From 06ebf6a67ec10e399ad041f666deb497924803cd Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 1 Jun 2001 23:28:13 +0000 Subject: Added fields for the GalViewMenus and GalViewCollection, since we need to 2001-06-01 Federico Mena Quintero * folder-browser.h (FolderBrowser): Added fields for the GalViewMenus and GalViewCollection, since we need to keep them around while the component is active. * folder-browser-factory.c (folder_browser_setup_view_menus): Plug leaks; unref the spec and factory. Set the view collection and the view menus on the FolderBrowser object. (folder_browser_discard_view_menus): New function. (control_deactivate): Discard the menus. * folder-browser.c (folder_browser_destroy): Destroy the view collection and the view menus. svn path=/trunk/; revision=10086 --- mail/folder-browser.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mail/folder-browser.c') diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 81c27f450f..e29f406a67 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -108,6 +108,16 @@ folder_browser_destroy (GtkObject *object) CORBA_exception_free (&ev); + if (folder_browser->view_collection) { + gtk_object_unref (GTK_OBJECT (folder_browser->view_collection)); + folder_browser->view_collection = NULL; + } + + if (folder_browser->view_menus) { + gtk_object_unref (GTK_OBJECT (folder_browser->view_menus)); + folder_browser->view_menus = NULL; + } + folder_browser_parent_class->destroy (object); } @@ -1152,6 +1162,9 @@ my_folder_browser_init (GtkObject *object) { FolderBrowser *fb = FOLDER_BROWSER (object); + fb->view_collection = NULL; + fb->view_menus = NULL; + /* * Setup parent class fields. */ -- cgit