summaryrefslogtreecommitdiff
path: root/ibus
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2011-03-31 12:56:45 +0900
committerPeng Huang <shawn.p.huang@gmail.com>2011-04-01 10:10:26 -0400
commit1428a361cd3b416c4e4da7839f4a3ec23a67eb12 (patch)
tree318d76bc7b603abe3881e497584afbf30427257b /ibus
parented4775b5fec355c1ccb13947d03dcac0aaaeb47f (diff)
downloadibus-1428a361cd3b416c4e4da7839f4a3ec23a67eb12.tar.gz
Use ibus panel icon from the desktop theme instead of ibus-keyboard.
Diffstat (limited to 'ibus')
-rw-r--r--ibus/_config.py.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/ibus/_config.py.in b/ibus/_config.py.in
index 9b83aa8c..a8301363 100644
--- a/ibus/_config.py.in
+++ b/ibus/_config.py.in
@@ -24,6 +24,7 @@ __all__ = (
"get_version",
"get_copyright",
"get_license",
+ "get_ICON_KEYBOARD",
"ISOCODES_PREFIX",
"_"
)
@@ -42,4 +43,12 @@ Copyright (c) 2007-2010 Red Hat, Inc.''')
def get_license():
return 'LGPL'
+def get_ICON_KEYBOARD():
+ import gtk
+ theme = gtk.icon_theme_get_default()
+ icon = '@IBUS_ICON_KEYBOARD@'
+ if not theme.lookup_icon(icon, 18, 0):
+ icon = 'ibus-keyboard'
+ return icon
+
ISOCODES_PREFIX='@ISOCODES_PREFIX@'