summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakao Fujiwara <tfujiwar@redhat.com>2010-01-15 12:20:06 +0900
committerTakao Fujiwara <tfujiwar@redhat.com>2010-01-15 12:20:06 +0900
commit2d3be0aa51ce6a5fe116dd3e216aaf0eabdfd58e (patch)
tree0bdaa7f51a1045741fae0a50d7342048e87de5b0
parente21b1fc31da27d27dc8c8b08cef780cf0725b937 (diff)
downloadibus-anthy-2d3be0aa51ce6a5fe116dd3e216aaf0eabdfd58e.tar.gz
Fix icon in ibus-setup-anthy.1.2.0.20100115
-rw-r--r--setup/main.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/setup/main.py b/setup/main.py
index 9105fcb..1da35f7 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -50,6 +50,16 @@ class AnthySetup(object):
glade_file = path.join(path.dirname(__file__), "setup.glade")
self.xml = xml = glade.XML(glade_file)
+ # glade "icon_name" property has a custom scaling and it seems
+ # to be difficult to show the complicated small icon in metacity.
+ # This can add the pixbuf without scaling.
+ anthydir = path.dirname(path.dirname(__file__))
+ if not anthydir:
+ anthydir = "/usr/share/ibus-anthy"
+ icon_path = path.join(anthydir, "icons", "ibus-anthy.png")
+ if path.exists(icon_path):
+ xml.get_widget('main').set_icon_from_file(icon_path)
+
for name in ['input_mode', 'typing_method',
'period_style', 'symbol_style', 'ten_key_mode',
'behavior_on_focus_out', 'behavior_on_period',