From 171e59e3eae4ff183d690c460f99eea788b70be8 Mon Sep 17 00:00:00 2001 From: Adrian Carpenter Date: Mon, 10 Aug 2009 03:59:34 +0100 Subject: Bug 551116 - Fix default activation in entry dialog when using the dialog with drop down menu. --- src/entry.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/entry.c b/src/entry.c index 43a312d5..8826e92b 100644 --- a/src/entry.c +++ b/src/entry.c @@ -42,6 +42,12 @@ zenity_entry_fill_entries (GSList **entries, const gchar **args) } } +static void +zenity_entry_combo_activate_default (GtkEntry *entry, gpointer window) +{ + gtk_window_activate_default (GTK_WINDOW (window)); +} + void zenity_entry (ZenityData *data, ZenityEntryData *entry_data) { @@ -96,6 +102,10 @@ zenity_entry (ZenityData *data, ZenityEntryData *entry_data) gtk_combo_box_prepend_text (GTK_COMBO_BOX (entry), entry_data->entry_text); gtk_combo_box_set_active (GTK_COMBO_BOX (entry), 0); } + + g_signal_connect (gtk_bin_get_child (GTK_BIN (entry)), "activate", + G_CALLBACK (zenity_entry_combo_activate_default), + GTK_WINDOW (dialog)); } else { entry = gtk_entry_new(); -- cgit