summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* docs: Update symbolswip/ebassi/shortcutEmmanuele Bassi2020-03-221-14/+49
|
* Turn GtkShortcutAction into a GObjectEmmanuele Bassi2020-03-2211-402/+684
| | | | | | Just like we did for GtkShortcutTrigger. This allows language bindings to properly deal with all the actions.
* Turn GtkShortcutTrigger into an objectEmmanuele Bassi2020-03-226-378/+621
| | | | | | | | | | The lightweight inheritance mechanism used for GtkShortcutTrigger is not going to be usable by bindings, because boxed types cannot have derived types. We could use GTypeInstance and derive everything from that, like GParamSpec, but in the end shortcuts are not really a performance critical paths, unlike CSS values or render nodes.
* Add definition macro for internal typesEmmanuele Bassi2020-03-221-0/+39
| | | | | | | | | | GTK defines various types that are meant to be derivable only within GTK itself, and "final" from the perspective of consumers of the GTK API. The existing macros defined by GObject, such as G_DECLARE_FINAL_TYPE and G_DECLARE_DERIVABLE_TYPE, lack this functionality. While we wait for GObject to get this kind of macro, we should define our own.
* shortcutcontroller: Plug a memory leakMatthias Clasen2020-03-221-1/+4
| | | | g_list_model_get_item is transfer full :(
* Add tests for shortcut actionsMatthias Clasen2020-03-221-0/+67
|
* Add a test for shortcut triggersMatthias Clasen2020-03-222-0/+261
|
* Fix the action testMatthias Clasen2020-03-221-3/+4
| | | | | We have a test that enumerates the GtkText actions, so when a new open appears, the test needs to be updated.
* Fix a compiler warningMatthias Clasen2020-03-221-1/+1
|
* text view: Fix touch selectionMatthias Clasen2020-03-221-0/+3
| | | | We forgot to allocated that popover.
* widget: Drop the ::popup-menu signalMatthias Clasen2020-03-221-36/+0
| | | | | This is now done in widgets which have context menus.
* placesview: Stop using ::popup-menuMatthias Clasen2020-03-223-32/+66
| | | | This signal is going away.
* filechooser: Stop using ::popup-menuMatthias Clasen2020-03-222-5/+37
| | | | This signal is going away.
* mountoperation: Stop using ::popup-menuMatthias Clasen2020-03-221-3/+18
| | | | We can just use a shortcut controller directly.
* gtk-demo: Stop emitting ::popup-menuMatthias Clasen2020-03-221-25/+0
| | | | The signal was not used anyway, in the font explorer demo.
* colorchooser: Stop using ::popup-menuMatthias Clasen2020-03-224-25/+82
| | | | This signal is going away. Use an action instead.
* range: Remove ::popup-menu emissionMatthias Clasen2020-03-221-10/+0
| | | | | This signal is going away, and having context menus on sliders is not really a thing anyway.
* scrollbar: Remove :popup-menu forwardingMatthias Clasen2020-03-221-11/+0
| | | | This signal is going away.
* emojichooser: Stop using ::popup-menuMatthias Clasen2020-03-221-13/+27
| | | | This signal is going away. Use an action instead.
* Use an action for the context menu keybindingMatthias Clasen2020-03-226-39/+104
| | | | The ::popup-menu signal is going away.
* Print mnemonic triggers clearlyMatthias Clasen2020-03-221-0/+1
|
* inspector: Show shortcutsMatthias Clasen2020-03-228-0/+265
| | | | | At a tab that lists the shortcuts contained in a GtkShortcutController.
* Only create a class shortcut controller if we have shortcutsMatthias Clasen2020-03-221-3/+6
| | | | No point in creating objects that just hold empty lists.
* widget: Name the controllersMatthias Clasen2020-03-221-0/+1
|
* window: Name the the controllersMatthias Clasen2020-03-221-0/+2
|
* shortcutmanager: Name the controllersMatthias Clasen2020-03-221-0/+2
| | | | This is helpful in the inspector.
* Move shortcut manager initialization codeMatthias Clasen2020-03-223-14/+33
| | | | | | It is just too ugly to use quarks across multiple source files, so add a private helper function that attaches the controllers.
* filechooser: Trigger the location popup via bindingsBenjamin Otte2020-03-222-123/+24
| | | | Simplifies code quite a bit.
* accels: Remove GtkAccelGroupBenjamin Otte2020-03-2212-1484/+7
|
* testmenubutton: Don't create a GtkAccelGroupBenjamin Otte2020-03-221-4/+0
| | | | It's unused.
* testsuite: Remove GtkAccelGroup usageBenjamin Otte2020-03-221-53/+0
|
* widget: Remove gtk_widget_add_accelerator()Benjamin Otte2020-03-225-397/+2
| | | | | | | | People should use shortcut controllers instead (global, capture). A side effect of this is that GtkAccelLabel now lost its method to magically look up accelerators to display. Somebody needs to add that back later.
* doc tools: Create AccelLabel image without using GtkAccelGroupBenjamin Otte2020-03-221-7/+1
|
* testgtk: Port keyval example to shortcut controllersEmmanuele Bassi2020-03-221-17/+20
|
* shortcutcontroller: Implement GtkBuildableBenjamin Otte2020-03-222-1/+31
| | | | | Use it to allow adding shortcuts to the controller via the usual <child> method.
* shortcutaction: INtegrate with GtkBuilder property parsingBenjamin Otte2020-03-223-1/+120
| | | | | <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-224-1/+52
| | | | And hook it up into the GtkBuilder infrastructure.
* application: Replace accelerator handling with shortcutsBenjamin Otte2020-03-223-373/+198
| | | | | | | | 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-223-2/+6
| | | | It was using the default display unconditionally.
* accelerators: Make gtk_accelerator_parse() return TRUE/FALSEBenjamin Otte2020-03-226-24/+26
| | | | A parse function should return success or not. So do that.
* shortcuttrigger: Add hash(), equal(), and compare() functionsBenjamin Otte2020-03-223-0/+183
| | | | | Those are useful for putting triggers in hash tables or getting sorted output.
* shortcuts: Mananage managed shortcuts with a custom modelBenjamin Otte2020-03-229-46/+732
| | | | | | | | | | | Reduce the amount of special casing by using a list model for global and managed shortcuts, too. This way, the ListModel API will work for the ShortcutController in the GtkShortcutManager and GtkRoot. The only special case remaining is shortcut activation, which needs to pass the right widget to the controller in the global/managed case.
* shortcutaction: Add gtk_shortcut_action_to_string()Benjamin Otte2020-03-223-7/+124
| | | | For all but the callback action, we can print something useful.
* widget: Keep keybindings as a GListStoreBenjamin Otte2020-03-224-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-223-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-221-15/+74
| | | | After all, this controller is a list of shortcuts.
* gtk-demo: Port the sliding puzzle demo to shortcutsBenjamin Otte2020-03-221-43/+36
|
* shortcut: Change the API for creating shortcutsBenjamin Otte2020-03-227-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-2216-615/+1200
| | | | | | | | | | | | | | | 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 - Activate a GAction
* accelgroup: Remove unneeded APIsBenjamin Otte2020-03-224-154/+0
| | | | After the removal of GtkAccelMap, these things are no longer necessary.