diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2011-11-08 10:48:42 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2011-11-08 10:48:42 +0900 |
commit | 613e01520f27a53c947fed476d99aeb8ae1ae39b (patch) | |
tree | fea541242fea81f5d1cddad6c2e192b3c0f773f1 /ibus | |
parent | 02893693fc0a8692a6242b0be6dc8f09e14c1c54 (diff) | |
download | ibus-613e01520f27a53c947fed476d99aeb8ae1ae39b.tar.gz |
Fixed fallback icons.
1. Set 'ibus-keyboard' icon for IME off in non-GNOME theme.
People would think the application icon for non-GNONE classic desktop.
The themed icon is applied for GNOME icon theme only.
2. Set gtk-fallback-icon-theme as 'gnome'
ibus gtk panel needs gtk stock icons but some desktop does not load GNOME
icon theme. I assigned 'gnome' for gtk-fallback-icon-theme if it's none.
3. Use 'gtk-dialog-info' if 'gtk-info' is not found.
It seems the latest gtk2 does not have 'gtk-info' icon via pygtk2.
BUG=RH#711632
TEST=Linux desktop
Review URL: http://codereview.appspot.com/5320066
Diffstat (limited to 'ibus')
-rw-r--r-- | ibus/_config.py.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ibus/_config.py.in b/ibus/_config.py.in index a8301363..098d805a 100644 --- a/ibus/_config.py.in +++ b/ibus/_config.py.in @@ -45,10 +45,14 @@ def get_license(): def get_ICON_KEYBOARD(): import gtk - theme = gtk.icon_theme_get_default() icon = '@IBUS_ICON_KEYBOARD@' + fallback_icon = 'ibus-keyboard' + settings = gtk.settings_get_default() + if settings.get_property('gtk-icon-theme-name') != 'gnome': + return fallback_icon + theme = gtk.icon_theme_get_default() if not theme.lookup_icon(icon, 18, 0): - icon = 'ibus-keyboard' + return fallback_icon return icon ISOCODES_PREFIX='@ISOCODES_PREFIX@' |