[maemo-commits] [maemo-commits] r9955 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Feb 16 16:02:04 EET 2007
- Previous message: [maemo-commits] r9954 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r9956 - in projects/haf/branches/hildon-libs/hildon-1: . debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: mitch Date: 2007-02-16 16:02:00 +0200 (Fri, 16 Feb 2007) New Revision: 9955 Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c Log: 2007-02-16 Michael Natterer <mitch at imendio.com> * gtk/gtkcombobox.c (gtk_combo_box_menu_setup) (gtk_combo_box_list_setup): if the child widget is a GtkEntry, unset CAN_FOCUS on the toggle button. (gtk_combo_box_list_button_pressed): grab the focus on the combo box, which implicitly grabs the right widget due to grab_focus() virtualization. Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-02-16 13:39:22 UTC (rev 9954) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog 2007-02-16 14:02:00 UTC (rev 9955) @@ -1,3 +1,13 @@ +2007-02-16 Michael Natterer <mitch at imendio.com> + + * gtk/gtkcombobox.c (gtk_combo_box_menu_setup) + (gtk_combo_box_list_setup): if the child widget is a GtkEntry, + unset CAN_FOCUS on the toggle button. + + (gtk_combo_box_list_button_pressed): grab the focus on the combo + box, which implicitly grabs the right widget due to grab_focus() + virtualization. + 2007-02-16 Tommi Komulainen <tommi.komulainen at nokia.com> * gtk/gtkwidget.c (gtk_widget_realize): Call Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c =================================================================== --- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c 2007-02-16 13:39:22 UTC (rev 9954) +++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkcombobox.c 2007-02-16 14:02:00 UTC (rev 9955) @@ -2664,6 +2664,11 @@ gtk_button_set_focus_on_click (GTK_BUTTON (combo_box->priv->button), combo_box->priv->focus_on_click); +#ifdef MAEMO_CHANGES + if (GTK_IS_ENTRY (GTK_BIN (combo_box)->child)) + GTK_WIDGET_UNSET_FLAGS (combo_box->priv->button, GTK_CAN_FOCUS); +#endif /* MAEMO_CHANGES */ + g_signal_connect (combo_box->priv->button, "toggled", G_CALLBACK (gtk_combo_box_button_toggled), combo_box); gtk_widget_set_parent (combo_box->priv->button, @@ -3444,6 +3449,12 @@ combo_box->priv->button = gtk_toggle_button_new (); gtk_widget_set_parent (combo_box->priv->button, GTK_BIN (combo_box)->child->parent); + +#ifdef MAEMO_CHANGES + if (GTK_IS_ENTRY (GTK_BIN (combo_box)->child)) + GTK_WIDGET_UNSET_FLAGS (combo_box->priv->button, GTK_CAN_FOCUS); +#endif /* MAEMO_CHANGES */ + g_signal_connect (combo_box->priv->button, "button_press_event", G_CALLBACK (gtk_combo_box_list_button_pressed), combo_box); g_signal_connect (combo_box->priv->button, "toggled", @@ -3665,9 +3676,13 @@ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (combo_box->priv->button))) return FALSE; +#ifdef MAEMO_CHANGES + gtk_widget_grab_focus (GTK_WIDGET (combo_box)); +#else if (combo_box->priv->focus_on_click && !GTK_WIDGET_HAS_FOCUS (combo_box->priv->button)) gtk_widget_grab_focus (combo_box->priv->button); +#endif /* MAEMO_CHANGES */ gtk_combo_box_popup (combo_box);
- Previous message: [maemo-commits] r9954 - projects/haf/hafbuildbot
- Next message: [maemo-commits] r9956 - in projects/haf/branches/hildon-libs/hildon-1: . debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]