Commit Graph

57840 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
e0723d74e6 passwordentry: Remove unused header 2019-05-15 17:20:43 -03:00
Benjamin Otte
e3ead985e4 accelgroup: Actually have a default mod mask
Don't just use a value without initializing it.
2019-05-15 17:20:43 -03:00
Benjamin Otte
cf4c4e0465 treeview: Redo event forwarding hack
Reorder the event controllers so that key forwarding to the search
entries really happens after shortcut triggering.
2019-05-15 17:20:43 -03:00
Benjamin Otte
ee815e0cf5 combobox: Redo key event forwarding hack
Instead of manualling invoking bindings, we now reorder event
controllers inside the treemenu, so that shortcuts run before the event
forwarding.
2019-05-15 17:20:42 -03:00
Benjamin Otte
16fd077867 iconview: Port bindings to use shortcuts 2019-05-15 17:20:42 -03:00
Benjamin Otte
2c25375663 infobar: Port bindings to use shortcuts 2019-05-15 17:20:42 -03:00
Benjamin Otte
c340a18b0f label: Port bindings to use shortcuts 2019-05-15 17:20:41 -03:00
Benjamin Otte
f164fe371c listbox: Port bindings to use shortcuts 2019-05-15 17:20:41 -03:00
Benjamin Otte
533200a016 menubar: Port bindings to use shortcuts 2019-05-15 17:20:41 -03:00
Benjamin Otte
614a1c694d menu: Port bindings to use shortcuts 2019-05-15 17:20:41 -03:00
Benjamin Otte
d5d032cb08 menushell: Port bindings to use shortcuts 2019-05-15 17:20:41 -03:00
Benjamin Otte
f19f7f793c notebook: Port bindings to use shortcuts 2019-05-15 17:20:40 -03:00
Benjamin Otte
c891f2e562 scale: Port bindings to use shortcuts 2019-05-15 17:20:40 -03:00
Benjamin Otte
fed84e47a6 scalebutton: Port bindings to use shortcuts 2019-05-15 17:20:40 -03:00
Benjamin Otte
fb4126f1fd scrolledwindow: Port bindings to use shortcuts 2019-05-15 17:20:40 -03:00
Benjamin Otte
78717fb175 searchentry: Port bindings to use shortcuts 2019-05-15 17:20:40 -03:00
Benjamin Otte
9474c1dd9f shortcutssection: Port bindings to use shortcuts 2019-05-15 17:20:39 -03:00
Benjamin Otte
0ccb4036c2 shortcutswindow: Port bindings to use shortcuts 2019-05-15 17:20:39 -03:00
Benjamin Otte
9dacd803a1 flowbox: Port bindings to use shortcuts 2019-05-15 17:20:39 -03:00
Benjamin Otte
82434c44fb paned: Port bindings to use shortcuts 2019-05-15 17:20:39 -03:00
Benjamin Otte
114b8be8a3 spinbutton: Port bindings to use shortcuts 2019-05-15 17:20:39 -03:00
Benjamin Otte
b204748dbc textview: Port bindings to use shortcuts 2019-05-15 17:20:39 -03:00
Benjamin Otte
03fdc3eea0 filechooserwidget: Port bindings to use shortcuts 2019-05-15 17:20:38 -03:00
Benjamin Otte
14fba445f4 toolbar: Port bindings to use shortcuts 2019-05-15 17:20:38 -03:00
Benjamin Otte
05662e194b shortcutcontroller: Add gtk_shortcut_controller_add_shortcut()
... and gtk_shortcut_controller_remove_shortcut().
2019-05-15 17:20:38 -03:00
Benjamin Otte
fbb58721b6 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-05-15 17:20:38 -03:00
Benjamin Otte
9bdb03ae56 treeview: Port bindings to use shortcuts 2019-05-15 17:20:38 -03:00
Benjamin Otte
90d699b483 widget: Port bindings to use shortcuts 2019-05-15 17:20:37 -03:00
Benjamin Otte
b7b3cb1f13 dialog: Port binding to use shortcuts 2019-05-15 17:20:37 -03:00
Benjamin Otte
2ea5835e5b text: Port bindings to use shortcuts 2019-05-15 17:20:37 -03:00
Benjamin Otte
822f28989f 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-05-15 17:20:37 -03:00
Benjamin Otte
791176611f combobox: Port bindings to use shortcuts 2019-05-15 17:20:37 -03:00
Benjamin Otte
e1fe9c8973 assistant: Port bindings to use shortcuts 2019-05-15 17:20:36 -03:00
Benjamin Otte
8542481ba1 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-05-15 17:20:36 -03:00
Benjamin Otte
eec8a96d0c shortcut: Add GtkShortcutTrigger
Triggers are meant to describe how to trigger a shortcut. So far only a
keyval + modifiers trigger exists.
2019-05-15 17:20:36 -03:00
Benjamin Otte
6edcf01ff6 contentformats: Fix doc typo 2019-05-15 17:20:36 -03:00
Benjamin Otte
6cafda4097 gsk: Fix annotations for ref()/unref() 2019-05-15 17:20:36 -03:00
Benjamin Otte
08ca6a3c44 window: Port bindings to use shortcuts 2019-05-15 17:20:35 -03:00
Benjamin Otte
2d2f138ff5 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-05-15 17:20:35 -03:00
Benjamin Otte
a1dfe3da52 widget: Add gtk_widget_class_add_shortcut()
This allows adding shortcuts as a replacement for keybindings.
2019-05-15 17:20:35 -03:00
Benjamin Otte
e5eb17576e 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-05-15 17:20:35 -03:00
Benjamin Otte
74262752de bindings: Split out function to invoke an action signal
We want to use that in shortcuts later.
2019-05-15 17:20:35 -03:00
Benjamin Otte
8d6138b8f2 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-05-15 17:20:34 -03:00
Benjamin Otte
2c48acb5a3 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-05-15 17:20:34 -03:00
Benjamin Otte
32d2a52028 bindings: Parse into GVariantBuilder directly
Avoids the indirection via GtkBindingArg
2019-05-15 17:20:34 -03:00
Benjamin Otte
1a115ea681 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-05-15 17:20:34 -03:00
Benjamin Otte
424bc84288 bindings: Replace GtkBindingArg arguments with GVariant
This only replaces invocation, not yet parsing.
2019-05-15 17:20:33 -03:00
Benjamin Otte
ac738ac45e bindings: Make gtk_binding_entry_add_signall() private
This function needs a replacement and that will appear after
refactorings.
2019-05-15 17:20:33 -03:00
Benjamin Otte
42396a98a9 bindings: Hide structs 2019-05-15 17:20:33 -03:00
Benjamin Otte
c04d7d1b28 bindings: Remove unused member variables 2019-05-15 17:20:33 -03:00