[evolution/gnome-3-30] I#278 - Ctrl+Shift+Arrow to expand/collapse whole subthread



commit 46503c45be6d49fffc6d7ec718ccb9d493a63005
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jan 11 14:58:35 2019 +0100

    I#278 - Ctrl+Shift+Arrow to expand/collapse whole subthread
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/278

 src/e-util/e-tree.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/src/e-util/e-tree.c b/src/e-util/e-tree.c
index b9acd7874b..e98ba08be5 100644
--- a/src/e-util/e-tree.c
+++ b/src/e-util/e-tree.c
@@ -1045,11 +1045,13 @@ item_key_press (ETableItem *eti,
                }
 
                if (row != -1) {
-                       path = e_tree_table_adapter_node_at_row (
-                               tree->priv->etta, row);
-                       if (path)
-                               e_tree_table_adapter_node_set_expanded (
-                                       tree->priv->etta, path, TRUE);
+                       path = e_tree_table_adapter_node_at_row (tree->priv->etta, row);
+                       if (path) {
+                               if ((key->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == (GDK_CONTROL_MASK | 
GDK_SHIFT_MASK))
+                                       e_tree_table_adapter_node_set_expanded_recurse (tree->priv->etta, 
path, TRUE);
+                               else
+                                       e_tree_table_adapter_node_set_expanded (tree->priv->etta, path, TRUE);
+                       }
                }
                return_val = 1;
                break;
@@ -1068,11 +1070,13 @@ item_key_press (ETableItem *eti,
                }
 
                if (row != -1) {
-                       path = e_tree_table_adapter_node_at_row (
-                               tree->priv->etta, row);
-                       if (path)
-                               e_tree_table_adapter_node_set_expanded (
-                                       tree->priv->etta, path, FALSE);
+                       path = e_tree_table_adapter_node_at_row (tree->priv->etta, row);
+                       if (path) {
+                               if ((key->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == (GDK_CONTROL_MASK | 
GDK_SHIFT_MASK))
+                                       e_tree_table_adapter_node_set_expanded_recurse (tree->priv->etta, 
path, FALSE);
+                               else
+                                       e_tree_table_adapter_node_set_expanded (tree->priv->etta, path, 
FALSE);
+                       }
                }
                return_val = 1;
                break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]