diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-02 20:28:20 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-02 20:28:20 +0100 |
commit | f4ccff8a434c832be406b6bde08d94cf26b31fdc (patch) | |
tree | f65d0050eed2dddb1f40776a28d8c1a50382b829 | |
parent | f4e78b03800068498ab72b24f54d9d2c2ab71201 (diff) |
Add default response to the text input dialog.
-rw-r--r-- | text_input_dialog.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/text_input_dialog.c b/text_input_dialog.c index da18b24..8a77692 100644 --- a/text_input_dialog.c +++ b/text_input_dialog.c @@ -7,7 +7,10 @@ GtkDialog *text_input_dialog_new(GtkWidget *parent, const gchar *msg) { dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, msg); + gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); + entry = gtk_entry_new(); + gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); gtk_box_pack_end(GTK_BOX(vbox), entry, FALSE, FALSE, 0); |