diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-08-21 20:07:43 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-08-21 20:07:43 +0000 |
commit | f1e1024c53ea5c0c5c2632417f4f8f4838f6d8f7 (patch) | |
tree | 50e103ed618c60dccd86bd71edcd7e1ff0fde064 /bin/net_applet | |
parent | f2e9d08a554e3e52c7b0b185d7d2889fb82dd168 (diff) | |
download | drakx-net-f1e1024c53ea5c0c5c2632417f4f8f4838f6d8f7.tar drakx-net-f1e1024c53ea5c0c5c2632417f4f8f4838f6d8f7.tar.gz drakx-net-f1e1024c53ea5c0c5c2632417f4f8f4838f6d8f7.tar.bz2 drakx-net-f1e1024c53ea5c0c5c2632417f4f8f4838f6d8f7.tar.xz drakx-net-f1e1024c53ea5c0c5c2632417f4f8f4838f6d8f7.zip |
always show interfaces in left-click menu
Diffstat (limited to 'bin/net_applet')
-rw-r--r-- | bin/net_applet | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/net_applet b/bin/net_applet index e0a4815..5e8a348 100644 --- a/bin/net_applet +++ b/bin/net_applet @@ -379,10 +379,11 @@ sub update_applet() { } sub create_menu_choices { - my ($action) = @_; + my ($action, $o_allow_single_choice) = @_; my @choices = $actions{$action}{choices}->(); #- don't add submenu if only zero or one choice exists - @choices > ($actions{$action}{allow_single_choice} ? 0 : 1) or return (); + my $allow_single_choice = $actions{$action}{allow_single_choice} || $o_allow_single_choice; + @choices > ($allow_single_choice ? 0 : 1) or return (); my $selected = $actions{$action}{choice_selected}; my $format = $actions{$action}{format_choice}; my $get_icon = $actions{$action}{get_icon}; @@ -446,7 +447,7 @@ sub generate_simple_menu() { Gtk2::SeparatorMenuItem->new, ); } - gtkappend($simple_menu, create_menu_choices('setInterface')); + gtkappend($simple_menu, create_menu_choices('setInterface', 'allow_single_choice')); } sub generate_menu() { |