diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-25 03:38:55 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-08-25 03:38:55 +0800 |
commit | 059103efde35f9714cbe945ea81462076440a360 (patch) | |
tree | b8c00980b2d921fc7055a0df22da634b2204e960 /shell | |
parent | e87341cef9c382e61e0a5d74c6fd129f2d017607 (diff) | |
download | gsoc2013-evolution-059103efde35f9714cbe945ea81462076440a360.tar gsoc2013-evolution-059103efde35f9714cbe945ea81462076440a360.tar.gz gsoc2013-evolution-059103efde35f9714cbe945ea81462076440a360.tar.bz2 gsoc2013-evolution-059103efde35f9714cbe945ea81462076440a360.tar.lz gsoc2013-evolution-059103efde35f9714cbe945ea81462076440a360.tar.xz gsoc2013-evolution-059103efde35f9714cbe945ea81462076440a360.tar.zst gsoc2013-evolution-059103efde35f9714cbe945ea81462076440a360.zip |
[Fix #5978, "If a component dies, it's toolbar buttons remain".]
* e-shell-view.c (socket_destroy_cb): If the view belongs to a
toplevel storage node, get the right type information with
`e_storage_get_toplevel_node_uri()' instead of trying to get the
[non-existing] folder for it.
svn path=/trunk/; revision=12451
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 9 | ||||
-rw-r--r-- | shell/e-shell-view.c | 23 |
2 files changed, 26 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index ed1c23e5e5..9e26e53ec2 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,12 @@ +2001-08-24 Ettore Perazzoli <ettore@ximian.com> + + [Fix #5978, "If a component dies, it's toolbar buttons remain".] + + * e-shell-view.c (socket_destroy_cb): If the view belongs to a + toplevel storage node, get the right type information with + `e_storage_get_toplevel_node_uri()' instead of trying to get the + [non-existing] folder for it. + 2001-08-24 Iain Holmes <iain@ximian.com> * e-shell-startup-wizard.c (druid_event_notify_cb): Implement the other diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 9dd90b2125..d6d7539a58 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1634,6 +1634,8 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) gboolean viewing_closed_uri; char *copy_of_uri; const char *current_uri; + const char *path; + const char *folder_type; shell_view = E_SHELL_VIEW (data); priv = shell_view->priv; @@ -1655,8 +1657,20 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) gtk_widget_destroy (control); g_hash_table_remove (priv->uri_to_control, uri); - folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), - get_storage_set_path_from_uri (uri)); + path = get_storage_set_path_from_uri (uri); + folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), path); + + if (folder != NULL) { + folder_type = e_folder_get_type_string (folder); + } else { + EStorage *storage; + + storage = e_storage_set_get_storage (e_shell_get_storage_set (priv->shell), path + 1); + if (storage == NULL) + folder_type = NULL; + else + folder_type = e_storage_get_toplevel_node_type (storage); + } /* See if we were actively viewing the uri for the socket that's being closed */ current_uri = e_shell_view_get_current_uri (shell_view); @@ -1672,10 +1686,7 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) if (viewing_closed_uri) e_shell_view_display_uri (shell_view, NULL); - e_shell_component_maybe_crashed (priv->shell, - uri, - e_folder_get_type_string (folder), - shell_view); + e_shell_component_maybe_crashed (priv->shell, uri, folder_type, shell_view); /* We were actively viewing the component that just crashed, so flip to the Inbox */ if (viewing_closed_uri) |