aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-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));