diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-01 07:11:37 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-01 07:11:37 +0000 |
commit | 505aec587f9d21336b813eafe59ad2efd60cfbd1 (patch) | |
tree | c747ee3136805e29cbb8c2b49924c601a75bc587 /src/folderview.c | |
parent | 66c701ac9305c87aeef631dc58a9b1c92ba76b43 (diff) |
added 'Update summary' to the context menu of folder view.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@794 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/folderview.c')
-rw-r--r-- | src/folderview.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/folderview.c b/src/folderview.c index 8d88774a..dc9092d6 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -164,6 +164,10 @@ static void folderview_update_tree_cb (FolderView *folderview, guint action, GtkWidget *widget); +static void folderview_update_summary_cb(FolderView *folderview, + guint action, + GtkWidget *widget); + static void folderview_new_folder_cb (FolderView *folderview, guint action, GtkWidget *widget); @@ -241,6 +245,7 @@ static GtkItemFactoryEntry folderview_mail_popup_entries[] = {N_("/_Check for new messages"), NULL, folderview_update_tree_cb, 0, NULL}, {N_("/R_ebuild folder tree"), NULL, folderview_update_tree_cb, 1, NULL}, + {N_("/_Update summary"), NULL, folderview_update_summary_cb, 0, NULL}, {N_("/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Search messages..."), NULL, folderview_search_cb, 0, NULL}, {N_("/_Properties..."), NULL, folderview_property_cb, 0, NULL} @@ -260,6 +265,7 @@ static GtkItemFactoryEntry folderview_imap_popup_entries[] = {N_("/_Check for new messages"), NULL, folderview_update_tree_cb, 0, NULL}, {N_("/R_ebuild folder tree"), NULL, folderview_update_tree_cb, 1, NULL}, + {N_("/_Update summary"), NULL, folderview_update_summary_cb, 0, NULL}, {N_("/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Search messages..."), NULL, folderview_search_cb, 0, NULL}, {N_("/_Properties..."), NULL, folderview_property_cb, 0, NULL} @@ -275,6 +281,7 @@ static GtkItemFactoryEntry folderview_news_popup_entries[] = {N_("/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Check for new messages"), NULL, folderview_update_tree_cb, 0, NULL}, + {N_("/_Update summary"), NULL, folderview_update_summary_cb, 0, NULL}, {N_("/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Search messages..."), NULL, folderview_search_cb, 0, NULL}, {N_("/_Properties..."), NULL, folderview_property_cb, 0, NULL} @@ -1467,6 +1474,7 @@ static gboolean folderview_menu_popup(FolderView *folderview, gboolean empty_trash = FALSE; gboolean download_msg = FALSE; gboolean update_tree = FALSE; + gboolean update_summary = FALSE; gboolean rescan_tree = FALSE; gboolean remove_tree = FALSE; gboolean search_folder = FALSE; @@ -1492,9 +1500,11 @@ static gboolean folderview_menu_popup(FolderView *folderview, if (item->parent == NULL) { update_tree = remove_tree = TRUE; } else { - if (gtkut_tree_row_reference_equal(folderview->selected, - folderview->opened)) + if (gtkut_tree_row_reference_equal + (folderview->selected, folderview->opened)) { + update_summary = TRUE; search_folder = TRUE; + } } if (FOLDER_IS_LOCAL(folder) || FOLDER_TYPE(folder) == F_IMAP) { if (item->parent == NULL) @@ -1529,6 +1539,7 @@ static gboolean folderview_menu_popup(FolderView *folderview, SET_SENS(mail_factory, "/Empty trash", empty_trash); SET_SENS(mail_factory, "/Check for new messages", update_tree); SET_SENS(mail_factory, "/Rebuild folder tree", rescan_tree); + SET_SENS(mail_factory, "/Update summary", update_summary); SET_SENS(mail_factory, "/Search messages...", search_folder); SET_SENS(mail_factory, "/Properties...", folder_property); } else if (FOLDER_TYPE(folder) == F_IMAP) { @@ -1542,6 +1553,7 @@ static gboolean folderview_menu_popup(FolderView *folderview, SET_SENS(imap_factory, "/Download", download_msg); SET_SENS(imap_factory, "/Check for new messages", update_tree); SET_SENS(imap_factory, "/Rebuild folder tree", rescan_tree); + SET_SENS(imap_factory, "/Update summary", update_summary); SET_SENS(imap_factory, "/Search messages...", search_folder); SET_SENS(imap_factory, "/Properties...", folder_property); } else if (FOLDER_TYPE(folder) == F_NEWS) { @@ -1551,6 +1563,7 @@ static gboolean folderview_menu_popup(FolderView *folderview, SET_SENS(news_factory, "/Remove newsgroup", delete_folder); SET_SENS(news_factory, "/Download", download_msg); SET_SENS(news_factory, "/Check for new messages", update_tree); + SET_SENS(news_factory, "/Update summary", update_summary); SET_SENS(news_factory, "/Search messages...", search_folder); SET_SENS(news_factory, "/Properties...", folder_property); } else @@ -1928,6 +1941,17 @@ static void folderview_update_tree_cb(FolderView *folderview, guint action, folderview_rescan_tree(folderview, item->folder); } +static void folderview_update_summary_cb(FolderView *folderview, guint action, + GtkWidget *widget) +{ + if (!folderview->summaryview->folder_item) + return; + + GTK_EVENTS_FLUSH(); + summary_show(folderview->summaryview, + folderview->summaryview->folder_item, TRUE); +} + static void folderview_new_folder_cb(FolderView *folderview, guint action, GtkWidget *widget) { |