diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-07-15 05:23:04 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-07-15 05:23:04 +0000 |
commit | ef917dd0683bc51e6d8d9628f8476aa54d1e2b01 (patch) | |
tree | 749bb6c8ab2c7849ec4b6690f319e43dfb0a2fc0 /perl-install/standalone/net_applet | |
parent | 2308332a074bc15e8d4186dc26293666805afe2f (diff) | |
download | drakx-ef917dd0683bc51e6d8d9628f8476aa54d1e2b01.tar drakx-ef917dd0683bc51e6d8d9628f8476aa54d1e2b01.tar.gz drakx-ef917dd0683bc51e6d8d9628f8476aa54d1e2b01.tar.bz2 drakx-ef917dd0683bc51e6d8d9628f8476aa54d1e2b01.tar.xz drakx-ef917dd0683bc51e6d8d9628f8476aa54d1e2b01.zip |
don't show choices menus if only one choice is possible
Diffstat (limited to 'perl-install/standalone/net_applet')
-rw-r--r-- | perl-install/standalone/net_applet | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 43dfad3fb..601201ecf 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -216,7 +216,8 @@ sub generate_menu { my ($action) = @_; my $name = ref($actions{$action}{name}) eq 'CODE' ? $actions{$action}{name}->($interface) : $actions{$action}{name}; my $launch = $actions{$action}{launch}; - if ($actions{$action}{choices}) { + my @choices = exists $actions{$action}{choices} && $actions{$action}{choices}->(); + if (@choices > 1) { my $selected = $actions{$action}{choice_selected}; gtkshow(create_menu($name, map { my $choice = $_; |