[Xfce4-commits] <postler:master> Disable saving of account details without address
Christian Dywan
noreply at xfce.org
Sat Dec 11 20:08:05 CET 2010
Updating branch refs/heads/master
to 1ecf6ebd7fc8b76eaa8811f98c2984f23d7e05da (commit)
from af3e3418cab25ecf4c1bcd9bb7394ef0c099f7da (commit)
commit 1ecf6ebd7fc8b76eaa8811f98c2984f23d7e05da
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Dec 11 00:21:28 2010 +0100
Disable saving of account details without address
postler/postler-accountsetup.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/postler/postler-accountsetup.vala b/postler/postler-accountsetup.vala
index 8a230f8..c70b20b 100644
--- a/postler/postler-accountsetup.vala
+++ b/postler/postler-accountsetup.vala
@@ -115,6 +115,11 @@ public class Postler.AccountSetup : Gtk.Dialog {
var setup = new AccountSetup (info);
setup.add_button (_("_Create Account"), Gtk.ResponseType.APPLY);
setup.set_default_response (Gtk.ResponseType.APPLY);
+ setup.set_response_sensitive (Gtk.ResponseType.APPLY, false);
+ setup.address.changed.connect ((editable) => {
+ setup.set_response_sensitive (Gtk.ResponseType.APPLY,
+ setup.address.text.chr (-1, '@') != null);
+ });
setup.show ();
return setup;
}
@@ -123,6 +128,10 @@ public class Postler.AccountSetup : Gtk.Dialog {
var setup = new AccountSetup (info);
setup.add_button (_("_Save Account"), Gtk.ResponseType.APPLY);
setup.set_default_response (Gtk.ResponseType.APPLY);
+ setup.address.changed.connect ((editable) => {
+ setup.set_response_sensitive (Gtk.ResponseType.APPLY,
+ setup.address.text.chr (-1, '@') != null);
+ });
setup.show ();
return setup;
}
More information about the Xfce4-commits
mailing list