aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-factory.c
diff options
context:
space:
mode:
authorMatthew Loper <mloper@src.gnome.org>2000-04-08 05:42:56 +0800
committerMatthew Loper <mloper@src.gnome.org>2000-04-08 05:42:56 +0800
commit59606c28498271b7e0d3734f9b094bee3fc10cf8 (patch)
tree3a1394611fd756784d32449927ccede0d8af6d15 /mail/folder-browser-factory.c
parentc893285da76dca4a43ace7819964f09ce8802882 (diff)
downloadgsoc2013-evolution-59606c28498271b7e0d3734f9b094bee3fc10cf8.tar.gz
gsoc2013-evolution-59606c28498271b7e0d3734f9b094bee3fc10cf8.tar.zst
gsoc2013-evolution-59606c28498271b7e0d3734f9b094bee3fc10cf8.zip
+ * folder-browser.c (folder_browser_destroy): Unref the shell
+ interface that we have a handle to. + + * folder-browser-factory.c (control_destroy_cb): New function; + destroys a folder-browser when its control is destroyed. + (folder_browser_factory): Hook up to the above. + + * e-shell-view.c (destroy_folder_view): New function; + Bonobo_Unknown_unref's the controls that have the views in them. + (esv_destroy): Calls the above for each folder_view in the + hashtable. + (get_view): unref the ServiceRepository interface of the control + when we're done with it. + svn path=/trunk/; revision=2333
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r--mail/folder-browser-factory.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 8e2b7ec8f7..a6075f7858 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -39,7 +39,7 @@ folder_browser_set_shell (EvolutionServiceRepository *sr,
CORBA_exception_init (&ev);
folder_browser = FOLDER_BROWSER (closure);
- /* FIXME : ref the shell here */
+
folder_browser->shell = shell;
/* test the component->shell registration */
@@ -225,7 +225,14 @@ control_activate_cb (BonoboControl *control,
control_deactivate (control, uih);
}
+static void
+control_destroy_cb (BonoboControl *control,
+ gpointer user_data)
+{
+ GtkWidget *folder_browser = user_data;
+ gtk_object_destroy (GTK_OBJECT (folder_browser));
+}
/*
* Creates the Folder Browser, wraps it in a Bonobo Control, and
@@ -264,6 +271,8 @@ folder_browser_factory (BonoboGenericFactory *factory, void *closure)
gtk_signal_connect (GTK_OBJECT (control), "activate",
control_activate_cb, NULL);
+ gtk_signal_connect (GTK_OBJECT (control), "destroy",
+ control_destroy_cb, folder_browser);
bonobo_control_set_property_bag (control,
FOLDER_BROWSER (folder_browser)->properties);