Created attachment 872993 [details] iBus preferences, Xfce keyboard preferences and iBus layout switch list on top of each other Description of problem: I have system keyboard layouts (set via Xfce) English (US) and Czech (qwerty) which aren't picked up by ibus (see Bug 1074879 ). In ibus I have set English (US), Czech (no qwerty available -- see Bug 1074879 again), Japanese - mozc and Russian - translit (m17n). Everytime I restart ibus (or is started by logging in) new English US layout is added. Only to the layout switch list. It does not appear in the settings so it cannot be removed. Currently I have 8 times more English US layouts in the list than set up. Happens both in fresh install as well as upgrade from F19. Version-Release number of selected component (if applicable): ibus-gtk2-1.5.5-2.fc20.i686 How reproducible: Always Steps to Reproduce: 1. Set up both system and ibus layouts 2. Restart ibus. Actual results: Two English layouts (and growing) present in layout switch list, only one in settings. Expected results: Same layouts in settings as in the layout switch list. Additional info: see the attachment
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.