Benjamin Otte
58c3be5dfb
menubar: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
a3cb40832e
menu: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
603da7b432
menushell: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
95c7669a96
notebook: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
2774f9ab9f
scale: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
0e875859aa
scalebutton: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
042ad688eb
scrolledwindow: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
25519ae3fa
searchentry: Port bindings to use shortcuts
2019-06-24 22:40:28 +00:00
Benjamin Otte
484a20709e
shortcutssection: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
c1f6dd6f0a
shortcutswindow: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
b10e31985a
flowbox: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
a55af731f0
paned: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
52ff060527
spinbutton: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
11e132d8e0
textview: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
da0465ec27
filechooserwidget: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
27a60f76fc
toolbar: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
232f4a8503
shortcutcontroller: Add gtk_shortcut_controller_add_shortcut()
...
... and gtk_shortcut_controller_remove_shortcut().
2019-06-24 22:40:27 +00:00
Benjamin Otte
bb0343ecc8
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.
2019-06-24 22:40:27 +00:00
Benjamin Otte
f8638c7fc9
treeview: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
571320a198
widget: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
8c256ab36a
dialog: Port binding to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
dfba621d80
text: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
80ecccf6ba
shortcut: Add gtk_shortcut_set_callback()
...
... and gtk_widget_class_add_binding() to go with it.
This allows shortcuts to invoke manually added callbacks.
2019-06-24 22:40:27 +00:00
Benjamin Otte
47d348a6de
combobox: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
778a60fa2c
assistant: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
fbaba0026a
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.
2019-06-24 22:40:27 +00:00
Benjamin Otte
e8aba7d8b9
shortcut: Add GtkShortcutTrigger
...
Triggers are meant to describe how to trigger a shortcut. So far only a
keyval + modifiers trigger exists.
2019-06-24 22:40:27 +00:00
Benjamin Otte
fc9ff92096
window: Port bindings to use shortcuts
2019-06-24 22:40:27 +00:00
Benjamin Otte
f80d664c0d
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().
2019-06-24 22:40:27 +00:00
Benjamin Otte
ec641ebcab
widget: Add gtk_widget_class_add_shortcut()
...
This allows adding shortcuts as a replacement for keybindings.
2019-06-24 22:40:27 +00:00
Benjamin Otte
8b96ce4e8b
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.
2019-06-24 22:40:27 +00:00
Benjamin Otte
504e203a1d
bindings: Split out function to invoke an action signal
...
We want to use that in shortcuts later.
2019-06-24 22:40:27 +00:00
Benjamin Otte
435ff1012f
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.
2019-06-24 22:40:27 +00:00
Benjamin Otte
83bfc8d9f2
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.
2019-06-24 22:40:27 +00:00
Benjamin Otte
0e4bbb18f3
bindings: Parse into GVariantBuilder directly
...
Avoids the indirection via GtkBindingArg
2019-06-24 22:40:27 +00:00
Benjamin Otte
935c03c8a0
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.
2019-06-24 22:40:27 +00:00
Benjamin Otte
77ef644c7c
bindings: Replace GtkBindingArg arguments with GVariant
...
This only replaces invocation, not yet parsing.
2019-06-24 22:40:27 +00:00
Georges Basile Stavracas Neto
fd9d7c67d5
widget: Bring back _gtk_widget_list_controllers()
...
Will be used by shourtcuts.
2019-06-24 22:40:27 +00:00
Matthias Clasen
3d55b74197
Merge branch 'master' into 'master'
...
Fix a typo
See merge request GNOME/gtk!960
2019-06-24 19:52:12 +00:00
Hodong Kim
19b1fcfee3
Fix a typo
2019-06-24 18:42:40 +00:00
Daniel Boles
98cfbd3712
ShortcutsSection: Fix tiny grammar-o "in for"→"in"
2019-06-24 18:02:15 +01:00
Ask Hjorth Larsen
112f49b23c
Updated Danish translation of gtk-properties
2019-06-24 18:55:47 +02:00
Ask Hjorth Larsen
4d36fdc176
Updated Danish translation of gtk
2019-06-24 18:55:25 +02:00
Matthias Clasen
31d79b07b7
Merge branch 'no-varargs-activate' into 'master'
...
Add a non-varargs variant of activate_action
See merge request GNOME/gtk!959
2019-06-24 16:10:03 +00:00
Matthias Clasen
2405e2711e
Add a non-varargs variant of activate_action
...
I recently turned gtk_widget_activate_action()
into a varargs function. That is more convenient
from C, but we need a non-varargs variant for
bindings. So add the old API back, under the
name gtk_widget_activate_action_variant(),
with a rename-to annotation.
2019-06-24 15:51:39 +00:00
Emmanuele Bassi
1527407c3d
Merge branch 'issue-1961-master' into 'master'
...
Provide GdkMonitor:connector
See merge request GNOME/gtk!954
2019-06-24 15:13:15 +00:00
Emmanuele Bassi
f524a9315b
Set the monitor's connector under X11
...
Like we do on Wayland.
In this case, we copy it from the same source as the output name,
because it's going to match.
2019-06-24 15:38:36 +01:00
Emmanuele Bassi
a5f22897f9
Relay the xdg_output.name to GdkMonitor
...
The xdg_output v2 interface has a `name` property that reflects the
output name coming from the compositor.
This is the closest thing we can get to a connector name.
2019-06-24 15:38:36 +01:00
Emmanuele Bassi
03840fb687
Add getter for a monitor connector
...
The migration from GdkScreen's monitor API to GdkMonitor left out a way
to get the connector's name of a monitor.
While there's no real guarantee coming from the underlying graphics
system that the connector's name is stable, some system components may
use it to uniquely identify a monitor until the next plug in/out event.
2019-06-24 15:38:36 +01:00
Emmanuele Bassi
6e65c16b60
Merge branch 'stack-realign' into 'master'
...
build: Do not use add_global_flags()
See merge request GNOME/gtk!958
2019-06-24 14:22:18 +00:00