aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-04-21 09:33:08 -0500
committerCharles Kerr <charles.kerr@canonical.com>2016-04-21 09:33:08 -0500
commitd4e82e7d4fa1937d27d1397a036af2b6b03349b3 (patch)
treea8c110f56dac5535d3f96cb4b04f0de3476da4a9 /src
parent3b84a37b2caae0c7c971b3c7cc5df9be1319a5ac (diff)
downloadayatana-indicator-display-d4e82e7d4fa1937d27d1397a036af2b6b03349b3.tar.gz
ayatana-indicator-display-d4e82e7d4fa1937d27d1397a036af2b6b03349b3.tar.bz2
ayatana-indicator-display-d4e82e7d4fa1937d27d1397a036af2b6b03349b3.zip
code cleanup to prepare for MR
Diffstat (limited to 'src')
-rw-r--r--src/greeter.cpp15
-rw-r--r--src/greeter.h2
2 files changed, 7 insertions, 10 deletions
diff --git a/src/greeter.cpp b/src/greeter.cpp
index 7f79bf9..d41160f 100644
--- a/src/greeter.cpp
+++ b/src/greeter.cpp
@@ -26,13 +26,13 @@ class UnityGreeter::Impl
{
public:
- explicit Impl()
+ Impl()
{
m_cancellable.reset(
g_cancellable_new(),
- [](GCancellable* c){
- g_cancellable_cancel(c);
- g_clear_object(&c);
+ [](GCancellable* o){
+ g_cancellable_cancel(o);
+ g_clear_object(&o);
}
);
@@ -154,7 +154,7 @@ private:
}
static void on_properties_changed_signal(
- GDBusConnection* /*connection*/,
+ GDBusConnection* /*bus*/,
const gchar* sender_name,
const gchar* object_path,
const gchar* interface_name,
@@ -171,7 +171,6 @@ private:
g_return_if_fail(g_variant_is_of_type(parameters, G_VARIANT_TYPE(DBusNames::Properties::PropertiesChanged::ARGS_VARIANT_TYPE)));
auto v = g_variant_get_child_value(parameters, 1);
-
gboolean is_active {};
if (g_variant_lookup(v, "IsActive", "b", &is_active))
{
@@ -179,13 +178,11 @@ private:
self->m_is_active.set(is_active);
}
g_clear_pointer(&v, g_variant_unref);
-
}
core::Property<bool> m_is_active {false};
-
- std::shared_ptr<GDBusConnection> m_bus;
std::shared_ptr<GCancellable> m_cancellable;
+ std::shared_ptr<GDBusConnection> m_bus;
std::string m_owner;
};
diff --git a/src/greeter.h b/src/greeter.h
index 9508220..e084d25 100644
--- a/src/greeter.h
+++ b/src/greeter.h
@@ -36,7 +36,7 @@ public:
class UnityGreeter: public Greeter
{
public:
- explicit UnityGreeter();
+ UnityGreeter();
virtual ~UnityGreeter();
core::Property<bool>& is_active() override;