summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/draksambashare32
1 files changed, 26 insertions, 6 deletions
diff --git a/perl-install/standalone/draksambashare b/perl-install/standalone/draksambashare
index 1a50bf7aa..4b436ffdd 100755
--- a/perl-install/standalone/draksambashare
+++ b/perl-install/standalone/draksambashare
@@ -29,7 +29,7 @@ use ugtk2 qw(:ask :wrappers :create :dialogs);
use mygtk2 qw(gtknew);
use Gtk2::SimpleList;
-# use libconf
+# use libconf
use Libconf::Templates;
use Libconf::Glueconf::Samba::Smb_conf;
@@ -416,6 +416,26 @@ sub add_printers_entry() {
post => sub {
if ($wiz_todo == 1) {
&pdf_section;
+ push @{$share_list->{data}}, [
+ $samba->{'pdf-gen'},
+ $samba->{'pdf-gen'}{path},
+ $samba->{'pdf-gen'}{printable},
+ $samba->{'pdf-gen'}{comment},
+ $samba->{'pdf-gen'}{printing},
+ $samba->{'pdf-gen'}{'print command'},
+ $samba->{'pdf-gen'}{'lpq command'},
+ $samba->{'pdf-gen'}{'guest ok'},
+ ];
+ push @listshare, {
+ share_name => $samba->{'pdf-gen'},
+ path => $samba->{'pdf-gen'}{path},
+ comment => $samba->{'pdf-gen'}{comment},
+ printebale => $samba->{'pdf-gen'}{printable},
+ printing => $samba->{'pdf-gen'}{printing},
+ print_command => $samba->{'pdf-gen'}{'print command'},
+ lpq_command => $samba->{'pdf-gen'}{'lpq command'},
+ guest_ok => $samba->{'pdf-gen'}{'guest ok'},
+ };
} elsif ($wiz_todo == 2) {
&printdollar_section;
&printers_section;
@@ -446,9 +466,9 @@ sub modify_printers_entry {
$_ = Gtk2::OptionMenu->new foreach $browseable, $printable, $guest_ok, $writable, $use_client_driver, $inherit_permissions;
$_->set_popdown_strings(@yesno) foreach $browseable, $printable, $guest_ok, $writable, $use_client_driver, $inherit_permissions;
- $selected or info_dialog(N("Error"), N("Please add or select a Samba printer share to be able to modify it.")) and return;
+
my $s = $printer_list->{data}[$selected][0];
- $share_name->set_text($s);
+ $s or info_dialog(N("Error"), N("Please add or select a Samba printer share to be able to modify it.")) and return; $share_name->set_text($s);
$dir->set_text($printer_list->{data}[$selected][1]);
$comment->set_text($printer_list->{data}[$selected][2]);
$browseable->set_text($printer_list->{data}[$selected][3]);
@@ -520,8 +540,8 @@ sub modify_entry {
my $w = ugtk2->new(N("DrakSamba entry"));
$w->{window}->set_modal(1);
- $selected or info_dialog(N("Error"), N("Please add or select a Samba share to be able to modify it.")) and return;
my $s = $share_list->{data}[$selected][0];
+ $s or info_dialog(N("Error"), N("Please add or select a Samba share to be able to modify it.")) and return;
$share_name->set_text($s);
$dir->set_text($share_list->{data}[$selected][1]);
$comment->set_text($share_list->{data}[$selected][2]);
@@ -779,13 +799,13 @@ $W->signal_connect(delete_event => sub { ugtk2->exit });
$share_list->signal_connect(button_press_event => sub {
my (undef, $event) = @_;
my ($selected) = $share_list->get_selected_indices;
- $selected and modify_entry($selected) if $event->type eq '2button-press';
+ $share_list->{data}[$selected][0] and modify_entry($selected) if $event->type eq '2button-press';
});
$printer_list->signal_connect(button_press_event => sub {
my (undef, $event) = @_;
my ($selected) = $printer_list->get_selected_indices;
- $selected and modify_printers_entry($selected) if $event->type eq '2button-press';
+ $printer_list->{data}[$selected][0] and modify_printers_entry($selected) if $event->type eq '2button-press';
});
# create menu