Benjamin Otte
f54c0bf1df
iconview: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
d405d95ce4
infobar: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
16b8bf042c
label: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
b695b1fd4c
listbox: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
fda4d8b7c6
notebook: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
378af08a72
scale: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
3e1a86b36b
scalebutton: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
199b5174f1
scrolledwindow: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
7efbe18783
searchentry: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
893b6a8514
shortcutssection: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
75e9d9af53
shortcutswindow: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
ff500ea26c
flowbox: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
eb6834b989
paned: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
6f0284e361
spinbutton: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
a3d9f0ac60
textview: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
6fec3f22a4
filechooserwidget: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
453d08b982
shortcutcontroller: Add gtk_shortcut_controller_add_shortcut()
...
... and gtk_shortcut_controller_remove_shortcut().
2020-03-22 11:14:06 -04:00
Benjamin Otte
4fbcb74697
shortcutcontroller: Add private API for running class shortcuts
...
We don't want regular users to be able to run class shortcuts in their
controllers, so we have to special case that.
2020-03-22 11:14:06 -04:00
Benjamin Otte
2382d8e9c2
treeview: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
0089c6146e
widget: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
60a89ff7d4
dialog: Port binding to use shortcuts
2020-03-22 11:14:06 -04:00
Emmanuele Bassi
3eec8799f0
text: Port to widget shortcuts
2020-03-22 11:14:06 -04:00
Emmanuele Bassi
93bebe31e6
Allow installing bindings bound to actions
...
This is just convenience code around GtkShortcut, just like bindings for
signal emission and callback invocation.
2020-03-22 11:14:06 -04:00
Emmanuele Bassi
0ee873c5e4
shortcut: Add action activation
2020-03-22 11:14:06 -04:00
Emmanuele Bassi
9965ed54b8
bindings: Export action activation internally
...
We're going to use it, just like we use the signal emission code.
2020-03-22 11:14:06 -04:00
Benjamin Otte
02991b9bd4
shortcut: Add gtk_shortcut_set_callback()
...
... and gtk_widget_class_add_binding() to go with it.
This allows shortcuts to invoke manually added callbacks.
2020-03-22 11:14:06 -04:00
Benjamin Otte
f1cb6384ac
combobox: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
5026af064a
assistant: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
69c3d60539
trigger: Add an alternative trigger
...
And use it.
I just added it to GtkWidget just to show that I can.
The real reason I want it is for gamepad/joystick triggers
in games, so that it becomes possible to select 2 different
triggers (gamepad and keyboard) for the same shortcut.
2020-03-22 11:14:06 -04:00
Matthias Clasen
1ac761d111
shortcut: Add GtkShortcutTrigger
...
Triggers are meant to describe how to trigger a shortcut.
So far only a keyval + modifiers trigger exists.
2020-03-22 11:14:06 -04:00
Benjamin Otte
46f3bb1401
window: Port bindings to use shortcuts
2020-03-22 11:14:06 -04:00
Benjamin Otte
f967c3dbba
bindings: Add more variant types
...
Also marshal types that the code in gtkbindings.c doesn't use. These
will be used by gtk_widget_class_add_binding_signal().
2020-03-22 11:14:05 -04:00
Benjamin Otte
b324a2872a
widget: Add gtk_widget_class_add_shortcut()
...
This allows adding shortcuts as a replacement for keybindings.
2020-03-22 11:14:05 -04:00
Benjamin Otte
498545eccb
gtk: Add GtkShortcut
...
This is the base class for what is about to take over all sorts of
keyboard shortcuts. The initial version barely deals with keybindings.
2020-03-22 11:14:05 -04:00
Benjamin Otte
453e2156d7
bindings: Split out function to invoke an action signal
...
We want to use that in shortcuts later.
2020-03-22 11:14:05 -04:00
Benjamin Otte
e8dff6b095
shortcutcontroller: Introduce
...
This is a very barebones controller that currently does nothing but
activate the binding signals. Yay.
And because we have bindings on every widget (Yes, a GtkGrid has a
keybinding - 2 in fact), we need that controller everywhere.
2020-03-22 11:14:05 -04:00
Benjamin Otte
fc5b55901c
bindings: Make gtk_binding_parse_signal() use GVariantBuilder
...
And because it's the last user of GtkBindingArg and
gtk_binding_entry_add_signall(), also remove those two.
2020-03-22 11:14:05 -04:00
Benjamin Otte
075f2ddc77
bindings: Parse into GVariantBuilder directly
...
Avoids the indirection via GtkBindingArg
2020-03-22 11:14:05 -04:00
Benjamin Otte
6546362ac2
bindings: Add gtk_binding_entry_add_signal_variant()
...
This function is the replacement for
gtk_binding_entry_add_signall().
The GVariant will be demarshalled and passed to the action signal upon
binding activation. The same rules apply as used to apply for
GtkBindingArg, in that long, double and string args are now replaced by
"x", "d" and "s" variant types.
2020-03-22 11:14:05 -04:00
Benjamin Otte
17887319c0
bindings: Replace GtkBindingArg arguments with GVariant
...
So far, this only replaces invocation, not yet parsing.
2020-03-22 11:13:54 -04:00
Matthias Clasen
6ec96d2e98
Merge branch 'wip/chergert/speedup-char_is_invisible' into 'master'
...
textbtree: short-circuit visibility check when possible
See merge request GNOME/gtk!1534
2020-03-19 01:20:21 +00:00
Christian Hergert
6c8d47f585
textbtree: short-circuit visibility check when possible
...
If we have never seen a GtkTextTag in the GtkTextTagTable with the
invisible bit set, then we do not need to go through the process of
checking the accumulated tags.
Not using invisible tags is overwhelmingly the common case.
2020-03-18 11:32:46 -07:00
Matthias Clasen
1bc1b82256
Merge branch 'wip/jimmac/adwaitadark-lighten-switches' into 'master'
...
Adwaita: dark switches/check/radios
Closes #2461
See merge request GNOME/gtk!1532
2020-03-18 12:28:15 +00:00
Matthias Clasen
89c0df6cb7
Merge branch 'wip/chergert/textview-fix-gdk_event_unref' into 'master'
...
textview: use gdk_event_unref()
Closes #2520
See merge request GNOME/gtk!1531
2020-03-18 12:27:08 +00:00
Jakub Steiner
c91dd2cb45
Adwaita: dark switches/check/radios
...
- lighten up radios, switches and checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-18 13:01:17 +01:00
Matthias Clasen
3408ff1dd7
emojichooser: Fix keynav
...
Make arrow and tab keys work in the
variations popover again.
2020-03-17 21:49:29 -04:00
Matthias Clasen
7a46157edf
window: Set min size properly
...
When we are mapping the window, we need to compute
a proper min size, otherwise the 1, 1 sticks and
makes all windows shrinkable to nothing.
2020-03-17 20:46:57 -04:00
Matthias Clasen
01568dc915
Revert "Adwaita: dark switches/check/radios"
...
This reverts commit 435992600f .
This causes warnings from the CSS parser.
2020-03-17 20:32:23 -04:00
Matthias Clasen
6eb848f0e0
popover: Add keynav keybindings
...
The shortcut controllers are limited to same-native,
so we need to duplicate the Tab and arrow key bindings
for focus handling, as well as the Enter bindings for
activation.
2020-03-17 20:15:26 -04:00
Christian Hergert
e4578b15c3
textview: use gdk_event_unref()
...
Fixes #2520
2020-03-17 13:24:03 -07:00