[Commits] [SCM] claws branch, master, updated. 3.14.1-91-g91c5187

wwp at claws-mail.org wwp at claws-mail.org
Tue Jan 3 22:21:57 CET 2017


The branch, master has been updated
       via  91c518753963324156acb3da99129d784c503474 (commit)
      from  cdb10d81ebc19035e8b71ba5bda9e36431bc7cf5 (commit)

Summary of changes:
 src/folderutils.c |    2 +-
 src/folderview.c  |   10 +++-----
 src/summaryview.c |   66 +++++++++++++++++++++++++++++++++++------------------
 3 files changed, 48 insertions(+), 30 deletions(-)


- Log -----------------------------------------------------------------
commit 91c518753963324156acb3da99129d784c503474
Author: wwp <wwp at free.fr>
Date:   Tue Jan 3 22:20:59 2017 +0100

    Cosmetic changes: align arrays, remove debug statements.

diff --git a/src/folderutils.c b/src/folderutils.c
index 0a4c95c..ce2fe3c 100644
--- a/src/folderutils.c
+++ b/src/folderutils.c
@@ -116,7 +116,7 @@ gint folderutils_delete_duplicates(FolderItem *item,
 
 	debug_print("done.\n");
 
-	return dups;	
+	return dups;
 }
 
 void folderutils_mark_all_read(FolderItem *item)
diff --git a/src/folderview.c b/src/folderview.c
index 3fe8ccc..e837a28 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -243,12 +243,12 @@ GHashTable *folderview_popups;
 
 static GtkActionEntry folderview_common_popup_entries[] = 
 {
-	{"FolderViewPopup",			NULL, "FolderViewPopup" },
+	{"FolderViewPopup",			NULL, "FolderViewPopup", NULL, NULL , NULL},
 	{"FolderViewPopup/MarkAllRead",		NULL, N_("Mark all re_ad"), NULL, NULL, G_CALLBACK(mark_all_read_cb) },
 	{"FolderViewPopup/MarkAllUnread",		NULL, N_("Mark all u_nread"), NULL, NULL, G_CALLBACK(mark_all_unread_cb) },
 	{"FolderViewPopup/MarkAllReadRec",	NULL, N_("Mark all read recursi_vely"), NULL, NULL, G_CALLBACK(mark_all_read_recursive_cb) },
 	{"FolderViewPopup/MarkAllUnreadRec",	NULL, N_("Mark all unread recursi_vely"), NULL, NULL, G_CALLBACK(mark_all_unread_recursive_cb) },
-	{"FolderViewPopup/---",			NULL, "---" },
+	{"FolderViewPopup/---",			NULL, "---", NULL, NULL , NULL},
 	{"FolderViewPopup/RunProcessing",	NULL, N_("R_un processing rules"), NULL, NULL, G_CALLBACK(folderview_run_processing_cb) },
 	{"FolderViewPopup/SearchFolder",	NULL, N_("_Search folder..."), NULL, NULL, G_CALLBACK(folderview_search_cb) },
 	{"FolderViewPopup/Properties",		NULL, N_("_Properties..."), NULL, NULL, G_CALLBACK(folderview_property_cb) },
@@ -1422,17 +1422,13 @@ static gboolean folderview_have_read_children_sub(FolderView *folderview,
 		}
 	}
 
-debug_print("-> false 2 %s\n", item->name);
 	return FALSE;
 }
 
 static gboolean folderview_have_read_children(FolderView *folderview,
 						FolderItem *item)
 {
-gboolean ret;
-	 ret = folderview_have_read_children_sub(folderview, item, FALSE);
-debug_print("-> %s 0 (%d)\n", ret?"true":"false", ret);
-	return ret;
+	return folderview_have_read_children_sub(folderview, item, FALSE);
 }
 
 static gboolean folderview_have_matching_children_sub(FolderView *folderview,
diff --git a/src/summaryview.c b/src/summaryview.c
index 2bf5399..513df7b 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -423,31 +423,31 @@ GtkTargetEntry summary_drag_types[3] =
 
 static GtkActionEntry summary_popup_entries[] =
 {
-	{"SummaryViewPopup",				NULL, "SummaryViewPopup" },
-	{"SummaryViewPopup/ReplyTo",			NULL, N_("Repl_y to") },
-	{"SummaryViewPopup/Mark",			NULL, N_("_Mark") },
-	{"SummaryViewPopup/ColorLabel",			NULL, N_("Color la_bel") },
-	{"SummaryViewPopup/Tags",			NULL, N_("Ta_gs") },
-	{"SummaryViewPopup/CreateFilterRule",		NULL, N_("Create _filter rule") },
+	{"SummaryViewPopup",                      NULL, "SummaryViewPopup", NULL, NULL, NULL },
+	{"SummaryViewPopup/ReplyTo",              NULL, N_("Repl_y to"), NULL, NULL, NULL },
+	{"SummaryViewPopup/Mark",                 NULL, N_("_Mark"), NULL, NULL, NULL },
+	{"SummaryViewPopup/ColorLabel",           NULL, N_("Color la_bel"), NULL, NULL, NULL },
+	{"SummaryViewPopup/Tags",                 NULL, N_("Ta_gs"), NULL, NULL, NULL },
+	{"SummaryViewPopup/CreateFilterRule",     NULL, N_("Create _filter rule"), NULL, NULL, NULL },
 #ifndef GENERIC_UMPC
-	{"SummaryViewPopup/CreateProcessingRule",	NULL, N_("Create processing rule") },
+	{"SummaryViewPopup/CreateProcessingRule", NULL, N_("Create processing rule"), NULL, NULL, NULL },
 #endif
-	{"SummaryViewPopup/View",			NULL, N_("_View") },
+	{"SummaryViewPopup/View",                 NULL, N_("_View"), NULL, NULL, NULL },
 };
 
 static const gchar *const col_label[N_SUMMARY_COLS] = {
-	"",		/* S_COL_MARK    */
-	N_("S"),	/* S_COL_STATUS  */
-	"",		/* S_COL_MIME    */
-	N_("Subject"),	/* S_COL_SUBJECT */
-	N_("From"),	/* S_COL_FROM    */
-	N_("To"),	/* S_COL_TO      */
-	N_("Date"),	/* S_COL_DATE    */
-	N_("Size"),	/* S_COL_SIZE    */
-	N_("#"),	/* S_COL_NUMBER  */
-	N_("Score"),	/* S_COL_SCORE   */
-	"",		/* S_COL_LOCKED	 */
-	N_("Tags"),	/* S_COL_TAGS	 */
+	"",            /* S_COL_MARK    */
+	N_("S"),       /* S_COL_STATUS  */
+	"",            /* S_COL_MIME    */
+	N_("Subject"), /* S_COL_SUBJECT */
+	N_("From"),    /* S_COL_FROM    */
+	N_("To"),      /* S_COL_TO      */
+	N_("Date"),    /* S_COL_DATE    */
+	N_("Size"),    /* S_COL_SIZE    */
+	N_("#"),       /* S_COL_NUMBER  */
+	N_("Score"),   /* S_COL_SCORE   */
+	"",            /* S_COL_LOCKED  */
+	N_("Tags"),    /* S_COL_TAGS    */
 };
 
 void summary_freeze(SummaryView *summaryview)
@@ -1558,7 +1558,8 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
 				else
 					open_selected = 0;
 			}
-			summary_select_node(summaryview, node, open_selected);
+			debug_print("\n>> ask for NOT marking as read\n\n");
+			summary_select_node_no_mard_read(summaryview, node, open_selected);
 		}
 
 		summary_lock(summaryview);
@@ -2217,9 +2218,26 @@ static gboolean summary_select_retry(void *data)
  * 1, display the corresponding message in the message view, if
  * @force_display is -1, obey prefs_common.always_show_msg.
  **/
+static void summary_select_node_real(SummaryView *summaryview, GtkCMCTreeNode *node,
+			 gint force_display, gboolean ignore_mark_read);
+
 void summary_select_node(SummaryView *summaryview, GtkCMCTreeNode *node,
 			 gint force_display)
 {
+	summary_select_node_real(summaryview, node, force_display, FALSE);
+
+}
+
+void summary_select_node_no_mard_read(SummaryView *summaryview, GtkCMCTreeNode *node,
+			 gint force_display, gboolean ignore_mark_read)
+{
+	summary_select_node_real(summaryview, node, force_display, TRUE);
+
+}
+
+static void summary_select_node_real(SummaryView *summaryview, GtkCMCTreeNode *node,
+			 gint force_display, gboolean ignore_mark_read)
+{
 	GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree);
 	gboolean display_msg;
 	
@@ -2251,7 +2269,11 @@ void summary_select_node(SummaryView *summaryview, GtkCMCTreeNode *node,
 	if (!summaryview->folder_item)
 		return;
 	if (node) {
-		summary_cancel_mark_read_timeout(summaryview);
+		if (!ignore_mark_read) {
+			debug_print(">> marking as read\n");
+			summary_cancel_mark_read_timeout(summaryview);
+		} else
+			debug_print(">> NOT marking as read\n");
 		gtkut_ctree_expand_parent_all(ctree, node);
 
 		summary_lock(summaryview);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list