aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device-provider-upower.c18
-rw-r--r--src/ib-brightness-control.c2
2 files changed, 19 insertions, 1 deletions
diff --git a/src/device-provider-upower.c b/src/device-provider-upower.c
index 05faeab..1b1b7bd 100644
--- a/src/device-provider-upower.c
+++ b/src/device-provider-upower.c
@@ -249,6 +249,22 @@ on_upower_device_removed (DbusUPower * unused G_GNUC_UNUSED,
}
static void
+on_upower_resuming (DbusUPower * unused G_GNUC_UNUSED,
+ gpointer gself)
+{
+ IndicatorPowerDeviceProviderUPower * self;
+ GHashTableIter iter;
+ gpointer object_path;
+
+ self = INDICATOR_POWER_DEVICE_PROVIDER_UPOWER (gself);
+
+ g_debug ("Resumed from hibernate/sleep; queueing all devices for a refresh");
+ g_hash_table_iter_init (&iter, self->priv->devices);
+ while (g_hash_table_iter_next (&iter, &object_path, NULL))
+ refresh_device_soon (self, object_path);
+}
+
+static void
on_upower_proxy_ready (GObject * source G_GNUC_UNUSED,
GAsyncResult * res,
gpointer gself)
@@ -272,6 +288,8 @@ on_upower_proxy_ready (GObject * source G_GNUC_UNUSED,
p = self->priv;
p->upower_proxy = proxy;
+ g_signal_connect (proxy, "resuming",
+ G_CALLBACK (on_upower_resuming), self);
g_signal_connect (proxy, "device-changed",
G_CALLBACK (on_upower_device_changed), self);
g_signal_connect (proxy, "device-added",
diff --git a/src/ib-brightness-control.c b/src/ib-brightness-control.c
index 2b9b79d..ddc82e5 100644
--- a/src/ib-brightness-control.c
+++ b/src/ib-brightness-control.c
@@ -52,7 +52,7 @@ ib_brightness_control_new (void)
(g_strcmp0 (device_type, "platform") == 0) ||
(g_strcmp0 (device_type, "raw") == 0)) {
path = g_strdup (g_udev_device_get_sysfs_path (device->data));
- g_print ("found: %s\n", path);
+ g_debug ("found: %s", path);
break;
}
}