From 059822313ada017d710a6900d8c3d28e1ac992c3 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 9 Mar 2006 15:59:05 +0000 Subject: use "Active interfaces" menu label for network interfaces list, and use checkboxes instead of radio buttons (#18636) --- perl-install/standalone/net_applet | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 7949f4add..a0c9efe40 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -69,12 +69,9 @@ my %actions = ( } }, 'setInterface' => { - name => N("Network interface"), + name => N("Active interfaces"), + use_checkbox => 1, choices => sub { sort keys %{$net->{ifcfg}} }, - format_choice => sub { - my ($is_up, $_gw) = network::tools::get_interface_status($_[0]); - $is_up ? N("Disconnect %s", $_[0]) : N("Connect %s", $_[0]); - }, choice_selected => sub { my ($is_up, $_gw) = network::tools::get_interface_status($_[0]); $is_up; @@ -304,7 +301,7 @@ sub generate_menu { my $choice = $_; my $w = gtkshow(gtkset_active(Gtk2::CheckMenuItem->new_with_label($format ? $format->($choice) : $choice), $selected->($choice))); gtksignal_connect($w, activate => sub { $launch->($choice) }); - $w->set_draw_as_radio(1); + $w->set_draw_as_radio(!$actions{$action}{use_checkbox}); $w; } $actions{$action}{choices}->())); } -- cgit v1.2.1