[maemo-commits] [maemo-commits] r12614 - in projects/haf/trunk/gtk+: . gtk
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Jul 3 12:04:15 EEST 2007
- Previous message: [maemo-commits] r12613 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r12615 - projects/haf/trunk/gtk+
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: xan Date: 2007-07-03 12:04:02 +0300 (Tue, 03 Jul 2007) New Revision: 12614 Modified: projects/haf/trunk/gtk+/ChangeLog projects/haf/trunk/gtk+/gtk/gtkradiobutton.c Log: 2007-07-03 Xan Lopez <xan.lopez at nokia.com> * gtk/gtkradiobutton.c (gtk_radio_button_focus): We have remapped cursor keys to TAB movements in our rc files, so we get TAB_{FORWARD,BACKWARD} instead of DOWN/UP in the focus handler of GtkRadioButton. We need to re-enable the old behavior or navigation within the group would be impossible. Modified: projects/haf/trunk/gtk+/ChangeLog =================================================================== --- projects/haf/trunk/gtk+/ChangeLog 2007-07-03 08:05:18 UTC (rev 12613) +++ projects/haf/trunk/gtk+/ChangeLog 2007-07-03 09:04:02 UTC (rev 12614) @@ -1,3 +1,19 @@ +2007-07-03 Xan Lopez <xan.lopez at nokia.com> + + * gtk/gtkradiobutton.c (gtk_radio_button_focus): + + We have remapped cursor keys to TAB movements in our rc files, so we get + TAB_{FORWARD,BACKWARD} instead of DOWN/UP in the focus handler of GtkRadioButton. + We need to re-enable the old behavior or navigation within the group would be + impossible. + +2007-07-02 Xan Lopez <xan.lopez at nokia.com> + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup), + (_gtk_entry_completion_popdown): + Do not grab keyboard and pointer for the popup window. + Fixes: NB#60874 + 2007-06-29 Michael Natterer <mitch at imendio.com> * gtk/gtkmenu.c: use gtk-dnd-drag-threshold (which is 30) instead Modified: projects/haf/trunk/gtk+/gtk/gtkradiobutton.c =================================================================== --- projects/haf/trunk/gtk+/gtk/gtkradiobutton.c 2007-07-03 08:05:18 UTC (rev 12613) +++ projects/haf/trunk/gtk+/gtk/gtkradiobutton.c 2007-07-03 09:04:02 UTC (rev 12614) @@ -442,7 +442,7 @@ */ if (!GTK_TOGGLE_BUTTON (widget)->draw_indicator) return GTK_WIDGET_CLASS (gtk_radio_button_parent_class)->focus (widget, direction); - + if (gtk_widget_is_focus (widget)) { GtkSettings *settings = gtk_widget_get_settings (widget); @@ -452,6 +452,11 @@ gboolean cursor_only; gboolean wrap_around; + g_object_get (settings, + "gtk-keynav-cursor-only", &cursor_only, + "gtk-keynav-wrap-around", &wrap_around, + NULL); + switch (direction) { case GTK_DIR_LEFT: @@ -466,12 +471,28 @@ break; case GTK_DIR_TAB_FORWARD: case GTK_DIR_TAB_BACKWARD: - /* fall through */ +#ifdef MAEMO_CHANGES + /* We have remapped cursor keys to TAB movements in our rc files, so we'll get + TAB_{FORWARD,BACKWARD} instead of DOWN/UP here. For GtkRadioButton, though, + we need to re-enable the old behavior or navigation within the group would be + impossible */ + if (cursor_only) + { + focus_list = g_slist_copy (radio_button->group); + focus_list = g_slist_sort_with_data (focus_list, up_down_compare, toplevel); + break; + } +#endif /* MAEMO_CHANGES */ + /* fall through */ default: return FALSE; } - if (direction == GTK_DIR_LEFT || direction == GTK_DIR_UP) + if (direction == GTK_DIR_LEFT || direction == GTK_DIR_UP +#ifdef MAEMO_CHANGES + || (cursor_only && direction == GTK_DIR_TAB_BACKWARD) +#endif /* MAEMO_CHANGES */ + ) focus_list = g_slist_reverse (focus_list); tmp_list = g_slist_find (focus_list, widget); @@ -494,11 +515,6 @@ } } - g_object_get (settings, - "gtk-keynav-cursor-only", &cursor_only, - "gtk-keynav-wrap-around", &wrap_around, - NULL); - if (!new_focus) { if (cursor_only)
- Previous message: [maemo-commits] r12613 - in projects/haf/trunk/hildon-theme-layout-4: . rc
- Next message: [maemo-commits] r12615 - projects/haf/trunk/gtk+
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]