[gdm/multi-stack: 16/17] Disconnect task "loaded" handler when loaded
- From: Ray Strode <halfline src gnome org>
- To: svn-commits-list gnome org
- Subject: [gdm/multi-stack: 16/17] Disconnect task "loaded" handler when loaded
- Date: Tue, 3 Mar 2009 13:31:30 -0500 (EST)
commit 533d9a6d206a44c6da99528a4faaa80d4e9fc1cd
Author: Ray Strode <rstrode redhat com>
Date: Mon Mar 2 15:50:47 2009 -0500
Disconnect task "loaded" handler when loaded
---
gui/simple-greeter/gdm-greeter-login-window.c | 26 +++++++++++++++++++++---
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 83f4057..d7f3cf3 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -850,6 +850,27 @@ do_cancel (GdmGreeterLoginWindow *login_window)
restart_conversations (login_window);
}
+static void
+on_can_set_task_ready (GtkWidget *user_chooser,
+ GdmTask *task)
+{
+ g_signal_handlers_disconnect_by_func (user_chooser,
+ on_can_set_task_ready,
+ task);
+ gdm_conversation_set_ready (GDM_CONVERSATION (task));
+ g_object_unref (task);
+}
+
+static void
+set_task_ready_when_loaded (GdmGreeterLoginWindow *login_window,
+ GdmTask *task)
+{
+ g_signal_connect (login_window->priv->user_chooser,
+ "loaded",
+ G_CALLBACK (on_can_set_task_ready),
+ g_object_ref (task));
+}
+
gboolean
gdm_greeter_login_window_ready (GdmGreeterLoginWindow *login_window,
const char *service_name)
@@ -865,10 +886,7 @@ gdm_greeter_login_window_ready (GdmGreeterLoginWindow *login_window,
gdm_conversation_set_ready (GDM_CONVERSATION (task));
} else {
- g_signal_connect_swapped (login_window->priv->user_chooser,
- "loaded",
- G_CALLBACK (gdm_conversation_set_ready),
- GDM_CONVERSATION (task));
+ set_task_ready_when_loaded (login_window, task);
}
g_object_unref (task);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]