How do I support user-configurable shortcuts in GTK+ menus?
Using GtkUIManager
, it's easy to specify accelerators for GtkAction
s. However, some users inevitably want different accelerators, or want accelerators for actions that I don't think see enough usage to warrant them.
GtkAccelMap
开发者_运维技巧 looks like what I need, but the documentation suggests that it's more low-level than required, and that GtkUIManager
should be used. It looks like I could support a fixed-location .ui
file containing only <accelerator>
entries, but this isn't explicitly suggested anywhere I can find, and I don't know of other applications that do this.
What is the suggested/approved way to support user customisation of accelerators for menu actions?
精彩评论