diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-07-26 10:37:06 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-07-26 10:37:06 +0000 |
commit | 893de173062895d46f8458ad6bcdc84c95653af9 (patch) | |
tree | 21d22731059caa023052259e4992b494ece9e12a | |
parent | cd21067ce794ec83c374e9fccd3f595f69045677 (diff) | |
download | drakx-893de173062895d46f8458ad6bcdc84c95653af9.tar drakx-893de173062895d46f8458ad6bcdc84c95653af9.tar.gz drakx-893de173062895d46f8458ad6bcdc84c95653af9.tar.bz2 drakx-893de173062895d46f8458ad6bcdc84c95653af9.tar.xz drakx-893de173062895d46f8458ad6bcdc84c95653af9.zip |
(reallyChooseGroups) add "select all" & "unselect all" buttons
buttons layout should be probably enhanced later...
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/install/steps_gtk.pm | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 237b68e74..1f001ec8e 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,6 +1,7 @@ - package group selection: o add a scrollbar (due to Oxygen theme eating more space than Ia Ora one) + o add "select all" & "unselect all" buttons Version 14.31 - 24 July 2012 diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm index 2ed26ac34..17102b167 100644 --- a/perl-install/install/steps_gtk.pm +++ b/perl-install/install/steps_gtk.pm @@ -318,17 +318,20 @@ sub reallyChooseGroups { my $w = ugtk2->new(N("Package Group Selection")); my $w_size = gtknew('Label_Left', text => &$size_to_display, padding => [ 0, 0 ]); + my @entries; my $entry = sub { my ($e) = @_; - gtknew('CheckButton', + my $w = gtknew('CheckButton', text => translate($e->{label}), tip => translate($e->{descr}), active_ref => \$e->{selected}, toggled => sub { gtkset($w_size, text => &$size_to_display); }); + push @entries, $w; + $w; }; #- when restarting this step, it might be necessary to reload the compssUsers.pl (bug 11558). kludgy. if (!ref $o->{gtk_display_compssUsers}) { install::any::load_rate_files($o) } @@ -345,6 +348,8 @@ sub reallyChooseGroups { 0, gtknew('HButtonBox', layout => 'edge', children_tight => [ gtknew('Install_Button', text => N("Help"), clicked => sub { interactive::gtk::display_help($o, { interactive_help_id => 'choosePackages#choosePackagesGroups' }, $w) }), + gtknew('Button', text => N("Select All"), clicked => sub { $_->set_active(1) foreach @entries }), + gtknew('Button', text => N("Unselect All"), clicked => sub { $_->set_active(0) foreach @entries }), gtknew('Button', text => N("Next"), clicked => sub { Gtk2->main_quit }), ]), ]), |