diff options
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r-- | perl-install/harddrake/ui.pm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm index c4f8e59cb..293b398e6 100644 --- a/perl-install/harddrake/ui.pm +++ b/perl-install/harddrake/ui.pm @@ -242,12 +242,10 @@ sub new { } sort keys %$current_device ]); # we've valid driver, let's offer to configure it - if (exists $current_device->{driver} && $current_device->{driver} !~ /(unknown|.*\|.*)/ && $current_device->{driver} !~ /^Card:/) { - $module_cfg_button->show; - } + show_hide(exists $current_device->{driver} && $current_device->{driver} !~ /(unknown|.*\|.*)/ && $current_device->{driver} !~ /^Card:/, $module_cfg_button); $current_configurator = $configurators{$id}; - $config_button->show if -x $current_configurator; + show_hide(-x $current_configurator, $config_button); return 1; } } @@ -301,5 +299,14 @@ sub quit_global { ugtk2->exit(0); } +sub show_hide { + my ($bool, $button) = @_; + if ($bool) { + $button->show(); + } else { + $button->hide(); + } +} + 1; |