[Xfce4-commits] <postler:master> Only enable 'Send Message' if To field is not empty

Christian Dywan noreply at xfce.org
Thu Jun 3 23:26:01 CEST 2010


Updating branch refs/heads/master
         to 0c6c6e13c51c4d085934ee0e61e0fc35666498fa (commit)
       from 7ae834ce26085abda2d16c95c208db175072896f (commit)

commit 0c6c6e13c51c4d085934ee0e61e0fc35666498fa
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Jun 3 17:20:27 2010 +0200

    Only enable 'Send Message' if To field is not empty

 postler/postler-composer.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index c717ae8..d225c0e 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -163,6 +163,12 @@ public class Postler.Composer : Gtk.Window {
         shelf.pack_start (scrolled, true, true, 0);
         shelf.show_all ();
 
+        actions.get_action ("MessageSend").sensitive = false;
+        entry_to.notify["text"].connect ((object, pspec) => {
+            bool state = entry_to.text != "";
+            actions.get_action ("MessageSend").sensitive = state;
+        });
+
         entry_from.grab_focus ();
 
         content.editable = true;



More information about the Xfce4-commits mailing list