From 05877aea9bad861887d7917bdeb53741b84aeb23 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sun, 15 Jul 2001 05:18:49 +0000 Subject: Fix a crash that could happen by closing one or more views, and then clicking on the off-line button. svn path=/trunk/; revision=11107 --- shell/ChangeLog | 8 ++++++++ shell/e-shell-view-menu.c | 5 +++-- shell/e-shell-view.c | 5 +++-- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 2a6293c485..bc87bec543 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,11 @@ +2001-07-15 Ettore Perazzoli + + * e-shell-view-menu.c (e_shell_view_menu_setup): Connect the + "line_status_changed" signal with + `gtk_signal_connect_while_alive()' for the shell views, so we + don't crash if a view gets destroyed. + * e-shell-view.c (e_shell_view_construct): Likewise. + 2001-07-12 Jason Leach * e-shell-view-menu.c (command_submit_bug): Because diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 2d7cd8e4a9..f8a0368d64 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -776,7 +776,8 @@ e_shell_view_menu_setup (EShellView *shell_view) SHORTCUT_BAR_TOGGLE_PATH); /* Set up the work online / work offline menu item. */ - gtk_signal_connect (GTK_OBJECT (shell), "line_status_changed", - GTK_SIGNAL_FUNC (shell_line_status_changed_cb), shell_view); + gtk_signal_connect_while_alive (GTK_OBJECT (shell), "line_status_changed", + GTK_SIGNAL_FUNC (shell_line_status_changed_cb), shell_view, + GTK_OBJECT (shell_view)); update_offline_menu_item (shell_view, e_shell_get_line_status (shell)); } diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 689a299871..ba9022cb8a 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1216,8 +1216,9 @@ e_shell_view_construct (EShellView *shell_view, bonobo_ui_component_thaw (priv->ui_component, NULL); - gtk_signal_connect (GTK_OBJECT (shell), "line_status_changed", - GTK_SIGNAL_FUNC (shell_line_status_changed_cb), view); + gtk_signal_connect_while_alive (GTK_OBJECT (shell), "line_status_changed", + GTK_SIGNAL_FUNC (shell_line_status_changed_cb), view, + GTK_OBJECT (view)); return view; } -- cgit