diff options
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-x | drakwizard.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drakwizard.pl b/drakwizard.pl index 3fb49513..330c1904 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -67,7 +67,7 @@ my $o = []; $xmltree = XML::Parser->new(Style => 'Tree')->parsefile($ARGV[0]); get_parameter($o, $xmltree); -eval {navigation($o, $o->[0])}; +navigation($o, $o->[0]); $in->exit; @@ -143,6 +143,7 @@ sub get_parameter { : ($tag eq 'Boolean') ? 'bool' : ($leaf->{editable} eq 'true') ? 'entry' : 'field')}; + $leaf->{fillScript} =~ s/\\q/\"/g; }, Chooser => \&$common_freetext_chooser, Boolean => \&$common_freetext_chooser, @@ -201,6 +202,14 @@ sub display { @liste = @{$_->{Option}}; } } + if ($_->{main_order} eq 'entry' and $_->{fillScript}) { + $ENV{$variable{$_->{variableName}}} = `$_->{fillScript}`; + chomp($ENV{$variable{$_->{variableName}}}); + } + elsif (!$ENV{$variable{$_->{variableName}}} && $_->{main_order} eq 'entry' && $_->{fillfunc}) { + $ENV{$variable{$_->{variableName}}} = $::{$perl_module_name."::"}{"$_->{fillfunc}"}->(); + chomp($ENV{$variable{$_->{variableName}}}); + } ($_->{main_order} eq 'entry') ? { label => translate($_->{helpText}), val => \$ENV{$variable{$_->{variableName}}}, type => $_->{main_order} } : ($_->{main_order} eq 'bool') ? { val => \$ENV{$variable{$_->{variableName}}}, type => $_->{main_order}, |