refactoring kxkb (Was: is new lib dependency possible for 3.5.2?)
Lubos Lunak
l.lunak at suse.cz
Thu Feb 9 10:20:29 GMT 2006
On Thursday 09 February 2006 05:10, Andriy Rysin wrote:
> Lubos Lunak wrote:
> > I'm not sure I get what you mean. Currently there's kxkb (which is
> > actually more binaries because of kdeinit etc. but that's irrelevant) and
> > there's kcm_keyboard(?) which is for configuring. My idea is that kxkb's
> >functionality would be limited to just to displaying the indicator and
> > doing the actual keymap switch, there would be no dependency on
> > libxklavier as that's not necessary for this.
>
> Got bad news on this.
> I was hoping this is possible, so I was working on separating kxkb from
> rules stuff but found one thing: kxkb uses rules code to get name for
> layouts (displayed in menu/tooltips).
> In the old approach (w/out libxklavier) I could potentially cache the
> (english) names in the kxkb configuration with the hope that the name
> (in X11) would not change between user the runs kcmlayout. The
> translation for the name will be done on the fly (as it's done now).
> This solution is not very nice but could work.
>
> But if we start using translations for layout name from xorg.xml
> (whether via libklavier or bu parsing manually) there would be no way to
> make kxkb run without parsing rules or using libxklavier. Becaus all
> translation will come from X.
>
> I hate to load all that rules parsing just to get names for layouts in
> kxkb but I see no other way. If somebody can point the solution I'd
> really appreciate it.
Is that xorg.xml a specific file (or a limited number of specific files)? In
that case you could cache the values and also timestamps of the files and
regenerate them only if some of those files have changed.
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
More information about the kde-core-devel
mailing list