diff options
author | Radek Doulik <rodo@ximian.com> | 2002-02-01 02:58:59 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2002-02-01 02:58:59 +0800 |
commit | 81762a26a3409b65c1d7a45e024eaba88242f103 (patch) | |
tree | c8bf54303bbe4fe3b808aca2355bc5996c93dd81 | |
parent | a6c6ee7466577e48eca43ecb15ad309006d16eed (diff) | |
download | gsoc2013-evolution-81762a26a3409b65c1d7a45e024eaba88242f103.tar gsoc2013-evolution-81762a26a3409b65c1d7a45e024eaba88242f103.tar.gz gsoc2013-evolution-81762a26a3409b65c1d7a45e024eaba88242f103.tar.bz2 gsoc2013-evolution-81762a26a3409b65c1d7a45e024eaba88242f103.tar.lz gsoc2013-evolution-81762a26a3409b65c1d7a45e024eaba88242f103.tar.xz gsoc2013-evolution-81762a26a3409b65c1d7a45e024eaba88242f103.tar.zst gsoc2013-evolution-81762a26a3409b65c1d7a45e024eaba88242f103.zip |
ignore spell checking of words in addresses, move set_body_text after all
2002-01-31 Radek Doulik <rodo@ximian.com>
* mail-callbacks.c (mail_generate_reply): ignore spell checking of
words in addresses, move set_body_text after all ignored words are
set so we don't have to spell check whole document again
(mail_ignore_address): helper function
(mail_ignore): ditto
svn path=/trunk/; revision=15541
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 34 | ||||
-rw-r--r-- | mail/main.c | 1 |
3 files changed, 37 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 9d03ad328e..47f6aa6041 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2002-01-31 Radek Doulik <rodo@ximian.com> + + * mail-callbacks.c (mail_generate_reply): ignore spell checking of + words in addresses, move set_body_text after all ignored words are + set so we don't have to spell check whole document again + (mail_ignore_address): helper function + (mail_ignore): ditto + 2002-01-30 Jeffrey Stedfast <fejj@ximian.com> * mail-accounts.c (mail_edit): Pass the parent window to diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 463c435369..34e23e14aa 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -861,6 +861,25 @@ guess_me (const CamelInternetAddress *to, const CamelInternetAddress *cc, const return account; } +inline static void +mail_ignore (EMsgComposer *composer, const gchar *name, const gchar *address) +{ + e_msg_composer_ignore (composer, name && *name ? name : address); +} + +static void +mail_ignore_address (EMsgComposer *composer, const CamelInternetAddress *addr) +{ + const gchar *name, *address; + gint i, max; + + max = camel_address_length (CAMEL_ADDRESS (addr)); + for (i = 0; i < max; i++) { + camel_internet_address_get (addr, i, &name, &address); + mail_ignore (composer, name, address); + } +} + static EMsgComposer * mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char *uid, int mode) { @@ -895,19 +914,17 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char localtime (&date)); format = e_utf8_from_locale_string (date_str); text = mail_tool_quote_message (message, format, name && *name ? name : address); + mail_ignore (composer, name, address); g_free (format); - if (text) { - e_msg_composer_set_body_text (composer, text); - g_free (text); - } - /* Set the recipients */ accounts = mail_config_get_accounts (); to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO); cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC); - + mail_ignore_address (composer, to_addrs); + mail_ignore_address (composer, cc_addrs); + if (mode == REPLY_LIST) { CamelMessageInfo *info; const char *mlist; @@ -970,6 +987,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char e_destination_set_email (dest, reply_addr); to = g_list_append (to, dest); g_hash_table_insert (rcpt_hash, (char *) reply_addr, GINT_TO_POINTER (1)); + mail_ignore (composer, name, reply_addr); } } @@ -1021,6 +1039,10 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char g_list_free (to); g_list_free (cc); + if (text) { + e_msg_composer_set_body_text (composer, text); + g_free (text); + } e_msg_composer_set_headers (composer, me ? me->name : NULL, tov, ccv, NULL, subject); e_destination_freev (tov); diff --git a/mail/main.c b/mail/main.c index b3daea3f99..8876fb7517 100644 --- a/mail/main.c +++ b/mail/main.c @@ -14,6 +14,7 @@ #include <signal.h> #include <libgnome/gnome-defs.h> +#include <libgnome/gnome-sound.h> #include <libgnomeui/gnome-init.h> #include <bonobo/bonobo-main.h> #include <bonobo/bonobo-object-directory.h> |