move 'Mark all read' to folder view menu
authorPaul Mangan <paul@claws-mail.org>
Sat, 26 Jan 2002 08:34:33 +0000 (08:34 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 26 Jan 2002 08:34:33 +0000 (08:34 +0000)
AUTHORS
ChangeLog.claws
configure.in
src/folderview.c
src/summaryview.c

diff --git a/AUTHORS b/AUTHORS
index 9bba4d3..cd3f173 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -111,4 +111,5 @@ contributors (beside the above; based on Changelog)
        Motonobu Ichimura
        Luca Rosellini
        Yasuzaki Masayoshi
-       Stoyen Genov
+       Stoyan Genov
+       Jeremy Andrews
index 7e018e2..aa75189 100644 (file)
@@ -1,10 +1,18 @@
-2001-01-25 [alfons]    0.7.0claws28
+2002-01-26 [paul]      0.7.0claws29
+
+       * src/folderview.c
+         src/summaryview.c
+               move 'Mark all read' from summary view to folder view
+               menu. (adapted from) patch submitted by Jeremy Andrews,
+               <lists@kerneltrap.com>
+
+2002-01-25 [alfons]    0.7.0claws28
 
        * src/gtkstext.c
                put the gtk class name back so GtkSText adapts the 
                settings of GtkText
 
-2001-01-25 [alfons]    0.7.0claws27
+2002-01-25 [alfons]    0.7.0claws27
 
        * src/folderview.c 
                assimilate Ricardo's patch that shows pixmaps instead of
@@ -16,7 +24,7 @@
        * src/Makefile.am
                add $(GPGME_CFLAGS) to INCLUDES so that gpgme can 
                be found in non-standard locations. 
-               Closes Patch #507976, submitted by Stoyen Genov.
+               Closes Patch #507976, submitted by Stoyan Genov, <sdg@rila.bg>
 
 2002-01-25 [paul]      0.7.0claws25
 
index 70f3a11..27c824a 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws28
+EXTRA_VERSION=claws29
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index ef34007..367505d 100644 (file)
@@ -166,6 +166,9 @@ static void folderview_update_tree_cb       (FolderView     *folderview,
                                         guint           action,
                                         GtkWidget      *widget);
 
+static void mark_all_read_cb            (FolderView    *folderview,
+                                         guint           action,
+                                         GtkWidget      *widget);
 static void folderview_new_folder_cb   (FolderView     *folderview,
                                         guint           action,
                                         GtkWidget      *widget);
@@ -248,6 +251,8 @@ static GtkItemFactoryEntry folderview_mbox_popup_entries[] =
 
 static GtkItemFactoryEntry folderview_mail_popup_entries[] =
 {
+       {N_("/Mark all _read"),         NULL, mark_all_read_cb, 0, NULL},
+       {N_("/---"),                    NULL, NULL, 0, "<Separator>"},
        {N_("/Create _new folder..."),  NULL, folderview_new_folder_cb,    0, NULL},
        {N_("/_Rename folder..."),      NULL, folderview_rename_folder_cb, 0, NULL},
        {N_("/_Delete folder"),         NULL, folderview_delete_folder_cb, 0, NULL},
@@ -571,6 +576,13 @@ void folderview_select(FolderView *folderview, FolderItem *item)
                folder_update_op_count();
 }
 
+static void mark_all_read_cb(FolderView *folderview, guint action,
+                             GtkWidget *widget)
+{
+       if (!folderview->selected) return;
+               summary_mark_all_read(folderview->summaryview);
+}
+
 static void folderview_select_node(FolderView *folderview, GtkCTreeNode *node)
 {
        GtkCTree *ctree = GTK_CTREE(folderview->ctree);
@@ -1307,6 +1319,7 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
        FolderItem *item;
        Folder *folder;
        GtkWidget *popup;
+       gboolean mark_all_read   = FALSE;
        gboolean new_folder      = FALSE;
        gboolean rename_folder   = FALSE;
        gboolean delete_folder   = FALSE;
@@ -1363,7 +1376,7 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
                if (item->parent == NULL)
                        update_tree = remove_tree = TRUE;
                else
-                       search_folder = TRUE;
+                       mark_all_read = search_folder = TRUE;
                if (FOLDER_IS_LOCAL(folder) || FOLDER_TYPE(folder) == F_IMAP || FOLDER_TYPE(folder) == F_MBOX) {
                        if (item->parent == NULL)
                                update_tree = rescan_tree = TRUE;
@@ -1379,6 +1392,8 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
                        if (item->parent != NULL)
                                delete_folder = folder_scoring = folder_processing = TRUE;
                }
+               if (item->unread < 1) 
+                       mark_all_read = FALSE;
        }
 
 #define SET_SENS(factory, name, sens) \
@@ -1387,6 +1402,7 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
        if (FOLDER_IS_LOCAL(folder)) {
                popup = folderview->mail_popup;
                menu_set_insensitive_all(GTK_MENU_SHELL(popup));
+               SET_SENS(mail_factory, "/Mark all read", mark_all_read);
                SET_SENS(mail_factory, "/Create new folder...", new_folder);
                SET_SENS(mail_factory, "/Rename folder...", rename_folder);
                SET_SENS(mail_factory, "/Delete folder", delete_folder);
index 2b07f57..136c275 100644 (file)
@@ -406,7 +406,6 @@ static GtkItemFactoryEntry summary_popup_entries[] =
        {N_("/_Mark/---"),              NULL, NULL,             0, "<Separator>"},
        {N_("/_Mark/Mark as unr_ead"),  NULL, summary_mark_as_unread, 0, NULL},
        {N_("/_Mark/Mark as rea_d"),    NULL, summary_mark_as_read, 0, NULL},
-       {N_("/_Mark/Mark all read"),    NULL, summary_mark_all_read, 0, NULL},
        {N_("/_Mark/Ignore thread"),    NULL, summary_ignore_thread, 0, NULL},
        {N_("/_Mark/Unignore thread"),  NULL, summary_unignore_thread, 0, NULL},
        {N_("/Color la_bel"),           NULL, NULL,             0, NULL},
@@ -1046,7 +1045,6 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
 
        menu_set_sensitive(ifactory, "/Mark/Mark as unread", TRUE);
        menu_set_sensitive(ifactory, "/Mark/Mark as read",   TRUE);
-       menu_set_sensitive(ifactory, "/Mark/Mark all read", TRUE);
        menu_set_sensitive(ifactory, "/Mark/Ignore thread",   TRUE);
        menu_set_sensitive(ifactory, "/Mark/Unignore thread", TRUE);