diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-08-19 18:17:22 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-08-19 18:17:22 +0000 |
commit | e71293f2c05c827d5383cae15e99f2460ad1725b (patch) | |
tree | 67759058b23c5516d29e4e1a964d9ddbac12166b | |
parent | 8d83d221ffdc569ea1914de43d1641131459faa4 (diff) | |
download | drakx-e71293f2c05c827d5383cae15e99f2460ad1725b.tar drakx-e71293f2c05c827d5383cae15e99f2460ad1725b.tar.gz drakx-e71293f2c05c827d5383cae15e99f2460ad1725b.tar.bz2 drakx-e71293f2c05c827d5383cae15e99f2460ad1725b.tar.xz drakx-e71293f2c05c827d5383cae15e99f2460ad1725b.zip |
(update_intbutt) consolidate internet connection button switch code
-rwxr-xr-x | perl-install/standalone/drakconnect | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index e94b8fe96..f3caf6255 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -331,6 +331,12 @@ sub apply() { sub ethisup { `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig $_[0]` =~ /inet/ } +sub update_intbutt { + $int_state->set($isconnected ? N("Connected") : N("Not connected")); + $int_connect->child->set($isconnected ? N("Disconnect...") : N("Connect...")); + $int_connect->set_sensitive(1); +} + my $to_update; sub update() { my $h = chomp_(`hostname`); @@ -341,9 +347,7 @@ sub update() { update_list(); $button_del->set_sensitive(network::netconnect::get_profiles() > 1); return 1 if $isconnected == -1; - $int_state->set($isconnected ? N("Connected") : N("Not connected")); - $int_connect->child->set($isconnected ? N("Disconnect...") : N("Connect...")); - $int_connect->set_sensitive(1); + update_intbutt(); 1; } @@ -364,9 +368,7 @@ sub update2() { $warning_label1->set(N("Warning, another Internet connection has been detected, maybe using your network")); $isconnected = 0; } else { $warning_label1->set("") } - $int_state->set($isconnected ? N("Connected") : N("Not connected")); - $int_connect->child->set($isconnected ? N("Disconnect...") : N("Connect...")); - $int_connect->set_sensitive(1); + update_intbutt(); } } update(); |