summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-28 22:23:18 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-06-03 18:07:13 +0200
commit622f806e42a8d045f6c776f94995748533146b8e (patch)
treedfd1b32d0355ed7d0c4cfffa4c03fd4a4edd053e
parent615d827d505e83704c6d7a3030628bf15a745312 (diff)
downloaddrakx-net-622f806e42a8d045f6c776f94995748533146b8e.tar
drakx-net-622f806e42a8d045f6c776f94995748533146b8e.tar.gz
drakx-net-622f806e42a8d045f6c776f94995748533146b8e.tar.bz2
drakx-net-622f806e42a8d045f6c776f94995748533146b8e.tar.xz
drakx-net-622f806e42a8d045f6c776f94995748533146b8e.zip
fix undefined value for parameter (mga#13206)
regression introduced in commit 4a4453328a1a2051307f44e6c1c200625666ba16 simplify/factorize BTW
-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) });