diff options
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-x | drakwizard.pl | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drakwizard.pl b/drakwizard.pl index bc5a7ce6..77ee0095 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -138,22 +138,7 @@ sub map_freetext { my @data = map { my $toto = $_->{variableName}; - if ($_->{main_order} eq 'combo') { - if($_->{fillScript}){ - @liste = (); - $valeur = `. $lib_script && $_->{fillScript}`; - while( $valeur =~ /(.+)\n/g){ - push @liste, $1; - $chooser_hash{$1} = $1; - } - } - if ($_->{fillfunc}){ - @liste = $::{$perl_module_name."::"}{"$_->{fillfunc}"}->(); - } - else { - @liste = @{$_->{Option}}; - } - } + if ($_->{fillScript}) { $ENV{$variable{$_->{variableName}}} = `. $lib_script && $_->{fillScript}`; } @@ -167,8 +152,8 @@ sub map_freetext { help => $_->{help}} } elsif ($_->{main_order} eq 'bool') { - if ($_->{fillfunc}) { - my @checklist = $::{$perl_module_name."::"}{"$_->{fillfunc}"}->(); + if ($_->{listfunc}) { + my @checklist = $::{$perl_module_name."::"}{"$_->{listfunc}"}->(); my $i = 21 - scalar @checklist; # workaround to get get the scrollbar if (!$::isSummary) { @@ -204,6 +189,20 @@ sub map_freetext { } } elsif ($_->{main_order} eq 'combo') { + if($_->{fillScript}){ + @liste = (); + $valeur = `. $lib_script && $_->{fillScript}`; + while( $valeur =~ /(.+)\n/g){ + push @liste, $1; + $chooser_hash{$1} = $1; + } + } + elsif ($_->{fillfunc}){ + @liste = $::{$perl_module_name."::"}{"$_->{fillfunc}"}->(); + } + else { + @liste = @{$_->{Option}}; + } { label => _($_->{helpText}), val => \$ENV{$variable{$_->{variableName}}}, list => [@liste], type => $_->{main_order}, @@ -251,14 +250,15 @@ sub get_parameter { $leaf->{helpText} = translate($leaf->{helpText}); if ($leaf->{fontName} eq "Monospaced") { chomp($leaf->{helpText}); - $leaf->{helpText} = $leaf->{helpText} ? "$leaf->{helpText}\n$leaf->{helpText}" : "$leaf->{helpText}\n"; + $leaf->{helpText} = $leaf->{helpText} ? + "$leaf->{helpText}\n$leaf->{helpText}" : "$leaf->{helpText}\n"; } $page->{info} = xml_text($leaf->{helpText} ? "$page->{info}\n$leaf->{helpText}" : "$page->{info}\n"); $page->{info} = c::from_utf8($page->{info}); - if ($leaf->{fillScript}) { - $page->{info} .= translate(`source $lib_script; $leaf->{fillScript}`); - } + + $page->{info} .= translate(`source $lib_script; $leaf->{fillScript}`) if + ($leaf->{fillScript}) }, Freetext => $common_freetext_chooser = sub { my $main_order = ($tag eq 'Chooser') ? 'combo' |