diff options
author | Adrian Carpenter <adriatic.c@gmail.com> | 2009-08-10 03:59:34 +0100 |
---|---|---|
committer | Lucas Rocha <lucasr@gnome.org> | 2009-08-10 03:59:34 +0100 |
commit | 171e59e3eae4ff183d690c460f99eea788b70be8 (patch) | |
tree | e840034ca436788e0e0d800d732647281df739d0 | |
parent | [option] Free file filter list on exit (diff) | |
download | zenity-171e59e3eae4ff183d690c460f99eea788b70be8.tar.gz zenity-171e59e3eae4ff183d690c460f99eea788b70be8.tar.bz2 zenity-171e59e3eae4ff183d690c460f99eea788b70be8.zip |
Bug 551116 - Fix default activation in entry dialog
when using the dialog with drop down menu.
-rw-r--r-- | src/entry.c | 10 |
1 files changed, 10 insertions, 0 deletions
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(); |