aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 56ea51c..b0182c9 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -1154,13 +1154,10 @@ static void
session_active_change_cb (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name,
GVariant * parameters, gpointer user_data)
{
- // Just returned from suspend
- if (g_strcmp0(signal_name, "SystemIdleHintChanged") == 0) {
- gboolean idle = FALSE;
- g_variant_get(parameters, "(b)", &idle);
- if (!idle) {
- on_clock_skew ();
- }
+ // Just returned from suspend. Don't care about the sleep type.
+ if (g_strcmp0(signal_name, "NotifyResume") == 0) {
+ g_debug ("System has been resumed; adjusting clock");
+ on_clock_skew ();
}
return;
}
@@ -1174,7 +1171,7 @@ system_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
if (error != NULL) {
- g_warning("Could not grab DBus proxy for ConsoleKit: %s", error->message);
+ g_warning("Could not grab DBus proxy for UPower: %s", error->message);
g_clear_error (&error);
return;
}
@@ -1482,9 +1479,9 @@ main (int argc, char ** argv)
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
- "org.freedesktop.ConsoleKit",
- "/org/freedesktop/ConsoleKit/Manager",
- "org.freedesktop.ConsoleKit.Manager",
+ "org.freedesktop.UPower",
+ "/org/freedesktop/UPower",
+ "org.freedesktop.UPower",
NULL, system_proxy_cb, dbus);
mainloop = g_main_loop_new(NULL, FALSE);