summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/net_applet10
1 files changed, 4 insertions, 6 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 330bd84bb..5f7627904 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -14,7 +14,6 @@ use ugtk2 qw(:create :helpers :wrappers);
my ($eventbox, $img);
my ($menu, $timeout);
-my $raisedwindow = 0;
my $onstartupfile = "$ENV{HOME}/.net_applet";
add_icon_path("/usr/share/libDrakX/pixmaps/");
# Allow multiple instances, but only one per user:
@@ -54,11 +53,10 @@ gtkadd(my $icon = Gtk2::TrayIcon->new("Net_Applet"),
)
);
$eventbox->signal_connect(button_press_event => sub {
- if (!$raisedwindow) {
- if ($_[1]->button == 1) {
- $raisedwindow = 1; netMonitor()
- }
- }
+ if ($_[1]->button == 1) {
+ my @nm_pid = `ps -u $ENV{USER}` =~ /net_monitor/;
+ @nm_pid > 1 and netMonitor()
+ }
$_[1]->button == 3 && $menu and $menu->popup(undef, undef, undef, undef, $_[1]->button, $_[1]->time);
});
my ($opt) = @ARGV;