[gdm/multi-stack: 18/35] squash with password



commit 8b0c7fb9df4c51983bdc745e4ab0450cc4b7610e
Author: Ray Strode <rstrode redhat com>
Date:   Wed Aug 4 18:25:50 2010 -0400

    squash with password

 .../plugins/password/gdm-password-extension.c      |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gui/simple-greeter/plugins/password/gdm-password-extension.c b/gui/simple-greeter/plugins/password/gdm-password-extension.c
index 255283e..11a171c 100644
--- a/gui/simple-greeter/plugins/password/gdm-password-extension.c
+++ b/gui/simple-greeter/plugins/password/gdm-password-extension.c
@@ -33,6 +33,7 @@ struct _GdmPasswordExtensionPrivate
         GIcon     *icon;
         GtkWidget *page;
         GtkActionGroup *actions;
+        GtkAction *login_action;
 
         GtkWidget *message_label;
         GtkWidget *prompt_label;
@@ -78,6 +79,8 @@ gdm_password_extension_ask_question (GdmConversation *conversation,
         gtk_widget_show (extension->priv->prompt_entry);
         gtk_widget_grab_focus (extension->priv->prompt_entry);
         extension->priv->answer_pending = TRUE;
+
+        gtk_action_set_sensitive (extension->priv->login_action, TRUE);
 }
 
 static void
@@ -92,6 +95,8 @@ gdm_password_extension_ask_secret (GdmConversation *conversation,
         gtk_widget_show (extension->priv->prompt_entry);
         gtk_widget_grab_focus (extension->priv->prompt_entry);
         extension->priv->answer_pending = TRUE;
+
+        gtk_action_set_sensitive (extension->priv->login_action, TRUE);
 }
 
 static void
@@ -249,9 +254,11 @@ gdm_password_extension_finalize (GObject *object)
 }
 
 static void
-on_activate_log_in (GdmPasswordExtension *extension)
+on_activate_log_in (GdmPasswordExtension *extension,
+                    GtkAction            *action)
 {
         gdm_password_extension_request_answer (GDM_CONVERSATION (extension));
+        gtk_action_set_sensitive (action, FALSE);
 }
 
 static void
@@ -311,6 +318,8 @@ create_actions (GdmPasswordExtension *extension)
         g_object_set (G_OBJECT (action), "icon-name", "go-home", NULL);
         gtk_action_group_add_action (extension->priv->actions,
                                      action);
+
+        extension->priv->login_action = action;
 }
 
 static void



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