summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* shortcutaction: Integrate with GtkBuilder property parsingBenjamin Otte2020-03-253-1/+95
| | | | | <property name="action">action(win.quit)</property> style action specifications now work for GtkShortcutAction properties.
* shortcuttrigger: Add gtk_shortcut_triger_new_parse_string()Benjamin Otte2020-03-254-0/+52
| | | | And hook it up into the GtkBuilder infrastructure.
* application: Replace accelerator handling with shortcutsBenjamin Otte2020-03-253-373/+199
| | | | | | | | API remains the same, but activation is now done via a shortcutcontroller. The code uses a controller with global scope so that the shortcuts are managed with all the other global shortcuts.
* accel: Add display arg to gtk_accelerator_parse_with_keycode()Benjamin Otte2020-03-253-2/+6
| | | | It was using the default display unconditionally.
* accelerators: Make gtk_accelerator_parse() return TRUE/FALSEBenjamin Otte2020-03-256-24/+26
| | | | A parse function should return success or not. So do that.
* shortcuttrigger: Add hash(), equal(), and compare() functionsBenjamin Otte2020-03-253-0/+183
| | | | | Those are useful for putting triggers in hash tables or getting sorted output.
* shortcutmanager: Use list modelsMatthias Clasen2020-03-253-23/+93
|
* shortcutcontroller: Use a list model for shortcutsMatthias Clasen2020-03-252-30/+19
|
* shortcutaction: Add gtk_shortcut_action_to_string()Benjamin Otte2020-03-253-6/+113
| | | | For all but the callback action, we can print something useful.
* widget: Only create a controller if we have shortcutsMatthias Clasen2020-03-251-3/+6
| | | | No point in creating objects that just hold empty lists.
* widget: Keep keybindings as a GListStoreBenjamin Otte2020-03-254-36/+27
| | | | | This way, we can use shortcut_controller_new_for_model() and avoid all the special casing about run_class.
* shortcutcontroller: Add gtk_shortcut_controller_new_for_model()Benjamin Otte2020-03-253-6/+64
| | | | | | | 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.
* shortcutcontroller: Implement GListModelBenjamin Otte2020-03-251-15/+74
| | | | After all, this controller is a list of shortcuts.
* gtk-demo: Port the sliding puzzle demo to shortcutsBenjamin Otte2020-03-251-43/+36
|
* shortcut: Change the API for creating shortcutsBenjamin Otte2020-03-257-28/+94
| | | | | | | | When creating shortcuts, there almost always are a trigger and an action available for use. So make gtk_shortcut_new() take those as arguments. Also add gtk_shortcut_new_with_arguments() so people can easily pass those in, too.
* shortcut: Add GtkShortcutActionBenjamin Otte2020-03-2516-615/+1101
| | | | | | | | | | | | | | Similar to GtkShortcutTrigger, GtkShortCutAction provides all the different ways to activate a shortcut. So far, these different ways are supported: - do nothing - Call a user-provided callback - Call gtk_widget_activate() - Call gtk_widget_mnemonic_activate() - Emit an action signal - Activate an action from the widget's action muxer
* accelgroup: Remove unneeded APIsBenjamin Otte2020-03-254-154/+0
| | | | After the removal of GtkAccelMap, these things are no longer necessary.
* gtk: Remove GtkAccelMapEmmanuele Bassi2020-03-2515-1383/+2
| | | | | Now that accel paths are gone, the object managing them isn't needed anymore either.
* gtk: Remove accel pathsBenjamin Otte2020-03-256-107/+7
| | | | | | | It's an outdated technology now that everybody is using GActionGroups. If somebody wanted to support changeable shortcuts, they'd need to reintroduce it in another way.
* Remove GtkMnemonicHashBenjamin Otte2020-03-254-255/+0
| | | | It's not used anymore.
* window: Remove all old mnemonic handling APIEmmanuele Bassi2020-03-255-243/+27
|
* Add GtkShortcutManagerEmmanuele Bassi2020-03-2511-22/+228
| | | | | | | | | This adds an interface for taking care of shortcut controllers with managed scope. Only GtkWindow currently implements this interface, so we need to ensure that we check if any top-level widget we reach is a shortcuts manager before we call into it.
* label: Implement mnemonics using shortcutsBenjamin Otte2020-03-251-27/+35
|
* shortcut: Add gtk_shortcut_set_mnemonic_activate()Benjamin Otte2020-03-252-0/+86
| | | | Makes the shortcut call gtk_widget_mnemonic_activate() upon activation.
* shortcuttrigger: Add support for mnemonicsBenjamin Otte2020-03-257-28/+257
| | | | | | | 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.
* window: Put F10 accelerator into its own shortcut controllerBenjamin Otte2020-03-251-54/+45
| | | | | So instead of relying on gtk_window_activate_key(), it's now using proper infrastructure.
* window: Get rid of public APIs that shouldn't beBenjamin Otte2020-03-254-76/+5
| | | | | | Event controllers should have replaced all of them. And if they haven't, apps need to fix their code (I'm looking at you Gimp).
* gdk: Remove GDK_RELEASE_MASKBenjamin Otte2020-03-253-37/+6
| | | | It was only ever supported by keybindings and those are gone now.
* gtk-demo: Add a dumb demo for shortcut triggersBenjamin Otte2020-03-253-0/+94
|
* shortcutcontroller: Add GtkShortcutScopeBenjamin Otte2020-03-256-8/+327
| | | | | | | | | | | | | 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.
* shortcuttrigger: Add gtk_shortcut_trigger_to_label()Benjamin Otte2020-03-253-5/+126
| | | | Provide a user-presentable string.
* accelgroup: Add gtk_accel_group_print_label()Benjamin Otte2020-03-252-7/+19
|
* accellabel: Move gtk_accelerator_get_label() codeBenjamin Otte2020-03-253-339/+312
| | | | | | The function lives in gtkaccelgroup.c, so there's no need to have that call a private function in another source file. Instead, make that other source file call gtk_accelerator_get_label() instead.
* accellabel: Get rid of class variablesBenjamin Otte2020-03-251-46/+56
| | | | We can just look them up as-needed, no need to cache them.
* gtk: Remove bindingsBenjamin Otte2020-03-2518-2006/+255
| | | | The whole binding functionality is now handled by shortcuts.
* Remove bindings activation from GtkEventControllerKeyEmmanuele Bassi2020-03-251-4/+0
| | | | We're going to use shortcuts soon.
* popover: Add keynav keybindingsMatthias Clasen2020-03-251-40/+40
| | | | | | | 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.
* popovermenu: Port to shortcutsEmmanuele Bassi2020-03-251-44/+40
|
* accelgroup: Actually have a default mod maskBenjamin Otte2020-03-251-1/+1
| | | | Don't just use a value without initializing it.
* treeview: Redo event forwarding hackBenjamin Otte2020-03-251-20/+34
| | | | | Reorder the event controllers so that key forwarding to the search entries really happens after shortcut triggering.
* combobox: Redo key event forwarding hackBenjamin Otte2020-03-251-14/+18
| | | | | | Instead of manualling invoking bindings, we now reorder event controllers inside the treemenu, so that shortcuts run before the event forwarding.
* widget: Add private accessor to event controllersEmmanuele Bassi2020-03-252-0/+21
|
* iconview: Port bindings to use shortcutsBenjamin Otte2020-03-251-67/+77
|
* infobar: Port bindings to use shortcutsBenjamin Otte2020-03-251-12/+7
|
* label: Port bindings to use shortcutsBenjamin Otte2020-03-251-78/+64
|
* listbox: Port bindings to use shortcutsBenjamin Otte2020-03-251-47/+49
|
* notebook: Port bindings to use shortcutsBenjamin Otte2020-03-251-86/+87
|
* scale: Port bindings to use shortcutsBenjamin Otte2020-03-251-8/+5
|
* scalebutton: Port bindings to use shortcutsBenjamin Otte2020-03-251-16/+24
|
* scrolledwindow: Port bindings to use shortcutsBenjamin Otte2020-03-251-34/+32
|