[gnome-calendar/calendar-editor] source-dialog: hear 'activate' signal



commit b0f233524df35ed8b6bc3ee0616768a7abd45bd4
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Mar 30 18:07:59 2015 -0300

    source-dialog: hear 'activate' signal

 src/gcal-source-dialog.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index b513b45..100fd4c 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -628,6 +628,13 @@ out:
   return FALSE;
 }
 
+static void
+credential_entry_activate (GtkEntry *entry,
+                           gpointer  user_data)
+{
+  gtk_dialog_response (GTK_DIALOG (user_data), GTK_RESPONSE_OK);
+}
+
 static gint
 prompt_credentials (GcalSourceDialog  *dialog,
                     gchar            **username,
@@ -686,6 +693,9 @@ prompt_credentials (GcalSourceDialog  *dialog,
   gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (prompt_dialog))), grid);
   gtk_widget_show_all (grid);
 
+  g_signal_connect (name_entry, "activate", G_CALLBACK (credential_entry_activate), prompt_dialog);
+  g_signal_connect (password_entry, "activate", G_CALLBACK (credential_entry_activate), prompt_dialog);
+
   // Show the dialog, then destroy it
   response = gtk_dialog_run (GTK_DIALOG (prompt_dialog));
 


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