aboutsummaryrefslogtreecommitdiff
path: root/tests/backend-dbus/mock-unity-session.cc
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-06-20 15:27:33 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-06-20 15:27:33 +0000
commit44bcea9deba51cee162a1ea4acda35b4a3f5b7bb (patch)
tree631eaa41e056641e6c1d14a954e65664acef7491 /tests/backend-dbus/mock-unity-session.cc
parentc2e6f8bf33ffe3b928f910f46cf175b101fc8ed3 (diff)
parent52d94a51a0a4b8660a63f14e37ddf5183b052b02 (diff)
downloadayatana-indicator-session-44bcea9deba51cee162a1ea4acda35b4a3f5b7bb.tar.gz
ayatana-indicator-session-44bcea9deba51cee162a1ea4acda35b4a3f5b7bb.tar.bz2
ayatana-indicator-session-44bcea9deba51cee162a1ea4acda35b4a3f5b7bb.zip
When logging out, prefer com.canonical.Unity.RequestLogout over org.gnome.SessionManager.Logout. Fixes: 1296814
Diffstat (limited to 'tests/backend-dbus/mock-unity-session.cc')
-rw-r--r--tests/backend-dbus/mock-unity-session.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/backend-dbus/mock-unity-session.cc b/tests/backend-dbus/mock-unity-session.cc
index c996310..d32e339 100644
--- a/tests/backend-dbus/mock-unity-session.cc
+++ b/tests/backend-dbus/mock-unity-session.cc
@@ -21,7 +21,7 @@
gboolean
-MockUnitySession :: handle_lock (UnitySession * us,
+MockUnitySession :: handle_lock (UnitySession * us,
GDBusMethodInvocation * inv,
gpointer gself)
{
@@ -31,7 +31,7 @@ MockUnitySession :: handle_lock (UnitySession * us,
}
gboolean
-MockUnitySession :: handle_prompt_lock (UnitySession * us,
+MockUnitySession :: handle_prompt_lock (UnitySession * us,
GDBusMethodInvocation * inv,
gpointer gself)
{
@@ -40,6 +40,16 @@ MockUnitySession :: handle_prompt_lock (UnitySession * us,
return true;
}
+gboolean
+MockUnitySession :: handle_request_logout (UnitySession * us,
+ GDBusMethodInvocation * inv,
+ gpointer gself)
+{
+ static_cast<MockUnitySession*>(gself)->my_last_action = RequestLogout;
+ unity_session_complete_request_logout (us, inv);
+ return true;
+}
+
/***
****
***/
@@ -61,6 +71,8 @@ MockUnitySession :: MockUnitySession (GMainLoop * loop,
G_CALLBACK(handle_lock), this);
g_signal_connect (my_skeleton, "handle-prompt-lock",
G_CALLBACK(handle_prompt_lock), this);
+ g_signal_connect (my_skeleton, "handle-request-logout",
+ G_CALLBACK(handle_request_logout), this);
set_skeleton (G_DBUS_INTERFACE_SKELETON(my_skeleton));
}