[Commits] [SCM] claws branch, master, updated. 3.14.1-17-gc95de2b

claws at claws-mail.org claws at claws-mail.org
Thu Nov 17 20:19:12 CET 2016


The branch, master has been updated
       via  c95de2bcb0bfa98985909a0248019c2f7bba46fe (commit)
      from  81d0b58adc8a3e5960a88f566227b5f2e922ae9e (commit)

Summary of changes:
 src/summaryview.c |  200 ++++++++++++++++++-----------------------------------
 1 file changed, 67 insertions(+), 133 deletions(-)


- Log -----------------------------------------------------------------
commit c95de2bcb0bfa98985909a0248019c2f7bba46fe
Author: Paul <paul at claws-mail.org>
Date:   Thu Nov 17 19:19:08 2016 +0000

    fix 'Go to' moving off current, unopened msg, and dialogue to go next folder
    
    T

diff --git a/src/summaryview.c b/src/summaryview.c
index 204f065..4153341 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -1832,16 +1832,9 @@ void summary_select_next(SummaryView *summaryview)
 void summary_select_prev_unread(SummaryView *summaryview)
 {
 	GtkCMCTreeNode *node;
-	gboolean skip_cur = FALSE;
-
-	if (summaryview->displayed 
-	&&  summaryview->selected == summaryview->displayed) {
-		debug_print("skipping current\n");
-		skip_cur = TRUE;
-	}
 
 	node = summary_find_prev_flagged_msg
-		(summaryview, summaryview->selected, MSG_UNREAD, skip_cur);
+		(summaryview, summaryview->selected, MSG_UNREAD, TRUE);
 
 	if (!node || node == summaryview->selected) {
 		AlertValue val = 0;
@@ -1877,65 +1870,44 @@ void summary_select_prev_unread(SummaryView *summaryview)
 void summary_select_next_unread(SummaryView *summaryview)
 {
 	GtkCMCTreeNode *node = summaryview->selected;
-	gboolean skip_cur = FALSE;
-	
-	if (summaryview->displayed 
-	&&  summaryview->selected == summaryview->displayed) {
-		debug_print("skipping cur (%p %p)\n",
-			summaryview->displayed, summaryview->selected);
-		skip_cur = TRUE;
-	}
 
 	node = summary_find_next_flagged_msg
-		(summaryview, node, MSG_UNREAD, skip_cur);
+		(summaryview, node, MSG_UNREAD, TRUE);
 	
 	if (node)
 		summary_select_node(summaryview, node, -1);
 	else {
-		node = summary_find_next_flagged_msg
-			(summaryview, NULL, MSG_UNREAD, FALSE);
-		if (node == NULL || node == summaryview->selected) {
-			AlertValue val = 0;
-
- 			switch (prefs_common.next_unread_msg_dialog) {
- 				case NEXTUNREADMSGDIALOG_ALWAYS:
-					val = alertpanel(_("No more unread messages"),
-							 _("No unread message found. "
-							   "Go to next folder?"),
-							 GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
- 					break;
- 				case NEXTUNREADMSGDIALOG_ASSUME_YES:
- 					val = G_ALERTALTERNATE;
- 					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_ALERTALTERNATE)
-				folderview_select_next_with_flag(summaryview->folderview, MSG_UNREAD);
-		} else {
-			summary_select_node(summaryview, node, -1);
-		}
+		AlertValue val = 0;
+
+ 		switch (prefs_common.next_unread_msg_dialog) {
+ 			case NEXTUNREADMSGDIALOG_ALWAYS:
+				val = alertpanel(_("No more unread messages"),
+						 _("No unread message found. "
+						   "Go to next folder?"),
+						 GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ 				break;
+ 			case NEXTUNREADMSGDIALOG_ASSUME_YES:
+ 				val = G_ALERTALTERNATE;
+ 				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_ALERTALTERNATE)
+			folderview_select_next_with_flag(summaryview->folderview, MSG_UNREAD);
 	}
 }
 
 void summary_select_prev_new(SummaryView *summaryview)
 {
 	GtkCMCTreeNode *node;
-	gboolean skip_cur = FALSE;
-
-	if (summaryview->displayed 
-	&&  summaryview->selected == summaryview->displayed) {
-		debug_print("skipping current\n");
-		skip_cur = TRUE;
-	}
 
 	node = summary_find_prev_flagged_msg
-		(summaryview, summaryview->selected, MSG_NEW, skip_cur);
+		(summaryview, summaryview->selected, MSG_NEW, TRUE);
 
 	if (!node || node == summaryview->selected) {
 		AlertValue val = 0;
@@ -1971,53 +1943,34 @@ void summary_select_prev_new(SummaryView *summaryview)
 void summary_select_next_new(SummaryView *summaryview)
 {
 	GtkCMCTreeNode *node = summaryview->selected;
-	gboolean skip_cur = FALSE;
-	
-	if (summaryview->displayed 
-	&&  summaryview->selected == summaryview->displayed) {
-		debug_print("skipping cur (%p %p)\n",
-			summaryview->displayed, summaryview->selected);
-		skip_cur = TRUE;
-	}
 
 	node = summary_find_next_flagged_msg
-		(summaryview, node, MSG_NEW, skip_cur);
+		(summaryview, node, MSG_NEW, TRUE);
 	
 	if (node)
 		summary_select_node(summaryview, node, -1);
 	else {
-		node = summary_find_next_flagged_msg
-			(summaryview, NULL, MSG_NEW, FALSE);
-		if (node == NULL || node == summaryview->selected) {
-			AlertValue val = 0;
-
- 			switch (prefs_common.next_unread_msg_dialog) {
- 				case NEXTUNREADMSGDIALOG_ALWAYS:
-					val = alertpanel(_("No more new messages"),
-							 _("No new message found. "
-							   "Go to next folder?"),
-							 GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
- 					break;
- 				case NEXTUNREADMSGDIALOG_ASSUME_YES:
- 					val = G_ALERTALTERNATE;
- 					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_ALERTALTERNATE) {
-				folderview_select_next_with_flag(summaryview->folderview, MSG_NEW);
-				return;
-			} 
-			else
-				return;
-		} else
-			summary_select_node(summaryview, node, -1);
+		AlertValue val = 0;
 
+ 		switch (prefs_common.next_unread_msg_dialog) {
+ 			case NEXTUNREADMSGDIALOG_ALWAYS:
+				val = alertpanel(_("No more new messages"),
+						 _("No new message found. "
+						   "Go to next folder?"),
+						 GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ 				break;
+ 			case NEXTUNREADMSGDIALOG_ASSUME_YES:
+ 				val = G_ALERTALTERNATE;
+ 				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_ALERTALTERNATE)
+			folderview_select_next_with_flag(summaryview->folderview, MSG_NEW);
 	}
 }
 
@@ -2049,53 +2002,34 @@ void summary_select_prev_marked(SummaryView *summaryview)
 void summary_select_next_marked(SummaryView *summaryview)
 {
 	GtkCMCTreeNode *node = summaryview->selected;
-	gboolean skip_cur = FALSE;
-	
-	if (summaryview->displayed 
-	&&  summaryview->selected == summaryview->displayed) {
-		debug_print("skipping cur (%p %p)\n",
-			summaryview->displayed, summaryview->selected);
-		skip_cur = TRUE;
-	}
 
 	node = summary_find_next_flagged_msg
-		(summaryview, node, MSG_MARKED, skip_cur);
+		(summaryview, node, MSG_MARKED, TRUE);
 	
 	if (node)
 		summary_select_node(summaryview, node, -1);
 	else {
-		node = summary_find_next_flagged_msg
-			(summaryview, NULL, MSG_MARKED, FALSE);
-		if (node == NULL || node == summaryview->selected) {
-			AlertValue val = 0;
-
- 			switch (prefs_common.next_unread_msg_dialog) {
- 				case NEXTUNREADMSGDIALOG_ALWAYS:
-					val = alertpanel(_("No more marked messages"),
-							 _("No marked message found. "
-							   "Go to next folder?"),
-							 GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
- 					break;
- 				case NEXTUNREADMSGDIALOG_ASSUME_YES:
- 					val = G_ALERTALTERNATE;
- 					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_ALERTALTERNATE) {
-				folderview_select_next_with_flag(summaryview->folderview, MSG_MARKED);
-				return;
-			} 
-			else
-				return;
-		} else
-			summary_select_node(summaryview, node, -1);
+		AlertValue val = 0;
 
+ 		switch (prefs_common.next_unread_msg_dialog) {
+ 			case NEXTUNREADMSGDIALOG_ALWAYS:
+				val = alertpanel(_("No more marked messages"),
+						 _("No marked message found. "
+						   "Go to next folder?"),
+						 GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ 				break;
+ 			case NEXTUNREADMSGDIALOG_ASSUME_YES:
+ 				val = G_ALERTALTERNATE;
+ 				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_ALERTALTERNATE)
+			folderview_select_next_with_flag(summaryview->folderview, MSG_MARKED);
 	}
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list