diff options
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/em-folder-browser.c | 8 | ||||
-rw-r--r-- | mail/em-folder-browser.h | 2 | ||||
-rw-r--r-- | mail/em-folder-view.c | 3 |
4 files changed, 18 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 72458075f8..a273aa85ab 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,15 @@ 2006-08-09 Srinivasa Ragavan <sragavan@novell.com> + * em-folder-browser.c: (em_folder_browser_get_wide), + (emfb_activate): Get the wide status from the priv struct when + available already instead of gconf. + * em-folder-browser.h: + * em-folder-view.c: (emfv_setup_view_instance): Get the wide status + from the parent struct. It avoids a race, where it shows compressed + headers in classic view and vice versa. + +2006-08-09 Srinivasa Ragavan <sragavan@novell.com> + ** Fix for bug #348565 * em-format-html-display.c (efhd_bar_resize) (efhd_add_bar): Check diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 3950640c98..8890d5931d 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -603,6 +603,11 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state) /* FIXME: need to update menu's to reflect ui changes */ } +gboolean em_folder_browser_get_wide (EMFolderBrowser *emfb) +{ + return emfb->priv->show_wide; +} + void em_folder_browser_show_wide(EMFolderBrowser *emfb, gboolean state) { GtkWidget *w; @@ -1874,8 +1879,7 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) message_list_set_threaded(emfv->list, state); /* Show wide display */ - state = gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_wide", NULL); - if (state) { + if (emfb->priv->show_wide) { bonobo_ui_component_set_prop(uic, "/commands/ViewAfter", "state", "1", NULL); bonobo_ui_component_set_prop(uic, "/commands/ViewBelow", "state", "0", NULL); } else { diff --git a/mail/em-folder-browser.h b/mail/em-folder-browser.h index d09bf91cd3..0ac684c800 100644 --- a/mail/em-folder-browser.h +++ b/mail/em-folder-browser.h @@ -56,7 +56,7 @@ GtkWidget *em_folder_browser_new(void); void em_folder_browser_show_preview(EMFolderBrowser *emfv, gboolean state); void em_folder_browser_show_wide(EMFolderBrowser *emfv, gboolean state); - +gboolean em_folder_browser_get_wide(EMFolderBrowser *emfv); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 67bdc34b46..03080cd23e 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -560,8 +560,7 @@ emfv_setup_view_instance(EMFolderView *emfv) id = mail_config_folder_to_safe_url (emfv->folder); p->view_instance = gal_view_instance_new (collection, id); - show_wide = gconf_client_get_bool (mail_config_get_gconf_client (), "/apps/evolution/mail/display/show_wide", NULL); - + show_wide = em_folder_browser_get_wide (emfv); if (show_wide) { char *safe_id, *filename; |