forked from AuroraMiddleware/gtk
Merge branch 'focusable-fixes' into 'master'
label: Fix mnemonic activation Closes #3965 See merge request GNOME/gtk!3578
This commit is contained in:
commit
21057fb857
@ -337,8 +337,8 @@ gtk_flow_box_child_focus (GtkWidget *widget,
|
||||
GtkWidget *child = priv->child;
|
||||
gboolean had_focus = FALSE;
|
||||
|
||||
/* Without "can-focus" flag try to pass the focus to the child immediately */
|
||||
if (!gtk_widget_get_can_focus (widget))
|
||||
/* Without "focusable" flag try to pass the focus to the child immediately */
|
||||
if (!gtk_widget_get_focusable (widget))
|
||||
{
|
||||
if (child)
|
||||
{
|
||||
@ -3383,10 +3383,10 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* If the child has its "can-focus" property set to FALSE then it will
|
||||
/* If the child has its "focusable" property set to FALSE then it will
|
||||
* not grab the focus. We must pass the focus to its child directly.
|
||||
*/
|
||||
if (!gtk_widget_get_can_focus (GTK_WIDGET (child)))
|
||||
if (!gtk_widget_get_focusable (GTK_WIDGET (child)))
|
||||
{
|
||||
GtkWidget *subchild;
|
||||
|
||||
|
@ -1930,7 +1930,7 @@ gtk_label_mnemonic_activate (GtkWidget *widget,
|
||||
|
||||
while (parent)
|
||||
{
|
||||
if (gtk_widget_get_can_focus (parent) ||
|
||||
if (gtk_widget_get_focusable (parent) ||
|
||||
(!group_cycling && gtk_widget_can_activate (parent)) ||
|
||||
GTK_IS_NOTEBOOK (gtk_widget_get_parent (parent)))
|
||||
return gtk_widget_mnemonic_activate (parent, group_cycling);
|
||||
|
@ -184,7 +184,7 @@ gtk_toggle_button_mnemonic_activate (GtkWidget *widget,
|
||||
* gtk_widget_real_mnemonic_activate() in order to focus the widget even
|
||||
* if there is no mnemonic conflict.
|
||||
*/
|
||||
if (gtk_widget_get_can_focus (widget))
|
||||
if (gtk_widget_get_focusable (widget))
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
||||
if (!group_cycling)
|
||||
|
@ -311,7 +311,7 @@ gtk_tree_expander_focus (GtkWidget *widget,
|
||||
if (gtk_widget_is_focus (widget))
|
||||
return FALSE;
|
||||
|
||||
if (!gtk_widget_get_can_focus (widget))
|
||||
if (!gtk_widget_get_focusable (widget))
|
||||
return FALSE;
|
||||
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
@ -1096,7 +1096,7 @@ gtk_tree_view_column_mnemonic_activate (GtkWidget *widget,
|
||||
|
||||
if (priv->clickable)
|
||||
g_signal_emit_by_name (priv->button, "clicked");
|
||||
else if (gtk_widget_get_can_focus (priv->button))
|
||||
else if (gtk_widget_get_focusable (priv->button))
|
||||
gtk_widget_grab_focus (priv->button);
|
||||
else
|
||||
gtk_widget_grab_focus (priv->tree_view);
|
||||
|
Loading…
Reference in New Issue
Block a user