[Commits] [SCM] claws branch, master, updated. 3.16.0-4-g3e51045

claws at claws-mail.org claws at claws-mail.org
Tue Dec 19 12:40:37 CET 2017


The branch, master has been updated
       via  3e51045f2f786606104edf349d5f56dd482e57a9 (commit)
      from  174c03f1931636ba6a47415619c18ce5af572d69 (commit)

Summary of changes:
 src/folderview.c         |    8 ++++----
 src/prefs_common.c       |    6 ++++++
 src/prefs_common.h       |   13 ++++++++-----
 src/prefs_summary_open.c |   34 ++++++++++++++++++++--------------
 src/prefs_summary_open.h |    2 +-
 src/summaryview.c        |   34 +++++++++++++++++++++++++++++-----
 6 files changed, 68 insertions(+), 29 deletions(-)


- Log -----------------------------------------------------------------
commit 3e51045f2f786606104edf349d5f56dd482e57a9
Author: Paul <paul at claws-mail.org>
Date:   Tue Dec 19 11:40:33 2017 +0000

    extend 'default selection when entering a folder'
    
    Renamed 'first ...' to 'oldest ...', and added 'newest ...' in GUI

diff --git a/src/folderview.c b/src/folderview.c
index 31a8cea..ff84755 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -995,16 +995,16 @@ void folderview_select_next_with_flag(FolderView *folderview,
 	
 	switch (flag) {
 	case MSG_UNREAD:
-		prefs_common.summary_select_prio[0] = ACTION_UNREAD;
+		prefs_common.summary_select_prio[0] = ACTION_OLDEST_UNREAD;
 		break;
 	case MSG_NEW:
-		prefs_common.summary_select_prio[0] = ACTION_NEW;
+		prefs_common.summary_select_prio[0] = ACTION_OLDEST_NEW;
 		break;
 	case MSG_MARKED:
-		prefs_common.summary_select_prio[0] = ACTION_MARKED;
+		prefs_common.summary_select_prio[0] = ACTION_OLDEST_MARKED;
 		break;
 	default:
-		prefs_common.summary_select_prio[0] = ACTION_FIRST_LIST;
+		prefs_common.summary_select_prio[0] = ACTION_OLDEST_LIST;
 		break;
 	}
 
diff --git a/src/prefs_common.c b/src/prefs_common.c
index 5a5ee4f..4b42e65 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -836,6 +836,12 @@ static PrefParam param[] = {
 	 NULL, NULL, NULL},
 	{"summary_select_prio7", "0", &prefs_common.summary_select_prio[6], P_ENUM,
 	 NULL, NULL, NULL},
+	{"summary_select_prio8", "0", &prefs_common.summary_select_prio[7], P_ENUM,
+	 NULL, NULL, NULL},
+	{"summary_select_prio9", "0", &prefs_common.summary_select_prio[8], P_ENUM,
+	 NULL, NULL, NULL},
+	{"summary_select_prio10", "0", &prefs_common.summary_select_prio[9], P_ENUM,
+	 NULL, NULL, NULL},
 
 	{"mark_as_read_on_new_window", "FALSE",
 	 &prefs_common.mark_as_read_on_new_window,
diff --git a/src/prefs_common.h b/src/prefs_common.h
index b94d34c..702db3d 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -74,13 +74,16 @@ typedef enum
 typedef enum
 {
 	ACTION_UNSET = 0, /* for backward compatibility */
-	ACTION_MARKED,
-	ACTION_NEW,
-	ACTION_UNREAD,
+	ACTION_OLDEST_MARKED,
+	ACTION_OLDEST_NEW,
+	ACTION_OLDEST_UNREAD,
 	ACTION_LAST_OPENED,
-	ACTION_LAST_LIST,
+	ACTION_NEWEST_LIST,
 	ACTION_NOTHING,
-	ACTION_FIRST_LIST
+	ACTION_OLDEST_LIST,
+	ACTION_NEWEST_MARKED,
+	ACTION_NEWEST_NEW,
+	ACTION_NEWEST_UNREAD
 } EntryAction;
 
 typedef enum
diff --git a/src/prefs_summary_open.c b/src/prefs_summary_open.c
index 00dfecd..9331e45 100644
--- a/src/prefs_summary_open.c
+++ b/src/prefs_summary_open.c
@@ -106,13 +106,16 @@ static EntryAction saved_summary_select_prio[SUMMARY_OPEN_ACTIONS-1];
 
 static gchar *action_name[SUMMARY_OPEN_ACTIONS] = 
 {	  ("UNSET (!)"),
-	 N_("first marked email"),
-	 N_("first new email"),
-	 N_("first unread email"),
+	 N_("oldest marked email"),
+	 N_("oldest new email"),
+	 N_("oldest unread email"),
 	 N_("last opened email"),
-	 N_("last email in the list"),
+	 N_("newest email in the list"),
 	 N_("none"),
-	 N_("first email in the list")
+	 N_("oldest email in the list"),
+	 N_("newest marked email"),
+	 N_("newest new email"),
+	 N_("newest unread email")
 };
 
 void prefs_summary_open_open(void)
@@ -314,27 +317,30 @@ static void prefs_summary_open_create(void)
 	prefs_common.summary_select_prio[4] = ACTION_UNSET;		\
 	prefs_common.summary_select_prio[5] = ACTION_UNSET;		\
 	prefs_common.summary_select_prio[6] = ACTION_UNSET;		\
-}							
+	prefs_common.summary_select_prio[7] = ACTION_UNSET;		\
+	prefs_common.summary_select_prio[8] = ACTION_UNSET;		\
+	prefs_common.summary_select_prio[9] = ACTION_UNSET;		\
+}
 
 void prefs_summary_open_set_defaults(void)
 {
  	switch (prefs_common.select_on_entry) {
  		case SELECTONENTRY_MNU:
-			SET_PRIO(ACTION_MARKED, ACTION_NEW, ACTION_UNREAD, ACTION_LAST_LIST); break;
+			SET_PRIO(ACTION_OLDEST_MARKED, ACTION_OLDEST_NEW, ACTION_OLDEST_UNREAD, ACTION_NEWEST_LIST); break;
  		case SELECTONENTRY_MUN:
-			SET_PRIO(ACTION_MARKED, ACTION_UNREAD, ACTION_NEW, ACTION_LAST_LIST); break;
+			SET_PRIO(ACTION_OLDEST_MARKED, ACTION_OLDEST_UNREAD, ACTION_OLDEST_NEW, ACTION_NEWEST_LIST); break;
  		case SELECTONENTRY_NMU:
-			SET_PRIO(ACTION_NEW, ACTION_MARKED, ACTION_UNREAD, ACTION_LAST_LIST); break;
+			SET_PRIO(ACTION_OLDEST_NEW, ACTION_OLDEST_MARKED, ACTION_OLDEST_UNREAD, ACTION_NEWEST_LIST); break;
  		case SELECTONENTRY_NUM:
-			SET_PRIO(ACTION_NEW, ACTION_UNREAD, ACTION_MARKED, ACTION_LAST_LIST); break;
+			SET_PRIO(ACTION_OLDEST_NEW, ACTION_OLDEST_UNREAD, ACTION_OLDEST_MARKED, ACTION_NEWEST_LIST); break;
  		case SELECTONENTRY_UNM:
-			SET_PRIO(ACTION_UNREAD, ACTION_NEW, ACTION_MARKED, ACTION_LAST_LIST); break;
+			SET_PRIO(ACTION_OLDEST_UNREAD, ACTION_OLDEST_NEW, ACTION_OLDEST_MARKED, ACTION_NEWEST_LIST); break;
  		case SELECTONENTRY_UMN:
-			SET_PRIO(ACTION_UNREAD, ACTION_MARKED, ACTION_NEW, ACTION_LAST_LIST); break;
+			SET_PRIO(ACTION_OLDEST_UNREAD, ACTION_OLDEST_MARKED, ACTION_OLDEST_NEW, ACTION_NEWEST_LIST); break;
 		case SELECTONENTRY_LAST:
-			SET_PRIO(ACTION_LAST_OPENED, ACTION_LAST_LIST, ACTION_UNSET, ACTION_UNSET); break;
+			SET_PRIO(ACTION_LAST_OPENED, ACTION_NEWEST_LIST, ACTION_UNSET, ACTION_UNSET); break;
 		case SELECTONENTRY_NOTHING:
-			SET_PRIO(ACTION_LAST_LIST, ACTION_UNSET, ACTION_UNSET, ACTION_UNSET); break;
+			SET_PRIO(ACTION_NEWEST_LIST, ACTION_UNSET, ACTION_UNSET, ACTION_UNSET); break;
 		default:
 			break;
 	}
diff --git a/src/prefs_summary_open.h b/src/prefs_summary_open.h
index f6e16df..e0f0a14 100644
--- a/src/prefs_summary_open.h
+++ b/src/prefs_summary_open.h
@@ -20,7 +20,7 @@
 #ifndef __PREFS_SUMMARY_OPEN_H__
 #define __PREFS_SUMMARY_OPEN_H__
 
-#define SUMMARY_OPEN_ACTIONS 8
+#define SUMMARY_OPEN_ACTIONS 11
 
 void prefs_summary_open_open		(void);
 void prefs_summary_open_set_defaults	(void);
diff --git a/src/summaryview.c b/src/summaryview.c
index ebb344f..deaac7b 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -1518,7 +1518,7 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
 			EntryAction act = prefs_common.summary_select_prio[i];
 			
 			switch(act) {
-			case ACTION_MARKED:
+			case ACTION_OLDEST_MARKED:
 				if (summaryview->sort_type == SORT_ASCENDING)
 					node = summary_find_next_flagged_msg(summaryview, NULL,
 					     MSG_MARKED, FALSE);
@@ -1526,7 +1526,15 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
 					node = summary_find_prev_flagged_msg(summaryview, NULL,
 					     MSG_MARKED, FALSE);
 				break;
-			case ACTION_NEW:
+			case ACTION_NEWEST_MARKED:
+				if (summaryview->sort_type == SORT_ASCENDING)
+					node = summary_find_prev_flagged_msg(summaryview, NULL,
+					     MSG_MARKED, FALSE);
+				else
+					node = summary_find_next_flagged_msg(summaryview, NULL,
+					     MSG_MARKED, FALSE);
+				break;
+			case ACTION_OLDEST_NEW:
 				if (summaryview->sort_type == SORT_ASCENDING)
 					node = summary_find_next_flagged_msg(summaryview, NULL,
 					     MSG_NEW, FALSE);
@@ -1534,7 +1542,15 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
 					node = summary_find_prev_flagged_msg(summaryview, NULL,
 					     MSG_NEW, FALSE);
 				break;
-			case ACTION_UNREAD:
+			case ACTION_NEWEST_NEW:
+				if (summaryview->sort_type == SORT_ASCENDING)
+					node = summary_find_prev_flagged_msg(summaryview, NULL,
+					     MSG_NEW, FALSE);
+				else
+					node = summary_find_next_flagged_msg(summaryview, NULL,
+					     MSG_NEW, FALSE);
+				break;
+			case ACTION_OLDEST_UNREAD:
 				if (summaryview->sort_type == SORT_ASCENDING)
 					node = summary_find_next_flagged_msg(summaryview, NULL,
 					     MSG_UNREAD, FALSE);
@@ -1542,13 +1558,21 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
 					node = summary_find_prev_flagged_msg(summaryview, NULL,
 					     MSG_UNREAD, FALSE);
 				break;
+			case ACTION_NEWEST_UNREAD:
+				if (summaryview->sort_type == SORT_ASCENDING)
+					node = summary_find_prev_flagged_msg(summaryview, NULL,
+					     MSG_UNREAD, FALSE);
+				else
+					node = summary_find_next_flagged_msg(summaryview, NULL,
+					     MSG_UNREAD, FALSE);
+				break;
 			case ACTION_LAST_OPENED:
 				if (summaryview->folder_item) {
 					node = summary_find_msg_by_msgnum(summaryview, 
 							summaryview->folder_item->last_seen);
 				}
 				break;
-			case ACTION_LAST_LIST:
+			case ACTION_NEWEST_LIST:
 				if (GTK_CMCLIST(ctree)->row_list != NULL) {
 					node = gtk_cmctree_node_nth
 						(ctree,
@@ -1556,7 +1580,7 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
 						 ? 0 : GTK_CMCLIST(ctree)->rows - 1);
 				}
 				break;
-			case ACTION_FIRST_LIST:
+			case ACTION_OLDEST_LIST:
 				if (GTK_CMCLIST(ctree)->row_list != NULL) {
 					node = gtk_cmctree_node_nth
 						(ctree,

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list