summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/net_monitor
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/net_monitor')
-rwxr-xr-xperl-install/standalone/net_monitor11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index 2f58c073f..e3283bf52 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -27,6 +27,7 @@ use my_gtk qw(:helpers :wrappers);
use common;
use strict;
use network::netconnect;
+use network::tools;
use MDK::Common::Globals "network", qw($in $prefix $connect_file $disconnect_file $connect_prog);
my ($connect, $default_intf);
@@ -153,16 +154,16 @@ sub connection {
my $tag2 = Gtk->timeout_add(10000, sub {
Gtk->timeout_remove($tag);
$statusbar->pop(1);
- $statusbar->push(1, $isconnected2 ? ( network::netconnect::connected('', $netc) ?
+ $statusbar->push(1, $isconnected2 ? ( connected() ?
_("Disconnection from Internet failed.") :
_("Disconnection from Internet complete.")) :
- ( network::netconnect::connected('', $netc) ?
+ ( connected() ?
_("Connection complete.") :
_("Connection failed.\nVerify your configuration in the Mandrake Control Center."))
);
my $tag3 = Gtk->timeout_add(10000, sub {
$statusbar->pop(1);
- $statusbar->push(1, network::netconnect::connected('', $netc) ? _("Connected") : _("Not connected"));
+ $statusbar->push(1, connected() ? _("Connected") : _("Not connected"));
0;
});
$button_connect->set_sensitive(1);
@@ -331,11 +332,11 @@ sub update {
}
@interfaces = @intfs;
my $netc={};
- if(network::netconnect::connected('', $netc) == !$isconnected) {
+ if(connected() == !$isconnected) {
$isconnected = $isconnected ? 0 : 1;
$label_c->set($isconnected ? _("Disconnect") : _("Connect"));
$statusbar->pop(1);
- $statusbar->push(1, network::netconnect::connected('', $netc) ? _("Connected") : _("Not connected"));
+ $statusbar->push(1, connected() ? _("Connected") : _("Not connected"));
$isconnected ? $pix_c->set($pix_c_map, $pix_c_mask) : $pix_c->set($pix_d_map, $pix_d_mask);
}
$time_tag2 = Gtk->timeout_add(5000, \&update);