fix 'No more unread messages' persistant pop-up window bug
authorPaul Mangan <paul@claws-mail.org>
Tue, 25 Jun 2002 15:24:58 +0000 (15:24 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 25 Jun 2002 15:24:58 +0000 (15:24 +0000)
ChangeLog.claws
configure.in
src/summaryview.c

index 4e33895a2039811b3b7df9de0cf51d6e1a35e701..f5b1c518ed41f055d165133cbafef18dd2111285 100644 (file)
@@ -1,3 +1,9 @@
+2002-06-25 [paul]      0.7.8claws24
+
+       * src/summaryview.c
+               fix "No more unread messages" persistant pop-up
+               window bug
+
 2002-06-25 [paul]      0.7.8claws23
 
        * po/it.po
index 7e4fca39cfeaf3605b540957e08c78d10a84c634..847e126a243d7e5608f497ac7368630b30161d4c 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws23
+EXTRA_VERSION=claws24
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index b70b4cb29e82cff6c956e7e2701b247d73900b5a..f8f9a4dbc59ffc3fa225e30bcc2e1c2feaaad5db 100644 (file)
@@ -1150,44 +1150,50 @@ void summary_select_next_unread(SummaryView *summaryview)
        GtkCTreeNode *node = summaryview->selected;
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
 
-       while ((node = summary_find_next_flagged_msg
-               (summaryview, node, MSG_UNREAD, FALSE)) == 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 if (val == G_ALERTALTERNATE)
-                       node = NULL;
-               else
-                       return;
-       }
-
+       node = summary_find_next_flagged_msg
+               (summaryview, node, MSG_UNREAD, FALSE);
+       
        if (node)
                summary_select_node(summaryview, node, TRUE, FALSE);
+       else {
+               node = summary_find_next_flagged_msg
+                       (summaryview, NULL, MSG_UNREAD, FALSE);
+               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_new(SummaryView *summaryview)