aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 3654e31fe4..5f89f6a9a3 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -1996,6 +1996,7 @@ e_shell_view_remove_control_for_uri (EShellView *shell_view,
EShellViewPrivate *priv;
View *view;
GtkWidget *socket;
+ GtkWidget *control;
int page_num;
g_return_val_if_fail (shell_view != NULL, FALSE);
@@ -2005,25 +2006,25 @@ 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) {
- view_destroy (view);
- g_hash_table_remove (priv->uri_to_view, uri);
- } else {
+ if (view == NULL)
return FALSE;
- }
+
+ control = view->control;
+ view_destroy (view);
+ g_hash_table_remove (priv->uri_to_view, uri);
/* Get the socket, remove it from our list of sockets */
- socket = find_socket (GTK_CONTAINER (view->control));
+ socket = find_socket (GTK_CONTAINER (control));
priv->sockets = g_list_remove (priv->sockets, socket);
/* Remove the notebook page */
- page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), view->control);
+ 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 (view->control);
+ gtk_widget_destroy (control);
return TRUE;
}
raph'>* De-pkg-comment.knu2003-02-212-1/+1 * o Update to version 3.2betalkoeller2003-01-175-100/+147 * Fix PORTCOMMENTs that were killing INDEX builds.adamw2002-11-072-2/+1 sysutils/xfce4-fsguard-plugin to 1.0.2 - sysutils/xfce4-power-manager to 1.4.3 - sysutils/xfce4-wavelan-plugin to 0.5.12 - x11/libexo to 0.10.3 - x11-fm/thunar to 1.6.6 - x11-themes/gtk-xfce-engine to 3.2.0 PR: 196003 [1], 197251 [2], 198132 Differential Revision: https://reviews.freebsd.org/D677 Submitted by: Kamil Szczesny [1], amdmi3@ [2], myself Exp-run by: antoine@ Approved by: danilo@ (maintainer) [3] Tested by: Ivan <enitarzi@gmail.com>
Diffstat