summaryrefslogtreecommitdiffstats
path: root/drakwizard.pl
diff options
context:
space:
mode:
authorArnaud Desmons <adesmons@mandriva.com>2002-08-23 09:06:39 +0000
committerArnaud Desmons <adesmons@mandriva.com>2002-08-23 09:06:39 +0000
commit8ad8f4cbad0a2c62d0aca9173719cecd8da9c9f3 (patch)
treeb70e37a6c617d170db8ac9825ac8de608df86353 /drakwizard.pl
parent5ffab5fe98e305ae5846c36c0c23aeae4be5c72e (diff)
downloaddrakwizard-8ad8f4cbad0a2c62d0aca9173719cecd8da9c9f3.tar
drakwizard-8ad8f4cbad0a2c62d0aca9173719cecd8da9c9f3.tar.gz
drakwizard-8ad8f4cbad0a2c62d0aca9173719cecd8da9c9f3.tar.bz2
drakwizard-8ad8f4cbad0a2c62d0aca9173719cecd8da9c9f3.tar.xz
drakwizard-8ad8f4cbad0a2c62d0aca9173719cecd8da9c9f3.zip
wiz chooser sort fix
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-xdrakwizard.pl33
1 files changed, 16 insertions, 17 deletions
diff --git a/drakwizard.pl b/drakwizard.pl
index 241410ac..cb0cfbd5 100755
--- a/drakwizard.pl
+++ b/drakwizard.pl
@@ -20,7 +20,7 @@
use lib qw(/usr/lib/libDrakX);
#use strict;
-use vars qw($wizard_title $lib_script $perl_module %variable $in $rpm $bifield $chooser_hash $welcome);
+use vars qw($Wizard_title $Wizard_pix_up $lib_script $perl_module %variable $in $rpm $bifield $chooser_hash $welcome);
use XML::Parser;
use standalone;
@@ -36,32 +36,31 @@ setlocale(LC_ALL, "");
Locale::gettext::textdomain("drakwizard");
my $in = 'interactive'->vnew('su', 'default');
-$::Wizard_title = translate($wizard_title);
-$::Wizard_pix_up = "wiz_drakconnect.png";
$::direct = /-direct/;
$::Wizard_no_previous = 1;
-$::Wizard_title = "Drakwizard";
+$Wizard_title = "Drakwizard";
$::isWizard = 1;
my $standalone = 1;
if (!defined($ARGV[0])) {
my $prefix = "/usr/share/wizards/";
- my %l = (
- $prefix."dhcp_wizard/dhcp.wiz" => _("Dhcp"),
- $prefix."dns_wizard/dns.wiz" => _("Dns"),
- $prefix."ftp_wizard/ftp.wiz" => _("Proftpd"),
- $prefix."news_wizard/news.wiz" => _("News"),
- $prefix."postfix_wizard/postfix.wiz" => _("Postfix"),
- $prefix."proxy_wizard/proxy.wiz" => _("Squid"),
- $prefix."samba_wizard/samba.wiz" => _("Samba"),
- $prefix."time_wizard/time.wiz" => _("Time"),
- $prefix."web_wizard/web.wiz" => _("Apache"),
- );
+ my %wiz = (
+ 1 => [$prefix."web_wizard/web.wiz", "Apache"],
+ 2 => [$prefix."dhcp_wizard/dhcp.wiz", "Dhcp"],
+ 3 => [$prefix."dns_wizard/dns.wiz", "Dns"],
+ 4 => [$prefix."news_wizard/news.wiz", "News"],
+ 5 => [$prefix."postfix_wizard/postfix.wiz", "Postfix"],
+ 6 => [$prefix."ftp_wizard/ftp.wiz", "Proftpd"],
+ 7 => [$prefix."samba_wizard/samba.wiz", "Samba"],
+ 8 => [$prefix."proxy_wizard/proxy.wiz", "Squid"],
+ 9 => [$prefix."time_wizard/time.wiz", "Time"]
+ );
$in->ask_from(
_("Drakwizard wizard selection"),
_("Please select a wizard"),
- [{ val => \$ARGV[0], list => [ sort keys %l ], format => sub { $l{$_} }}]
+ [{ val => \$ARGV[0], list => [sort keys %wiz], format => sub { $wiz{$_}[1] }}]
);
+ $ARGV[0] = $wiz{$ARGV[0]}[0];
}
my $o = [];
$xmltree = XML::Parser->new(Style => 'Tree')->parsefile($ARGV[0]);
@@ -91,7 +90,7 @@ sub get_parameter {
my $common_freetext_chooser;
my %actions = (
Wizard => sub {
- ($Wizard_title, $lib_script, $perl_module, $rpm, $::Wizard_pix_up) = @{$leaf}{qw(wizardTitle libScript perlModule rpm defaultImage)};
+ ($Wizard_title, $lib_script, $perl_module, $rpm, $Wizard_pix_up) = @{$leaf}{qw(wizardTitle libScript perlModule rpm defaultImage)};
if ($perl_module) {
($::perl_module_name) = ($perl_module =~ /.*\/(.*)\.pm/);
require $perl_module;