Automatically find unread messages in current folder
authorColin Leroy <colin@colino.net>
Sun, 9 Jun 2002 22:01:49 +0000 (22:01 +0000)
committerColin Leroy <colin@colino.net>
Sun, 9 Jun 2002 22:01:49 +0000 (22:01 +0000)
before annoying the user.

ChangeLog.claws
configure.in
src/summaryview.c

index a438b088e35c8407c6fefe74a3650f3bb6495982..a1ba57a66cba4bf7e626e4764e4dbcee3b8263ca 100644 (file)
@@ -1,3 +1,9 @@
+2002-06-09 [colin]     0.7.6claws34
+       
+       *src/summaryview.c
+               Automatically find unread messages in current folder
+               before annoying the user.
+
 2002-06-08 [alfons]    0.7.6claws33
 
        * po/it.po
index 87bc84932a3b8237e988f668e8d17d62de219f5d..d19f612973a6df3ea22cede4dfb8b983e78219af 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws33
+EXTRA_VERSION=claws34
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 05d174fb20750e4bd5e1d6039e5ac4ed85a2080a..20a0f63efa733e30f455bda2e6b44bed654286a6 100644 (file)
@@ -1155,43 +1155,48 @@ void summary_select_next_unread(SummaryView *summaryview)
        GtkCTreeNode *node = summaryview->selected;
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
 
-       while ((node = summary_find_next_unread_msg(summaryview, node)) == NULL) {
-               AlertValue val;
-
-               switch (prefs_common.next_unread_msg_dialog) {
-                       case NEXTUNREADMSGDIALOG_ALWAYS:
-                               val = alertpanel(_("No more unread messages"),
-                                                _("No unread message found. "
-                                                  "Go to next folder?"),
-                                                _("Yes"), _("Search again"), _("No"));
-                               break;
-                       case NEXTUNREADMSGDIALOG_ASSUME_YES:
-                               val = G_ALERTDEFAULT;
-                               break;
-                       case NEXTUNREADMSGDIALOG_ASSUME_NO:
-                               val = G_ALERTOTHER;
-                               break;
-                       default:
-                               debug_print(
-                                       _("Internal error: unexpected value for prefs_common.next_unread_msg_dialog\n"));
-               }
-
-               if (val == G_ALERTDEFAULT) {
-                       if (gtk_signal_n_emissions_by_name
-                               (GTK_OBJECT(ctree), "key_press_event") > 0)
-                                       gtk_signal_emit_stop_by_name
-                                               (GTK_OBJECT(ctree),
-                                                "key_press_event");
-                       folderview_select_next_unread(summaryview->folderview);
-                       return;
-               } else if (val == G_ALERTALTERNATE)
-                       node = NULL;
-               else
-                       return;
-       }
-
+       node = summary_find_next_unread_msg(summaryview, node);
+       
        if (node)
                summary_select_node(summaryview, node, TRUE, FALSE);
+       else {
+               node = summary_find_next_unread_msg(summaryview, NULL);
+               if (node == NULL) {
+                       AlertValue val;
+
+                       switch (prefs_common.next_unread_msg_dialog) {
+                               case NEXTUNREADMSGDIALOG_ALWAYS:
+                                       val = alertpanel(_("No more unread messages"),
+                                                        _("No unread message found. "
+                                                          "Go to next folder?"),
+                                                        _("Yes"), _("No"), NULL);
+                                       break;
+                               case NEXTUNREADMSGDIALOG_ASSUME_YES:
+                                       val = G_ALERTDEFAULT;
+                                       break;
+                               case NEXTUNREADMSGDIALOG_ASSUME_NO:
+                                       val = G_ALERTOTHER;
+                                       break;
+                               default:
+                                       debug_print(
+                                               _("Internal error: unexpected value for prefs_common.next_unread_msg_dialog\n"));
+                       }
+
+                       if (val == G_ALERTDEFAULT) {
+                               if (gtk_signal_n_emissions_by_name
+                                       (GTK_OBJECT(ctree), "key_press_event") > 0)
+                                               gtk_signal_emit_stop_by_name
+                                                       (GTK_OBJECT(ctree),
+                                                        "key_press_event");
+                               folderview_select_next_unread(summaryview->folderview);
+                               return;
+                       } 
+                       else
+                               return;
+               } else
+                       summary_select_node(summaryview, node, TRUE, FALSE);
+
+       }
 }
 
 void summary_select_prev_marked(SummaryView *summaryview)