[zenity/gnome-2-28] Bug 551116 - Fix default activation in entry dialog
- From: Lucas Almeida Rocha <lucasr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [zenity/gnome-2-28] Bug 551116 - Fix default activation in entry dialog
- Date: Mon, 10 Aug 2009 03:00:52 +0000 (UTC)
commit 31ce2e5af366fbdbef05ff220c62d731eaf69267
Author: Adrian Carpenter <adriatic c gmail com>
Date: Mon Aug 10 03:59:34 2009 +0100
Bug 551116 - Fix default activation in entry dialog
when using the dialog with drop down menu.
src/entry.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/entry.c b/src/entry.c
index 43a312d..8826e92 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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]