diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-08-18 07:55:16 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-08-18 07:55:16 +0000 |
commit | f0d9d49902f39cb284f155f08a79bfea8662831a (patch) | |
tree | dfa1b95c854d064a9ab9e3dd0cd79444a579e1d0 /perl-install | |
parent | 61379b079d85737f21fcdbae19daa649044fe658 (diff) | |
download | drakx-backup-do-not-use-f0d9d49902f39cb284f155f08a79bfea8662831a.tar drakx-backup-do-not-use-f0d9d49902f39cb284f155f08a79bfea8662831a.tar.gz drakx-backup-do-not-use-f0d9d49902f39cb284f155f08a79bfea8662831a.tar.bz2 drakx-backup-do-not-use-f0d9d49902f39cb284f155f08a79bfea8662831a.tar.xz drakx-backup-do-not-use-f0d9d49902f39cb284f155f08a79bfea8662831a.zip |
(configure_lan) fix crash on interface enabling/disabling
(get_intf_status) factorize translations and use upcase initale
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/drakconnect | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 0f234a875..3a849f75a 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -411,6 +411,11 @@ sub configure_hostname() { return; } +sub get_intf_status { + my ($c) = @ç; + ethisup($c) ? N("Deactivate now") : N("Activate now") +} + sub configure_lan() { my $window = _create_dialog(N("LAN configuration"), { small => 1 }); my @card_tab; @@ -485,11 +490,12 @@ Configure them first by clicking on 'Configure'")),1,1,0); my $c = $_; my $widget_temp; if (-e "$::prefix/etc/sysconfig/network-scripts/ifcfg-eth$c") { - $widget_temp = gtksignal_connect(new Gtk2::Button(ethisup($c) ? N("deactivate now") : N("activate now")), - clicked => sub { - system("/sbin/if" . (ethisup($c) ? "down" : "up") . " eth$c"); - ugtk2::gtkbuttonset($_[0], ethisup($c) ? N("deactivate now") : N("activate now")); - }); + $widget_temp = gtksignal_connect(new Gtk2::Button(get_intf_status($c)), + clicked => sub { + system("/sbin/if" . (ethisup($c) ? "down" : "up") . " eth$c"); + $_[0]->set_label(get_intf_status($c)); + update(); + }); } else { $widget_temp = N("This interface has not been configured yet.\nLaunch the configuration wizard in the main window"); } |