Commit Graph

15 Commits

Author SHA1 Message Date
Timm Bäder
d01e664c79 applicationaccels: Fix shortcut memory leaks
g_list_model_get_item() is transfer-full.
2020-03-28 08:34:35 +01:00
Emmanuele Bassi
6e8c78714d Turn GtkShortcutAction into a GObject
Just like we did for GtkShortcutTrigger.

This allows language bindings to properly deal with all the actions.
2020-03-25 23:14:45 -04:00
Emmanuele Bassi
457b6657bb Turn GtkShortcutTrigger into an object
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.
2020-03-25 23:14:45 -04:00
Benjamin Otte
daa7d9072d application: Replace accelerator handling with shortcuts
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.
2020-03-25 23:14:28 -04:00
Benjamin Otte
580863b112 accelerators: Make gtk_accelerator_parse() return TRUE/FALSE
A parse function should return success or not. So do that.
2020-03-25 23:14:28 -04:00
Emmanuele Bassi
2c62cde780 window: Remove all old mnemonic handling API 2020-03-25 23:14:27 -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
df792a088d application: Replace accelerator handling with shortcuts
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.
2020-03-18 23:00:51 -04:00
Benjamin Otte
87df17e4ce accelerators: Make gtk_accelerator_parse() return TRUE/FALSE
A parse function should return success or not. So do that.
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
a977094e18 window: Remove all old mnemonic handling API 2020-03-18 23:00:51 -04:00
Benjamin Otte
df282a13bb applicationaccels: Use g_renew() 2020-03-06 05:44:11 +01:00
Emmanuele Bassi
fcaa9aa22d Rename GtkActionMuxer's private header
Follow the naming policy for private headers.
2018-02-02 10:28:17 +01:00
Sébastien Wilmet
3b988ce523 app: share function to normalise detailed action name
Put the function in gtkactionmuxer.c, where
gtk_print_action_and_target() is implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:40:08 +02:00
Sébastien Wilmet
3d182160bb app-accels: rename static functions
Remove the "accels_" prefix from the remaining static functions. The
prefix no longer makes sense since the whole file is devoted to accels.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:39:44 +02:00
Sébastien Wilmet
bce4a0abde app: extract GtkApplicationAccels private class
This has several benefits:
- Less code in GtkApplication. The accels handling is something
  self-contained, and GtkApplication now delegates the work.
- For the accels functions, there is now a distinction between static
  functions and functions in the gtkapplicationaccelsprivate.h header,
  which makes the code easier to understand, because we have a good
  overview just by reading the header.
- The struct _GtkApplicationPrivate is now easier to find instead of
  being in the middle of the file.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:39:18 +02:00