diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-07-13 04:44:02 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-07-13 04:44:02 +0800 |
commit | 4da3e76c2cb4e89850166ae5fa0bf2e4db837733 (patch) | |
tree | 1eecb0e9c1c701eb95e180fa14129ed5bc418583 | |
parent | 160eb8c6e95b1bd15558f6c7d15a4b671dacb104 (diff) | |
download | gsoc2013-evolution-4da3e76c2cb4e89850166ae5fa0bf2e4db837733.tar gsoc2013-evolution-4da3e76c2cb4e89850166ae5fa0bf2e4db837733.tar.gz gsoc2013-evolution-4da3e76c2cb4e89850166ae5fa0bf2e4db837733.tar.bz2 gsoc2013-evolution-4da3e76c2cb4e89850166ae5fa0bf2e4db837733.tar.lz gsoc2013-evolution-4da3e76c2cb4e89850166ae5fa0bf2e4db837733.tar.xz gsoc2013-evolution-4da3e76c2cb4e89850166ae5fa0bf2e4db837733.tar.zst gsoc2013-evolution-4da3e76c2cb4e89850166ae5fa0bf2e4db837733.zip |
Ignore set_expanded if the node is the root and root_visible is FALSE.
2001-07-12 Christopher James Lahey <clahey@ximian.com>
* e-tree-table-adapter.c (e_tree_table_adapter_node_set_expanded):
Ignore set_expanded if the node is the root and root_visible is
FALSE.
* e-tree.c (item_key_press): Don't call set_expanded on NULL
paths.
svn path=/trunk/; revision=11061
-rw-r--r-- | widgets/table/e-tree-table-adapter.c | 3 | ||||
-rw-r--r-- | widgets/table/e-tree.c | 14 |
2 files changed, 13 insertions, 4 deletions
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index f02494c4e1..99c312c805 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -928,6 +928,9 @@ void e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ET ETreeTableAdapterNode *node; int row; + if (e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible) + return; + node = find_or_create_node(etta, path); row = find_row_num(etta, path); diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 4af1cc2dab..1c45afa7ef 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -555,14 +555,20 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) break; case '=': case GDK_Right: - path = e_tree_table_adapter_node_at_row(et->priv->etta, row); - e_tree_table_adapter_node_set_expanded (et->priv->etta, path, TRUE); + if (row != -1) { + path = e_tree_table_adapter_node_at_row(et->priv->etta, row); + if (path) + e_tree_table_adapter_node_set_expanded (et->priv->etta, path, TRUE); + } return_val = 1; break; case '-': case GDK_Left: - path = e_tree_table_adapter_node_at_row(et->priv->etta, row); - e_tree_table_adapter_node_set_expanded (et->priv->etta, path, FALSE); + if (row != -1) { + path = e_tree_table_adapter_node_at_row(et->priv->etta, row); + if (path) + e_tree_table_adapter_node_set_expanded (et->priv->etta, path, FALSE); + } return_val = 1; break; default: |