summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-05 19:52:25 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-06 16:32:03 -0400
commitc297d45b8a19d84e0bc04ffad17df1382d7a9bf7 (patch)
tree7c6059e55e44a27d9158b4395f022da1e0b3455c /gtk/gtktreeview.c
parentdce8d251c618acbd38643a8ba4bd74110f178275 (diff)
downloadgtk+-c297d45b8a19d84e0bc04ffad17df1382d7a9bf7.tar.gz
gtk: Stop using modifier intents
Reviewing the existing settings, the only backend with some differences in the modifier intent settings is OS X, and we would rather have that implemented by interpreting the existing modifiers in the appropriate way. X11 Wayland Win32 OS X primary ctrl ctrl ctrl mod2 mnemonic alt alt alt alt context menu - - - ctrl extend sel shift shift shift shift modify sel ctrl ctrl ctrl mod2 no text alt|ctrl alt|ctrl alt|ctrl mod2|ctrl shift group varies - - alt GTK now uses the following modifiers: primary ctrl mnemonic alt extend sel shift modify sel ctrl no text alt|ctrl The context menu and shift group intents were not used in GTK at all. Update tests to no longer expect <Primary> to roundtrip through the accelerator parsing and formatting code.
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r--gtk/gtktreeview.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 36449aba41..3580ab8f8d 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2791,10 +2791,10 @@ get_current_selection_modifiers (GtkWidget *widget,
if (gtk_get_current_event_state (&state))
{
- mask = gtk_widget_get_modifier_mask (widget, GDK_MODIFIER_INTENT_MODIFY_SELECTION);
+ mask = GDK_CONTROL_MASK;
if ((state & mask) == mask)
*modify = TRUE;
- mask = gtk_widget_get_modifier_mask (widget, GDK_MODIFIER_INTENT_EXTEND_SELECTION);
+ mask = GDK_SHIFT_MASK;
if ((state & mask) == mask)
*extend = TRUE;
}
@@ -7966,13 +7966,8 @@ gtk_tree_view_real_move_cursor (GtkTreeView *tree_view,
GdkModifierType extend_mod_mask;
GdkModifierType modify_mod_mask;
- extend_mod_mask =
- gtk_widget_get_modifier_mask (GTK_WIDGET (tree_view),
- GDK_MODIFIER_INTENT_EXTEND_SELECTION);
-
- modify_mod_mask =
- gtk_widget_get_modifier_mask (GTK_WIDGET (tree_view),
- GDK_MODIFIER_INTENT_MODIFY_SELECTION);
+ extend_mod_mask = GDK_SHIFT_MASK;
+ modify_mod_mask = GDK_CONTROL_MASK;
if ((state & modify_mod_mask) == modify_mod_mask)
tree_view->modify_selection_pressed = TRUE;
@@ -9990,9 +9985,7 @@ gtk_tree_view_real_select_cursor_parent (GtkTreeView *tree_view)
{
GdkModifierType modify_mod_mask;
- modify_mod_mask =
- gtk_widget_get_modifier_mask (GTK_WIDGET (tree_view),
- GDK_MODIFIER_INTENT_MODIFY_SELECTION);
+ modify_mod_mask = GDK_CONTROL_MASK;
if ((state & modify_mod_mask) == modify_mod_mask)
tree_view->modify_selection_pressed = TRUE;
@@ -13686,8 +13679,7 @@ gtk_tree_view_search_key_pressed (GtkEventControllerKey *key,
return TRUE;
}
- default_accel = gtk_widget_get_modifier_mask (widget,
- GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR);
+ default_accel = GDK_CONTROL_MASK;
/* select previous matching iter */
if (keyval == GDK_KEY_Up || keyval == GDK_KEY_KP_Up)