diff options
author | Mystery Man 580 <uid580@mandriva.org> | 2002-12-04 10:21:47 +0000 |
---|---|---|
committer | Mystery Man 580 <uid580@mandriva.org> | 2002-12-04 10:21:47 +0000 |
commit | 73eacc0b2542d1f383635b7ab7dbdd8d576edcc4 (patch) | |
tree | dde71fe4f675d5650e9ea1f10b1ef42c77c190ea /perl-install/harddrake | |
parent | d3491c6707e7b0e5265d63ecc540e5c3f75f3c20 (diff) | |
download | drakx-backup-do-not-use-73eacc0b2542d1f383635b7ab7dbdd8d576edcc4.tar drakx-backup-do-not-use-73eacc0b2542d1f383635b7ab7dbdd8d576edcc4.tar.gz drakx-backup-do-not-use-73eacc0b2542d1f383635b7ab7dbdd8d576edcc4.tar.bz2 drakx-backup-do-not-use-73eacc0b2542d1f383635b7ab7dbdd8d576edcc4.tar.xz drakx-backup-do-not-use-73eacc0b2542d1f383635b7ab7dbdd8d576edcc4.zip |
hide config buttons when switching from a configurable device to a non
configurable one
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; |