[Commits] [SCM] claws branch, master, updated. 3.17.0-21-ge3670ef

ticho at claws-mail.org ticho at claws-mail.org
Sat Aug 25 11:00:05 CEST 2018


The branch, master has been updated
       via  e3670efae20817acbbd16920c1ba7f5749b59365 (commit)
      from  125f9caede475bb80ffa2e69c93ad2fd8d043068 (commit)

Summary of changes:
 src/folderview.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit e3670efae20817acbbd16920c1ba7f5749b59365
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Aug 25 10:58:49 2018 +0200

    Improve Left Arrow keypress handling for childless folders in folderview.
    
    Based on patch by Abhay S. Kushwaha.

diff --git a/src/folderview.c b/src/folderview.c
index d8526bf..246ab3c 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -2152,10 +2152,13 @@ static gboolean folderview_key_pressed(GtkWidget *widget, GdkEventKey *event,
 		break;
 	case GDK_KEY_Left:
 		if (folderview->selected) {
-			if (GTK_CMCTREE_ROW(folderview->selected)->expanded) {
+			/* If the folder is expanded and can be collapsed, do that... */
+			if (GTK_CMCTREE_ROW(folderview->selected)->expanded &&
+					GTK_CMCTREE_ROW(folderview->selected)->children != NULL) {
 				gtk_cmctree_collapse(GTK_CMCTREE(folderview->ctree),
 						folderview->selected);
 			} else {
+				/* ...otherwise, move cursor to its parent node. */
 				if ((item = gtk_cmctree_node_get_row_data(GTK_CMCTREE(folderview->ctree),
 						folderview->selected))) {
 					if ((node = gtk_cmctree_find_by_row_data(GTK_CMCTREE(folderview->ctree),

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list