diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-17 23:18:57 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-17 23:20:22 +0200 |
commit | aa62f6a15c3834bc16f15e95f8d6e956b72fabd0 (patch) | |
tree | 41c38509346d9c53c5a018e83ebdc630817786d0 | |
parent | c33729ad2c9e31dea3f256af2841efead91e7628 (diff) | |
download | upower-aa62f6a15c3834bc16f15e95f8d6e956b72fabd0.tar.gz |
lib: Fix possible warning when type changes
UpDevice on the daemon side has a "type" property, but the
libupower-glib object has a "kind" type instead. Translate that.
-rw-r--r-- | libupower-glib/up-device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c index ad608c1..2d65806 100644 --- a/libupower-glib/up-device.c +++ b/libupower-glib/up-device.c @@ -102,7 +102,10 @@ G_DEFINE_TYPE (UpDevice, up_device, G_TYPE_OBJECT) static void up_device_changed_cb (UpDeviceGlue *proxy, GParamSpec *pspec, UpDevice *device) { - g_object_notify (G_OBJECT (device), pspec->name); + if (g_strcmp0 (pspec->name, "type") == 0) + g_object_notify (G_OBJECT (device), "kind"); + else + g_object_notify (G_OBJECT (device), pspec->name); } /** |