diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-24 10:31:28 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-08-24 10:31:28 +0000 |
commit | 1003322f977add069c7ec91546274ffe22de493e (patch) | |
tree | 4152d6d05ebca4f989292b5bbb9660521b392199 /src/inc.c | |
parent | d99c5a9b8032f5290c640bcea7f406326c325c04 (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.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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) { |