From 66c174f92ee21a4688608819749a72cf0c5b0603 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Wed, 1 Jun 2005 09:06:27 +0000 Subject: update --- samba_wizard/Sambaprint.pm | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'samba_wizard/Sambaprint.pm') diff --git a/samba_wizard/Sambaprint.pm b/samba_wizard/Sambaprint.pm index 2e2cfa38..32170c67 100755 --- a/samba_wizard/Sambaprint.pm +++ b/samba_wizard/Sambaprint.pm @@ -65,28 +65,15 @@ $o->{pages} = { name => N('Samba printers Wizard') . "\n\n" . N(''), no_back => 1, pre => sub { - if (-f $wiz_samba_etc) { - $::in->ask_warn(N("Information"), N("It seems you previously setup a Samba server. This wizard will re-read your old configuration, and show you the Samba server type you choose")); - my $data = cat_($wiz_samba_etc); - # detect old Samba type - my ($old_type) = $data =~ /type=(\d)/; - $o->{var}{wiz_type} = chomp_($old_type); - } else { $o->{var}{wiz_type} = 2 } + if (! -f $wiz_samba_etc) { + $::in->ask_warn(N("Information"), N("It seems that you don\'t setup a Samba server. Please setup a Samba server with Samba wizard before manage your share.")); + exit(1); + } }, - next => 'ask_type', - post => sub { - if ($o->{var}{wiz_type} == 2) { - return 'pdc' } - elsif ($o->{var}{wiz_type} == 1) { - return 'bdc' } - elsif ($o->{var}{wiz_type} == 3) { - return 'ask_workgroup' } - elsif ($o->{var}{wiz_type} == 4) { - return 'member' } - }, - data => [ - { label => N("Wich type of Samba server do you you want:"), val => \$o->{var}{wiz_type}, list => [ keys %type ], format => sub { $type{$_[0]} } }, + data => [ + { label => N("? :"), val => \$o->{var}{wiz_todo}, list => [ keys %cprint ], format => sub { $cprint{$_[0]} } }, ], + next => 'ask_services', }, ask_printers => { name => N('Select which printers you want to be accessible from known users'), -- cgit v1.2.1