Benjamin Otte
051f7e4118
listbox: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
cbeb096bb3
notebook: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
bf7c51cc11
scale: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
3803209330
scalebutton: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
fb7d1095d1
scrolledwindow: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
45ec453b76
searchentry: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
e4d628b410
shortcutssection: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
e11d799460
shortcutswindow: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
6e38af4429
flowbox: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
a70635f760
paned: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
2c91f15f6d
spinbutton: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
bad5ee7ed9
textview: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
277aaab041
filechooserwidget: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
5ade831cd1
shortcutcontroller: Add gtk_shortcut_controller_add_shortcut()
...
... and gtk_shortcut_controller_remove_shortcut().
2020-03-18 23:00:50 -04:00
Benjamin Otte
3b8a4340da
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-18 23:00:49 -04:00
Benjamin Otte
ae11b29ee7
treeview: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
ac31979805
widget: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
0b4d0f4d31
dialog: Port binding to use shortcuts
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
00bc9e6b85
text: Port to widget shortcuts
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
d75fd59ddf
Allow installing bindings bound to actions
...
This is just convenience code around GtkShortcut, just like bindings for
signal emission and callback invocation.
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
84a52e3bbd
shortcut: Add action activation
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
9687d69b5a
bindings: Export action activation internally
...
We're going to use it, just like we use the signal emission code.
2020-03-18 23:00:49 -04:00
Benjamin Otte
b18f9da807
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-18 23:00:49 -04:00
Benjamin Otte
6c13bbb441
combobox: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
4f128a4a21
assistant: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
e62154c91f
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-18 23:00:49 -04:00
Matthias Clasen
78f9940ddc
shortcut: Add GtkShortcutTrigger
...
Triggers are meant to describe how to trigger a shortcut.
So far only a keyval + modifiers trigger exists.
2020-03-18 23:00:49 -04:00
Benjamin Otte
0f6c5da28d
window: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
c7f10e570e
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-18 23:00:49 -04:00
Benjamin Otte
e19b49f5aa
widget: Add gtk_widget_class_add_shortcut()
...
This allows adding shortcuts as a replacement for keybindings.
2020-03-18 23:00:49 -04:00
Benjamin Otte
ff13ee4b66
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-18 23:00:49 -04:00
Benjamin Otte
fed7d3833f
bindings: Split out function to invoke an action signal
...
We want to use that in shortcuts later.
2020-03-18 23:00:49 -04:00
Benjamin Otte
5c6be5c0cd
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-18 23:00:49 -04:00
Benjamin Otte
06660874ee
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-18 23:00:49 -04:00
Benjamin Otte
4675d74e42
bindings: Parse into GVariantBuilder directly
...
Avoids the indirection via GtkBindingArg
2020-03-18 23:00:49 -04:00
Benjamin Otte
3b3a5c2d53
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-18 23:00:49 -04:00
Benjamin Otte
385c5e0569
bindings: Replace GtkBindingArg arguments with GVariant
...
This only replaces invocation, not yet parsing.
2020-03-18 23:00:49 -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
Matthias Clasen
8fab4ceebb
Assorted migration guide updates
...
Mention GdkEvent, GdkPopup, GdkToplevel, GtkIconTheme
changes.
2020-03-17 16:23:03 -04:00
Jakub Steiner
826f237782
Merge branch 'wip/jimmac/adwaitadark-lighten-switches'
2020-03-17 11:05:26 +01:00
Jakub Steiner
435992600f
Adwaita: dark switches/check/radios
...
- lighten up radios, switches and checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-17 11:03:28 +01:00