aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.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/mail-display.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/mail-display.c')
-rw-r--r--mail/mail-display.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index bf8bc41c47..79f0aea10d 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -44,6 +44,7 @@
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnome/gnome-url.h>
+#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-control-frame.h>
#include <bonobo/bonobo-stream-memory.h>
#include <bonobo/bonobo-widget.h>
@@ -2570,14 +2571,11 @@ retrieve_shell_view_interface_from_control (BonoboControl *control)
shell_view_interface = Bonobo_Unknown_queryInterface (control_frame,
"IDL:GNOME/Evolution/ShellView:1.0",
&ev);
- CORBA_exception_free (&ev);
+
+ if (BONOBO_EX (&ev))
+ shell_view_interface = CORBA_OBJECT_NIL;
- if (shell_view_interface != CORBA_OBJECT_NIL)
- g_object_set_data ((GObject *) control,
- "mail_threads_shell_view_interface",
- shell_view_interface);
- else
- g_warning ("Control frame doesn't have Evolution/ShellView.");
+ CORBA_exception_free (&ev);
return shell_view_interface;
}
@@ -2596,10 +2594,7 @@ set_status_message (const char *message, int busy)
control = BONOBO_CONTROL (e_iterator_get (it));
- shell_view_interface = g_object_get_data ((GObject *) control, "mail_threads_shell_view_interface");
-
- if (shell_view_interface == CORBA_OBJECT_NIL)
- shell_view_interface = retrieve_shell_view_interface_from_control (control);
+ shell_view_interface = retrieve_shell_view_interface_from_control (control);
CORBA_exception_init (&ev);
@@ -2612,6 +2607,8 @@ set_status_message (const char *message, int busy)
}
CORBA_exception_free (&ev);
+
+ bonobo_object_release_unref (shell_view_interface, NULL);
/* yeah we only set the first one. Why? Because it seems to leave
random ones lying around otherwise. Shrug. */