From e9ea8a567cc85027ef7dcef7ba3ad03044677793 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 22 Apr 2010 18:28:17 -0400 Subject: Work around another dropped gnome-icon-theme icon. mail-mark-notjunk -> mail-mark-not-junk --- modules/mail/e-mail-shell-view-actions.c | 2 +- modules/mail/e-mail-shell-view-actions.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 732b65060f..efd3f64d02 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -1223,7 +1223,7 @@ static GtkRadioActionEntry mail_filter_entries[] = { MAIL_FILTER_LAST_5_DAYS_MESSAGES }, { "mail-filter-messages-not-junk", - "mail-mark-notjunk", + "mail-mark-not-junk", N_("Messages Not Junk"), NULL, NULL, /* XXX Add a tooltip! */ diff --git a/modules/mail/e-mail-shell-view-actions.h b/modules/mail/e-mail-shell-view-actions.h index eb11f46013..addd67452b 100644 --- a/modules/mail/e-mail-shell-view-actions.h +++ b/modules/mail/e-mail-shell-view-actions.h @@ -115,8 +115,8 @@ E_SHELL_WINDOW_ACTION ((window), "mail-mark-important") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_JUNK(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-mark-junk") -#define E_SHELL_WINDOW_ACTION_MAIL_MARK_NOTJUNK(window) \ - E_SHELL_WINDOW_ACTION ((window), "mail-mark-notjunk") +#define E_SHELL_WINDOW_ACTION_MAIL_MARK_NOT_JUNK(window) \ + E_SHELL_WINDOW_ACTION ((window), "mail-mark-not-junk") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_READ(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-mark-read") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_UNIMPORTANT(window) \ -- cgit v1.2.3 From 76735b58fcbce6fa39fd73d765786790307a6abb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 26 Apr 2010 16:43:15 +0200 Subject: Bug #603418 - Custom headers not displayed in message preview --- modules/mail/e-mail-shell-content.c | 3 + modules/mail/em-mailer-prefs.c | 128 +++--------------------------------- modules/mail/em-mailer-prefs.h | 12 ---- 3 files changed, 13 insertions(+), 130 deletions(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 17eb613b32..9ac74a48ea 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -40,6 +40,7 @@ #include "message-list.h" #include "e-mail-reader.h" +#include "e-mail-reader-utils.h" #include "e-mail-shell-backend.h" #include "e-mail-shell-view-actions.h" @@ -461,6 +462,8 @@ mail_shell_content_constructed (GObject *object) message_list, "message-selected", G_CALLBACK (mail_shell_content_message_selected_cb), shell_content); + + e_mail_reader_connect_headers (reader); } static guint32 diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c index f32fbbf284..89a7f0acc9 100644 --- a/modules/mail/em-mailer-prefs.c +++ b/modules/mail/em-mailer-prefs.c @@ -45,6 +45,7 @@ #include "widgets/misc/e-charset-combo-box.h" #include "e-mail-label-manager.h" +#include "e-mail-reader-utils.h" #include "mail-config.h" #include "em-folder-selection-button.h" #include "em-junk.h" @@ -416,7 +417,7 @@ emmp_save_headers (EMMailerPrefs *prefs) header_list = NULL; valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (prefs->header_list_store), &iter); while (valid) { - struct _EMMailerPrefsHeader h; + struct _EMailReaderHeader h; gboolean enabled; gchar *xml; @@ -426,7 +427,7 @@ emmp_save_headers (EMMailerPrefs *prefs) -1); h.enabled = enabled; - if ((xml = em_mailer_prefs_header_to_xml (&h))) + if ((xml = e_mail_reader_header_to_xml (&h))) header_list = g_slist_append (header_list, xml); valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (prefs->header_list_store), &iter); @@ -1085,9 +1086,9 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, header_add_list = NULL; default_header_hash = g_hash_table_new (g_str_hash, g_str_equal); for (i = 0; i < G_N_ELEMENTS (default_headers); i++) { - struct _EMMailerPrefsHeader *h; + EMailReaderHeader *h; - h = g_malloc (sizeof (struct _EMMailerPrefsHeader)); + h = g_malloc (sizeof (EMailReaderHeader)); h->is_default = TRUE; h->name = g_strdup (default_headers[i]); h->enabled = strcmp ((gchar *)default_headers[i], "x-evolution-mailer") != 0; @@ -1099,15 +1100,15 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, header_config_list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/display/headers", GCONF_VALUE_STRING, NULL); p = header_config_list; while (p) { - struct _EMMailerPrefsHeader *h, *def; + EMailReaderHeader *h, *def; gchar *xml = (gchar *) p->data; - h = em_mailer_prefs_header_from_xml (xml); + h = e_mail_reader_header_from_xml (xml); if (h) { def = g_hash_table_lookup (default_header_hash, h->name); if (def) { def->enabled = h->enabled; - em_mailer_prefs_header_free (h); + e_mail_reader_header_free (h); } else { h->is_default = FALSE; header_add_list = g_slist_append (header_add_list, h); @@ -1123,7 +1124,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, p = header_add_list; while (p) { - struct _EMMailerPrefsHeader *h = (struct _EMMailerPrefsHeader *) p->data; + struct _EMailReaderHeader *h = (struct _EMailReaderHeader *) p->data; const gchar *name; if (g_ascii_strcasecmp (h->name, EM_FORMAT_HEADER_XMAILER) == 0) @@ -1139,7 +1140,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, HEADER_LIST_HEADER_COLUMN, h->name, -1); - em_mailer_prefs_header_free (h); + e_mail_reader_header_free (h); p = p->next; } @@ -1227,112 +1228,3 @@ em_mailer_prefs_new (EShell *shell) return GTK_WIDGET (new); } - -static struct _EMMailerPrefsHeader * -emmp_header_from_xmldoc (xmlDocPtr doc) -{ - struct _EMMailerPrefsHeader *h; - xmlNodePtr root; - xmlChar *name; - - if (doc == NULL) - return NULL; - - root = doc->children; - if (strcmp ((gchar *)root->name, "header") != 0) - return NULL; - - name = xmlGetProp (root, (const guchar *)"name"); - if (name == NULL) - return NULL; - - h = g_malloc0 (sizeof (struct _EMMailerPrefsHeader)); - h->name = g_strdup ((gchar *)name); - xmlFree (name); - - if (xmlHasProp (root, (const guchar *)"enabled")) - h->enabled = 1; - else - h->enabled = 0; - - return h; -} - -/** - * em_mailer_prefs_header_from_xml - * @xml: XML configuration data - * - * Parses passed XML data, which should be of - * the format
, and - * returns a EMMailerPrefs structure, or NULL if there - * is an error. - **/ -struct _EMMailerPrefsHeader * -em_mailer_prefs_header_from_xml (const gchar *xml) -{ - struct _EMMailerPrefsHeader *header; - xmlDocPtr doc; - - if (!(doc = xmlParseDoc ((guchar *) xml))) - return NULL; - - header = emmp_header_from_xmldoc (doc); - xmlFreeDoc (doc); - - return header; -} - -/** - * em_mailer_prefs_header_free - * @header: header to free - * - * Frees the memory associated with the passed header - * structure. - */ -void -em_mailer_prefs_header_free (struct _EMMailerPrefsHeader *header) -{ - if (header == NULL) - return; - - g_free (header->name); - g_free (header); -} - -/** - * em_mailer_prefs_header_to_xml - * @header: header from which to generate XML - * - * Returns the passed header as a XML structure, - * or NULL on error - */ -gchar * -em_mailer_prefs_header_to_xml (struct _EMMailerPrefsHeader *header) -{ - xmlDocPtr doc; - xmlNodePtr root; - xmlChar *xml; - gchar *out; - gint size; - - g_return_val_if_fail (header != NULL, NULL); - g_return_val_if_fail (header->name != NULL, NULL); - - doc = xmlNewDoc ((const guchar *)"1.0"); - - root = xmlNewDocNode (doc, NULL, (const guchar *)"header", NULL); - xmlSetProp (root, (const guchar *)"name", (guchar *)header->name); - if (header->enabled) - xmlSetProp (root, (const guchar *)"enabled", NULL); - - xmlDocSetRootElement (doc, root); - xmlDocDumpMemory (doc, &xml, &size); - xmlFreeDoc (doc); - - out = g_malloc (size + 1); - memcpy (out, xml, size); - out[size] = '\0'; - xmlFree (xml); - - return out; -} diff --git a/modules/mail/em-mailer-prefs.h b/modules/mail/em-mailer-prefs.h index 8ad6ad2f64..db77493416 100644 --- a/modules/mail/em-mailer-prefs.h +++ b/modules/mail/em-mailer-prefs.h @@ -50,13 +50,6 @@ G_BEGIN_DECLS typedef struct _EMMailerPrefs EMMailerPrefs; typedef struct _EMMailerPrefsClass EMMailerPrefsClass; -typedef struct _EMMailerPrefsHeader EMMailerPrefsHeader; - -struct _EMMailerPrefsHeader { - gchar *name; - guint enabled:1; - guint is_default:1; -}; struct _EMMailerPrefs { GtkVBox parent_object; @@ -120,11 +113,6 @@ GtkWidget * create_combo_text_widget (void); GtkWidget * em_mailer_prefs_new (EShell *shell); -EMMailerPrefsHeader * - em_mailer_prefs_header_from_xml (const gchar *xml); -gchar * em_mailer_prefs_header_to_xml (EMMailerPrefsHeader *header); -void em_mailer_prefs_header_free (EMMailerPrefsHeader *header); - G_END_DECLS #endif /* EM_MAILER_PREFS_H */ -- cgit v1.2.3 From be8c081a728fe8a1e97e615f443dccb5f824b19f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 29 Apr 2010 21:08:09 -0400 Subject: Revert "Work around another dropped gnome-icon-theme icon." This reverts commit edf6286a38279e6db82dee4da50e94c587f06e02. gnome-icon-theme got it wrong, not us. See bug #616954. --- modules/mail/e-mail-shell-view-actions.c | 2 +- modules/mail/e-mail-shell-view-actions.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index efd3f64d02..732b65060f 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -1223,7 +1223,7 @@ static GtkRadioActionEntry mail_filter_entries[] = { MAIL_FILTER_LAST_5_DAYS_MESSAGES }, { "mail-filter-messages-not-junk", - "mail-mark-not-junk", + "mail-mark-notjunk", N_("Messages Not Junk"), NULL, NULL, /* XXX Add a tooltip! */ diff --git a/modules/mail/e-mail-shell-view-actions.h b/modules/mail/e-mail-shell-view-actions.h index addd67452b..eb11f46013 100644 --- a/modules/mail/e-mail-shell-view-actions.h +++ b/modules/mail/e-mail-shell-view-actions.h @@ -115,8 +115,8 @@ E_SHELL_WINDOW_ACTION ((window), "mail-mark-important") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_JUNK(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-mark-junk") -#define E_SHELL_WINDOW_ACTION_MAIL_MARK_NOT_JUNK(window) \ - E_SHELL_WINDOW_ACTION ((window), "mail-mark-not-junk") +#define E_SHELL_WINDOW_ACTION_MAIL_MARK_NOTJUNK(window) \ + E_SHELL_WINDOW_ACTION ((window), "mail-mark-notjunk") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_READ(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-mark-read") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_UNIMPORTANT(window) \ -- cgit v1.2.3 From 9638b78a83918ddb54afc15580f01a3fce17c0fd Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 11 May 2010 21:44:42 -0500 Subject: Bug 618400 - "Mark All Messages as Read" shortcut missing --- modules/mail/e-mail-shell-view-actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 732b65060f..e92800c660 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -913,7 +913,7 @@ static GtkActionEntry mail_entries[] = { { "mail-folder-mark-all-as-read", "mail-read", N_("Mar_k All Messages as Read"), - NULL, + "slash", N_("Mark all messages in the folder as read"), G_CALLBACK (action_mail_folder_mark_all_as_read_cb) }, -- cgit v1.2.3