aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-mailer-prefs.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-05-14 02:04:57 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-14 02:04:57 +0800
commit11ec709d94cea06827785fe09d1760711939c7ef (patch)
tree9d8d82d314483c8a88737000bb60a7a5d22326e3 /mail/em-mailer-prefs.c
parentc22062eb58d8b15321d9c0dcc3c3bf02574ecc19 (diff)
downloadgsoc2013-evolution-11ec709d94cea06827785fe09d1760711939c7ef.tar
gsoc2013-evolution-11ec709d94cea06827785fe09d1760711939c7ef.tar.gz
gsoc2013-evolution-11ec709d94cea06827785fe09d1760711939c7ef.tar.bz2
gsoc2013-evolution-11ec709d94cea06827785fe09d1760711939c7ef.tar.lz
gsoc2013-evolution-11ec709d94cea06827785fe09d1760711939c7ef.tar.xz
gsoc2013-evolution-11ec709d94cea06827785fe09d1760711939c7ef.tar.zst
gsoc2013-evolution-11ec709d94cea06827785fe09d1760711939c7ef.zip
Don't include the last default_header when setting the default headers. If
2004-05-13 Jeffrey Stedfast <fejj@novell.com> * em-format.c (em_format_default_headers): Don't include the last default_header when setting the default headers. If the user has configured Evolution to display the Mailer header, then it will be set in em-folder-view.c as appropriate when it checks the gconf settings. Fixes bug #58217. * em-mailer-prefs.c (em_mailer_prefs_construct): Default "x-evolution-mailer" header to disabled. svn path=/trunk/; revision=25903
Diffstat (limited to 'mail/em-mailer-prefs.c')
-rw-r--r--mail/em-mailer-prefs.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 6371188f7a..f4a72deeca 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -77,19 +77,16 @@ static GType col_types[] = {
};
/* temporarily copied from em-format.c */
-static const struct {
- const char *name;
- guint32 flags;
-} default_headers[] = {
- { N_("From"), EM_FORMAT_HEADER_BOLD },
- { N_("Reply-To"), EM_FORMAT_HEADER_BOLD },
- { N_("To"), EM_FORMAT_HEADER_BOLD },
- { N_("Cc"), EM_FORMAT_HEADER_BOLD },
- { N_("Bcc"), EM_FORMAT_HEADER_BOLD },
- { N_("Subject"), EM_FORMAT_HEADER_BOLD },
- { N_("Date"), EM_FORMAT_HEADER_BOLD },
- { N_("Newsgroups"), EM_FORMAT_HEADER_BOLD },
- { "x-evolution-mailer", 0 }, /* DO NOT translate */
+static const char *default_headers[] = {
+ N_("From"),
+ N_("Reply-To"),
+ N_("To"),
+ N_("Cc"),
+ N_("Bcc"),
+ N_("Subject"),
+ N_("Date"),
+ N_("Newsgroups"),
+ "x-evolution-mailer", /* DO NOT translate */
};
#define EM_FORMAT_HEADER_XMAILER "x-evolution-mailer"
@@ -886,14 +883,14 @@ 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 < sizeof (default_headers) / sizeof (default_headers[0]); i++) {
+ for (i = 0; i < G_N_ELEMENTS (default_headers); i++) {
struct _EMMailerPrefsHeader *h;
h = g_malloc (sizeof (struct _EMMailerPrefsHeader));
h->is_default = TRUE;
- h->name = g_strdup (default_headers[i].name);
- h->enabled = TRUE;
- g_hash_table_insert (default_header_hash, (gpointer) default_headers[i].name, h);
+ h->name = g_strdup (default_headers[i]);
+ h->enabled = strcmp (default_headers[i], "x-evolution-mailer") != 0;
+ g_hash_table_insert (default_header_hash, (gpointer) default_headers[i], h);
header_add_list = g_slist_append (header_add_list, h);
}