aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-11-21 09:31:47 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-11-21 09:31:47 +0000
commitce48cec6937f7cab180cabd101586ab0f795c4e2 (patch)
treeb3635490c7a9e5fb6298f2852d2bee2dc8b6fc6c /src
parent706387299924733de026545cc7fd99fa15624278 (diff)
disable new mail notification when any message is displayed, marked as read, or trashes are emptied.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1333 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/folderview.c5
-rw-r--r--src/mainwindow.c2
-rw-r--r--src/summaryview.c19
3 files changed, 18 insertions, 8 deletions
diff --git a/src/folderview.c b/src/folderview.c
index 6c2937f7..cf04ffff 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -57,6 +57,7 @@
#include "procmsg.h"
#include "utils.h"
#include "gtkutils.h"
+#include "trayicon.h"
#include "prefs_common.h"
#include "prefs_account.h"
#include "prefs_folder_item.h"
@@ -2146,6 +2147,8 @@ static void folderview_mark_all_read_cb(FolderView *folderview, guint action,
else {
procmsg_mark_all_read(item);
folderview_update_item(item, FALSE);
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
}
}
@@ -2501,6 +2504,8 @@ static void folderview_empty_trash_cb(FolderView *folderview, guint action,
procmsg_empty_trash(folder->trash);
statusbar_pop_all();
folderview_update_item(folder->trash, TRUE);
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
open_path = gtk_tree_row_reference_get_path(folderview->opened);
if (open_path && sel_path &&
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 9d2a4edc..cb8c3d92 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1668,6 +1668,8 @@ void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
procmsg_empty_all_trash();
statusbar_pop_all();
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
for (list = folder_get_list(); list != NULL; list = list->next) {
Folder *folder;
diff --git a/src/summaryview.c b/src/summaryview.c
index 2ec78bb9..c01212d4 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -2576,10 +2576,6 @@ static void summary_display_msg_full(SummaryView *summaryview,
if (MSG_IS_NEW(msginfo->flags) ||
MSG_IS_UNREAD(msginfo->flags)) {
- if (MSG_IS_NEW(msginfo->flags)) {
- trayicon_set_tooltip(NULL);
- trayicon_set_notify(FALSE);
- }
MSG_UNSET_PERM_FLAGS
(msginfo->flags, MSG_NEW | MSG_UNREAD);
MSG_SET_TMP_FLAGS(msginfo->flags, MSG_FLAG_CHANGED);
@@ -2611,6 +2607,9 @@ static void summary_display_msg_full(SummaryView *summaryview,
summary_set_menu_sensitive(summaryview);
main_window_set_toolbar_sensitive(summaryview->mainwin);
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
+
statusbar_pop_all();
summary_unlock(summaryview);
@@ -2832,10 +2831,6 @@ static void summary_mark_row_as_read(SummaryView *summaryview,
}
if (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)) {
- if (MSG_IS_NEW(msginfo->flags)) {
- trayicon_set_tooltip(NULL);
- trayicon_set_notify(FALSE);
- }
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_NEW | MSG_UNREAD);
MSG_SET_TMP_FLAGS(msginfo->flags, MSG_FLAG_CHANGED);
summaryview->folder_item->mark_dirty = TRUE;
@@ -2874,6 +2869,8 @@ void summary_mark_as_read(SummaryView *summaryview)
SORT_UNBLOCK(SORT_BY_UNREAD);
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
summary_status_show(summaryview);
}
@@ -2964,6 +2961,8 @@ void summary_mark_thread_as_read(SummaryView *summaryview)
SORT_UNBLOCK(SORT_BY_UNREAD);
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
summary_status_show(summaryview);
}
@@ -3007,6 +3006,8 @@ void summary_mark_all_read(SummaryView *summaryview)
SORT_UNBLOCK(SORT_BY_UNREAD);
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
summary_status_show(summaryview);
}
@@ -5427,6 +5428,8 @@ static gboolean summary_button_pressed(GtkWidget *treeview,
if (MSG_IS_IMAP(msginfo->flags))
imap_msg_unset_perm_flags
(msginfo, MSG_NEW | MSG_UNREAD);
+ trayicon_set_tooltip(NULL);
+ trayicon_set_notify(FALSE);
summary_status_show(summaryview);
} else if (!MSG_IS_REPLIED(msginfo->flags) &&
!MSG_IS_FORWARDED(msginfo->flags)) {