aboutsummaryrefslogtreecommitdiff
path: root/src/inc.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-08-24 10:31:28 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-08-24 10:31:28 +0000
commit1003322f977add069c7ec91546274ffe22de493e (patch)
tree4152d6d05ebca4f989292b5bbb9660521b392199 /src/inc.c
parentd99c5a9b8032f5290c640bcea7f406326c325c04 (diff)
separated trayicon into another module, and notify new messages with trayicon on receive.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@510 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/inc.c')
-rw-r--r--src/inc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/inc.c b/src/inc.c
index 70c61560..0fe78bbb 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -56,6 +56,7 @@
#include "progressdialog.h"
#include "inputdialog.h"
#include "alertpanel.h"
+#include "trayicon.h"
#include "filter.h"
#include "folder.h"
@@ -151,6 +152,16 @@ static void inc_finished(MainWindow *mainwin, gint new_messages)
if (prefs_common.scan_all_after_inc)
folderview_check_new(NULL);
+ if (new_messages > 0) {
+ gchar buf[1024];
+
+ g_snprintf(buf, sizeof(buf), _("Sylpheed: %d new messages"),
+ new_messages);
+ trayicon_set_tooltip(buf);
+ } else {
+ trayicon_set_tooltip(_("Sylpheed"));
+ }
+
if (new_messages <= 0 && !prefs_common.scan_all_after_inc) return;
if (prefs_common.open_inbox_on_inc) {