File: dev-notes

package info (click to toggle)
amtk 5.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 668 kB
  • sloc: ansic: 2,991; xml: 283; makefile: 7
file content (44 lines) | stat: -rw-r--r-- 2,543 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Amtk notes - possible things to do or to investigate
====================================================

- When calling amtk_menu_item_set_icon_name(), do not have a large margin on
  the left. GtkUIManager was able to put the icon without the large margin (in
  the same column as the check or radio drawing). Maybe only GtkImageMenuItem
  is able to do that, but is deprecated (and removed in GTK 4).

- Add convenient API to replace a placeholder by a list of menu/toolbar items?
  And be able to update the placeholder content when the application runs (so
  mark items to recognize them later, to know that they are part of the
  placeholder). Or create a Placeholder object that contains the list of items,
  so when the Placeholder object is modified, the menu/toolbar is updated
  accordingly.
  Or, the application can re-generate the whole submenu or a toolbar each time
  that it is needed. Or a submenu could be created on-the-fly, upon receiving a
  signal to open the submenu (?). In these cases, a full-blown placeholder
  mechanism is not needed, but perhaps a few utility functions would help.
  A good test-bed for this is the gnome-latex application.

- Add one more sanity check: check that a GAction is *implemented* when (or
  after) creating a menu or toolbar item for that action? Because currently
  when the GAction is not implemented, the menu/toolbar item is just
  insensitive, there is no warning, no way to know if the menu/toolbar item was
  set as insensitive explicitly/intentionally or not.

- An AmtkActionInfo could have a field for the default AmtkFactoryFlags (or to
  force some flags). For example setting AMTK_FACTORY_IGNORE_ACCELS_FOR_APP for
  the tepl-cut/copy/paste/select-all actions.
  But it's perhaps a bit messy.

- To prevent apps from modifying ActionInfos of libs, maybe seal an ActionInfo
  when it is added to a store, except for mark_as_used(). But it's maybe a bit
  too paranoid. Or instead of sealing, have a builder class that creates an
  immutable ActionInfo, see:
  https://blogs.gnome.org/otte/2018/02/03/builders/

- ActionInfo and ActionInfoEntry could have one more field for an identifier,
  because when using a detailed GAction name the name can become a bit hairy
  (small tip / side note: to "git grep" it the `--fixed-strings` argument is
  needed). The detailed GAction name would be the equivalent of the callback in
  a GtkActionEntry.
  Because currently, to avoid such hairy names, more GActions need to be
  implemented, that can in turn call common functions.