diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-04-06 04:01:19 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-04-06 04:01:19 +0000 |
commit | c825c71a663a536ce80114d36f9a93d2aaa60c4a (patch) | |
tree | 972ba54b886164e3719d132d523cdad3854694f4 /gtk/gtkcomboboxentry.c | |
parent | a6259bbd4d1c8d4d75dd21ba630ed634d9b6c8ee (diff) | |
download | gtk+-c825c71a663a536ce80114d36f9a93d2aaa60c4a.tar.gz |
Implement grab_focus for GtkComboBox and GtkComboBoxEntry. (#171912,
2005-04-05 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus):
* gtk/gtkcombobox.c (gtk_combo_box_grab_focus): Implement
grab_focus for GtkComboBox and GtkComboBoxEntry. (#171912,
Gustavo Carneiro)
Diffstat (limited to 'gtk/gtkcomboboxentry.c')
-rw-r--r-- | gtk/gtkcomboboxentry.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkcomboboxentry.c b/gtk/gtkcomboboxentry.c index d5f54a0c59..c3f000ad1e 100644 --- a/gtk/gtkcomboboxentry.c +++ b/gtk/gtkcomboboxentry.c @@ -57,6 +57,7 @@ static void gtk_combo_box_entry_contents_changed (GtkEntry *entry, gpointer user_data); static gboolean gtk_combo_box_entry_mnemonic_activate (GtkWidget *entry, gboolean group_cycling); +static void gtk_combo_box_entry_grab_focus (GtkWidget *widget); static void has_frame_changed (GtkComboBoxEntry *entry_box, GParamSpec *pspec, gpointer data); @@ -110,6 +111,7 @@ gtk_combo_box_entry_class_init (GtkComboBoxEntryClass *klass) widget_class = (GtkWidgetClass *)klass; widget_class->mnemonic_activate = gtk_combo_box_entry_mnemonic_activate; + widget_class->grab_focus = gtk_combo_box_entry_grab_focus; combo_class = (GtkComboBoxClass *)klass; combo_class->get_active_text = gtk_combo_box_entry_get_active_text; @@ -359,6 +361,15 @@ gtk_combo_box_entry_mnemonic_activate (GtkWidget *widget, return TRUE; } +static void +gtk_combo_box_entry_grab_focus (GtkWidget *widget) +{ + GtkComboBoxEntry *entry_box = GTK_COMBO_BOX_ENTRY (widget); + + gtk_widget_grab_focus (entry_box->priv->entry); +} + + /* convenience API for simple text combos */ |