diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-05-14 02:04:57 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-05-14 02:04:57 +0800 |
commit | 11ec709d94cea06827785fe09d1760711939c7ef (patch) | |
tree | 9d8d82d314483c8a88737000bb60a7a5d22326e3 | |
parent | c22062eb58d8b15321d9c0dcc3c3bf02574ecc19 (diff) | |
download | gsoc2013-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
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/em-format.c | 4 | ||||
-rw-r--r-- | mail/em-mailer-prefs.c | 31 |
3 files changed, 25 insertions, 19 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 0196d30f3a..627debbc22 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,14 @@ 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. + * em-format-quote.c (emfq_text_plain): Add a stripsig filter. Fixes bug #52767. diff --git a/mail/em-format.c b/mail/em-format.c index 0894669a15..a93b63728c 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -762,9 +762,9 @@ void em_format_default_headers(EMFormat *emf) { int i; - + em_format_clear_headers(emf); - for (i=0;i<sizeof(default_headers)/sizeof(default_headers[0]);i++) + for (i = 0; i < G_N_ELEMENTS (default_headers) - 1; i++) em_format_add_header(emf, default_headers[i].name, default_headers[i].flags); } 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); } |