[empathy/gnome-2-34] password-dialog: activate the dialog when the entry is activated (#642296)



commit 9060de5a495ec7afc49c08299c9b060c0abaae56
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Feb 14 16:33:10 2011 +0100

    password-dialog: activate the dialog when the entry is activated (#642296)

 libempathy-gtk/empathy-password-dialog.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-password-dialog.c b/libempathy-gtk/empathy-password-dialog.c
index 25ce9db..b07932e 100644
--- a/libempathy-gtk/empathy-password-dialog.c
+++ b/libempathy-gtk/empathy-password-dialog.c
@@ -150,6 +150,13 @@ password_entry_changed_cb (GtkEditable *entry,
       !EMP_STR_EMPTY (str));
 }
 
+static void
+password_entry_activate_cb (GtkEntry *entry,
+    EmpathyPasswordDialog *self)
+{
+  gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
+}
+
 static gboolean
 password_dialog_grab_keyboard (GtkWidget *widget,
     GdkEvent *event,
@@ -277,6 +284,8 @@ empathy_password_dialog_constructed (GObject *object)
       G_CALLBACK (clear_icon_released_cb), NULL);
   g_signal_connect (priv->entry, "changed",
       G_CALLBACK (password_entry_changed_cb), dialog);
+  g_signal_connect (priv->entry, "activate",
+      G_CALLBACK (password_entry_activate_cb), dialog);
 
   gtk_box_pack_start (box, priv->entry, FALSE, FALSE, 0);
   gtk_widget_show (priv->entry);



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