aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-10 12:34:11 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-10 12:34:11 +0800
commit5b9b2f83d39d01a0c45988df58c93e27f5ab8352 (patch)
tree900df17fe6e6bcba14a2cfe7fad3a41dd4bde1eb /shell
parent5cfa31ba114380fa2a731ed1b2a55f6ef835dc5a (diff)
downloadgsoc2013-evolution-5b9b2f83d39d01a0c45988df58c93e27f5ab8352.tar.gz
gsoc2013-evolution-5b9b2f83d39d01a0c45988df58c93e27f5ab8352.tar.zst
gsoc2013-evolution-5b9b2f83d39d01a0c45988df58c93e27f5ab8352.zip
[Fix #6787, Removing a storage with children and then re-adding it
causes a crash.] * e-storage-set-view.c (convert_corba_drag_action_set_to_gdk): Removed `#if 0'ed function. (etree_node_destroy_func): New destroy function. (e_storage_set_view_construct): Set this as the new destroy function on the ETreeMemory. svn path=/trunk/; revision=11869
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog11
-rw-r--r--shell/e-storage-set-view.c39
2 files changed, 27 insertions, 23 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 3baf2eced1..59d6e116c5 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,14 @@
+2001-08-10 Ettore Perazzoli <ettore@ximian.com>
+
+ [Fix #6787, Removing a storage with children and then re-adding it
+ causes a crash.]
+
+ * e-storage-set-view.c (convert_corba_drag_action_set_to_gdk):
+ Removed `#if 0'ed function.
+ (etree_node_destroy_func): New destroy function.
+ (e_storage_set_view_construct): Set this as the new destroy
+ function on the ETreeMemory.
+
2001-08-09 Ettore Perazzoli <ettore@ximian.com>
* evolution-test-component.c (user_create_new_item_callback):
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 23e97ece8c..461b05411d 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -352,28 +352,6 @@ convert_gdk_drag_action_set_to_corba (GdkDragAction action)
return retval;
}
-#if 0
-static GdkDragAction
-convert_corba_drag_action_set_to_gdk (GNOME_Evolution_ShellComponentDnd_ActionSet action)
-{
- GdkDragAction retval;
-
- retval = GDK_ACTION_DEFAULT;
-
- if (action & GNOME_Evolution_ShellComponentDnd_ACTION_COPY)
- retval |= GDK_ACTION_COPY;
- if (action & GNOME_Evolution_ShellComponentDnd_ACTION_MOVE)
- retval |= GDK_ACTION_MOVE;
- if (action & GNOME_Evolution_ShellComponentDnd_ACTION_LINK)
- retval |= GDK_ACTION_LINK;
- if (action & GNOME_Evolution_ShellComponentDnd_ACTION_ASK)
- retval |= GDK_ACTION_ASK;
-
- return retval;
-}
-#endif
-
-
static GNOME_Evolution_ShellComponentDnd_ActionSet
convert_gdk_drag_action_to_corba (GdkDragAction action)
{
@@ -1549,6 +1527,20 @@ etree_value_to_string (ETreeModel *etc, int col, const void *value, void *data)
return g_strdup(value ? "Yes" : "No");
}
+static void
+etree_node_destroy_func (void *data,
+ void *user_data)
+{
+ EStorageSetView *storage_set_view;
+ char *path;
+
+ path = (char *) data;
+ storage_set_view = E_STORAGE_SET_VIEW (user_data);
+
+ remove_node_from_hash (storage_set_view, path);
+ g_free (path);
+}
+
/* StorageSet signal handling. */
@@ -1942,7 +1934,8 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view,
storage_set_view);
- e_tree_memory_set_node_destroy_func (E_TREE_MEMORY (priv->etree_model), (GFunc) g_free, NULL);
+ e_tree_memory_set_node_destroy_func (E_TREE_MEMORY (priv->etree_model),
+ etree_node_destroy_func, storage_set_view);
e_tree_memory_set_expanded_default (E_TREE_MEMORY (priv->etree_model), TRUE);
priv->root_node = e_tree_memory_node_insert (E_TREE_MEMORY(priv->etree_model), NULL, -1,