summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-10-17 14:59:36 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-10-17 14:59:36 +0000
commitcd1506a9b0c17e5753dd1cd75fcb1bfcfc4a75e8 (patch)
treebbec97255ab6cbf4598f030d896b44a8e6cb623d
parent8daf54a90d65683066651930a6adb4b3952386d4 (diff)
downloaddrakwizard-cd1506a9b0c17e5753dd1cd75fcb1bfcfc4a75e8.tar
drakwizard-cd1506a9b0c17e5753dd1cd75fcb1bfcfc4a75e8.tar.gz
drakwizard-cd1506a9b0c17e5753dd1cd75fcb1bfcfc4a75e8.tar.bz2
drakwizard-cd1506a9b0c17e5753dd1cd75fcb1bfcfc4a75e8.tar.xz
drakwizard-cd1506a9b0c17e5753dd1cd75fcb1bfcfc4a75e8.zip
greyed partial bugfix
-rwxr-xr-xdrakwizard.pl46
1 files changed, 28 insertions, 18 deletions
diff --git a/drakwizard.pl b/drakwizard.pl
index 77ee0095..fb27e5fa 100755
--- a/drakwizard.pl
+++ b/drakwizard.pl
@@ -138,6 +138,7 @@ sub map_freetext {
my @data = map {
my $toto = $_->{variableName};
+ my $page = $_;
if ($_->{fillScript}) {
$ENV{$variable{$_->{variableName}}} = `. $lib_script && $_->{fillScript}`;
@@ -151,29 +152,37 @@ sub map_freetext {
disabled => $disabled{$_->{variableName}},
help => $_->{help}}
}
+ elsif ($_->{main_order} eq 'field' && $_->{fillfunc}) {
+ { label => _($_->{helpText}),
+ val => $::{$perl_module_name."::"}{"$_->{fillfunc}"}->(), type => $_->{main_order},
+ disabled => $disabled{$_->{variableName}},
+ help => $_->{help}}
+ }
elsif ($_->{main_order} eq 'bool') {
if ($_->{listfunc}) {
my @checklist = $::{$perl_module_name."::"}{"$_->{listfunc}"}->();
my $i = 21 - scalar @checklist;
+
# workaround to get get the scrollbar
- if (!$::isSummary) {
- while ($i--) {
- push @checklist, '';
- }
- }
- else {
- while ($i--) {
- $::isSummary++;
- }
- }
+ if (!$::isSummary) {
+ while ($i--) {
+ push @checklist, '';
+ }
+ }
+ else {
+ while ($i--) {
+ $::isSummary++;
+ }
+ }
#
map {
if (length($_)) {
+ $disabled{$toto} = sub { callback($toto)};
{ val => \$bool{$_},
label => "",
type => 'bool',
text => "$_",
- help => "toto",
+ help => "",
disabled => $disabled{$toto}
}
}
@@ -256,7 +265,6 @@ sub get_parameter {
$page->{info} = xml_text($leaf->{helpText} ?
"$page->{info}\n$leaf->{helpText}" : "$page->{info}\n");
$page->{info} = c::from_utf8($page->{info});
-
$page->{info} .= translate(`source $lib_script; $leaf->{fillScript}`) if
($leaf->{fillScript})
},
@@ -278,7 +286,8 @@ sub get_parameter {
$disabled{$leaf->{description}} = sub { callback($leaf->{description})};
});
$actions{$tag} and &{$actions{$tag}};
- } elsif($leaf=~ /\w\D/){
+ }
+ elsif($leaf=~ /\w\D/) {
$tag = $leaf;
}
}
@@ -292,8 +301,9 @@ sub find_page {
sub display {
my ($o, $page) = @_;
-
my $data;
+
+ $current_page = $page;
if ($page->{no_prev} || $page->{name} eq $welcome->{name}) {
$::Wizard_no_previous = 1;
}
@@ -336,7 +346,6 @@ sub navigation {
my ($o, $page, $previous_page) = @_;
$page->{old_page} ||= $previous_page;
- $current_page = $page;
display($o, $page);
my ($next, $prev) = do {
if (defined $perl_module_name && $page->{func}) {
@@ -397,9 +406,9 @@ sub is_disabled_summary {
}
sub is_disabled {
- my ($widget, $page) = @_;
- my $ret;
-
+ my ($widget, $page) = @_;
+ my $ret;
+
foreach (@{$page->{freetext}}) {
if ($_->{is}) {
my ($val, $arg) = split(/\s*?=\s*/, $_->{is});
@@ -451,6 +460,7 @@ sub get_summary {
$disabled{$leaf->{name}} = sub { callback_summary($leaf->{name})};
},
Freetext => $common_freetext_chooser = sub {
+
my $main_order = ($tag eq 'Chooser') ? 'combo'
: ($tag eq 'Boolean') ? 'bool'
: ($leaf->{editable} eq 'true') ? 'entry'