aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/e-storage-set-view.c30
2 files changed, 18 insertions, 20 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 0d8ee5a331..6240195fa2 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,11 @@
+2002-05-13 Christopher James Lahey <clahey@ximian.com>
+
+ * e-storage-set-view.c (e_storage_set_view_get_checkboxes_list):
+ Changed this to just walk the hash table to get the list of
+ checked checkboxes instead of walking the tree. (Makes it so that
+ checked paths will remain checked, even if they're not shown in
+ the tree when the list is gotten.)
+
2002-05-13 Ettore Perazzoli <ettore@ximian.com>
* e-shell-config.c: Handle the e-shell-config-offline and
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 5d4a7616e6..6d3557ad36 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -2042,35 +2042,25 @@ e_storage_set_view_set_checkboxes_list (EStorageSetView *storage_set_view,
}
static void
-essv_add_to_list (ETreePath tree_path, void **temp)
+essv_add_to_list (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
- EStorageSetView *storage_set_view;
- EStorageSetViewPrivate *priv;
- GList **list;
+ GList **list = user_data;
- storage_set_view = temp[0];
- list = temp[1];
- priv = storage_set_view->priv;
-
- if (priv->checkboxes) {
- const char *path;
-
- path = (const char *) e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), tree_path);
- if (path != NULL && g_hash_table_lookup (priv->checkboxes, path))
- *list = g_list_prepend (*list, g_strdup (path));
- }
+ *list = g_list_prepend (*list, g_strdup (key));
}
GList *
e_storage_set_view_get_checkboxes_list (EStorageSetView *storage_set_view)
{
- void *temp[2];
GList *list = NULL;
- temp[0] = storage_set_view;
- temp[1] = &list;
- e_tree_path_foreach (E_TREE (storage_set_view), (ETreeForeachFunc) essv_add_to_list, temp);
- list = g_list_reverse (list);
+ if (storage_set_view->priv->checkboxes) {
+ g_hash_table_foreach (storage_set_view->priv->checkboxes, essv_add_to_list, &list);
+
+ list = g_list_reverse (list);
+ }
return list;
}