aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-04-10 04:09:46 +0800
committerFederico Mena Quintero <federico@novell.com>2010-04-10 04:09:46 +0800
commitb360395495a273356355959c1067c00abf18e2d4 (patch)
tree8316320e8e3c2078fafa9ced6a503197b5e6d6cd /mail
parent5b5ac7a174676bf665b627b25d25ae9a9de689f4 (diff)
parenta16f08974d6955f843dddce3b9423c5349873488 (diff)
downloadgsoc2013-evolution-b360395495a273356355959c1067c00abf18e2d4.tar.gz
gsoc2013-evolution-b360395495a273356355959c1067c00abf18e2d4.tar.zst
gsoc2013-evolution-b360395495a273356355959c1067c00abf18e2d4.zip
Merge branch 'express2' into express2-reduced-preferences
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-browser.c12
-rw-r--r--mail/e-mail-display.c4
-rw-r--r--mail/e-mail-reader.c4
-rw-r--r--mail/em-format-html.c68
-rw-r--r--mail/message-list.c8
5 files changed, 37 insertions, 59 deletions
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index a6461e2bfe..78dd91b5c2 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -244,6 +244,7 @@ mail_browser_message_selected_cb (EMailBrowser *browser,
CamelMessageInfo *info;
CamelFolder *folder;
EMailReader *reader;
+ const gchar *title;
if (uid == NULL)
return;
@@ -257,9 +258,14 @@ mail_browser_message_selected_cb (EMailBrowser *browser,
if (info == NULL)
return;
- gtk_window_set_title (
- GTK_WINDOW (browser),
- camel_message_info_subject (info));
+ /* XXX The string here was added after the 2.30.0 release, so
+ * it's not marked for translation. But it IS marked for
+ * translation in 2.31. */
+ title = camel_message_info_subject (info);
+ if (title == NULL || *title == '\0')
+ title = "(No Subject)";
+
+ gtk_window_set_title (GTK_WINDOW (browser), title);
gtk_widget_grab_focus (
GTK_WIDGET (((EMFormatHTML *) html_display)->html));
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 9f9569dd8a..fda1f3a034 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -255,12 +255,12 @@ mail_display_link_clicked (GtkHTML *html,
if (!(flags & EM_FORMAT_HTML_HEADER_CC))
flags |= EM_FORMAT_HTML_HEADER_CC;
else
- flags |= EM_FORMAT_HTML_HEADER_CC;
+ flags &= ~EM_FORMAT_HTML_HEADER_CC;
} else if (strcmp (uri, "##BCC##") == 0) {
if (!(flags & EM_FORMAT_HTML_HEADER_BCC))
flags |= EM_FORMAT_HTML_HEADER_BCC;
else
- flags |= EM_FORMAT_HTML_HEADER_BCC;
+ flags &= ~EM_FORMAT_HTML_HEADER_BCC;
}
priv->formatter->header_wrap_flags = flags;
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 97919c5888..684b97c085 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2145,8 +2145,12 @@ mail_reader_update_actions (EMailReader *reader)
shell = e_shell_backend_get_shell (shell_backend);
shell_settings = e_shell_get_shell_settings (shell);
+#ifndef G_OS_WIN32
disable_printing = e_shell_settings_get_boolean (
shell_settings, "disable-printing");
+#else
+ disable_printing = FALSE;
+#endif
have_an_account =
(state & E_MAIL_READER_HAVE_ACCOUNT);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 8e1cfcef3e..62e190f4b2 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1492,17 +1492,22 @@ efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMForm
} else if (g_ascii_strncasecmp(url, "http:", 5) == 0 || g_ascii_strncasecmp(url, "https:", 6) == 0) {
d(printf(" adding job, get %s\n", url));
job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url));
- } else if (g_ascii_strncasecmp(url, "/", 1) == 0) {
+ } else if (g_str_has_prefix (url, "file://")) {
gchar *data = NULL;
gsize length = 0;
gboolean status;
+ gchar *path;
+
+ path = g_filename_from_uri (url, NULL, NULL);
+ g_return_if_fail (path != NULL);
- status = g_file_get_contents (url, &data, &length, NULL);
+ status = g_file_get_contents (path, &data, &length, NULL);
if (status)
gtk_html_stream_write (handle, data, length);
- gtk_html_stream_close(handle, status? GTK_HTML_STREAM_OK : GTK_HTML_STREAM_ERROR);
+ gtk_html_stream_close (handle, status ? GTK_HTML_STREAM_OK : GTK_HTML_STREAM_ERROR);
g_free (data);
+ g_free (path);
} else {
d(printf("HTML Includes reference to unknown uri '%s'\n", url));
gtk_html_stream_close(handle, GTK_HTML_STREAM_ERROR);
@@ -2307,74 +2312,43 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
/* Let us add a '...' if we have more addresses */
if (limit > 0 && wrap && a && (i>(limit-1))) {
-
- gchar * evolution_imagesdir = g_filename_to_uri(EVOLUTION_IMAGESDIR, NULL, NULL);
+ gchar *evolution_imagesdir = g_filename_to_uri (EVOLUTION_IMAGESDIR, NULL, NULL);
if (!strcmp (field, _("To"))) {
-
g_string_append (out, "<a href=\"##TO##\">...</a>");
-#ifdef G_OS_WIN32
- str = g_strdup_printf ("<a href=\"##TO##\">+</a> ");
-#else
- str = g_strdup_printf ("<a href=\"##TO##\"><img src=\"%s/plus.png\" /></a> ", evolution_imagesdir);
-#endif
- g_free(evolution_imagesdir);
-
- return str;
+ str = g_strdup_printf ("<a href=\"##TO##\"><img src=\"%s/plus.png\"></a> ", evolution_imagesdir);
}
else if (!strcmp (field, _("Cc"))) {
g_string_append (out, "<a href=\"##CC##\">...</a>");
-#ifdef G_OS_WIN32
- str = g_strdup_printf ("<a href=\"##CC##\">+</a> ");
-#else
- str = g_strdup_printf ("<a href=\"##CC##\"><img src=\"%s/plus.png\" /></a> ", evolution_imagesdir);
-#endif
- g_free(evolution_imagesdir);
-
- return str;
+ str = g_strdup_printf ("<a href=\"##CC##\"><img src=\"%s/plus.png\"></a> ", evolution_imagesdir);
}
else if (!strcmp (field, _("Bcc"))) {
g_string_append (out, "<a href=\"##BCC##\">...</a>");
-#ifdef G_OS_WIN32
- str = g_strdup_printf ("<a href=\"##BCC##\">+</a> ");
-#else
- str = g_strdup_printf ("<a href=\"##BCC##\"><img src=\"%s/plus.png\" /></a> ", evolution_imagesdir);
-#endif
- g_free(evolution_imagesdir);
+ str = g_strdup_printf ("<a href=\"##BCC##\"><img src=\"%s/plus.png\"></a> ", evolution_imagesdir);
+ }
+ g_free (evolution_imagesdir);
+
+ if (str)
return str;
- }
}
}
if (limit > 0 && i>(limit)) {
-
- gchar * evolution_imagesdir = g_filename_to_uri(EVOLUTION_IMAGESDIR, NULL, NULL);
+ gchar *evolution_imagesdir = g_filename_to_uri (EVOLUTION_IMAGESDIR, NULL, NULL);
if (!strcmp (field, _("To"))) {
-#ifdef G_OS_WIN32
- str = g_strdup_printf ("<a href=\"##TO##\">-</a> ");
-#else
- str = g_strdup_printf ("<a href=\"##TO##\"><img src=\"%s/minus.png\" /></a> ", evolution_imagesdir);
-#endif
+ str = g_strdup_printf ("<a href=\"##TO##\"><img src=\"%s/minus.png\"></a> ", evolution_imagesdir);
}
else if (!strcmp (field, _("Cc"))) {
-#ifdef G_OS_WIN32
- str = g_strdup_printf ("<a href=\"##CC##\">-</a> ");
-#else
- str = g_strdup_printf ("<a href=\"##CC##\"><img src=\"%s/minus.png\" /></a> ", evolution_imagesdir);
-#endif
+ str = g_strdup_printf ("<a href=\"##CC##\"><img src=\"%s/minus.png\"></a> ", evolution_imagesdir);
}
else if (!strcmp (field, _("Bcc"))) {
-#ifdef G_OS_WIN32
- str = g_strdup_printf ("<a href=\"##BCC##\">-</a> ");
-#else
- str = g_strdup_printf ("<a href=\"##BCC##\"><img src=\"%s/minus.png\" /></a> ", evolution_imagesdir);
-#endif
+ str = g_strdup_printf ("<a href=\"##BCC##\"><img src=\"%s/minus.png\"></a> ", evolution_imagesdir);
}
- g_free(evolution_imagesdir);
+ g_free (evolution_imagesdir);
}
return str;
diff --git a/mail/message-list.c b/mail/message-list.c
index 02b7ce9908..ed1236524c 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2517,12 +2517,6 @@ message_list_finalize (GObject *object)
}
static void
-message_list_built (MessageList *message_list)
-{
- gtk_widget_grab_focus (GTK_WIDGET (message_list));
-}
-
-static void
message_list_selectable_update_actions (ESelectable *selectable,
EFocusTracker *focus_tracker,
GdkAtom *clipboard_targets,
@@ -2563,7 +2557,7 @@ message_list_class_init (MessageListClass *class)
gtk_object_class = GTK_OBJECT_CLASS (class);
gtk_object_class->destroy = message_list_destroy;
- class->message_list_built = message_list_built;
+ class->message_list_built = NULL;
/* Inherited from ESelectableInterface */
g_object_class_override_property (