summaryrefslogtreecommitdiffstats
path: root/perl-install
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
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')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/mygtk2.pm9
3 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 0021c52a6..816e3c177 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- mygtk2:
+ o HScale widget: added digits and ref_value options
- adduserdrake:
o use icons to display password weakness
- added security-{low,medium,strong}.png pixmaps used for
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index c2429224c..ae8adf47f 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- mygtk2:
+ o HScale widget: added digits and ref_value options
- adduserdrake:
o use icons to display password weakness
- added security-{low,medium,strong}.png pixmaps used for
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;
}