aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-display.c20
-rw-r--r--mail/e-mail-migrate.c30
-rw-r--r--mail/e-mail-reader.c66
-rw-r--r--mail/em-account-editor.c5
-rw-r--r--mail/em-folder-utils.c2
-rw-r--r--mail/em-format-html.c16
-rw-r--r--mail/importers/mail-importer.c2
-rw-r--r--mail/mail-folder-cache.c5
-rw-r--r--mail/mail-folder-cache.h5
-rw-r--r--mail/mail-ops.c6
-rw-r--r--mail/mail-tools.c6
11 files changed, 75 insertions, 88 deletions
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 86ed222f04..fda1f3a034 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -208,6 +208,22 @@ mail_display_style_set (GtkWidget *widget,
}
static void
+mail_display_load_string (EWebView *web_view,
+ const gchar *string)
+{
+ EMailDisplayPrivate *priv;
+
+ priv = E_MAIL_DISPLAY_GET_PRIVATE (web_view);
+ g_return_if_fail (priv->formatter != NULL);
+
+ if (em_format_busy (EM_FORMAT (priv->formatter)))
+ return;
+
+ /* Chain up to parent's load_string() method. */
+ E_WEB_VIEW_CLASS (parent_class)->load_string (web_view, string);
+}
+
+static void
mail_display_url_requested (GtkHTML *html,
const gchar *uri,
GtkHTMLStream *stream)
@@ -270,6 +286,7 @@ mail_display_class_init (EMailDisplayClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
+ EWebViewClass *web_view_class;
GtkHTMLClass *html_class;
parent_class = g_type_class_peek_parent (class);
@@ -284,6 +301,9 @@ mail_display_class_init (EMailDisplayClass *class)
widget_class->realize = mail_display_realize;
widget_class->style_set = mail_display_style_set;
+ web_view_class = E_WEB_VIEW_CLASS (class);
+ web_view_class->load_string = mail_display_load_string;
+
html_class = GTK_HTML_CLASS (class);
html_class->url_requested = mail_display_url_requested;
html_class->link_clicked = mail_display_link_clicked;
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index f28bf56825..34728929c2 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -1209,18 +1209,18 @@ is_mail_folder (const gchar *metadata)
gchar *type;
if (!(doc = xmlParseFile (metadata))) {
- g_warning ("Cannot parse `%s'", metadata);
+ g_warning ("Cannot parse '%s'", metadata);
return FALSE;
}
if (!(node = xmlDocGetRootElement (doc))) {
- g_warning ("`%s' corrupt: document contains no root node", metadata);
+ g_warning ("'%s' corrupt: document contains no root node", metadata);
xmlFreeDoc (doc);
return FALSE;
}
if (!node->name || strcmp ((gchar *)node->name, "efolder") != 0) {
- g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
+ g_warning ("'%s' corrupt: root node is not 'efolder'", metadata);
xmlFreeDoc (doc);
return FALSE;
}
@@ -1591,7 +1591,7 @@ em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar *
g_set_error (
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
- _("Unable to create new folder `%s': %s"),
+ _("Unable to create new folder '%s': %s"),
dest->str, g_strerror (errno));
goto fatal;
}
@@ -1619,7 +1619,7 @@ em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar *
g_set_error (
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
- _("Unable to copy folder `%s' to `%s': %s"),
+ _("Unable to copy folder '%s' to '%s': %s"),
src->str, dest->str, g_strerror (errno));
goto fatal;
}
@@ -1815,7 +1815,7 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, GError **error)
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
_("Unable to scan for existing mailboxes at "
- "`%s': %s"), session->srcdir, g_strerror (errno));
+ "'%s': %s"), session->srcdir, g_strerror (errno));
return FALSE;
}
@@ -2025,7 +2025,7 @@ em_migrate_pop_uid_caches_1_4 (const gchar *data_dir, GError **error)
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
_("Unable to open old POP keep-on-server data "
- "`%s': %s"), cache_dir, g_strerror (errno));
+ "'%s': %s"), cache_dir, g_strerror (errno));
g_free (cache_dir);
return FALSE;
}
@@ -2041,7 +2041,7 @@ em_migrate_pop_uid_caches_1_4 (const gchar *data_dir, GError **error)
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
_("Unable to create POP3 keep-on-server data "
- "directory `%s': %s"), cache_dir,
+ "directory '%s': %s"), cache_dir,
g_strerror (errno));
g_string_free (oldpath, TRUE);
g_free (cache_dir);
@@ -2073,7 +2073,7 @@ em_migrate_pop_uid_caches_1_4 (const gchar *data_dir, GError **error)
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
_("Unable to copy POP3 keep-on-server data "
- "`%s': %s"), oldpath->str,
+ "'%s': %s"), oldpath->str,
g_strerror (errno));
success = FALSE;
}
@@ -2357,7 +2357,7 @@ e_path_to_physical (const gchar *prefix, const gchar *vpath)
ppath_len++; /* For the separating slash. */
/* Take account of the fact that we need to translate every
- * separator into `subfolders/'.
+ * separator into 'subfolders/'.
*/
p = vpath;
while (1) {
@@ -2391,7 +2391,7 @@ e_path_to_physical (const gchar *prefix, const gchar *vpath)
break;
}
- memcpy (dp, p, newp - p + 1); /* `+ 1' to copy the slash too. */
+ memcpy (dp, p, newp - p + 1); /* '+ 1' to copy the slash too. */
dp += newp - p + 1;
memcpy (dp, SUBFOLDER_DIR_NAME, SUBFOLDER_DIR_NAME_LEN);
@@ -2544,7 +2544,7 @@ em_migrate_1_4 (const gchar *data_dir, xmlDocPtr filters, xmlDocPtr vfolders, GE
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
_("Failed to create local mail storage "
- "`%s': %s"), path + 5, g_strerror (errno));
+ "'%s': %s"), path + 5, g_strerror (errno));
g_free (session->srcdir);
camel_object_unref (session);
g_free (path);
@@ -2557,7 +2557,7 @@ em_migrate_1_4 (const gchar *data_dir, xmlDocPtr filters, xmlDocPtr vfolders, GE
g_set_error (
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
- _("Failed to create local mail storage `%s': %s"),
+ _("Failed to create local mail storage '%s': %s"),
path, lex.desc);
g_free (session->srcdir);
camel_object_unref (session);
@@ -3028,7 +3028,7 @@ e_mail_migrate (EShellBackend *shell_backend,
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
_("Unable to create local mail folders at "
- "`%s': %s"), data_dir, g_strerror (errno));
+ "'%s': %s"), data_dir, g_strerror (errno));
return FALSE;
}
}
@@ -3046,7 +3046,7 @@ e_mail_migrate (EShellBackend *shell_backend,
error, E_SHELL_MIGRATE_ERROR,
E_SHELL_MIGRATE_ERROR_FAILED,
_("Unable to read settings from previous "
- "Evolution install, `evolution/config.xmldb' "
+ "Evolution install, 'evolution/config.xmldb' "
"does not exist or is corrupt."));
return FALSE;
}
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index d238d500a9..684b97c085 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -1787,28 +1787,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,
@@ -1822,6 +1800,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;
@@ -1839,6 +1818,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)
@@ -1897,10 +1878,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);
@@ -1919,6 +1901,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;
@@ -1932,6 +1915,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;
@@ -1954,8 +1939,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;
@@ -2668,32 +2654,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);
@@ -2915,7 +2875,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;
}
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 77d2dc8216..d3158fb48d 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -835,7 +835,6 @@ emae_signature_new (GtkWidget *widget, EMAccountEditor *emae)
EShell *shell;
EShellSettings *shell_settings;
GtkWidget *editor;
- gboolean html_mode;
gpointer parent;
shell = e_shell_get_default ();
@@ -844,11 +843,7 @@ emae_signature_new (GtkWidget *widget, EMAccountEditor *emae)
parent = gtk_widget_get_toplevel (widget);
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
- html_mode = e_shell_settings_get_boolean (
- shell_settings, "composer-format-html");
-
editor = e_signature_editor_new ();
- gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (editor), html_mode);
gtk_window_set_transient_for (GTK_WINDOW (editor), parent);
gtk_widget_show (editor);
}
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index c840644870..98168866ae 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -504,7 +504,7 @@ struct _EMCreateFolderTempData
static gchar *
emfu_create_folder__desc (struct _EMCreateFolder *m)
{
- return g_strdup_printf (_("Creating folder `%s'"), m->full_name);
+ return g_strdup_printf (_("Creating folder '%s'"), m->full_name);
}
static void
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index ad47742ba8..62e190f4b2 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -47,6 +47,7 @@
#include "e-util/e-icon-factory.h"
#include "e-util/e-util-private.h"
#include "e-util/e-util.h"
+#include "e-util/e-extensible.h"
#include <gtkhtml/gtkhtml.h>
#include <gtkhtml/gtkhtml-stream.h>
@@ -965,6 +966,8 @@ efh_init (EMFormatHTML *efh,
g_signal_connect_swapped (
efh, "notify::mark-citations",
G_CALLBACK (em_format_redraw), NULL);
+
+ e_extensible_load_extensions (E_EXTENSIBLE (efh));
}
GType
@@ -986,9 +989,18 @@ em_format_html_get_type (void)
NULL /* value_table */
};
+ static const GInterfaceInfo extensible_info = {
+ (GInterfaceInitFunc) NULL,
+ (GInterfaceFinalizeFunc) NULL,
+ NULL /* interface_data */
+ };
+
type = g_type_register_static (
em_format_get_type(), "EMFormatHTML",
&type_info, G_TYPE_FLAG_ABSTRACT);
+
+ g_type_add_interface_static (
+ type, E_TYPE_EXTENSIBLE, &extensible_info);
}
return type;
@@ -1383,7 +1395,7 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
camel_http_stream_set_proxy ((CamelHttpStream *)instream, proxy);
g_free (proxy);
}
- camel_operation_start(NULL, _("Retrieving `%s'"), job->u.uri);
+ camel_operation_start(NULL, _("Retrieving '%s'"), job->u.uri);
tmp_stream = (CamelHttpStream *)instream;
content_type = camel_http_stream_get_content_type(tmp_stream);
length = camel_header_raw_find(&tmp_stream->headers, "Content-Length", NULL);
@@ -1392,7 +1404,7 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
total = atoi(length);
camel_content_type_unref(content_type);
} else
- camel_operation_start_transient(NULL, _("Retrieving `%s'"), job->u.uri);
+ camel_operation_start_transient(NULL, _("Retrieving '%s'"), job->u.uri);
camel_url_free(url);
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index ee1c958d12..f61ce2658b 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -152,7 +152,7 @@ import_mbox_exec (struct _import_mbox_msg *m)
if (m->cancel)
oldcancel = camel_operation_register(m->cancel);
- camel_operation_start(NULL, _("Importing `%s'"), folder->full_name);
+ camel_operation_start(NULL, _("Importing '%s'"), folder->full_name);
camel_folder_freeze(folder);
while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
CamelMimeMessage *msg;
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 10a66a4f47..b1a332d4f4 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -23,6 +23,11 @@
*
*/
+/**
+ * SECTION: mail-folder-cache
+ * @short_description: Stores information about open folders
+ **/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h
index 8a7b82eada..dd3a108d03 100644
--- a/mail/mail-folder-cache.h
+++ b/mail/mail-folder-cache.h
@@ -31,11 +31,6 @@
G_BEGIN_DECLS
-/**
- * SECTION: mail-folder-cache
- * @short_description: Stores information about open folders
- **/
-
#define MAIL_TYPE_FOLDER_CACHE mail_folder_cache_get_type()
#define MAIL_FOLDER_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_TYPE_FOLDER_CACHE, MailFolderCache))
#define MAIL_FOLDER_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAIL_TYPE_FOLDER_CACHE, MailFolderCacheClass))
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 73ad926390..7cbb91bede 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -595,7 +595,7 @@ mail_send_message (struct _send_queue_msg *m, CamelFolder *queue, const gchar *u
folder = mail_tool_uri_to_folder (sent_folder_uri, 0, ex);
if (camel_exception_is_set(ex)) {
g_string_append_printf (err, _("Failed to append to %s: %s\n"
- "Appending to local `Sent' folder instead."),
+ "Appending to local 'Sent' folder instead."),
sent_folder_uri, camel_exception_get_description (ex));
camel_exception_clear (ex);
}
@@ -622,7 +622,7 @@ mail_send_message (struct _send_queue_msg *m, CamelFolder *queue, const gchar *u
if (err->len)
g_string_append(err, "\n\n");
g_string_append_printf (err, _("Failed to append to %s: %s\n"
- "Appending to local `Sent' folder instead."),
+ "Appending to local 'Sent' folder instead."),
name, camel_exception_get_description (ex));
camel_object_ref (sent_folder);
camel_object_unref (folder);
@@ -638,7 +638,7 @@ mail_send_message (struct _send_queue_msg *m, CamelFolder *queue, const gchar *u
if (err->len)
g_string_append(err, "\n\n");
- g_string_append_printf (err, _("Failed to append to local `Sent' folder: %s"),
+ g_string_append_printf (err, _("Failed to append to local 'Sent' folder: %s"),
camel_exception_get_description (ex));
}
}
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 9e268d85cf..f006b1b963 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -120,7 +120,7 @@ mail_tool_get_local_movemail_path (const guchar *uri, CamelException *ex)
path = g_build_filename (data_dir, "spool", NULL);
if (g_stat(path, &st) == -1 && g_mkdir_with_parents(path, 0700) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create spool directory `%s': %s"),
+ camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create spool directory '%s': %s"),
path, g_strerror(errno));
g_free(path);
return NULL;
@@ -150,7 +150,7 @@ mail_tool_do_movemail (const gchar *source_url, CamelException *ex)
if (strcmp(uri->protocol, "mbox") != 0) {
/* This is really only an internal error anyway */
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("Trying to movemail a non-mbox source `%s'"),
+ _("Trying to movemail a non-mbox source '%s'"),
source_url);
camel_url_free(uri);
return NULL;
@@ -298,7 +298,7 @@ mail_tool_uri_to_folder (const gchar *uri, guint32 flags, CamelException *ex)
/* FIXME?: the filter:get_folder callback should do this itself? */
curi = em_uri_to_camel(uri);
if (uri == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Invalid folder: `%s'"), uri);
+ camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Invalid folder: '%s'"), uri);
return NULL;
}
uri = curi;