From 552e93b4654853bd4d3dab11a1457d2d601f0dc5 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 20 Jun 2008 21:11:15 +0000 Subject: ** Fixes bug #538908 2008-06-20 Matthew Barnes ** Fixes bug #538908 * composer/e-composer-actions.h: Define E_COMPOSER_ACTION_SEND_OPTIONS. * composer/e-msg-composer.c (msg_composer_account_changed_cb): Desensitize the "send-options" action unless we've selected an Exchange or GroupWise account. Based on a patch by Paul Bolle. svn path=/trunk/; revision=35660 --- composer/ChangeLog | 11 +++++++++++ composer/e-composer-actions.h | 2 ++ composer/e-msg-composer.c | 8 ++++++++ 3 files changed, 21 insertions(+) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 4c0ee3a144..fa81691838 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,14 @@ +2008-06-20 Matthew Barnes + + ** Fixes bug #538908 + + * e-composer-actions.h: + Define E_COMPOSER_ACTION_SEND_OPTIONS. + + * e-msg-composer.c (msg_composer_account_changed_cb): + Desensitize the "send-options" action unless we've selected an + Exchange or GroupWise account. Based on a patch by Paul Bolle. + 2008-06-13 Milan Crha ** Fix for bug #330597 diff --git a/composer/e-composer-actions.h b/composer/e-composer-actions.h index 16058da9ec..ec31e32827 100644 --- a/composer/e-composer-actions.h +++ b/composer/e-composer-actions.h @@ -49,6 +49,8 @@ E_COMPOSER_ACTION ((composer), "security-menu") #define E_COMPOSER_ACTION_SEND(composer) \ E_COMPOSER_ACTION ((composer), "send") +#define E_COMPOSER_ACTION_SEND_OPTIONS(composer) \ + E_COMPOSER_ACTION ((composer), "send-options") #define E_COMPOSER_ACTION_SMIME_ENCRYPT(composer) \ E_COMPOSER_ACTION ((composer), "smime-encrypt") #define E_COMPOSER_ACTION_SMIME_SIGN(composer) \ diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index cc92fdf8b7..5d43fb9b2f 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1669,6 +1669,7 @@ msg_composer_account_changed_cb (EMsgComposer *composer) ESignature *signature; EAccount *account; gboolean active; + gboolean sensitive; const gchar *cc_addrs = NULL; const gchar *bcc_addrs = NULL; const gchar *uid; @@ -1702,6 +1703,13 @@ msg_composer_account_changed_cb (EMsgComposer *composer) signature = uid ? mail_config_get_signature_by_uid (uid) : NULL; e_composer_header_table_set_signature (table, signature); + /* XXX This should be done more generically. The composer + * should not know about particular account types. */ + sensitive = + (strstr (account->transport->url, "exchange") != NULL) || + (strstr (account->transport->url, "groupwise") != NULL); + gtk_action_set_sensitive (ACTION (SEND_OPTIONS), sensitive); + exit: update_auto_recipients (table, UPDATE_AUTO_CC, cc_addrs); update_auto_recipients (table, UPDATE_AUTO_BCC, bcc_addrs); -- cgit