summaryrefslogtreecommitdiffstats
path: root/bin/net_applet
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-25 15:20:29 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-25 15:20:29 +0000
commit104603cc30d01e510c0d74685fa5a6c50342298d (patch)
tree12bb3af8c77068343c635b1ae27a01ba5a42e52f /bin/net_applet
parent634b91d4078049942f9d44446d16d913331033e9 (diff)
downloaddrakx-net-104603cc30d01e510c0d74685fa5a6c50342298d.tar
drakx-net-104603cc30d01e510c0d74685fa5a6c50342298d.tar.gz
drakx-net-104603cc30d01e510c0d74685fa5a6c50342298d.tar.bz2
drakx-net-104603cc30d01e510c0d74685fa5a6c50342298d.tar.xz
drakx-net-104603cc30d01e510c0d74685fa5a6c50342298d.zip
reload network interfaces list when a new network device appears (if dbus support is enabled)
Diffstat (limited to 'bin/net_applet')
-rwxr-xr-xbin/net_applet15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/net_applet b/bin/net_applet
index 30c881f..9fe641b 100755
--- a/bin/net_applet
+++ b/bin/net_applet
@@ -198,6 +198,21 @@ eval {
network::net_applet::ifw::create();
} if $dbus;
+if ($dbus) {
+ $dbus->{connection}->add_filter(sub {
+ my ($_con, $msg) = @_;
+ if ($msg->get_interface eq 'com.mandriva.network' && $msg->get_member eq 'status') {
+ my ($status, $interface) = $msg->get_args_list;
+ print "got connection status event: $status $interface\n";
+ if ($status eq "add") {
+ checkNetworkForce();
+ }
+ }
+ });
+ $dbus->{connection}->add_match("type='signal',interface='com.mandriva.network'");
+ dbus_object::set_gtk2_watch_helper($dbus);
+}
+
$notification_queue = Gtk2::Notify::Queue->new($icon);
$icon->signal_connect(activate => sub {