aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser-factory.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-16 02:45:42 +0800
committerDan Winship <danw@src.gnome.org>2001-05-16 02:45:42 +0800
commitdadc54fa9885cbe38e84ed667fea13c9d3ee7603 (patch)
treea358f95b9e0d9b375a860f0b3d77a5d6fe1c7c9f /mail/folder-browser-factory.c
parent7cc37466c122693397465b443811aa20d855c04f (diff)
downloadgsoc2013-evolution-dadc54fa9885cbe38e84ed667fea13c9d3ee7603.tar.gz
gsoc2013-evolution-dadc54fa9885cbe38e84ed667fea13c9d3ee7603.tar.zst
gsoc2013-evolution-dadc54fa9885cbe38e84ed667fea13c9d3ee7603.zip
Load http images if the user has force-loaded images too.
* mail-display.c (on_url_requested): Load http images if the user has force-loaded images too. (mail_display_redisplay): Update for normal/headers/source changes. (mail_display_load_images): New. Force HTTP image loading for the current message. * mail-config.c (mail_config_get_message_display_style, mail_config_set_message_display_style): Updated and renamed from mail_config_{get,set}_view_source * mail-callbacks.c (load_images): New. * folder-browser.c (folder_browser_set_message_display_style): Renamed and updated from folder_browser_toggle_view_source. * folder-browser-factory.c (verbs): Add ViewLoadImages. (control_activate): Update for normal/headers/source change to radio group. svn path=/trunk/; revision=9820
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r--mail/folder-browser-factory.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index daf087d9ff..31ee715eff 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -91,9 +91,9 @@ BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("ToolsVFolders", vfolder_edit_vfolders),
BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSender", vfolder_sender),
BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSubject", vfolder_subject),
-/* BONOBO_UI_UNSAFE_VERB ("ViewFullHeaders", view_full_headers), */
BONOBO_UI_UNSAFE_VERB ("ViewHideRead", hide_read),
BONOBO_UI_UNSAFE_VERB ("ViewHideSelected", hide_selected),
+ BONOBO_UI_UNSAFE_VERB ("ViewLoadImages", load_images),
BONOBO_UI_UNSAFE_VERB ("ViewShowAll", hide_none),
BONOBO_UI_VERB_END
@@ -203,6 +203,13 @@ folder_browser_setup_property_menu (FolderBrowser *fb,
g_free (name);
}
+/* Must be in the same order as MailConfigDisplayStyle */
+char *message_display_styles[] = {
+ "/commands/ViewNormal",
+ "/commands/ViewFullHeaders",
+ "/commands/ViewSource"
+};
+
static void
control_activate (BonoboControl *control,
BonoboUIComponent *uic,
@@ -236,11 +243,14 @@ control_activate (BonoboControl *control,
/* 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", folder_browser);
- state = mail_config_get_view_source();
- bonobo_ui_component_set_prop(uic, "/commands/ViewSource", "state", state?"1":"0", NULL);
- bonobo_ui_component_add_listener(uic, "ViewSource", folder_browser_toggle_view_source, folder_browser);
+ state = mail_config_get_message_display_style ();
+ bonobo_ui_component_set_prop (uic, message_display_styles[state],
+ "state", "1", NULL);
+ bonobo_ui_component_add_listener (uic, "ViewNormal", folder_browser_set_message_display_style, folder_browser);
+ bonobo_ui_component_add_listener (uic, "ViewFullHeaders", folder_browser_set_message_display_style, folder_browser);
+ bonobo_ui_component_add_listener (uic, "ViewSource", folder_browser_set_message_display_style, folder_browser);
/* FIXME: this kind of bypasses bonobo but seems the only way when we change components */
- folder_browser_toggle_view_source(uic, "", Bonobo_UIComponent_STATE_CHANGED, state?"1":"0", folder_browser);
+ folder_browser_set_message_display_style (uic, strrchr (message_display_styles[state], '/') + 1, Bonobo_UIComponent_STATE_CHANGED, "1", folder_browser);
if (fb->folder && CAMEL_IS_VTRASH_FOLDER(fb->folder)) {
bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "sensitive", "0", NULL);