diff options
author | Aurélien Lefebvre <alefebvre@mandriva.com> | 2009-09-04 10:00:23 +0000 |
---|---|---|
committer | Aurélien Lefebvre <alefebvre@mandriva.com> | 2009-09-04 10:00:23 +0000 |
commit | fe7e98edb99edb13bebd1ded4517368044fb1168 (patch) | |
tree | 691d4c5db26b70385f8ecebe478c6e7b40373f58 | |
parent | 079f650d7a3a176d558df1220d1a6e2c36c7879b (diff) | |
download | drakx-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
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/mygtk2.pm | 9 |
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; } |