aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-01-27 11:39:24 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-01-27 11:39:24 +0800
commit50cedfaadd7cc87d8c74fdff330c45f637c89e0b (patch)
treef87fe835cb39c6fffdc4bdf1c29ad2b8a1aa3533
parent93c8da913ba3e095432d6e2c07c8fcd6f5c3bef7 (diff)
downloadgsoc2013-evolution-50cedfaadd7cc87d8c74fdff330c45f637c89e0b.tar
gsoc2013-evolution-50cedfaadd7cc87d8c74fdff330c45f637c89e0b.tar.gz
gsoc2013-evolution-50cedfaadd7cc87d8c74fdff330c45f637c89e0b.tar.bz2
gsoc2013-evolution-50cedfaadd7cc87d8c74fdff330c45f637c89e0b.tar.lz
gsoc2013-evolution-50cedfaadd7cc87d8c74fdff330c45f637c89e0b.tar.xz
gsoc2013-evolution-50cedfaadd7cc87d8c74fdff330c45f637c89e0b.tar.zst
gsoc2013-evolution-50cedfaadd7cc87d8c74fdff330c45f637c89e0b.zip
Try a control before an embeddable instead of an embeddable before a
control when embedding something in the mail display. svn path=/trunk/; revision=7845
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-display.c35
2 files changed, 25 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ff11955455..f8e6a86b14 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2001-01-26 Ettore Perazzoli <ettore@ximian.com>
+
+ * mail-display.c (get_embedded_for_component): Try a control
+ first, instead of an embeddable.
+
2001-01-26 Jeffrey Stedfast <fejj@ximian.com>
* subscribe-dialog.c (populate_store_foreach): Check for a NULL
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 28587fe1a3..7d2cff4a8b 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -557,24 +557,29 @@ get_embedded_for_component (const char *iid, MailDisplay *md)
BonoboControlFrame *control_frame;
Bonobo_PropertyBag prop_bag;
- embedded = bonobo_widget_new_subdoc (iid, NULL);
- if (embedded) {
- /* FIXME: as of bonobo 0.18, there's an extra
- * client_site dereference in the BonoboWidget
- * destruction path that we have to balance out to
- * prevent problems.
- */
- bonobo_object_ref (BONOBO_OBJECT(bonobo_widget_get_client_site (
- BONOBO_WIDGET (embedded))));
-
- return embedded;
- }
-
/*
- * Try a control now
+ * First try a control.
*/
embedded = bonobo_widget_new_control (iid, NULL);
- if (!embedded)
+ if (embedded == NULL) {
+ /*
+ * No control, try an embeddable instead.
+ */
+ embedded = bonobo_widget_new_subdoc (iid, NULL);
+ if (embedded != NULL) {
+ /* FIXME: as of bonobo 0.18, there's an extra
+ * client_site dereference in the BonoboWidget
+ * destruction path that we have to balance out to
+ * prevent problems.
+ */
+ bonobo_object_ref (BONOBO_OBJECT(bonobo_widget_get_client_site (
+ BONOBO_WIDGET (embedded))));
+
+ return embedded;
+ }
+ }
+
+ if (embedded == NULL)
return NULL;
control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (embedded));