summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-03 19:48:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-03 19:48:18 +0000
commit5fb4960588d8e63ffb220e4251a61090055e829b (patch)
treea1d0b21c8651b854eaed2cbcc83b7bc1fdafa99d /perl-install/interactive_gtk.pm
parent27c399a88f3f75ecd78b4464a86a94a835885784 (diff)
downloaddrakx-backup-do-not-use-5fb4960588d8e63ffb220e4251a61090055e829b.tar
drakx-backup-do-not-use-5fb4960588d8e63ffb220e4251a61090055e829b.tar.gz
drakx-backup-do-not-use-5fb4960588d8e63ffb220e4251a61090055e829b.tar.bz2
drakx-backup-do-not-use-5fb4960588d8e63ffb220e4251a61090055e829b.tar.xz
drakx-backup-do-not-use-5fb4960588d8e63ffb220e4251a61090055e829b.zip
toggle Advanced/Basic button
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r--perl-install/interactive_gtk.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index f2a26a82d..e22d6b09b 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -501,7 +501,12 @@ sub ask_fromW {
$mainw->sync; #- for $set_all below (mainly for the set of clist)
$set_all->(); #- must be done when showing advanced lists (to center selected value)
};
- my $advanced_button = [ $common->{advanced_label}, sub { $set_advanced->(!$advanced) } ];
+ my $advanced_button = [ $common->{advanced_label},
+ sub {
+ my ($w) = @_;
+ $set_advanced->(!$advanced);
+ $w->child->set($advanced ? $common->{advanced_label_close} : $common->{advanced_label});
+ } ];
my $create_widgets = sub {
my $w = create_packtable({}, map { [($_->{icon_w}, $_->{e}{label}, $_->{real_w})]} @_);
@@ -522,7 +527,7 @@ sub ask_fromW {
my $pack = gtkpack_(create_box_with_title($mainw, @{$common->{messages}}),
1, $create_widgets->(@widgets_always),
if_($common->{ok} || $::isWizard,
- 0, $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', @$l2 ? $advanced_button : ())));
+ 0, $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', if_(@$l2, $advanced_button))));
my @adv = map { warp_text($_) } @{$common->{advanced_messages}};
$always_total_size += $mainw->{box_size};
$advanced_pack =