diff options
author | Damien Chaumette <dchaumette@mandriva.com> | 2004-02-10 11:40:27 +0000 |
---|---|---|
committer | Damien Chaumette <dchaumette@mandriva.com> | 2004-02-10 11:40:27 +0000 |
commit | 45892d795ad34a12dddf6695fa58b8973331e396 (patch) | |
tree | 22721a810f083b0432d1cbe022f600400db8bcc0 /perl-install/standalone | |
parent | 7789b636d36dcafe1a7bcb677b9e14dd354623f6 (diff) | |
download | drakx-45892d795ad34a12dddf6695fa58b8973331e396.tar drakx-45892d795ad34a12dddf6695fa58b8973331e396.tar.gz drakx-45892d795ad34a12dddf6695fa58b8973331e396.tar.bz2 drakx-45892d795ad34a12dddf6695fa58b8973331e396.tar.xz drakx-45892d795ad34a12dddf6695fa58b8973331e396.zip |
- add 'ath' and 'wlan' to ethernet kind
- use regexp once
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakconnect | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 1ff2b2c60..04049e8a0 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -278,10 +278,11 @@ sub build_notebook { my ($netc, $intf, $gui, $apply_button, $interface, $interface_kind) = @_; my $apply = sub { $apply_button->set_sensitive(1) }; + my $is_ethernet = $interface =~ /eth|ath|wlan/; if ($intf->{pages}{N("TCP/IP")}) { gtkpack_($gui->{sheet}{N("TCP/IP")} = Gtk2::VBox->new(0,0), - if_($interface =~ /eth/, + if_($is_ethernet, 0, $gui->{intf}{BOOTPROTO} = gtksignal_connect(Gtk2::OptionMenu->new, changed => sub { foreach ($gui->{intf}{IPADDR}, $gui->{intf}{NETMASK}, $gui->{netc}{GATEWAY}) { @@ -301,7 +302,7 @@ sub build_notebook { 0, gtksignal_connect($gui->{intf}{NETMASK} = Gtk2::Entry->new, key_press_event => $apply), ), - if_($interface =~ /eth/, + if_($is_ethernet, 0, gtkpack_(Gtk2::VBox->new(0,0), 1, Gtk2::Label->new(N("Gateway")), 0, gtksignal_connect($gui->{netc}{GATEWAY} = Gtk2::Entry->new, @@ -324,7 +325,7 @@ sub build_notebook { ), ), ); - if ($interface =~ /eth/) { $gui->{intf}{BOOTPROTO}->set_popdown_strings(N_("static"), N_("dhcp")) } + if ($is_ethernet) { $gui->{intf}{BOOTPROTO}->set_popdown_strings(N_("static"), N_("dhcp")) } else { $_->set_sensitive(0) foreach $gui->{intf}{IPADDR}, $gui->{intf}{NETMASK}; delete $gui->{intf}{BOOTPROTO}; @@ -372,7 +373,7 @@ sub build_notebook { gtkpack__(Gtk2::VBox->new(0,0), $gui->{intf_bool}{ONBOOT} = gtksignal_connect(Gtk2::CheckButton->new(N("Start at boot")), toggled => $apply), - if_($interface =~ /eth/, + if_($is_ethernet, map { ($gui->{intf_bool}{$_->[0]} = gtksignal_connect(Gtk2::CheckButton->new($_->[1]), toggled => $apply)) } ([ "HWADDR", N("Track network card id (useful for laptops)") ], |