summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorDamien Chaumette <dchaumette@mandriva.com>2004-02-06 12:21:53 +0000
committerDamien Chaumette <dchaumette@mandriva.com>2004-02-06 12:21:53 +0000
commit00fb105b32567a0f77bc7b001b73a54fda725987 (patch)
tree892876d02cebe4626ed8f4a2d0ddb1f26b1a9eee /perl-install/standalone
parent16a8a48af8b343f08a71774bc9c4ee23fcd2a47b (diff)
downloaddrakx-00fb105b32567a0f77bc7b001b73a54fda725987.tar
drakx-00fb105b32567a0f77bc7b001b73a54fda725987.tar.gz
drakx-00fb105b32567a0f77bc7b001b73a54fda725987.tar.bz2
drakx-00fb105b32567a0f77bc7b001b73a54fda725987.tar.xz
drakx-00fb105b32567a0f77bc7b001b73a54fda725987.zip
- do only one regexp on $interface
- more readable repack
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakconnect12
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index ace8d710b..1ff2b2c60 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -283,7 +283,10 @@ sub build_notebook {
gtkpack_($gui->{sheet}{N("TCP/IP")} = Gtk2::VBox->new(0,0),
if_($interface =~ /eth/,
0, $gui->{intf}{BOOTPROTO} = gtksignal_connect(Gtk2::OptionMenu->new,
- changed => sub { $_->set_sensitive($gui->{intf}{BOOTPROTO}->get_text eq "static" ? 1 : 0) foreach $gui->{intf}{IPADDR}, $gui->{intf}{NETMASK}, $gui->{netc}{GATEWAY}; $apply->() },
+ changed => sub {
+ foreach ($gui->{intf}{IPADDR}, $gui->{intf}{NETMASK}, $gui->{netc}{GATEWAY}) {
+ $_->set_sensitive($gui->{intf}{BOOTPROTO}->get_text eq "static" ? 1 : 0)
+ }; $apply->() },
),
),
1, gtkpack(Gtk2::HBox->new(0,0),
@@ -321,8 +324,11 @@ sub build_notebook {
),
),
);
- $interface =~ /eth/ ? $gui->{intf}{BOOTPROTO}->set_popdown_strings(N_("static"), N_("dhcp")) : delete $gui->{intf}{BOOTPROTO};
- $interface !~ /eth/ and $_->set_sensitive(0) foreach $gui->{intf}{IPADDR}, $gui->{intf}{NETMASK};
+ if ($interface =~ /eth/) { $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};
+ }
!$intf->{IPADDR} and ($intf->{IPADDR}, $gui->{active}, $intf->{NETMASK}) = get_intf_ip($interface);
$gui->{netc}{$_}->set_text($netc->{$_}) foreach keys %{$gui->{netc}};
}