diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-01-03 19:48:18 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-01-03 19:48:18 +0000 |
commit | 5fb4960588d8e63ffb220e4251a61090055e829b (patch) | |
tree | a1d0b21c8651b854eaed2cbcc83b7bc1fdafa99d /perl-install | |
parent | 27c399a88f3f75ecd78b4464a86a94a835885784 (diff) | |
download | drakx-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')
-rw-r--r-- | perl-install/interactive.pm | 1 | ||||
-rw-r--r-- | perl-install/interactive_gtk.pm | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 931ad9e30..6cfc277f2 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -284,6 +284,7 @@ sub ask_from_normalize { } @$l; $common->{advanced_label} ||= _("Advanced"); + $common->{advanced_label_close} ||= _("Basic"); $common->{$_} = [ deref($common->{$_}) ] foreach qw(messages advanced_messages); add2hash_($common, { ok => _("Ok"), cancel => _("Cancel") }) if !exists $common->{ok} && !$::isWizard; add2hash_($common->{callbacks} ||= {}, { changed => sub {}, focus_out => sub {}, complete => sub { 0 }, canceled => sub { 0 } }); 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 = |