Re: [Patch] Keyboard accelerators for actions



On Sun, 2009-04-05 at 22:27 +0200, Holger Berndt wrote:
> On Fr, 03.04.2009 14:00, Alexander Larsson wrote:
> 
> >Is there some way we can get told of when the user changes an
> >accelerator so that we can queue a writeout of the file maybe?
> 
> Unfortunately, not really. There's a signal for the change of the
> accelerator map, but I don't know of any way to determine whether this
> is a manual change or a programmatic one. So, during startup, dozen of
> signal emissions occur. Emissions also occur from time to time during
> normal usage, for example when opening a new tab in browser mode.
> 
> Attached is a modified patch that saves the accelerator map for every
> batch of signal emissions in an idle callback. As said above, it will
> happen from time to time even without a manual change of the keyboard
> shortcuts, though.

Doing it in an idle seems overdoing it though. What if you queue a
timeout of say 30 seconds when this happens (after startup perhaps to
avoid the initial flurry of signals), then save changes in the timeout
or if the signal is still queued at exit we save then too.




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