summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
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})) {