alert_panel but write virus message to statusbar instead.
#include "prefs.h"
#include "prefs_gtk.h"
#include "alertpanel.h"
#include "prefs.h"
#include "prefs_gtk.h"
#include "alertpanel.h"
+#include "prefs_common.h"
+#include "statusbar.h"
#include "clamav_plugin.h"
#include "clamd-plugin.h"
#include "clamav_plugin.h"
#include "clamd-plugin.h"
response buf;
int max;
struct stat info;
response buf;
int max;
struct stat info;
outfile = procmime_get_tmp_file_name(mimeinfo);
if (procmime_get_part(outfile, mimeinfo) < 0)
outfile = procmime_get_tmp_file_name(mimeinfo);
if (procmime_get_part(outfile, mimeinfo) < 0)
alertpanel_warning(_("Scanning\nClamd does not respond to ping.\nIs clamd running?"));
break;
case VIRUS:
alertpanel_warning(_("Scanning\nClamd does not respond to ping.\nIs clamd running?"));
break;
case VIRUS:
- g_warning("Detected %s virus.\n", clamd_get_virus_name(buf.msg));
- alertpanel_warning(_("Detected %s virus."), clamd_get_virus_name(buf.msg));
+ msg = g_strconcat(_("Detected %s virus."),
+ clamd_get_virus_name(buf.msg), NULL);
+ g_warning("%s\n", msg);
+ debug_print("no_recv: %d\n", prefs_common.no_recv_err_panel);
+ if (prefs_common.no_recv_err_panel) {
+ statusbar_print_all("%s", msg);
+ }
+ else {
+ alertpanel_warning("%s\n", msg);
+ }
+ g_free(msg);
break;
case SCAN_ERROR:
debug_print("Error: %s\n", buf.msg);
break;
case SCAN_ERROR:
debug_print("Error: %s\n", buf.msg);
return (result->status == OK) ? FALSE : TRUE;
}
return (result->status == OK) ? FALSE : TRUE;
}