aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r--mail/e-mail-reader.c76
1 files changed, 18 insertions, 58 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index c670446a50..10f1864497 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -1286,8 +1286,8 @@ static GtkActionEntry mail_reader_entries[] = {
N_("Mark the selected messages as junk"),
G_CALLBACK (action_mail_mark_junk_cb) },
- { "mail-mark-notjunk",
- "mail-mark-notjunk",
+ { "mail-mark-not-junk",
+ "mail-mark-not-junk",
N_("_Not Junk"),
"<Shift><Control>j",
N_("Mark the selected messages as not being junk"),
@@ -1596,9 +1596,9 @@ static EPopupActionEntry mail_reader_popup_entries[] = {
N_("Mark as _Junk"),
"mail-mark-junk" },
- { "mail-popup-mark-notjunk",
+ { "mail-popup-mark-not-junk",
N_("Mark as _Not Junk"),
- "mail-mark-notjunk" },
+ "mail-mark-not-junk" },
{ "mail-popup-mark-read",
N_("Mar_k as Read"),
@@ -1781,28 +1781,6 @@ mail_reader_message_read_cb (EMailReader *reader)
}
static void
-update_webview_content (EMailReader *reader, const gchar *content)
-{
- EMFormatHTMLDisplay *html_display;
- EWebView *web_view;
-
- g_return_if_fail (reader != NULL);
- g_return_if_fail (content != NULL);
-
- html_display = e_mail_reader_get_html_display (reader);
- g_return_if_fail (html_display != NULL);
-
- /* skip the progress message when it's formatting something */
- if (em_format_busy (EM_FORMAT (html_display)))
- return;
-
- web_view = E_WEB_VIEW (EM_FORMAT_HTML (html_display)->html);
- g_return_if_fail (web_view != NULL);
-
- e_web_view_load_string (web_view, content);
-}
-
-static void
mail_reader_message_loaded_cb (CamelFolder *folder,
const gchar *message_uid,
CamelMimeMessage *message,
@@ -1816,6 +1794,7 @@ mail_reader_message_loaded_cb (CamelFolder *folder,
EShellBackend *shell_backend;
EShellSettings *shell_settings;
EShell *shell;
+ EWebView *web_view;
EMEvent *event;
EMEventTargetMessage *target;
const gchar *cursor_uid;
@@ -1841,6 +1820,8 @@ mail_reader_message_loaded_cb (CamelFolder *folder,
cursor_uid = MESSAGE_LIST (message_list)->cursor_uid;
+ web_view = E_WEB_VIEW (EM_FORMAT_HTML (html_display)->html);
+
/* If the user picked a different message in the time it took
* to fetch this message, then don't bother rendering it. */
if (g_strcmp0 (cursor_uid, message_uid) != 0)
@@ -1899,10 +1880,11 @@ mail_reader_message_loaded_cb (CamelFolder *folder,
_("Unable to retrieve message"),
ex->desc);
} else {
- string = g_strdup_printf (_("Retrieving message '%s'"), cursor_uid);
+ string = g_strdup_printf (
+ _("Retrieving message '%s'"), cursor_uid);
}
- update_webview_content (reader, string);
+ e_web_view_load_string (web_view, string);
g_free (string);
camel_exception_clear (ex);
@@ -1921,6 +1903,7 @@ mail_reader_message_selected_timeout_cb (EMailReader *reader)
EMailReaderPrivate *priv;
EMFormatHTMLDisplay *html_display;
GtkWidget *message_list;
+ EWebView *web_view;
CamelFolder *folder;
const gchar *cursor_uid;
const gchar *format_uid;
@@ -1934,6 +1917,8 @@ mail_reader_message_selected_timeout_cb (EMailReader *reader)
cursor_uid = MESSAGE_LIST (message_list)->cursor_uid;
format_uid = EM_FORMAT (html_display)->uid;
+ web_view = E_WEB_VIEW (EM_FORMAT_HTML (html_display)->html);
+
if (MESSAGE_LIST (message_list)->last_sel_single) {
GtkWidget *widget;
gboolean html_display_visible;
@@ -1956,8 +1941,9 @@ mail_reader_message_selected_timeout_cb (EMailReader *reader)
gboolean store_async;
MailMsgDispatchFunc disp_func;
- string = g_strdup_printf (_("Retrieving message '%s'"), cursor_uid);
- update_webview_content (reader, string);
+ string = g_strdup_printf (
+ _("Retrieving message '%s'"), cursor_uid);
+ e_web_view_load_string (web_view, string);
g_free (string);
store_async = folder->parent_store->flags & CAMEL_STORE_ASYNC;
@@ -2318,7 +2304,7 @@ mail_reader_update_actions (EMailReader *reader)
action = e_mail_reader_get_action (reader, action_name);
gtk_action_set_sensitive (action, sensitive && !(state & E_MAIL_READER_FOLDER_IS_JUNK));
- action_name = "mail-mark-notjunk";
+ action_name = "mail-mark-not-junk";
sensitive = selection_has_junk_messages;
action = e_mail_reader_get_action (reader, action_name);
gtk_action_set_sensitive (action, sensitive);
@@ -2671,32 +2657,6 @@ e_mail_reader_init (EMailReader *reader)
/* Bind properties. */
- e_binding_new_full (
- shell_settings, "mail-citation-color",
- html_display, "citation-color",
- e_binding_transform_string_to_color,
- NULL, NULL);
-
- e_binding_new (
- shell_settings, "mail-image-loading-policy",
- html_display, "image-loading-policy");
-
- e_binding_new (
- shell_settings, "mail-only-local-photos",
- html_display, "only-local-photos");
-
- e_binding_new (
- shell_settings, "mail-show-animated-images",
- web_view, "animate");
-
- e_binding_new (
- shell_settings, "mail-show-sender-photo",
- html_display, "show-sender-photo");
-
- e_binding_new (
- shell_settings, "mail-show-real-date",
- html_display, "show-real-date");
-
action_name = "mail-caret-mode";
action = e_mail_reader_get_action (reader, action_name);
@@ -2935,7 +2895,7 @@ e_mail_reader_get_action (EMailReader *reader,
if (action == NULL)
g_critical (
- "%s: action `%s' not found", G_STRFUNC, action_name);
+ "%s: action '%s' not found", G_STRFUNC, action_name);
return action;
}