runtime accel changes



hi,

I recently wrote a patch[1] to re-enable accel labels in GtkMenu generated from GMenuModel. They got lost in the shuffle during some related recent changes.

Essentially, the new approach means that the accel='' attribute of each menuitem directly determines what the accel label will be (instead of doing the lookup in the accelgroup).

The most noteworthy impact of the patch (and the topic of this email) is the strong implication that we will no longer support runtime changing of accel keys.

It's my personal opinion that runtime changes to accels have resulted in some rather complicated code in Gtk and we'd be better off without this feature. Additionally, the feature is disabled by default for quite some time because enabling it results in lots of bug reports from confused users.

In the future we will likely gain some sort of action-database/factory functionality (to replace the other half of GtkAction -- creating proxies). I imagine accels will be registered with this database at application initialisation time.

I could see a hook (like a keyfile in ~/.config/ somewhere) that allows advanced users to adjust their accels. An app restart would be required.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=683738


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]