aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-folder-browser.c24
2 files changed, 26 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index df187b024f..2fef03451b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2004-01-20 Not Zed <NotZed@Ximian.com>
+ ** See bug #52885.
+
+ * em-folder-browser.c (emfb_create_view_menus): unref the view
+ instance/menu's rather than asserting, if they exist.
+ (emfb_set_folder): call create_view_menu's rather than
+ create_view_instance, so the view menu's are properly setup.
+ (emfb_set_folder): call superclass first.
+
** See bug #53028.
* message-list.c (on_selection_changed_cmd): emit the
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 43d42e433d..d8bc18c7fe 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -885,6 +885,8 @@ static void
emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
{
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
+
+ emfb_parent->set_folder(emfv, folder, uri);
/* This is required since we get activated the first time
before the folder is open and need to override the
@@ -909,10 +911,10 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
emfb->priv->list_built_id =
g_signal_connect (emfv->list, "message_list_built", G_CALLBACK (emfb_list_built), emfv);
- emfb_create_view_instance ((EMFolderBrowser *) emfv, folder, uri);
+ /*emfb_create_view_instance ((EMFolderBrowser *) emfv, folder, uri);*/
+ if (emfv->uic)
+ emfb_create_view_menus((EMFolderBrowser *)emfv, emfv->uic);
}
-
- emfb_parent->set_folder(emfv, folder, uri);
}
/* TODO: All this mess should sit directly on MessageList, but it would
@@ -922,9 +924,19 @@ static void
emfb_create_view_menus(EMFolderBrowser *emfb, BonoboUIComponent *uic)
{
struct _EMFolderBrowserPrivate *p = emfb->priv;
-
- g_assert(p->view_instance == NULL);
- g_assert(p->view_menus == NULL);
+
+ if (p->view_instance) {
+ g_object_unref(p->view_instance);
+ p->view_instance = NULL;
+ }
+
+ if (p->view_menus) {
+ g_object_unref(p->view_menus);
+ p->view_menus = NULL;
+ }
+
+ /*g_assert(p->view_instance == NULL);
+ g_assert(p->view_menus == NULL);*/
collection_init ();