aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2013-09-12 15:09:47 +0000
committerTarmac <Unknown>2013-09-12 15:09:47 +0000
commitc5b481b91f4ac2e0402d9cafcf3dc047412fa83d (patch)
tree11d416ec44a78dc254b451815f9c3455b6ec2b07
parentdddb0ed84a6cd0da6294fca0fc594f0e2cf40f89 (diff)
parent0fbbe7c35ab8674867b55c326b06e680246743cd (diff)
downloadayatana-greeter-session-broadcast-c5b481b91f4ac2e0402d9cafcf3dc047412fa83d.tar.gz
ayatana-greeter-session-broadcast-c5b481b91f4ac2e0402d9cafcf3dc047412fa83d.tar.bz2
ayatana-greeter-session-broadcast-c5b481b91f4ac2e0402d9cafcf3dc047412fa83d.zip
Add a RequestHomeShown method and ShowHome signal for when we want the dash to show itself and hide the applications.
Approved by Ted Gould, PS Jenkins bot.
-rw-r--r--data/com.canonical.Unity.Greeter.Broadcast.xml7
-rw-r--r--service/service.c17
2 files changed, 24 insertions, 0 deletions
diff --git a/data/com.canonical.Unity.Greeter.Broadcast.xml b/data/com.canonical.Unity.Greeter.Broadcast.xml
index a3a5487..5d29ca5 100644
--- a/data/com.canonical.Unity.Greeter.Broadcast.xml
+++ b/data/com.canonical.Unity.Greeter.Broadcast.xml
@@ -7,6 +7,9 @@
<arg type="s" name="appId" direction="in" />
</method>
+ <method name="RequestHomeShown">
+ <arg type="s" name="username" direction="in" />
+ </method>
<!-- To the Session -->
<signal name="StartApplication">
@@ -14,6 +17,10 @@
<arg type="s" name="appId" direction="out" />
</signal>
+ <signal name="ShowHome">
+ <arg type="s" name="username" direction="out" />
+ </signal>
+
<!-- Other -->
</interface>
</node>
diff --git a/service/service.c b/service/service.c
index 7118f65..425e8ac 100644
--- a/service/service.c
+++ b/service/service.c
@@ -34,6 +34,19 @@ on_handle_request_application_start (ServiceIfaceComCanonicalUnityGreeterBroadca
return TRUE;
}
+static gboolean
+on_handle_request_home_shown (ServiceIfaceComCanonicalUnityGreeterBroadcast *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_username)
+{
+ /* Simply pass the request on */
+ service_iface_com_canonical_unity_greeter_broadcast_emit_show_home (object,
+ arg_username);
+ service_iface_com_canonical_unity_greeter_broadcast_complete_request_home_shown (object,
+ invocation);
+ return TRUE;
+}
+
static void
on_bus_acquired (GDBusConnection *connection,
const gchar *name,
@@ -74,6 +87,10 @@ main (int argc, char * argv[])
"handle-request-application-start",
G_CALLBACK (on_handle_request_application_start),
NULL);
+ g_signal_connect (interface,
+ "handle-request-home-shown",
+ G_CALLBACK (on_handle_request_home_shown),
+ NULL);
owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM,
"com.canonical.Unity.Greeter.Broadcast",