[evolution] I#278 - Ctrl+Shift+Arrow to expand/collapse whole subthread
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#278 - Ctrl+Shift+Arrow to expand/collapse whole subthread
- Date: Fri, 11 Jan 2019 13:58:34 +0000 (UTC)
commit 6fefbfd10c84e8d09976ca64f61a59030c3854c2
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]