diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-09-15 09:56:52 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-09-15 09:56:52 -0500 |
commit | d52c7d1b04e5c4353533b9927617e1753784d2c8 (patch) | |
tree | 6e2132e3fd09a335da5c15baf3a894c5af8bf990 | |
parent | a705cb47912f6785a3dda0f67eee264938cdf4e0 (diff) | |
download | ayatana-indicator-datetime-d52c7d1b04e5c4353533b9927617e1753784d2c8.tar.gz ayatana-indicator-datetime-d52c7d1b04e5c4353533b9927617e1753784d2c8.tar.bz2 ayatana-indicator-datetime-d52c7d1b04e5c4353533b9927617e1753784d2c8.zip |
listen to powerd SysPowerStateChange instead of Wakeup
-rw-r--r-- | src/clock.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/clock.cpp b/src/clock.cpp index 35690dc..a04e074 100644 --- a/src/clock.cpp +++ b/src/clock.cpp @@ -169,11 +169,11 @@ private: auto tag = g_dbus_connection_signal_subscribe(bus, name_owner, BUS_POWERD_INTERFACE, - "Wakeup", // signal name + "SysPowerStateChange", BUS_POWERD_PATH, nullptr, // arg0 G_DBUS_SIGNAL_FLAGS_NONE, - on_wakeup, + on_sys_power_state_change, gself, // user_data nullptr); // user_data closure @@ -188,15 +188,15 @@ private: static_cast<Impl*>(gself)->m_subscriptions[name].clear(); } - static void on_wakeup(GDBusConnection* /*connection*/, - const gchar* /*sender_name*/, - const gchar* /*object_path*/, - const gchar* /*interface_name*/, - const gchar* /*signal_name*/, - GVariant* /*parameters*/, - gpointer gself) + static void on_sys_power_state_change(GDBusConnection* /*connection*/, + const gchar* /*sender_name*/, + const gchar* /*object_path*/, + const gchar* /*interface_name*/, + const gchar* /*signal_name*/, + GVariant* /*parameters*/, + gpointer gself) { - g_debug("firing clock.minute_changed() due to powerd.Wakeup"); + g_debug("firing clock.minute_changed() due to state change"); static_cast<Impl*>(gself)->m_owner.minute_changed(); } |