diff options
author | Jason Leach <jleach@ximian.com> | 2001-06-07 05:22:04 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-06-07 05:22:04 +0800 |
commit | aa71323c61923d24a7cf9aed4e63984eaf199b73 (patch) | |
tree | b1e57bc0356cc5b6587cddd79b2c2ea3c47e01aa /shell/e-shell-view.c | |
parent | f15bb6a3ebcadfc4dbe8e9d2a2c82c98ac2da35a (diff) | |
download | gsoc2013-evolution-aa71323c61923d24a7cf9aed4e63984eaf199b73.tar gsoc2013-evolution-aa71323c61923d24a7cf9aed4e63984eaf199b73.tar.gz gsoc2013-evolution-aa71323c61923d24a7cf9aed4e63984eaf199b73.tar.bz2 gsoc2013-evolution-aa71323c61923d24a7cf9aed4e63984eaf199b73.tar.lz gsoc2013-evolution-aa71323c61923d24a7cf9aed4e63984eaf199b73.tar.xz gsoc2013-evolution-aa71323c61923d24a7cf9aed4e63984eaf199b73.tar.zst gsoc2013-evolution-aa71323c61923d24a7cf9aed4e63984eaf199b73.zip |
(Fix bug #3205: Component crash causes folder switch even when not needed)
2001-06-06 Jason Leach <jleach@ximian.com>
(Fix bug #3205: Component crash causes folder switch even when not
needed)
* e-shell-view.c (socket_destroy_cb): Only flip around the
ShellView to different folders when we're currently viewing the
URI that's being closed/crashed.
svn path=/trunk/; revision=10137
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r-- | shell/e-shell-view.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 3b7f270caa..2a146009bc 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1549,6 +1549,7 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) EFolder *folder; GtkWidget *control; const char *uri; + gboolean viewing_closed_uri; char *copy_of_uri; shell_view = E_SHELL_VIEW (data); @@ -1557,7 +1558,7 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) uri = (const char *) gtk_object_get_data (GTK_OBJECT (socket_widget), "e_shell_view_folder_uri"); /* Strdup here as the string will be freed when the socket is destroyed. */ - copy_of_uri = g_strdup (uri); + copy_of_uri = g_strdup (uri); control = g_hash_table_lookup (priv->uri_to_control, uri); if (control == NULL) { @@ -1573,16 +1574,22 @@ socket_destroy_cb (GtkWidget *socket_widget, gpointer data) folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), get_storage_set_path_from_uri (uri)); - e_shell_view_display_uri (shell_view, NULL); + /* See if we were actively viewing the uri for the socket that's being closed */ + viewing_closed_uri = !strcmp (uri, e_shell_view_get_current_uri (shell_view)); + + 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); - g_free (copy_of_uri); + /* We were actively viewing the component that just crashed, so flip to the Inbox */ + if (viewing_closed_uri) + e_shell_view_display_uri (shell_view, DEFAULT_URI); - e_shell_view_display_uri (shell_view, DEFAULT_URI); + g_free (copy_of_uri); } |