[Xfce4-commits] <postler:master> Properly connect send button sensitivity

Christian Dywan noreply at xfce.org
Tue Jan 25 03:44:01 CET 2011


Updating branch refs/heads/master
         to 486832e0c4446a6118e204b9b0ad4759b348a49c (commit)
       from 4898636f1b498a006e157454b127b38ba02c31fe (commit)

commit 486832e0c4446a6118e204b9b0ad4759b348a49c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Jan 25 02:43:16 2011 +0100

    Properly connect send button sensitivity

 postler/postler-composer.vala |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index 9536e32..ba3b8bd 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -485,10 +485,14 @@ public class Postler.Composer : Gtk.Window {
         toolbar.insert (toolitem, -1);
         toolitem = new Gtk.ToolItem ();
         toolitem.set_border_width (4);
-        button = new Gtk.Button.from_stock (STOCK_MAIL_SEND);
-        toolitem.add (button);
-        actions.get_action ("MessageSend").connect_proxy (button);
-        button.clicked.connect ((widget) => {
+        var button_send = new Gtk.Button.from_stock (STOCK_MAIL_SEND);
+        toolitem.add (button_send);
+        var send = actions.get_action ("MessageSend");
+        send.connect_proxy (button_send);
+        send.notify["sensitive"].connect ((action, pspec) => {
+            button_send.sensitive = send.sensitive;
+        });
+        button_send.clicked.connect ((widget) => {
             action_mail_send ();
         });
         toolbar.insert (toolitem, -1);



More information about the Xfce4-commits mailing list