summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
ModeNameSize
-rwxr-xr-xXFdrake5332logstatsplain
-rwxr-xr-xadduserdrake1118logstatsplain
-rwxr-xr-xdiskdrake3583logstatsplain
-rwxr-xr-xdrakTermServ41429logstatsplain
-rwxr-xr-xdrakautoinst12245logstatsplain
-rwxr-xr-xdrakbackup160905logstatsplain
-rwxr-xr-xdrakboot1484logstatsplain
-rwxr-xr-xdrakbug6899logstatsplain
-rwxr-xr-xdrakbug_report255logstatsplain
-rwxr-xr-xdrakconnect27321logstatsplain
-rwxr-xr-xdrakfloppy14734logstatsplain
-rwxr-xr-xdrakfont43345logstatsplain
-rwxr-xr-xdrakgw18332logstatsplain
-rwxr-xr-xdrakproxy1182logstatsplain
-rwxr-xr-xdraksound1897logstatsplain
-rwxr-xr-xdraksplash19237logstatsplain
-rwxr-xr-xdrakxservices443logstatsplain
-rwxr-xr-xdrakxtv6128logstatsplain
-rwxr-xr-xfileshareset10022logstatsplain
-rwxr-xr-xharddrake2257logstatsplain
d---------icons2086logstatsplain
d---------interactive_http458logstatsplain
-rwxr-xr-xkeyboarddrake1626logstatsplain
-rwxr-xr-xlivedrake1385logstatsplain
-rw-r--r--localedrake991logstatsplain
-rwxr-xr-xlogdrake17836logstatsplain
-rwxr-xr-xlsnetdrake628logstatsplain
-rwxr-xr-xmousedrake2373logstatsplain
-rwxr-xr-xnet_monitor20614logstatsplain
-rwxr-xr-xprinterdrake2396logstatsplain
-rwxr-xr-xscannerdrake5140logstatsplain
-rwxr-xr-xservice_harddrake2404logstatsplain
-rw-r--r--service_harddrake.sh1231logstatsplain
-rwxr-xr-xtinyfirewall1031logstatsplain
="hl opt">); die qq(inexistant "$next" wizard step) if is_empty_hash_ref($page); # FIXME or the displaying fails my $data = defined $page->{data} ? (ref($page->{data}) eq 'CODE' ? $page->{data}->() : $page->{data}) : []; my $data2; foreach my $d (@$data) { $d->{val} = ${$d->{val_ref}} if $d->{val_ref}; $d->{list} = $d->{list_ref} if $d->{list_ref}; #$d->{val} = ref($d->{val}) eq 'CODE' ? $d->{val}->() : $d->{val}; if ($d->{boolean_list}) { my $i; foreach (@{$d->{boolean_list}}) { push @$data2, { text => $_, type => 'bool', val => \${$d->{val}}->[$i], disabled => $d->{disabled} }; $i++; } } else { push @$data2, $d; } } my $name = ref($page->{name}) ? $page->{name}->() : $page->{name}; my %yesno = (yes => N("Yes"), no => N("No")); my $yes = ref($page->{default}) eq 'CODE' ? $page->{default}->() : $page->{default}; $data2 = [ { val => \$yes, type => 'list', list => [ keys %yesno ], format => sub { $yesno{$_[0]} }, gtk => { use_boxradio => 1 } } ] if $page->{type} eq "yesorno"; my $a; if (ref $data2 eq 'ARRAY' && @$data2) { $a = $in->ask_from_({ title => $o->{name}, messages => $name, callbacks => { map { $_ => $page->{$_} || $default_callback{$_} } qw(focus_out complete) }, if_($page->{interactive_help_id}, interactive_help_id => $page->{interactive_help_id}), }, $data2); } else { $a = $in->ask_okcancel($o->{name}, $name, $yes || 'ok'); } # interactive->ask_yesorno does not support stepping forward or backward: $a = $yes if $a && $page->{type} eq "yesorno"; if ($a) { # step forward: push @steps, $next if !$page->{ignore} && $steps[-1] ne $next; my $current = $next; $next = defined $page->{post} ? $page->{post}($page->{type} eq "yesorno" ? $yes eq 'yes' : $a) : 0; return if $page->{end}; if (!$next) { if (!defined $o->{pages}{$next}) { $next = $page->{next}; } else { die qq(the "$next" page (from previous wizard step) is undefined) if !$next; } } die qq(Step "$current": inexistant "$next" page) if !exists $o->{pages}{$next}; } else { # step back: $next = pop @steps; } $page = $o->{pages}{$next}; } } sub safe_process { my ($w, $wiz, $in) = @_; eval { $w->process($wiz, $in) }; my $err = $@; if ($err =~ /wizcancel/) { $in->exit(0); } else { die $err if $err; } } 1;