From 4a8c1c7323bbde12c2213228f272cdaf5f5039ab Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 10 Jan 2003 19:42:20 +0000 Subject: Updated for function rename. 2003-01-10 Jeffrey Stedfast * component-factory.c (factory): Updated for function rename. * mail-config-factory.c (mail_config_control_factory_cb): Namespaced the function name. * folder-browser-ui.c (folder_browser_ui_add_global): Don't add the listener for show_preview here, it was moved into folder-browser.c so we could detach the listener when the folder-browser is destroyed. Also prevents a listener being added multiple times (which was possible? before). * folder-browser.c (folder_browser_destroy): Remove the gconf notify handler for show_preview. (show_preview_changed): Moved here from folder-browser-ui.c svn path=/trunk/; revision=19408 --- mail/folder-browser-ui.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'mail/folder-browser-ui.c') diff --git a/mail/folder-browser-ui.c b/mail/folder-browser-ui.c index 295991bd04..22f305df25 100644 --- a/mail/folder-browser-ui.c +++ b/mail/folder-browser-ui.c @@ -602,17 +602,6 @@ folder_browser_ui_rm_list (FolderBrowser *fb) folder_browser_ui_discard_view_menus (fb); } -static void -show_preview_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) -{ - FolderBrowser *fb = user_data; - gboolean show_preview; - - show_preview = gconf_client_get_bool (client, "/apps/evolution/mail/display/show_preview", NULL); - bonobo_ui_component_set_prop (fb->uicomp, "/commands/ViewPreview", "state", show_preview ? "1" : "0", NULL); - folder_browser_set_message_preview (fb, show_preview); -} - void folder_browser_ui_add_global (FolderBrowser *fb) { @@ -630,15 +619,6 @@ folder_browser_ui_add_global (FolderBrowser *fb) gconf = gconf_client_get_default (); /* (Pre)view toggle */ - - /* watch the show_preview setting */ - gconf_client_add_dir (gconf, "/apps/evolution/mail/display/show_preview", - GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); - - /* listen for changed events to the show_preview setting */ - gconf_client_notify_add (gconf, "/apps/evolution/mail/display/show_preview", - show_preview_changed, fb, NULL, NULL); - show_preview = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_preview", NULL); bonobo_ui_component_set_prop (uic, "/commands/ViewPreview", "state", show_preview ? "1" : "0", NULL); -- cgit