Yesterday I integrated the several features for ibus in Fedora 15 and rawhide, whose version is ibus-126.96.36.19910419-3 or later.
# yum update --enablerepo=updates-testing ibus-188.8.131.5210419-5.fc15 # yum update --enablerepo=updates-testing ibus-gnome3
I’d introduce the icon symbol property as one of the new features using GNOME 3(GNOME-Shell) here.
When a text application gets the input focus, IBus panel icon shows the current keyboard layout. E.g. I use the US keyboard below.
After I type Control + Space key, IBus enables the primary input method engine and shows the engine specific icon. The new feature of the icon symbol property supports the text icon on the IBus panel status. E.g. I use ibus-anthy as the primary IM engine and which has the icon symbol ‘あ’ below.
The feature also supports to switch the icon symbol by IM engine. E.g. I choose ‘Kanatana’ input mode and the status shows ‘ア’ below.
The icon symbol is defined in /usr/share/ibus/component/*.xml and each IBus engine also can call ibus.EngineBase.set_icon_symbol(‘text’)
% cat /usr/share/ibus/component/anthy.xml <?xml version="1.0" encoding="utf-8"?> <component> <name>org.freedesktop.IBus.Anthy</name> <description>Anthy Component</description> ... snip <engines> <engine> <name>anthy</name> <language>ja</language> <icon>/usr/share/ibus-anthy/icons/ibus-anthy.png</icon> <layout>jp</layout> <longname>Anthy</longname> <description>Anthy Input Method</description> <icon_symbol>あ</icon_symbol> <hotkeys>Control+space,Zenkaku_Hankaku</hotkeys> </engine> </engines> </component>
As you notice, the desktop is GNOME-Shell and currently it might not work for GNOME-Panel since I have no idea about GtkIconStatus text icon. Probably we might need to think another implementation for GTK+(PyGTK2 does not export the GtkImage in GtkStatusIcon and I also tried GtkNumerableIcon however it seems the emblem text was too small on the panel).