summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-08-26 14:59:20 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-08-26 14:59:20 +0000
commitc29edc6e7a60eca4002fb426df0334f890f11fcc (patch)
tree85625ca8aebb99313d1cd19e83d09851d8fac592 /perl-install/standalone
parenta60bae8afc424dd5fcc5c52b2b44ff6cb95b77de (diff)
downloaddrakx-c29edc6e7a60eca4002fb426df0334f890f11fcc.tar
drakx-c29edc6e7a60eca4002fb426df0334f890f11fcc.tar.gz
drakx-c29edc6e7a60eca4002fb426df0334f890f11fcc.tar.bz2
drakx-c29edc6e7a60eca4002fb426df0334f890f11fcc.tar.xz
drakx-c29edc6e7a60eca4002fb426df0334f890f11fcc.zip
test if printer share already exist
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/draksambashare12
1 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/standalone/draksambashare b/perl-install/standalone/draksambashare
index 6a7253f9c..0c6753104 100755
--- a/perl-install/standalone/draksambashare
+++ b/perl-install/standalone/draksambashare
@@ -416,6 +416,7 @@ sub add_printers_entry() {
next => 'end_add',
post => sub {
if ($wiz_todo == 1) {
+ exists $samba->{'pdf-gen'} and err_dialog(N("Error"), N("A pdf gnerator already exist.")) and return 'welcome';
&pdf_section;
push @{$printer_list->{data}}, [
'pdf-gen',
@@ -438,6 +439,7 @@ sub add_printers_entry() {
guest_ok => $samba->{'pdf-gen'}{'guest ok'},
};
} elsif ($wiz_todo == 2) {
+ exists $samba->{'print$'} || exists $samba->{printers} and err_dialog(N("Error"), N("Printers and print\$ already exist.")) and return 'welcome';
&printdollar_section;
&printers_section;
push @{$printer_list->{data}}, [
@@ -450,7 +452,7 @@ sub add_printers_entry() {
];
push @{$printer_list->{data}}, [
'printers',
- $samba->{printers}{path},
+ $samba->{printers}{path},
$samba->{printers}{comment},
$samba->{printers}{browseable},
$samba->{printers}{printable},
@@ -536,6 +538,14 @@ sub modify_printers_entry {
$dialog->set_modal(1);
$dialog->set_resizable(1);
+ if ($s eq "printers") { $printable->set_text("yes");
+ $printing->set_text("");
+ $_->set_sensitive(0) foreach $printable, $printing;
+ };
+ if ($s eq "pdf-gen") { $printing->set_text("bsd");
+ $printing->set_sensitive(0);
+ };
+
gtkpack_($dialog->vbox,
0, gtkadd(Gtk2::Frame->new(N("Printer share")),
gtkpack_(gtkset_border_width(Gtk2::HBox->new, 3),