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.
This commit is contained in:
Bastien Nocera 2013-10-17 23:18:57 +02:00
parent c33729ad2c
commit aa62f6a15c

View file

@ -102,7 +102,10 @@ G_DEFINE_TYPE (UpDevice, up_device, G_TYPE_OBJECT)
static void static void
up_device_changed_cb (UpDeviceGlue *proxy, GParamSpec *pspec, UpDevice *device) 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);
} }
/** /**