Bug 1011155
Summary: | wrong title of the keyboard preview dialog for some layouts | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Tomas Capek <tcapek> | ||||
Component: | anaconda | Assignee: | David Shea <dshea> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Release Test Team <release-test-team-automation> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 7.0 | CC: | dshea, mbanas, mkovarik, rmatos, vpodzime | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | anaconda-19.31.31-1 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-06-13 10:30:45 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Tomas Capek
2013-09-23 17:00:19 UTC
We just use the following code making use of the libgnomkbd: dialog = Gkbd.KeyboardDrawing.dialog_new() Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg, layout_row[0]) where layout_row[0] is layout + variant (e.g. 'cz' or 'cz (qwerty)'). Reassigning to libgnomekbd. (In reply to Vratislav Podzimek from comment #2) > We just use the following code making use of the libgnomkbd: > > dialog = Gkbd.KeyboardDrawing.dialog_new() > Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg, > layout_row[0]) > > where layout_row[0] is layout + variant (e.g. 'cz' or 'cz (qwerty)'). You need to build that string like: >>> layout = 'cz' >>> variant = 'qwerty' >>> str = layout + '\t' + variant (In reply to Rui Matos from comment #3) > (In reply to Vratislav Podzimek from comment #2) > > We just use the following code making use of the libgnomkbd: > > > > dialog = Gkbd.KeyboardDrawing.dialog_new() > > Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg, > > layout_row[0]) > > > > where layout_row[0] is layout + variant (e.g. 'cz' or 'cz (qwerty)'). > > You need to build that string like: > > >>> layout = 'cz' > >>> variant = 'qwerty' > >>> str = layout + '\t' + variant I can fix that, but isn't the problem on Gkbd's side? If it understands the argument and shows the right layout, it should set the right title as well. (In reply to Vratislav Podzimek from comment #4) > I can fix that, but isn't the problem on Gkbd's side? If it understands the > argument and shows the right layout, it should set the right title as well. But it doesn't understand it. You can consider this to be the "API". (In reply to Rui Matos from comment #5) > (In reply to Vratislav Podzimek from comment #4) > > I can fix that, but isn't the problem on Gkbd's side? If it understands the > > argument and shows the right layout, it should set the right title as well. > > But it doesn't understand it. You can consider this to be the "API". Well, it shows the right characters in the preview, just the title is wrong. Created attachment 804065 [details]
Gkbd preview dialog in the installer
(In reply to Vratislav Podzimek from comment #6) > (In reply to Rui Matos from comment #5) > > But it doesn't understand it. You can consider this to be the "API". > Well, it shows the right characters in the preview, just the title is wrong. Right, sorry, it's more nuanced than just "it doesn't understand it". The part of the code that gets the geometry data does understand "cz(qwerty)". This part actually calls into the X server and the X server apparently can handle this. But, the X server doesn't tell you the actual name (i.e. "Czech (qwerty)"). To get this string libgnomekbd calls into libxklavier which then parses /usr/share/X11/xkb/rules/evdev.xml. It's this part of the code that only understands the format "layout\tvariant". In any case, please use the \t format since I'd rather avoid patching these libraries which are increasingly becoming obsolete. Broken again, but now it seems to be all layouts. Actually, it's not all layouts, just the ones with no variant string (e.g., "us"). Verified on RHEL-7.0-20140127.0 with anaconda-19.31.51-1.el7. All mentioned layout ("English (English (Colemak))", "German (German (Dvorak))", or "Armenian (Armenian (phonetic))") have proper title. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |