summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-05 08:47:50 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-05 08:47:50 +0000
commit87e6faf70cdf80af1b40571a8d8b9189d7594b50 (patch)
tree20d29ccd516689009713a8fa33f389cf95c1ae9d /perl-install/standalone
parent3d923d1ea40866d2c38bf709ddea3e1d7f2a6e87 (diff)
downloaddrakx-87e6faf70cdf80af1b40571a8d8b9189d7594b50.tar
drakx-87e6faf70cdf80af1b40571a8d8b9189d7594b50.tar.gz
drakx-87e6faf70cdf80af1b40571a8d8b9189d7594b50.tar.bz2
drakx-87e6faf70cdf80af1b40571a8d8b9189d7594b50.tar.xz
drakx-87e6faf70cdf80af1b40571a8d8b9189d7594b50.zip
try to use $default_intf (and fix the last perl_checker warning, yeah)
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/net_monitor8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index be383ba63..67d267010 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -343,7 +343,7 @@ sub update() {
foreach (@intfs) {
my $intf = $_;
if (!member($intf,@interfaces)) {
- $default_intf = $intf;
+ $default_intf ||= $intf;
$monitor->{$intf}{initialr} = $monitor->{$intf}{val}[0];
$monitor->{$intf}{initialt} = $monitor->{$intf}{val}[8];
$darea->{$intf} = Gtk2::DrawingArea->new;
@@ -418,6 +418,12 @@ sub update() {
my $intf = $_;
$notebook->remove_page($monitor->{$intf}{page}) unless member($intf,@intfs);
}
+ for (my $num_p = 0; $num_p < $notebook->get_n_pages; $num_p++) {
+ if ($notebook->get_tab_label_text($notebook->get_nth_page($num_p)) eq $default_intf) {
+ $notebook->set_current_page($num_p);
+ last;
+ }
+ }
@interfaces = @intfs;
if ($isconnected != -2 && $isconnected != -1 && !$during_connection) {
if ($isconnected == 1 && !in_ifconfig($netcnx->{NET_INTERFACE})) {