diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 9 | ||||
-rw-r--r-- | shell/e-shell-view.c | 17 | ||||
-rw-r--r-- | shell/e-shell.c | 4 |
3 files changed, 23 insertions, 7 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 6731001353..5df2aee73a 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,12 @@ +2001-10-29 Ettore Perazzoli <ettore@ximian.com> + + * e-shell-view.c (e_shell_view_construct): Ref the shell. + (destroy): Unref the shell. + (destroy): Free the delayed_selection. No need to call + `cleanup_delayed_selection()' as the signal handler will have + already be disconnected at this point [as we are using + connect_while_alive()']. + 2001-10-28 Ettore Perazzoli <ettore@ximian.com> * e-shell-view.c (destroy): Call `cleanup_delayed_selection()' as diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index feeded1cdc..f50dcb685b 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -51,6 +51,8 @@ #include "widgets/misc/e-clipped-label.h" #include "widgets/misc/e-bonobo-widget.h" +#include "e-util/e-gtk-utils.h" + #include "evolution-shell-view.h" #include "e-gray-bar.h" @@ -90,9 +92,8 @@ struct _EShellViewPrivate { /* Currently displayed URI. */ char *uri; - /* delayed selection, used when a path doesn't exist in an - EStorage. cleared when we're signaled with - "folder_selected" */ + /* Delayed selection, used when a path doesn't exist in an EStorage. + Cleared when we're signaled with "folder_selected". */ char *delayed_selection; /* uri to go to at timeout */ @@ -1102,10 +1103,11 @@ destroy (GtkObject *object) shell_view = E_SHELL_VIEW (object); priv = shell_view->priv; - cleanup_delayed_selection (shell_view); - gtk_object_unref (GTK_OBJECT (priv->tooltips)); + if (priv->shell != NULL) + bonobo_object_unref (BONOBO_OBJECT (priv->shell)); + if (priv->corba_interface != NULL) bonobo_object_unref (BONOBO_OBJECT (priv->corba_interface)); @@ -1134,6 +1136,8 @@ destroy (GtkObject *object) g_free (priv->set_folder_uri); + g_free (priv->delayed_selection); + g_free (priv); (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); @@ -1371,6 +1375,7 @@ e_shell_view_construct (EShellView *shell_view, } priv->shell = shell; + bonobo_object_ref (BONOBO_OBJECT (priv->shell)); gtk_signal_connect (GTK_OBJECT (view), "delete_event", GTK_SIGNAL_FUNC (delete_event_cb), NULL); @@ -2029,7 +2034,7 @@ e_shell_view_display_uri (EShellView *shell_view, e_gtk_signal_connect_full_while_alive (GTK_OBJECT (e_shell_get_storage_set (priv->shell)), "new_folder", GTK_SIGNAL_FUNC (new_folder_cb), NULL, shell_view, NULL, - NULL, TRUE, + FALSE, TRUE, GTK_OBJECT (shell_view)); retval = FALSE; goto end; diff --git a/shell/e-shell.c b/shell/e-shell.c index 83942aa4fc..5c054b9ead 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -914,8 +914,10 @@ destroy (GtkObject *object) g_free (priv->local_directory); - if (priv->storage_set != NULL) + if (priv->storage_set != NULL) { gtk_object_unref (GTK_OBJECT (priv->storage_set)); + priv->storage_set = NULL; + } if (priv->local_storage != NULL) gtk_object_unref (GTK_OBJECT (priv->local_storage)); |