source-dialog: hear 'activate' signal
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
70aa052b0f
commit
eaa1dd2509
@@ -628,6 +628,13 @@ out:
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
credential_entry_activate (GtkEntry *entry,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
gtk_dialog_response (GTK_DIALOG (user_data), GTK_RESPONSE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
prompt_credentials (GcalSourceDialog *dialog,
|
prompt_credentials (GcalSourceDialog *dialog,
|
||||||
gchar **username,
|
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_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (prompt_dialog))), grid);
|
||||||
gtk_widget_show_all (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
|
// Show the dialog, then destroy it
|
||||||
response = gtk_dialog_run (GTK_DIALOG (prompt_dialog));
|
response = gtk_dialog_run (GTK_DIALOG (prompt_dialog));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user