aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-06-07 05:22:04 +0800
committerJacob Leach <jleach@src.gnome.org>2001-06-07 05:22:04 +0800
commitaa71323c61923d24a7cf9aed4e63984eaf199b73 (patch)
treeb1e57bc0356cc5b6587cddd79b2c2ea3c47e01aa /shell
parentf15bb6a3ebcadfc4dbe8e9d2a2c82c98ac2da35a (diff)
downloadgsoc2013-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')
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-shell-view.c15
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);
}