diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-11-01 07:46:10 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-11-01 07:46:10 +0800 |
commit | 49bad8cf37fc85a59fb6d2ea199770b33a92f458 (patch) | |
tree | 65bd05054a02e15708db98f16ef934941aae3296 /shell | |
parent | 71a63f1498b615c98a543138532cbbfc64cd616f (diff) | |
download | gsoc2013-evolution-49bad8cf37fc85a59fb6d2ea199770b33a92f458.tar gsoc2013-evolution-49bad8cf37fc85a59fb6d2ea199770b33a92f458.tar.gz gsoc2013-evolution-49bad8cf37fc85a59fb6d2ea199770b33a92f458.tar.bz2 gsoc2013-evolution-49bad8cf37fc85a59fb6d2ea199770b33a92f458.tar.lz gsoc2013-evolution-49bad8cf37fc85a59fb6d2ea199770b33a92f458.tar.xz gsoc2013-evolution-49bad8cf37fc85a59fb6d2ea199770b33a92f458.tar.zst gsoc2013-evolution-49bad8cf37fc85a59fb6d2ea199770b33a92f458.zip |
Don't do operations on a NULL path. (updated_folder_cb,
2001-10-31 Christopher James Lahey <clahey@ximian.com>
* e-storage-set-view.c (cursor_activated): Don't do operations on
a NULL path.
(updated_folder_cb, folder_changed_cb): Send pre_change signal
here.
svn path=/trunk/; revision=14558
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/e-storage-set-view.c | 24 |
2 files changed, 22 insertions, 9 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 77331f8bf3..bf03e571b4 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2001-10-31 Christopher James Lahey <clahey@ximian.com> + + * e-storage-set-view.c (cursor_activated): Don't do operations on + a NULL path. + (updated_folder_cb, folder_changed_cb): Send pre_change signal + here. + 2001-10-31 Ettore Perazzoli <ettore@ximian.com> * e-storage-set-view.c (handle_evolution_path_drag_motion): If the diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index d94160d53d..4a01f70238 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -1319,17 +1319,21 @@ cursor_activated (ETree *tree, priv = storage_set_view->priv; g_free (priv->selected_row_path); - priv->selected_row_path = g_strdup (e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), path)); + if (path) { + priv->selected_row_path = g_strdup (e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), path)); - if (e_tree_model_node_depth (priv->etree_model, path) >= 2) { - /* it was a folder */ - gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[FOLDER_SELECTED], - priv->selected_row_path); - } else { - /* it was a storage */ - gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[STORAGE_SELECTED], - priv->selected_row_path + 1); + if (e_tree_model_node_depth (priv->etree_model, path) >= 2) { + /* it was a folder */ + gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[FOLDER_SELECTED], + priv->selected_row_path); + } else { + /* it was a storage */ + gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[STORAGE_SELECTED], + priv->selected_row_path + 1); + } } + else + priv->selected_row_path = NULL; } @@ -1650,6 +1654,7 @@ updated_folder_cb (EStorageSet *storage_set, etree = priv->etree_model; node = lookup_node_in_hash (storage_set_view, path); + e_tree_model_pre_change (etree); e_tree_model_node_data_changed (etree, node); } @@ -1811,6 +1816,7 @@ folder_changed_cb (EFolder *folder, return; } + e_tree_model_pre_change (priv->etree_model); e_tree_model_node_data_changed (priv->etree_model, node); } |