[Xfce4-commits] <postler:master> Hide From if there is only a single account

Christian Dywan noreply at xfce.org
Thu Dec 16 02:30:02 CET 2010


Updating branch refs/heads/master
         to 28766dab4e62f6fadb95a9de22f8bd59cf0bb216 (commit)
       from 1f8a1efa37c15d4ff7018b3bcd37d435c1d919b2 (commit)

commit 28766dab4e62f6fadb95a9de22f8bd59cf0bb216
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Dec 16 02:28:55 2010 +0100

    Hide From if there is only a single account
    
    Fixes: https://bugs.launchpad.net/postler/+bug/690506

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

diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index 3a5fd55..0d1bdd9 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -407,15 +407,15 @@ public class Postler.Composer : Gtk.Window {
         var sizegroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
         var box = new Gtk.HBox (false, 0);
         shelf.pack_start (box, false, false, 4);
-        var label = new Gtk.Label.with_mnemonic (_("_From:"));
-        label.xalign = 1.0f;
-        box.pack_start (label, false, false, 4);
-        sizegroup.add_widget (label);
+        var label_from = new Gtk.Label.with_mnemonic (_("_From:"));
+        label_from.xalign = 1.0f;
+        box.pack_start (label_from, false, false, 4);
+        sizegroup.add_widget (label_from);
         combo_from = new Gtk.ComboBox.text ();
         box.pack_start (combo_from, true, true, 4);
         box = new Gtk.HBox (false, 0);
         shelf.pack_start (box, false, false, 4);
-        label = new Gtk.Label.with_mnemonic (_("_To:"));
+        var label = new Gtk.Label.with_mnemonic (_("_To:"));
         label.xalign = 1.0f;
         box.pack_start (label, false, false, 4);
         sizegroup.add_widget (label);
@@ -492,11 +492,13 @@ public class Postler.Composer : Gtk.Window {
             }
         }
 
+        /* Select first account, hide From if there's only one account */
         combo_from.set_active (0);
         if (combo_from.model.iter_n_children (null) > 1)
             combo_from.grab_focus ();
         else {
-            combo_from.button_sensitivity = Gtk.SensitivityType.OFF;
+            label_from.hide ();
+            combo_from.hide ();
             entry_to.grab_focus ();
         }
 



More information about the Xfce4-commits mailing list