Accelerators missing from dialogs in KDE 4.3

Tom Albers toma at kde.org
Sat Jul 25 17:53:57 BST 2009


Op Saturday 25 July 2009 18:31 schreef u:
> A Dimarts, 7 de juliol de 2009, Stephan Kulow va escriure:
> > Am Montag 29 Juni 2009 schrieb Albert Astals Cid:
> > > A Dilluns, 29 de juny de 2009, Andreas Pakulat va escriure:
> > > > On 29.06.09 12:19:18, David Faure wrote:
> > > > > On Friday 05 June 2009, Andreas Pakulat wrote:
> > > > > > Apart from that this is actually not the purpose (and never has
> > > > > > been) of KAcceleratorManager - at least not in the way it used
> > > > > > right now. The purpose was to use this during development to easily
> > > > > > find good accelerator keys and then assign them in code/ui files.
> > > > >
> > > > > Did coolo confirm that? Because it doesn't match what I remember from
> > > > > kde3 times. I distinctly remember that the goal was to have it done
> > > > > automatically when no accels were specified by the app developer
> > > > > explicitely.
> > > >
> > > > Well, that was what I gathered from the commits and source code, when
> > > > it was broken some time ago and fixed by Albert. There's a comment in
> > > > the code that activates the auto-assignment that suggests it wasn't
> > > > meant to be used during runtime, but during development to find good
> > > > accelerators.
> > > >
> > > > Can't find the commits easily at the moment and neither remember the
> > > > code file where the comment was.
> > >
> > > Stephan, can you clarify if the goal for KAcceleratorManager automatic
> > > accelerator assignment was:
> > >  a) have it done automatically when no accels were specified by the app
> > > developer explicitely and so should be always enabled
> > >  b) have a translators/developers tool but KAcceleratorManager automatic
> > > accelerator assignment should be generally disabled
> >
> > Hi Albert,
> >
> > The assignment should be done automatically as history proved that it's
> > impossible for a developer and even less possible for a translator to pick
> > accelerators that do not clash all the time. So my goal was to remove the
> > accelerators from the code in general and only leave those that are really
> > essential to the user, e.g. always have them on standard actions and assign
> > the free letters by an algorithm.
> 
> Ok, so we can see here that Coolo's intention was to remove accelerators 
> altogether from code and let KAcceleratorManager manage everything.
> 
> From the i18n point of view not having accelerators in strings to translate is 
> not good as non latin1 languages like Japanese do things like
> 
> msgid "&Source:"
> msgstr "???(&S):"
> 
> And without the & marker they can't know if they have to add one.
> 
> So having automatic accelerator assignment is good for developers and latin1 
> users but not for the broad i18n community.
> 
> So I see three possibilities here:
>  a) Always use automatic accelerator assignment and ignore the i18n problem
>  b) Try to add as much accelerators in code as possible but leave the 
> automatic accelerator enabled so that it somehow works if the developer is not 
> careful enough
>  c) Disable the automatic accelerator altogether and force developers to put 
> correct accelerators
> 
> I'm on b) because c) is asking for the impossible.

a) is no option.

I like to think: do c), especially when that means we gain even more speed by it.

Some other remarks:
When we do b) can we somehow ( in debugging mode), make the automatic accelarators different as the manually assigned ones? This way I, as developer, know I need to fix it, and face it, it is a great junior job for a lot of people.
Can we make a kaboutdata setting to disable it? This way apps that have completed can maybe get that tiny bit of extra speed?

Best.

Toma
-- 
KDE Developer


More information about the kde-core-devel mailing list