Commit Graph

12 Commits

Author SHA1 Message Date
Emmanuele Bassi
4e264a74be Annotation fixes
Match the arguments name in the declaration and the definition, and make
sure we have the proper transfer annotations.
2020-04-03 15:30:56 +01:00
Benjamin Otte
a1e9ae5259 shortcutcontroller: Add gtk_shortcut_controller_new_for_model()
This is mainly for internal use, but I can't see a reason to not have it
public for people who want to maintain their own lists.

I'm sure gnome-builder will never ever find a way to misuse it.
2020-03-25 23:14:27 -04:00
Benjamin Otte
bde4cbe377 shortcuttrigger: Add support for mnemonics
Mnemonics need to be triggered with help from the controllers (who
determine the modifiers). Support for that has been added, too.

Mnemonics do not use this yet though.
2020-03-25 23:14:27 -04:00
Benjamin Otte
730154df7d shortcutcontroller: Add GtkShortcutScope
Allow setting the scope for a controller. The scope determines at what
point in event propagation the shortcuts will be activated.

Local scope is the usual activation, global scope means that the root
widget activates the shortcuts - ie they are activated at the very
start of event propagation (for global capture events) or the very end
(for global bubble events).
Managed scope so far is unimplemented.

This is supposed to be used to replace accelerators and mnemonics.
2020-03-25 23:14:27 -04:00
Benjamin Otte
58e8f2332d shortcutcontroller: Add gtk_shortcut_controller_add_shortcut()
... and gtk_shortcut_controller_remove_shortcut().
2020-03-25 22:36:03 -04:00
Benjamin Otte
a232107122 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-25 22:36:03 -04:00
Matthias Clasen
31db615885 Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18, reversing
changes made to 6ec96d2e98.
2020-03-19 18:03:16 -04:00
Benjamin Otte
d14807b93d shortcutcontroller: Add gtk_shortcut_controller_new_for_model()
This is mainly for internal use, but I can't see a reason to not have it
public for people who want to maintain their own lists.

I'm sure gnome-builder will never ever find a way to misuse it.
2020-03-18 23:00:51 -04:00
Benjamin Otte
ef40f22632 shortcuttrigger: Add support for mnemonics
Mnemonics need to be triggered with help from the controllers (who
determine the modifiers). Support for that has been added, too.

Mnemonics do not use this yet though.
2020-03-18 23:00:50 -04:00
Benjamin Otte
d4127fe0d4 shortcutcontroller: Add GtkShortcutScope
Allow setting the scope for a controller. The scope determines at what
point in event propagation the shortcuts will be activated.

Local scope is the usual activation, global scope means that the root
widget activates the shortcuts - ie they are activated at the very
start of event propagation (for global capture events) or the very end
(for global bubble events).
Managed scope so far is unimplemented.

This is supposed to be used to replace accelerators and mnemonics.
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
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