aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-09-04 23:30:13 +0800
committerPeter Williams <peterw@src.gnome.org>2001-09-04 23:30:13 +0800
commit3b17294f868cf76f0784aed9465bcf79f88cf37d (patch)
tree128615867c8eda0104f561581726fd1b95136f08 /shell/e-shell-view.c
parent25001583d25c1755438da7354740c965b93f9ada (diff)
downloadgsoc2013-evolution-3b17294f868cf76f0784aed9465bcf79f88cf37d.tar
gsoc2013-evolution-3b17294f868cf76f0784aed9465bcf79f88cf37d.tar.gz
gsoc2013-evolution-3b17294f868cf76f0784aed9465bcf79f88cf37d.tar.bz2
gsoc2013-evolution-3b17294f868cf76f0784aed9465bcf79f88cf37d.tar.lz
gsoc2013-evolution-3b17294f868cf76f0784aed9465bcf79f88cf37d.tar.xz
gsoc2013-evolution-3b17294f868cf76f0784aed9465bcf79f88cf37d.tar.zst
gsoc2013-evolution-3b17294f868cf76f0784aed9465bcf79f88cf37d.zip
Remove the folder from the EvolutionStorage as well as the EStorage.
2001-08-30 Peter Williams <peterw@ximian.com> * e-local-storage.c (async_xfer_folder_complete): Remove the folder from the EvolutionStorage as well as the EStorage. 2001-08-29 Peter Williams <peterw@ximian.com> * e-storage-set-view.c (etree_node_destroy_func): Only call remove_node_from_hash if it's not the root node. (removed_storage_cb): Don't remove the node from the hash here, because it will be removed in the node_destroyed callback. (removed_folder_cb): Same. * e-shell-view.c (e_shell_view_remove_control_for_uri): Disconnect from the destroy signal so as not to confuse ourselves. Also, the page remove in the notebook destroys the control and the socket, so don't do that explicitly. * e-shell-folder-commands.c (folder_selection_dialog_folder_selected_callback): Remove the control for the source view if we're moving. svn path=/trunk/; revision=12578
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 9048c3a147..059df15b7f 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -2014,6 +2014,7 @@ e_shell_view_remove_control_for_uri (EShellView *shell_view,
GtkWidget *socket;
GtkWidget *control;
int page_num;
+ int destroy_connection_id;
g_return_val_if_fail (shell_view != NULL, FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
@@ -2022,8 +2023,10 @@ e_shell_view_remove_control_for_uri (EShellView *shell_view,
/* Get the control, remove it from our hash of controls */
view = g_hash_table_lookup (priv->uri_to_view, uri);
- if (view == NULL)
+ if (view == NULL) {
+ g_message ("Trying to remove view for non-existing URI -- %s", uri);
return FALSE;
+ }
control = view->control;
view_destroy (view);
@@ -2033,15 +2036,15 @@ e_shell_view_remove_control_for_uri (EShellView *shell_view,
socket = find_socket (GTK_CONTAINER (control));
priv->sockets = g_list_remove (priv->sockets, socket);
- /* Remove the notebook page */
+ /* disconnect from the destroy signal */
+ destroy_connection_id = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (socket),
+ "e_shell_view_destroy_connection_id"));
+ gtk_signal_disconnect (GTK_OBJECT (socket), destroy_connection_id);
+
+ /* Remove the notebook page, destroying the control and socket */
page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), control);
gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), page_num);
- /* Destroy things, socket first because otherwise shell will
- think the control crashed */
- gtk_widget_destroy (socket);
- gtk_widget_destroy (control);
-
return TRUE;
}