From 0e32cf0bca437f291a60dba07180a78e7f04e419 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 28 Aug 2002 15:25:48 +0000 Subject: add {callbacks}{advanced}, called when "Advance" button is pressed --- perl-install/interactive.pm | 2 +- perl-install/interactive/gtk.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index bb3d63a4f..8731be5f9 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -320,7 +320,7 @@ sub ask_from_normalize { $common->{advanced_label} ||= _("Advanced"); $common->{advanced_label_close} ||= _("Basic"); $common->{$_} = [ deref($common->{$_}) ] foreach qw(messages advanced_messages); - add2hash_($common->{callbacks} ||= {}, { changed => sub {}, focus_out => sub {}, complete => sub { 0 }, canceled => sub { 0 } }); + add2hash_($common->{callbacks} ||= {}, { changed => sub {}, focus_out => sub {}, complete => sub { 0 }, canceled => sub { 0 }, advanced => sub {} }); } sub ask_from_ { diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 106df7706..3fb7fd02a 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -508,8 +508,9 @@ sub ask_fromW { my $set_advanced = sub { ($advanced) = @_; $set_default_size->() if $advanced; + $update->($common->{callbacks}{advanced}) if $advanced; $advanced ? $advanced_pack->show : $advanced_pack->hide; - @widgets = (@widgets_always, $advanced ? @widgets_advanced : ()); + @widgets = (@widgets_always, if_($advanced, @widgets_advanced)); $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) }; -- cgit v1.2.1