diff options
author | Callum McKenzie <callum@spooky-possum.org> | 2009-05-30 18:56:02 +1200 |
---|---|---|
committer | Callum McKenzie <callum@spooky-possum.org> | 2009-05-30 18:56:02 +1200 |
commit | f8bd8fcf39b0286556ce321763a6ea3f79b1cc8e (patch) | |
tree | cde5ebee34a129b2df01daa384018954242549a7 /gweather | |
parent | fb2454e1aae19b5afb45c649d90e377fb0900adb (diff) |
Fix network state detection in gweather
Patch from Matthias Clasen to fix detection of network status changes
in gweather. See bug #579098 for details. I believe this also fixes
bugs 379422, and 565751.
Diffstat (limited to 'gweather')
-rw-r--r-- | gweather/gweather-applet.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gweather/gweather-applet.c b/gweather/gweather-applet.c index 101d64fb2..8d86ec015 100644 --- a/gweather/gweather-applet.c +++ b/gweather/gweather-applet.c @@ -17,6 +17,9 @@ #include <stdio.h> #include <stdlib.h> #include <assert.h> +#include <netinet/in.h> +#include <arpa/nameser.h> +#include <resolv.h> #include <gconf/gconf-client.h> #include <panel-applet.h> @@ -552,6 +555,8 @@ state_notify (DBusPendingCall *pending, gpointer data) DBUS_TYPE_UINT32, &result, DBUS_TYPE_INVALID)) { if (result == NM_STATE_CONNECTED) { + /* thank you, glibc */ + res_init (); gweather_update (gw_applet); } } @@ -614,7 +619,7 @@ setup_network_monitor (GWeatherApplet *gw_applet) dbus_connection_add_filter (dbus, filter_func, gw_applet, NULL); dbus_bus_add_match (dbus, "type='signal'," - "interface='" NM_DBUS_INTERFACE_DEVICE "'", + "interface='" NM_DBUS_INTERFACE "'", NULL); } } |