[Commits] [SCM] claws branch, master, updated. 3.13.0-14-gce08ae9

ticho at claws-mail.org ticho at claws-mail.org
Sun Oct 18 02:50:09 CEST 2015


The branch, master has been updated
       via  ce08ae91d0e8aa1688de420160593e9e97c3040d (commit)
      from  4ff162b471715c0594d78dcaacc23a0edcacc69f (commit)

Summary of changes:
 src/summaryview.c |   24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit ce08ae91d0e8aa1688de420160593e9e97c3040d
Author: Andrej Kacian <andrej at kacian.sk>
Date:   Sun Oct 18 02:46:40 2015 +0200

    Fix Shift+arrowkeys selection behavior in summaryview.
    
    This fixes bugs #1959, #2490 (unselected lines still
    appearing as selected), as well as #3513.

diff --git a/src/summaryview.c b/src/summaryview.c
index 4717efb..aaf4d24 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -6796,12 +6796,28 @@ static gboolean summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
 		return TRUE;
 	case GDK_KEY_Home:
 	case GDK_KEY_End:
+	case GDK_KEY_Up:
+	case GDK_KEY_Down:
 		if ((node = summaryview->selected) != NULL) {
 			GtkCMCTreeNode *next = NULL;
-			next = (event->keyval == GDK_KEY_Home)
-					? gtk_cmctree_node_nth(ctree, 0)
-					: gtk_cmctree_node_nth(ctree, 
-						g_list_length(GTK_CMCLIST(ctree)->row_list)-1);
+			switch (event->keyval) {
+				case GDK_KEY_Home:
+					next = gtk_cmctree_node_nth(ctree, 0);
+					break;
+				case GDK_KEY_End:
+					next = gtk_cmctree_node_nth(ctree,
+							g_list_length(GTK_CMCLIST(ctree)->row_list)-1);
+					break;
+				case GDK_KEY_Up:
+					next = gtk_cmctree_node_nth(ctree,
+							MAX(0, GTK_CMCLIST(ctree)->focus_row - 1));
+					break;
+				case GDK_KEY_Down:
+					next = gtk_cmctree_node_nth(ctree,
+							MIN(GTK_CMCLIST(ctree)->focus_row + 1, GTK_CMCLIST(ctree)->rows));
+					break;
+			}
+
 			if (next) {
 				gtk_sctree_select_with_state
 					(GTK_SCTREE(ctree), next, (event->state & ~GDK_CONTROL_MASK) );

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list