Bug 1074883
Summary: | English layout is added every time ibus is restarted resulting in duplicate entries | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Sourada <martin.sourada> | ||||
Component: | ibus | Assignee: | fujiwara <tfujiwar> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 20 | CC: | i18n-bugs, shawn.p.huang, tfujiwar | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | ibus-1.5.6-2.fc19 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-04-07 03:23:01 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
Martin Sourada
2014-03-11 07:59:54 UTC
Because cz(qwerty) is not available in ibus and it's fallen back to us layout. --- ibus-1.5.6/ui/gtk3/panel.vala.orig +++ ibus-1.5.6/ui/gtk3/panel.vala @@ -923,6 +923,39 @@ class Panel : IBus.PanelService { } } + /* IBus.Bus.get_engines_by_names() returns 'us' engine if the name + * does not exist in simple.xml and 'us' engine could be duplicated. + */ + private IBus.EngineDesc[] uniq_engines(IBus.EngineDesc[] engines) { + if (engines.length == 0) + return engines; + + int i = 0; + IBus.EngineDesc[] retval = {}; + + for (; i < engines.length; i++) { + if (engines[i].get_name() == "xkb:us::eng") + break; + } + + if (i == engines.length) + return engines; + + for (int j = 0; j < engines.length; j++) { + if (j <= i) { + retval += engines[j]; + continue; + } + + if (engines[i].get_name() == engines[j].get_name()) + continue; + + retval += engines[j]; + } + + return retval; + } + private void run_preload_engines(IBus.EngineDesc[] engines, int index) { string[] names = {}; @@ -955,6 +988,7 @@ class Panel : IBus.PanelService { } var engines = m_bus.get_engines_by_names(names); + engines = uniq_engines(engines); if (m_engines.length == 0) { m_engines = engines; Thanks for the quick reaction and fix to both of my bugs! I just tried to build patched (both changes) 1.5.6 and both this and bug 1074879 are fixed for me. Martin ibus-1.5.6-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/ibus-1.5.6-2.fc19 ibus-1.5.6-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/ibus-1.5.6-2.fc20 Package ibus-1.5.6-2.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ibus-1.5.6-2.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-4486/ibus-1.5.6-2.fc19 then log in and leave karma (feedback). ibus-1.5.6-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. ibus-1.5.6-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |