forked from AuroraMiddleware/gtk
don't use gtk_widget_keynav_failed(). Instead, look at
2006-11-16 Michael Natterer <mitch@imendio.com> * gtk/gtkradiobutton.c (gtk_radio_button_focus): don't use gtk_widget_keynav_failed(). Instead, look at gtk-keynav-cursor-only and gtk-keynav-wrap-around and wrap around, beep or continue outside the group manually (bug #322640).
This commit is contained in:
parent
7f374a74ba
commit
af0da9f221
@ -1,3 +1,10 @@
|
||||
2006-11-16 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkradiobutton.c (gtk_radio_button_focus): don't use
|
||||
gtk_widget_keynav_failed(). Instead, look at gtk-keynav-cursor-only
|
||||
and gtk-keynav-wrap-around and wrap around, beep or continue outside
|
||||
the group manually (bug #322640).
|
||||
|
||||
2006-11-16 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Add new infrastructure for notifications of failed keyboard
|
||||
|
@ -445,9 +445,12 @@ gtk_radio_button_focus (GtkWidget *widget,
|
||||
|
||||
if (gtk_widget_is_focus (widget))
|
||||
{
|
||||
GtkSettings *settings = gtk_widget_get_settings (widget);
|
||||
GSList *focus_list, *tmp_list;
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
GtkWidget *new_focus = NULL;
|
||||
gboolean cursor_only;
|
||||
gboolean wrap_around;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
@ -489,14 +492,26 @@ gtk_radio_button_focus (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
g_object_get (settings,
|
||||
"gtk-keynav-cursor-only", &cursor_only,
|
||||
"gtk-keynav-wrap-around", &wrap_around,
|
||||
NULL);
|
||||
|
||||
if (!new_focus)
|
||||
{
|
||||
if (!gtk_widget_keynav_failed (widget, direction))
|
||||
if (cursor_only)
|
||||
{
|
||||
g_slist_free (focus_list);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!wrap_around)
|
||||
{
|
||||
g_slist_free (focus_list);
|
||||
gtk_widget_error_bell (widget);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
tmp_list = focus_list;
|
||||
|
||||
while (tmp_list)
|
||||
@ -517,13 +532,6 @@ gtk_radio_button_focus (GtkWidget *widget,
|
||||
|
||||
if (new_focus)
|
||||
{
|
||||
GtkSettings *settings = gtk_widget_get_settings (widget);
|
||||
gboolean cursor_only;
|
||||
|
||||
g_object_get (settings,
|
||||
"gtk-keynav-cursor-only", &cursor_only,
|
||||
NULL);
|
||||
|
||||
gtk_widget_grab_focus (new_focus);
|
||||
|
||||
if (!cursor_only)
|
||||
|
Loading…
Reference in New Issue
Block a user