aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-browser.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-20 08:40:29 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-20 08:40:29 +0800
commitb50cd21e669befffe30870b474c250884f856100 (patch)
tree4f3454e458d4c0fb495ed741347f653accc96de1 /mail/em-folder-browser.c
parent96b112cb998fcf711eb3d0d3d66640a94607042f (diff)
downloadgsoc2013-evolution-b50cd21e669befffe30870b474c250884f856100.tar.gz
gsoc2013-evolution-b50cd21e669befffe30870b474c250884f856100.tar.zst
gsoc2013-evolution-b50cd21e669befffe30870b474c250884f856100.zip
** See bug #52885.
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. svn path=/trunk/; revision=24320
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r--mail/em-folder-browser.c24
1 files changed, 18 insertions, 6 deletions
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 ();