summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xbin/draksambashare31
2 files changed, 20 insertions, 13 deletions
diff --git a/NEWS b/NEWS
index fa8e0c6..a8457f0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
- draknfs, draksambashare:
o fix handling UTF-8 directories (mga#13354)
+- draksambashare:
+ o fix undefined value for parameter (mga#13206)
2.21
- Fix double entry in menu for drakx-net (mga#15835)
diff --git a/bin/draksambashare b/bin/draksambashare
index c4a08c7..ffdcaee 100755
--- a/bin/draksambashare
+++ b/bin/draksambashare
@@ -530,19 +530,24 @@ sub modify_printers_entry {
my $s = $printer_list->{data}[$selected][1];
$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][2]);
- $comment->set_text($printer_list->{data}[$selected][3]);
- $browseable->set_text($printer_list->{data}[$selected][4]);
- $printable->set_text($printer_list->{data}[$selected][5]);
- $print_command->set_text($printer_list->{data}[$selected][6]);
- $lpq_command->set_text($printer_list->{data}[$selected][7]);
- $guest_ok->set_text($printer_list->{data}[$selected][8]);
- $writable->set_text($printer_list->{data}[$selected][9]);
- $write_list->set_text($printer_list->{data}[$selected][10]);
- $inherit_permissions->set_text($printer_list->{data}[$selected][11]);
- $printing->set_text($printer_list->{data}[$selected][12]);
- $create_mode->set_text($printer_list->{data}[$selected][13]);
- $use_client_driver->set_text($printer_list->{data}[$selected][14]);
+ my %h = (
+ 2 => $dir,
+ 3 => $comment,
+ 4 => $browseable,
+ 5 => $printable,
+ 6 => $print_command,
+ 7 => $lpq_command,
+ 8 => $guest_ok,
+ 9 => $writable,
+ 10 => $write_list,
+ 11 => $inherit_permissions,
+ 12 => $printing,
+ 13 => $create_mode,
+ 14 => $use_client_driver,
+ );
+ foreach my $id (keys %h) {
+ $h{$id}->set_text($printer_list->{data}[$selected][$id] || '');
+ }
my $button = Gtk3::Button->new(N("Open"));
$button->signal_connect(clicked => sub { show_file_dialog($dir) });