From e73fea5ecfc8b1840eaff2b3c4d88fa9bd46df87 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 18 Sep 2001 21:12:37 +0000 Subject: Merged into folder_browser_new: nothing ever changes the URI of an * folder-browser.c (folder_browser_set_uri): Merged into folder_browser_new: nothing ever changes the URI of an existing folder browser any more. (folder_browser_new): Make this take a uri argument and do the work folder_browser_set_uri used to do, except that we set fb->uri right away, so that if the folder browser's control is activated before got_folder() gets called, then folder_browser_ui_add_list() will have access to the correct uri for purposes of setting ViewThreaded, etc. Fixes #4913. (got_folder): Don't set fb->uri here since it will already have been set. Don't call message_list_set_threaded, since it should be a noop now (and if it's not, it would make the message list not match the menu item). * folder-browser-ui.c (folder_browser_ui_add_list): Remove some code that was failing to work around the problems above. * message-browser.c (message_browser_new): Pass uri to folder_browser_new, remove call to set_uri. * folder-browser-factory.c (folder_browser_factory_new_control): Likewise. Also fix a s/destroy/unref/ in an error cleanup. svn path=/trunk/; revision=12954 --- mail/folder-browser-ui.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mail/folder-browser-ui.c') diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c index ca60821ae4..ad2b45f452 100644 --- a/mail/folder-browser-ui.c +++ b/mail/folder-browser-ui.c @@ -343,10 +343,8 @@ folder_browser_ui_add_list (FolderBrowser *fb) /* Threaded toggle */ state = mail_config_get_thread_list (FOLDER_BROWSER (fb)->uri); - bonobo_ui_component_set_prop (uic, "/commands/ViewThreaded", "state", state ? "1" : "0", NULL); bonobo_ui_component_add_listener (uic, "ViewThreaded", folder_browser_toggle_threads, fb); - /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */ - folder_browser_toggle_threads (uic, "", Bonobo_UIComponent_STATE_CHANGED, state ? "1" : "0", fb); + bonobo_ui_component_set_prop (uic, "/commands/ViewThreaded", "state", state ? "1" : "0", NULL); /* Property menu */ folder_browser_setup_property_menu (fb, fb->uicomp); -- cgit v1.2.3