evolution r35660 - trunk/composer



Author: mbarnes
Date: Fri Jun 20 21:11:15 2008
New Revision: 35660
URL: http://svn.gnome.org/viewvc/evolution?rev=35660&view=rev

Log:
2008-06-20  Matthew Barnes  <mbarnes redhat com>

	** 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.



Modified:
   trunk/composer/ChangeLog
   trunk/composer/e-composer-actions.h
   trunk/composer/e-msg-composer.c

Modified: trunk/composer/e-composer-actions.h
==============================================================================
--- trunk/composer/e-composer-actions.h	(original)
+++ trunk/composer/e-composer-actions.h	Fri Jun 20 21:11:15 2008
@@ -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) \

Modified: trunk/composer/e-msg-composer.c
==============================================================================
--- trunk/composer/e-msg-composer.c	(original)
+++ trunk/composer/e-msg-composer.c	Fri Jun 20 21:11:15 2008
@@ -1669,6 +1669,7 @@
 	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 @@
 	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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]