summaryrefslogtreecommitdiff
path: root/lockscreen
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2014-10-22 17:26:56 +0200
committerAndrea Azzarone <azzaronea@gmail.com>2014-10-22 17:26:56 +0200
commit362e5e3baa21c940d4aa9390dc33359bc4e64b16 (patch)
tree441cc6b76ceeae820466a628368106e182009239 /lockscreen
parent908c2e6969fd1365ccf5ba0b34de345bfae90bdd (diff)
Minor changes suggested by Marco's review.
(bzr r3874.1.16)
Diffstat (limited to 'lockscreen')
-rw-r--r--lockscreen/ShutdownNotifier.cpp20
-rw-r--r--lockscreen/ShutdownNotifier.h2
-rw-r--r--lockscreen/SuspendNotifier.cpp18
-rw-r--r--lockscreen/SuspendNotifier.h2
4 files changed, 21 insertions, 21 deletions
diff --git a/lockscreen/ShutdownNotifier.cpp b/lockscreen/ShutdownNotifier.cpp
index 280620bf1..796497d67 100644
--- a/lockscreen/ShutdownNotifier.cpp
+++ b/lockscreen/ShutdownNotifier.cpp
@@ -94,7 +94,7 @@ void ShutdownNotifier::Impl::UnregisterInterest()
Uninhibit();
logind_proxy_->DisconnectSignal("PrepareForShutdown");
- cb_ = 0;
+ cb_ = nullptr;
}
void ShutdownNotifier::Impl::Inhibit()
@@ -102,15 +102,15 @@ void ShutdownNotifier::Impl::Inhibit()
if (IsInhibited())
return;
- logind_proxy_->CallWithUnixFdList("Inhibit",
- g_variant_new("(ssss)", "shutdown", "Unity Lockscreen", "Screen is locked", "delay"),
- [this](GVariant* variant, glib::Error const& e){
- if (e)
- {
- LOG_ERROR(logger) << "Failed to inhbit suspend";
- }
- delay_inhibit_fd_ = glib::Variant(variant).GetInt32();
- });
+ GVariant* args = g_variant_new("(ssss)", "shutdown", "Unity Lockscreen", "Screen is locked", "delay");
+
+ logind_proxy_->CallWithUnixFdList("Inhibit", args, [this] (GVariant* variant, glib::Error const& e) {
+ if (e)
+ {
+ LOG_ERROR(logger) << "Failed to inhbit suspend";
+ }
+ delay_inhibit_fd_ = glib::Variant(variant).GetInt32();
+ });
}
void ShutdownNotifier::Impl::Uninhibit()
diff --git a/lockscreen/ShutdownNotifier.h b/lockscreen/ShutdownNotifier.h
index 8a3eebab5..ef4c9a3ef 100644
--- a/lockscreen/ShutdownNotifier.h
+++ b/lockscreen/ShutdownNotifier.h
@@ -37,7 +37,7 @@ public:
ShutdownNotifier();
~ShutdownNotifier();
- bool RegisterInterest(ShutdownCallback const& cb);
+ bool RegisterInterest(ShutdownCallback const&);
void UnregisterInterest();
private:
diff --git a/lockscreen/SuspendNotifier.cpp b/lockscreen/SuspendNotifier.cpp
index 355681f9c..6086ffa7f 100644
--- a/lockscreen/SuspendNotifier.cpp
+++ b/lockscreen/SuspendNotifier.cpp
@@ -103,15 +103,15 @@ void SuspendNotifier::Impl::Inhibit()
if (IsInhibited())
return;
- logind_proxy_->CallWithUnixFdList("Inhibit",
- g_variant_new("(ssss)", "sleep", "Unity Lockscreen", "Unity wants to lock screen before suspending.", "delay"),
- [this](GVariant* variant, glib::Error const& e){
- if (e)
- {
- LOG_ERROR(logger) << "Failed to inhbit suspend";
- }
- delay_inhibit_fd_ = glib::Variant(variant).GetInt32();
- });
+ GVariant* args = g_variant_new("(ssss)", "sleep", "Unity Lockscreen", "Unity wants to lock screen before suspending.", "delay");
+
+ logind_proxy_->CallWithUnixFdList("Inhibit", args, [this] (GVariant* variant, glib::Error const& e) {
+ if (e)
+ {
+ LOG_ERROR(logger) << "Failed to inhbit suspend";
+ }
+ delay_inhibit_fd_ = glib::Variant(variant).GetInt32();
+ });
}
void SuspendNotifier::Impl::Uninhibit()
diff --git a/lockscreen/SuspendNotifier.h b/lockscreen/SuspendNotifier.h
index 09ebe6f38..ff655bf68 100644
--- a/lockscreen/SuspendNotifier.h
+++ b/lockscreen/SuspendNotifier.h
@@ -37,7 +37,7 @@ public:
SuspendNotifier();
~SuspendNotifier();
- bool RegisterInterest(SuspendCallback const& cb);
+ bool RegisterInterest(SuspendCallback const&);
void UnregisterInterest();
private: