aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-factory.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-05-15 02:47:11 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-05-15 02:47:11 +0800
commit946d755adc6d2d7c1163e2993293a099651b0af7 (patch)
tree5f4d8593e408e3becf0d8a79d34ab3e869c6d552 /mail/folder-browser-factory.c
parent352d3c7d3b080850f4fc81b502a0f0b0d3c2369d (diff)
downloadgsoc2013-evolution-946d755adc6d2d7c1163e2993293a099651b0af7.tar.gz
gsoc2013-evolution-946d755adc6d2d7c1163e2993293a099651b0af7.tar.zst
gsoc2013-evolution-946d755adc6d2d7c1163e2993293a099651b0af7.zip
add proto
2003-05-14 JP Rosevear <jpr@ximian.com> * mail-local.h: add proto * mail-local.c (storage_listener_startup): don't listen for destruction, because we have a ref and it'll never happen (mail_local_storage_shutdown): release and unref the local storage * mail-display.c (retrieve_shell_view_interface_from_control): return a new copy every time (set_status_message): release and unref the shell view * folder-browser.c (folder_browser_destroy): guard for multiple destroys * folder-browser-factory.c (control_activate): release and unref the shell view (control_destroy_cb): just remove the control from the list (folder_browser_factory_new_control): don't weak ref the folder browser * component-factory.c (owner_unset_cb): shutdown local storage svn path=/trunk/; revision=21181
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r--mail/folder-browser-factory.c33
1 files changed, 6 insertions, 27 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 9f35b88db8..35e1aeb2ab 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -91,6 +91,7 @@ control_activate (BonoboControl *control,
{
GtkWidget *folder_browser;
Bonobo_UIContainer container;
+ GNOME_Evolution_ShellView svi;
container = bonobo_control_get_remote_ui_container (control, NULL);
bonobo_ui_component_set_container (uic, container, NULL);
@@ -110,7 +111,9 @@ control_activate (BonoboControl *control,
/*bonobo_ui_component_thaw (uic, NULL);*/
- folder_browser_set_shell_view (fb, fb_get_svi (control));
+ svi = fb_get_svi (control);
+ folder_browser_set_shell_view (fb, svi);
+ bonobo_object_release_unref (svi, NULL);
folder_browser_reload (fb);
@@ -158,32 +161,9 @@ control_activate_cb (BonoboControl *control,
}
static void
-control_destroy_cb (GtkObject *fb, GObject *deadbeef)
+control_destroy_cb (GtkObject *fb, GObject *control)
{
- gtk_object_destroy (fb);
-}
-
-static void
-browser_destroy_cb (BonoboControl *control, GObject *deadbeef)
-{
- EIterator *it;
-
- /* We do this from browser_destroy_cb rather than
- * control_destroy_cb because currently, the controls
- * don't seem to all get destroyed properly at quit
- * time (but the widgets get destroyed by X). FIXME.
- */
-
- it = e_list_get_iterator (control_list);
- while (e_iterator_is_valid (it)) {
- if (e_iterator_get (it) == control) {
- e_iterator_delete (it);
- break;
- }
- e_iterator_next (it);
- }
-
- g_object_unref (it);
+ e_list_remove (control_list, control);
}
BonoboControl *
@@ -210,7 +190,6 @@ folder_browser_factory_new_control (const char *uri,
g_signal_connect (control, "activate", G_CALLBACK (control_activate_cb), fb);
g_object_weak_ref (G_OBJECT(control), (GWeakNotify) control_destroy_cb, fb);
- g_object_weak_ref (G_OBJECT(fb), (GWeakNotify) browser_destroy_cb, control);
if (!control_list)
control_list = e_list_new (NULL, NULL, NULL);