[Commits] [SCM] clawsker branch, master, updated. 1.0.1-18-g3deb7b5

mones at claws-mail.org mones at claws-mail.org
Mon Feb 27 11:13:00 CET 2017


The branch, master has been updated
       via  3deb7b538371e99ed081be33b2bcdc23f4d5071f (commit)
      from  75186e05316579cb83fdd70cd8801a89ed6b4b22 (commit)

Summary of changes:
 clawsker |    7 +++++++
 1 file changed, 7 insertions(+)


- Log -----------------------------------------------------------------
commit 3deb7b538371e99ed081be33b2bcdc23f4d5071f
Author: Ricardo Mones <ricardo at mones.org>
Date:   Mon Feb 27 11:12:41 2017 +0100

    Support spinbuttons with unit labels

diff --git a/clawsker b/clawsker
index 6594bd7..726ef74 100755
--- a/clawsker
+++ b/clawsker
@@ -513,6 +513,11 @@ sub new_text_box_for_int($$$) {
     my @type = split (/,/, $$hash{$key}[TYPE]);
     push (@type, 0), push (@type, 10000) unless ($#type > 0);
     #
+    my $gunits = undef;
+    if (ref $label eq 'ARRAY') {
+        $gunits = Gtk2::Label->new ($label->[1]);
+        $label = $label->[0];
+    }
     my $glabel = Gtk2::Label->new ($label);
     my $pagei = int (($type[2] - $type[1]) / 10);
     my $gentry = Gtk2::SpinButton->new_with_range ($type[1], $type[2], $pagei);
@@ -527,7 +532,9 @@ sub new_text_box_for_int($$$) {
     set_widget_hint ($gentry, $$hash{$key}[DESC]);
     set_widget_sens ($gentry, $$hash{$key}[CMVER]);
     $glabel->set_sensitive ($gentry->sensitive);
+    $gunits->set_sensitive ($gentry->sensitive) if ($gunits);
     #
+    return new_hbox_spaced_pack ($glabel, $gentry, $gunits) if ($gunits);
     return new_hbox_spaced_pack ($glabel, $gentry);
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Hidden preferences editor for Claws Mail


More information about the Commits mailing list