diff options
author | Christopher James Lahey <clahey@ximian.com> | 2002-05-14 11:47:16 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2002-05-14 11:47:16 +0800 |
commit | 17f6f9980adefe5642c165fef6b1e9b15dd7cf7d (patch) | |
tree | b5b556d5850b3c0cae018496629a7810a9201551 | |
parent | b63eece6a300d773f7c3d7f865d570d3e0bcf422 (diff) | |
download | gsoc2013-evolution-17f6f9980adefe5642c165fef6b1e9b15dd7cf7d.tar.gz gsoc2013-evolution-17f6f9980adefe5642c165fef6b1e9b15dd7cf7d.tar.zst gsoc2013-evolution-17f6f9980adefe5642c165fef6b1e9b15dd7cf7d.zip |
Changed this to just walk the hash table to get the list of checked
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.)
svn path=/trunk/; revision=16778
-rw-r--r-- | shell/ChangeLog | 8 | ||||
-rw-r--r-- | shell/e-storage-set-view.c | 30 |
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; } |