diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-01-10 07:34:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-01-10 07:34:45 +0800 |
commit | 42e8edbe5c6bbb0ea247f256e113a07949432017 (patch) | |
tree | 614828e2b5513ba98c7621f97ac74f4f6095220b /composer | |
parent | b70d7b029286309bcd19bd2e3efd53fdd62705a9 (diff) | |
download | gsoc2013-evolution-42e8edbe5c6bbb0ea247f256e113a07949432017.tar gsoc2013-evolution-42e8edbe5c6bbb0ea247f256e113a07949432017.tar.gz gsoc2013-evolution-42e8edbe5c6bbb0ea247f256e113a07949432017.tar.bz2 gsoc2013-evolution-42e8edbe5c6bbb0ea247f256e113a07949432017.tar.lz gsoc2013-evolution-42e8edbe5c6bbb0ea247f256e113a07949432017.tar.xz gsoc2013-evolution-42e8edbe5c6bbb0ea247f256e113a07949432017.tar.zst gsoc2013-evolution-42e8edbe5c6bbb0ea247f256e113a07949432017.zip |
Fixed the setup of the "save-draft" signal so that it would actually work.
2002-01-09 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (class_init): Fixed the setup of the
"save-draft" signal so that it would actually work.
svn path=/trunk/; revision=15279
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 12 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 49 |
2 files changed, 23 insertions, 38 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index cdbf338f25..b0b891e5e9 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,15 @@ +2002-01-09 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer.c (class_init): Fixed the setup of the + "save-draft" signal so that it would actually work. + +2002-01-08 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer.c (is_special_header): Greatly simplified. No + need to have a list of headers to not accept - we can just refuse + all headers that are not X-* headers (other than X-Evolution + headers). + 2002-01-07 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer.c (e_msg_composer_get_message_draft): Set the diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 5c8cb768d3..485e73001a 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2181,7 +2181,7 @@ class_init (EMsgComposerClass *klass) object_class->type, GTK_SIGNAL_OFFSET (EMsgComposerClass, save_draft), marshal_NONE__NONE_INT, - GTK_TYPE_NONE, 1); + GTK_TYPE_NONE, 1, GTK_TYPE_INT); gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } @@ -2509,47 +2509,20 @@ e_msg_composer_new (void) return new; } - -/* FIXME: are there any other headers?? */ -/* This is a list of headers that we DO NOT want to append to the - * extra_hdr_* arrays. - * - * Note: a '*' char can be used for a simple wilcard match. - * is_special_header() will use g_strNcasecmp() with the first '*' - * char being the end of the match string. If no '*' is present, then - * it will be assumed that the header must be an exact match. - */ -static char *special_headers[] = { - "Subject", - "Date", - "From", - "To", - "Cc", - "Bcc", - "Received", - "Message-Id", - "X-Evolution*", - "Content-*", - "MIME-Version", - NULL -}; - static gboolean is_special_header (const char *hdr_name) { - int i; + /* Note: a header is a "special header" if it has any meaning: + 1. it's not a X-* header or + 2. it's an X-Evolution* header + */ + if (g_strncasecmp (hdr_name, "X-", 2)) + return TRUE; - for (i = 0; special_headers[i]; i++) { - char *p; - - if ((p = strchr (special_headers[i], '*'))) { - if (!g_strncasecmp (special_headers[i], hdr_name, p - special_headers[i])) - return TRUE; - } else { - if (!g_strcasecmp (special_headers[i], hdr_name)) - return TRUE; - } - } + if (!g_strncasecmp (hdr_name, "X-Evolution", 11)) + return TRUE; + + /* we can keep all other X-* headers */ return FALSE; } |