[newui] Replace system-config-keyboard and remove our loadKeymap code

Vratislav Podzimek vpodzime at redhat.com
Mon Jul 23 12:47:04 UTC 2012


PATCH 1/2 replaces the anaconda.keyboard object, which was a Keyboard object
from system-config-keyboard. The only method that was used was the activate()
method, that basically called loadkeys and setxkbmap. We now use libxklavier
to handle X layouts and we can call loadkeys ourselves. Once systemd-localed
has the capability to load X layouts in the virtual console, we could easily
replace calling loadkeys with calling systemd-localed methods via DBus.

The only problem is, that system-config-keyboard uses a table mapping console
keymaps to X layouts. But this table is not at all complete (only few keymaps
compared to the available keymaps in /lib/xkb/keymaps/i386 directory contents)
and once systemd-localed gets patched to load X layouts for console, this
mapping will not be necessary. For now, I've added the code, that tries to load
the keymap as given by user (e.g. 'cz_cp1250' or it could be an X layout) and if
it fails, it tries to load the basic variant (e.g. 'cz' for 'cz (qwerty)'). This
way, given a valid keymap, we load it, given an invalid keymap (X layout), we
load the basic variant and setup proper layout for the X session.

Could we drop console keymaps at all once systemd-localed gets patched to load X
layouts supporting only X layouts and not the legacy keymaps?

Ideas? Suggestions?

I believe PATCH 2/2 is okay, we don't use our loadKeymap code anywhere and
I see no reason to use it instead of the loadkeys command.

Vratislav Podzimek (2):
  Replace system-config-keyboard with our methods using ksdata.keyboard
  Remove our loadKeymap code from isys

 anaconda                               |    6 +-
 anaconda.spec.in                       |    2 -
 pyanaconda/__init__.py                 |    2 -
 pyanaconda/isys/__init__.py            |    6 --
 pyanaconda/isys/isys.c                 |    1 -
 pyanaconda/isys/lang.c                 |  108 --------------------------------
 pyanaconda/isys/lang.h                 |   18 ------
 pyanaconda/keyboard.py                 |   67 +++++++++++++++++---
 pyanaconda/language.py                 |   12 ----
 tests/pyanaconda_test/language_test.py |   20 ------
 10 files changed, 63 insertions(+), 179 deletions(-)

-- 
1.7.10.4



More information about the anaconda-patches mailing list