summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
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;
}