[gdm/multi-stack: 38/46] Bubble service-unavailable up to greeter



commit b16f3cfdd94ef9b518d2e00d298a34263fc512ea
Author: Ray Strode <rstrode redhat com>
Date:   Wed Oct 28 21:38:52 2009 -0400

    Bubble service-unavailable up to greeter

 daemon/gdm-greeter-server.c |    8 ++++++++
 daemon/gdm-greeter-server.h |    2 ++
 daemon/gdm-simple-slave.c   |   17 +++++++++++++++++
 3 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-greeter-server.c b/daemon/gdm-greeter-server.c
index ecb2ad6..1ae64a7 100644
--- a/daemon/gdm-greeter-server.c
+++ b/daemon/gdm-greeter-server.c
@@ -285,6 +285,14 @@ gdm_greeter_server_problem (GdmGreeterServer *greeter_server,
 }
 
 gboolean
+gdm_greeter_server_service_unavailable (GdmGreeterServer *greeter_server,
+                                        const char       *service_name)
+{
+        send_dbus_string_signal (greeter_server, "ServiceUnavailable", service_name);
+        return TRUE;
+}
+
+gboolean
 gdm_greeter_server_reset (GdmGreeterServer *greeter_server)
 {
         send_dbus_void_signal (greeter_server, "Reset");
diff --git a/daemon/gdm-greeter-server.h b/daemon/gdm-greeter-server.h
index 976f0b7..c1da2f4 100644
--- a/daemon/gdm-greeter-server.h
+++ b/daemon/gdm-greeter-server.h
@@ -93,6 +93,8 @@ gboolean            gdm_greeter_server_info                  (GdmGreeterServer *
 gboolean            gdm_greeter_server_problem               (GdmGreeterServer *greeter_server,
                                                               const char       *service_name,
                                                               const char       *text);
+gboolean            gdm_greeter_server_service_unavailable   (GdmGreeterServer *greeter_server,
+                                                              const char       *service_name);
 gboolean            gdm_greeter_server_reset                 (GdmGreeterServer *greeter_server);
 gboolean            gdm_greeter_server_ready                 (GdmGreeterServer *greeter_server,
                                                               const char       *service_name);
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index efe7fc7..13b47d7 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -211,6 +211,19 @@ queue_greeter_reset (GdmSimpleSlave *slave)
 }
 
 static void
+on_session_service_unavailable (GdmSession     *session,
+                                const char     *service_name,
+                                GdmSimpleSlave *slave)
+{
+        if (slave->priv->greeter_server != NULL) {
+                gdm_greeter_server_service_unavailable (slave->priv->greeter_server,
+                                                        service_name);
+        }
+
+        gdm_session_stop_conversation (session, service_name);
+}
+
+static void
 on_session_setup_complete (GdmSession     *session,
                            const char     *service_name,
                            GdmSimpleSlave *slave)
@@ -688,6 +701,10 @@ create_new_session (GdmSimpleSlave *slave)
                           G_CALLBACK (on_session_conversation_stopped),
                           slave);
         g_signal_connect (slave->priv->session,
+                          "service-unavailable",
+                          G_CALLBACK (on_session_service_unavailable),
+                          slave);
+        g_signal_connect (slave->priv->session,
                           "setup-complete",
                           G_CALLBACK (on_session_setup_complete),
                           slave);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]