aboutsummaryrefslogtreecommitdiff
path: root/src/clock.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-14 23:07:10 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-14 23:07:10 -0600
commitee64bb2698adfe27e55615a8856b0e2c78ad8469 (patch)
treeb8fb6e1440ac700f7f51e5c765303abb315c6399 /src/clock.cpp
parent3b8833efe6ab21387b6f73b4a4ef757445801623 (diff)
downloadayatana-indicator-datetime-ee64bb2698adfe27e55615a8856b0e2c78ad8469.tar.gz
ayatana-indicator-datetime-ee64bb2698adfe27e55615a8856b0e2c78ad8469.tar.bz2
ayatana-indicator-datetime-ee64bb2698adfe27e55615a8856b0e2c78ad8469.zip
Function: add fully-tested ActionGroups, per-profile Menus, state object.
Form: Add code annotations/comments. Remove dead code. Use Mir style guide. Todo: GSettings toggles, sync with new dbus-test-runner API, get GNOME Panel building again
Diffstat (limited to 'src/clock.cpp')
-rw-r--r--src/clock.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/clock.cpp b/src/clock.cpp
index 4a75ceb..f3f5d70 100644
--- a/src/clock.cpp
+++ b/src/clock.cpp
@@ -31,9 +31,9 @@ namespace datetime {
***/
Clock::Clock():
- cancellable_(g_cancellable_new())
+ m_cancellable(g_cancellable_new())
{
- g_bus_get(G_BUS_TYPE_SYSTEM, cancellable_, onSystemBusReady, this);
+ g_bus_get(G_BUS_TYPE_SYSTEM, m_cancellable, onSystemBusReady, this);
timezones.changed().connect([this](const std::set<std::string>& timezones){
g_message ("timezones changed... new count is %d", (int)timezones.size());
@@ -43,13 +43,13 @@ Clock::Clock():
Clock::~Clock()
{
- g_cancellable_cancel(cancellable_);
- g_clear_object(&cancellable_);
+ g_cancellable_cancel(m_cancellable);
+ g_clear_object(&m_cancellable);
- if (sleep_subscription_id_)
- g_dbus_connection_signal_unsubscribe(system_bus_ , sleep_subscription_id_);
+ if (m_sleep_subscription_id)
+ g_dbus_connection_signal_unsubscribe(m_system_bus, m_sleep_subscription_id);
- g_clear_object(&system_bus_);
+ g_clear_object(&m_system_bus);
}
void
@@ -61,9 +61,9 @@ Clock::onSystemBusReady(GObject*, GAsyncResult * res, gpointer gself)
{
auto self = static_cast<Clock*>(gself);
- self->system_bus_ = system_bus;
+ self->m_system_bus = system_bus;
- self->sleep_subscription_id_ = g_dbus_connection_signal_subscribe(
+ self->m_sleep_subscription_id = g_dbus_connection_signal_subscribe(
system_bus,
nullptr,
"org.freedesktop.login1.Manager", // interface
@@ -78,13 +78,13 @@ Clock::onSystemBusReady(GObject*, GAsyncResult * res, gpointer gself)
}
void
-Clock::onPrepareForSleep(GDBusConnection * connection G_GNUC_UNUSED,
- const gchar * sender_name G_GNUC_UNUSED,
- const gchar * object_path G_GNUC_UNUSED,
- const gchar * interface_name G_GNUC_UNUSED,
- const gchar * signal_name G_GNUC_UNUSED,
- GVariant * parameters G_GNUC_UNUSED,
- gpointer gself)
+Clock::onPrepareForSleep(GDBusConnection* /*connection*/,
+ const gchar* /*sender_name*/,
+ const gchar* /*object_path*/,
+ const gchar* /*interface_name*/,
+ const gchar* /*signal_name*/,
+ GVariant* /*parameters*/,
+ gpointer gself)
{
static_cast<Clock*>(gself)->skewDetected();
}