diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/printer/printerdrake.pm | 26 | ||||
-rwxr-xr-x | perl-install/standalone/scannerdrake | 26 |
2 files changed, 28 insertions, 24 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 2bc61a30a..e998c7d18 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -164,12 +164,13 @@ If some of these measures lead to problems for you, turn this option off, but th cancel => "", }, # List the hosts - [ { val => \$choice, format => \&translate, - sort => 0, separator => "####", - tree_expanded => 1, - quit_if_double_click => 1, - allow_empty_list => 1, - list => $sharehosts->{list} }, + [ if_($#{$sharehosts->{list}} >= 0, + { val => \$choice, format => \&translate, + sort => 0, separator => "####", + tree_expanded => 1, + quit_if_double_click => 1, + allow_empty_list => 1, + list => $sharehosts->{list} }), { val => N("Add host/network"), type => 'button', clicked_may_quit => sub { @@ -349,12 +350,13 @@ N("Examples for correct IPs:\n") . cancel => "", }, # List the hosts - [ { val => \$choice, format => \&translate, - sort => 0, separator => "####", - tree_expanded => 1, - quit_if_double_click => 1, - allow_empty_list => 1, - list => $browsepoll->{list} }, + [ if_($#{$browsepoll->{list}} >= 0, + { val => \$choice, format => \&translate, + sort => 0, separator => "####", + tree_expanded => 1, + quit_if_double_click => 1, + allow_empty_list => 1, + list => $browsepoll->{list} }), { val => N("Add server"), type => 'button', clicked_may_quit => sub { diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake index 2731505d0..61e92e692 100755 --- a/perl-install/standalone/scannerdrake +++ b/perl-install/standalone/scannerdrake @@ -635,12 +635,13 @@ sub sharewindow { cancel => "", }, # List the hosts - [ { val => \$choice, format => \&translate, - sort => 0, separator => "####", - tree_expanded => 1, - quit_if_double_click => 1, - allow_empty_list => 1, - list => \@list }, + [ if_($#list >= 0, + { val => \$choice, format => \&translate, + sort => 0, separator => "####", + tree_expanded => 1, + quit_if_double_click => 1, + allow_empty_list => 1, + list => \@list }), { val => N("Add host"), type => 'button', clicked_may_quit => sub { @@ -785,12 +786,13 @@ sub sharewindow { cancel => "", }, # List the hosts - [ { val => \$choice, format => \&translate, - sort => 0, separator => "####", - tree_expanded => 1, - quit_if_double_click => 1, - allow_empty_list => 1, - list => \@list }, + [ if_($#list >= 0, + { val => \$choice, format => \&translate, + sort => 0, separator => "####", + tree_expanded => 1, + quit_if_double_click => 1, + allow_empty_list => 1, + list => \@list }), { val => N("Add host"), type => 'button', clicked_may_quit => sub { |