summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
authorAurélien Lefebvre <alefebvre@mandriva.com>2009-09-04 10:00:23 +0000
committerAurélien Lefebvre <alefebvre@mandriva.com>2009-09-04 10:00:23 +0000
commitfe7e98edb99edb13bebd1ded4517368044fb1168 (patch)
tree691d4c5db26b70385f8ecebe478c6e7b40373f58 /perl-install/mygtk2.pm
parent079f650d7a3a176d558df1220d1a6e2c36c7879b (diff)
downloaddrakx-fe7e98edb99edb13bebd1ded4517368044fb1168.tar
drakx-fe7e98edb99edb13bebd1ded4517368044fb1168.tar.gz
drakx-fe7e98edb99edb13bebd1ded4517368044fb1168.tar.bz2
drakx-fe7e98edb99edb13bebd1ded4517368044fb1168.tar.xz
drakx-fe7e98edb99edb13bebd1ded4517368044fb1168.zip
- mygtk2:
o HScale widget: added digits and ref_value options
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index dc315f50c..68363c227 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -259,6 +259,15 @@ sub _gtk__HScale {
$w = Gtk2::HScale->new(delete $opts->{adjustment});
}
+ $w->set_digits(delete $opts->{digits}) if exists $opts->{digits};
+ if (my $value_ref = delete $opts->{value_ref}) {
+ my $set = sub { $w->set_value($$value_ref) };
+ gtkval_register($w, $value_ref, $set);
+ $set->();
+ $w->signal_connect(value_changed => sub {
+ gtkval_modify($value_ref, $w->get_value, $set);
+ });
+ }
$w->signal_connect(value_changed => delete $opts->{value_changed}) if exists $opts->{value_changed};
$w;
}