[geary/wip/537-send-on-invalid-cc] Composer: Only enable send if CC/BCC/Reply-To are empty or valid
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/537-send-on-invalid-cc] Composer: Only enable send if CC/BCC/Reply-To are empty or valid
- Date: Sat, 17 Aug 2019 06:34:43 +0000 (UTC)
commit 840494b2fa79291ded39b7938682498a659428ce
Author: Michael Gratton <mike vee net>
Date: Sat Aug 17 16:33:29 2019 +1000
Composer: Only enable send if CC/BCC/Reply-To are empty or valid
Fixes #537
src/client/composer/composer-widget.vala | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index e34736e4..3cbc21b6 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1765,7 +1765,14 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
}
private void validate_send_button() {
- get_action(ACTION_SEND).set_enabled(this.to_entry.valid || this.cc_entry.valid ||
this.bcc_entry.valid);
+ // To must be valid (and hence non-empty), the other email
+ // fields must be either empty or valid.
+ get_action(ACTION_SEND).set_enabled(
+ this.to_entry.valid &&
+ (this.cc_entry.empty || this.cc_entry.valid) &&
+ (this.bcc_entry.empty || this.bcc_entry.valid) &&
+ (this.reply_to_entry.empty || this.reply_to_entry.valid)
+ );
}
private void set_compact_header_recipients() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]