diff options
-rw-r--r-- | shell/ChangeLog | 9 | ||||
-rw-r--r-- | shell/e-shell-view.c | 15 |
2 files changed, 20 insertions, 4 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 47a245668e..3994abdce3 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,14 @@ 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. + +2001-06-06 Jason Leach <jleach@ximian.com> + (Fix bug #418: Save state of folder tree view) * e-shell-view.c (e_shell_view_save_settings): Changed the char * 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); } |