[gdm/multi-stack: 41/46] Remove task from task list if unavailable
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/multi-stack: 41/46] Remove task from task list if unavailable
- Date: Fri, 26 Mar 2010 13:37:03 +0000 (UTC)
commit 38139fc8be3391c108874b1fecf73efcc25ba73e
Author: Ray Strode <rstrode redhat com>
Date: Wed Oct 28 21:58:44 2009 -0400
Remove task from task list if unavailable
gui/simple-greeter/gdm-greeter-login-window.c | 20 ++++++++++++++++++++
gui/simple-greeter/gdm-greeter-login-window.h | 3 +++
gui/simple-greeter/gdm-greeter-session.c | 14 ++++++++++++++
3 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index e185efb..03858e3 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -870,6 +870,26 @@ gdm_greeter_login_window_problem (GdmGreeterLoginWindow *login_window,
return TRUE;
}
+gboolean
+gdm_greeter_login_window_service_unavailable (GdmGreeterLoginWindow *login_window,
+ const char *service_name)
+{
+ GdmTask *task;
+
+ g_return_val_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window), FALSE);
+ g_debug ("GdmGreeterLoginWindow: service unavailable: %s", service_name);
+
+ task = find_task_with_service_name (login_window, service_name);
+
+ if (task != NULL) {
+ gdm_task_list_remove_task (GDM_TASK_LIST (login_window->priv->conversation_list),
+ task);
+ g_object_unref (task);
+ }
+
+ return TRUE;
+}
+
void
gdm_greeter_login_window_request_timed_login (GdmGreeterLoginWindow *login_window,
const char *username,
diff --git a/gui/simple-greeter/gdm-greeter-login-window.h b/gui/simple-greeter/gdm-greeter-login-window.h
index c312a47..041cbc4 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.h
+++ b/gui/simple-greeter/gdm-greeter-login-window.h
@@ -94,6 +94,9 @@ gboolean gdm_greeter_login_window_problem (GdmGreeterLogin
const char *service_name,
const char *text);
+gboolean gdm_greeter_login_window_service_unavailable (GdmGreeterLoginWindow *login_window,
+ const char *service_name);
+
void gdm_greeter_login_window_request_timed_login (GdmGreeterLoginWindow *login_window,
const char *username,
int delay);
diff --git a/gui/simple-greeter/gdm-greeter-session.c b/gui/simple-greeter/gdm-greeter-session.c
index 848ea1e..3bf24e8 100644
--- a/gui/simple-greeter/gdm-greeter-session.c
+++ b/gui/simple-greeter/gdm-greeter-session.c
@@ -90,6 +90,16 @@ on_problem (GdmGreeterClient *client,
}
static void
+on_service_unavailable (GdmGreeterClient *client,
+ const char *service_name,
+ GdmGreeterSession *session)
+{
+ g_debug ("GdmGreeterSession: Service Unavailable: %s", service_name);
+
+ gdm_greeter_login_window_service_unavailable (GDM_GREETER_LOGIN_WINDOW (session->priv->login_window), service_name);
+}
+
+static void
on_ready (GdmGreeterClient *client,
const char *service_name,
GdmGreeterSession *session)
@@ -670,6 +680,10 @@ gdm_greeter_session_init (GdmGreeterSession *session)
G_CALLBACK (on_problem),
session);
g_signal_connect (session->priv->client,
+ "service-unavailable",
+ G_CALLBACK (on_service_unavailable),
+ session);
+ g_signal_connect (session->priv->client,
"ready",
G_CALLBACK (on_ready),
session);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]