diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-04-06 04:00:55 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-04-06 04:00:55 +0000 |
commit | 2f73f9b0c59f88a22a2cbfaa34fc71b3833ac489 (patch) | |
tree | 065fd61d05e0422fc6b9a6e1264c0df93efe4535 | |
parent | 7d83ed0479917540a703c7c1ed775cd9d2c32e83 (diff) | |
download | gdk-pixbuf-2f73f9b0c59f88a22a2cbfaa34fc71b3833ac489.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)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 7 | ||||
-rw-r--r-- | gtk/gtkcombobox.c | 12 | ||||
-rw-r--r-- | gtk/gtkcomboboxentry.c | 11 |
5 files changed, 43 insertions, 1 deletions
@@ -1,5 +1,12 @@ 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) + +2005-04-05 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkicontheme.c: Store icon caches along with the mtimes of the toplevel directories. The previous mechanism of a hashtable-per-theme caused duplicate icon diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ff9bcafbb..c665a3662 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,12 @@ 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) + +2005-04-05 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkicontheme.c: Store icon caches along with the mtimes of the toplevel directories. The previous mechanism of a hashtable-per-theme caused duplicate icon diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ff9bcafbb..c665a3662 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,12 @@ 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) + +2005-04-05 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkicontheme.c: Store icon caches along with the mtimes of the toplevel directories. The previous mechanism of a hashtable-per-theme caused duplicate icon diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 6b775479d..8cfe71e72 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -220,7 +220,7 @@ static void gtk_combo_box_get_property (GObject *object, GParamSpec *spec); static void gtk_combo_box_state_changed (GtkWidget *widget, - GtkStateType previous); + GtkStateType previous);static void gtk_combo_box_grab_focus (GtkWidget *widget); static void gtk_combo_box_style_set (GtkWidget *widget, GtkStyle *previous); static void gtk_combo_box_button_toggled (GtkWidget *widget, @@ -505,6 +505,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) widget_class->expose_event = gtk_combo_box_expose_event; widget_class->scroll_event = gtk_combo_box_scroll_event; widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate; + widget_class->grab_focus = gtk_combo_box_grab_focus; widget_class->style_set = gtk_combo_box_style_set; widget_class->state_changed = gtk_combo_box_state_changed; @@ -4793,6 +4794,14 @@ gtk_combo_box_mnemonic_activate (GtkWidget *widget, } static void +gtk_combo_box_grab_focus (GtkWidget *widget) +{ + GtkComboBox *combo_box = GTK_COMBO_BOX (widget); + + gtk_widget_grab_focus (combo_box->priv->button); +} + +static void gtk_combo_box_destroy (GtkObject *object) { GtkComboBox *combo_box = GTK_COMBO_BOX (object); @@ -5161,5 +5170,6 @@ gtk_combo_box_get_focus_on_click (GtkComboBox *combo) return combo->priv->focus_on_click; } + #define __GTK_COMBO_BOX_C__ #include "gtkaliasdef.c" diff --git a/gtk/gtkcomboboxentry.c b/gtk/gtkcomboboxentry.c index 6c10dd5b9..adc974882 100644 --- a/gtk/gtkcomboboxentry.c +++ b/gtk/gtkcomboboxentry.c @@ -56,6 +56,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); @@ -109,6 +110,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; @@ -358,6 +360,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 */ |