aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-05-21 14:24:29 +0800
committerChris Lahey <clahey@src.gnome.org>2002-05-21 14:24:29 +0800
commita33709547e482bfb7c0c0b3bf2fb491a28b61dab (patch)
treea901c910762793126e7697e9cfa4cda2a504986c /widgets/table
parent25cd5a551ae75b1720eb7fd9a0cbd11672c606e4 (diff)
downloadgsoc2013-evolution-a33709547e482bfb7c0c0b3bf2fb491a28b61dab.tar.gz
gsoc2013-evolution-a33709547e482bfb7c0c0b3bf2fb491a28b61dab.tar.zst
gsoc2013-evolution-a33709547e482bfb7c0c0b3bf2fb491a28b61dab.zip
Check for path being NULL.
2002-05-21 Christopher James Lahey <clahey@ximian.com> * e-tree-sorted.c (ets_proxy_node_request_collapse): Check for path being NULL. * e-tree-table-adapter.c (e_tree_table_adapter_load_expanded_state): Rebuild the tree after loading the state. svn path=/trunk/; revision=16963
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree-sorted.c4
-rw-r--r--widgets/table/e-tree-table-adapter.c15
2 files changed, 17 insertions, 2 deletions
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 2244f1ba11..16ee5160eb 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -1173,7 +1173,9 @@ static void
ets_proxy_node_request_collapse (ETreeModel *etm, ETreePath node, ETreeSorted *ets)
{
ETreeSortedPath *path = find_path(ets, node);
- e_tree_model_node_request_collapse(E_TREE_MODEL(ets), path);
+ if (path) {
+ e_tree_model_node_request_collapse(E_TREE_MODEL(ets), path);
+ }
}
static void
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index d828fbb4a8..c7a6c991c8 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -943,6 +943,8 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
xmlNode *child;
int vers;
gboolean model_default, saved_default;
+ int size;
+ ETreePath path;
g_return_if_fail(etta != NULL);
@@ -970,6 +972,8 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
return;
}
+ e_table_model_pre_change(E_TABLE_MODEL(etta));
+
for (child = root->xmlChildrenNode; child; child = child->next) {
char *id;
@@ -982,13 +986,22 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
if (!strcmp(id, "")) {
g_free(id);
- return;
+ continue;
}
add_expanded_node(etta, id, !model_default);
}
+
xmlFreeDoc (doc);
+
+ path = e_tree_model_get_root (etta->priv->source);
+ size = array_size_from_path(etta, path);
+ etta_expand_to(etta, size);
+ etta->priv->n_map = size;
+ fill_array_from_path(etta, etta->priv->map_table, path);
+
+ e_table_model_changed (E_TABLE_MODEL (etta));
}
void e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean visible)