aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-09-02 06:08:57 +0800
committerChris Toshok <toshok@src.gnome.org>2000-09-02 06:08:57 +0800
commit9a58a069bb9f8a6f130509786d1c95af7f3d225c (patch)
tree03c6354c6d90d0b980f9debe14b88b4df877d657 /shell
parent6f731fff4cfea7eac26b7a5e15083ee34445fff8 (diff)
downloadgsoc2013-evolution-9a58a069bb9f8a6f130509786d1c95af7f3d225c.tar
gsoc2013-evolution-9a58a069bb9f8a6f130509786d1c95af7f3d225c.tar.gz
gsoc2013-evolution-9a58a069bb9f8a6f130509786d1c95af7f3d225c.tar.bz2
gsoc2013-evolution-9a58a069bb9f8a6f130509786d1c95af7f3d225c.tar.lz
gsoc2013-evolution-9a58a069bb9f8a6f130509786d1c95af7f3d225c.tar.xz
gsoc2013-evolution-9a58a069bb9f8a6f130509786d1c95af7f3d225c.tar.zst
gsoc2013-evolution-9a58a069bb9f8a6f130509786d1c95af7f3d225c.zip
free node_data. (removed_storage_cb): same. (new_storage_cb): don't free
2000-09-01 Chris Toshok <toshok@helixcode.com> * e-storage-set-view.c (removed_folder_cb): free node_data. (removed_storage_cb): same. (new_storage_cb): don't free the path we put in the node's node_data. (e_storage_set_view_set_current_folder): remove calls to set_cursor_row (-1), and clean up a little bit. svn path=/trunk/; revision=5171
Diffstat (limited to 'shell')
-rw-r--r--shell/e-storage-set-view.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 5732d43349..9f9dba0467 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -512,8 +512,6 @@ new_storage_cb (EStorageSet *storage_set,
return;
}
- g_free (path);
-
/* FIXME: We want a more specialized sort, e.g. the local folders should always be
on top. */
sort_model = priv->etree_model;
@@ -530,6 +528,7 @@ removed_storage_cb (EStorageSet *storage_set,
ETreeModel *etree;
ETreePath *node;
char *path;
+ char *node_data;
storage_set_view = E_STORAGE_SET_VIEW (data);
priv = storage_set_view->priv;
@@ -539,7 +538,8 @@ removed_storage_cb (EStorageSet *storage_set,
node = remove_node_from_hash (storage_set_view, path);
g_free (path);
- e_tree_model_node_remove (etree, node);
+ node_data = e_tree_model_node_remove (etree, node);
+ g_free (node_data);
}
static void
@@ -594,13 +594,15 @@ removed_folder_cb (EStorageSet *storage_set,
EStorageSetViewPrivate *priv;
ETreeModel *etree;
ETreePath *node;
+ char *node_data;
storage_set_view = E_STORAGE_SET_VIEW (data);
priv = storage_set_view->priv;
etree = priv->etree_model;
node = remove_node_from_hash (storage_set_view, path);
- e_tree_model_node_remove (etree, node);
+ node_data = e_tree_model_node_remove (etree, node);
+ g_free (node_data);
}
@@ -821,7 +823,7 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view,
GTK_SIGNAL_FUNC (on_cursor_change), GTK_OBJECT(storage_set_view));
gtk_signal_connect (GTK_OBJECT (storage_set_view), "table_drag_begin",
GTK_SIGNAL_FUNC (etable_drag_begin), GTK_OBJECT(storage_set_view));
- gtk_signal_connect (GTK_OBJECT (storage_set_view), "drag_data_get",
+ gtk_signal_connect (GTK_OBJECT (storage_set_view), "table_drag_data_get",
GTK_SIGNAL_FUNC (etable_drag_data_get), GTK_OBJECT(storage_set_view));
storage_list = e_storage_set_get_storage_list (storage_set);
@@ -870,18 +872,12 @@ e_storage_set_view_set_current_folder (EStorageSetView *storage_set_view,
g_return_if_fail (storage_set_view != NULL);
g_return_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view));
- g_return_if_fail (path == NULL || g_path_is_absolute (path));
+ g_return_if_fail (path != NULL && g_path_is_absolute (path));
priv = storage_set_view->priv;
- if (path == NULL) {
- e_table_set_cursor_row (E_TABLE (storage_set_view), -1);
- return;
- }
-
node = g_hash_table_lookup (priv->path_to_etree_node, path);
if (node == NULL) {
- e_table_set_cursor_row (E_TABLE (storage_set_view), -1);
return;
}