diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2010-04-19 10:15:16 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2010-04-19 10:15:16 +0900 |
commit | c7e237e3e3110a5b5d321e31546812e08842e046 (patch) | |
tree | 3d52196f96ca00a2071616785b746d89932ee483 | |
parent | ec9cda8a73caf5dad6a6a0da5d5813fbd8887169 (diff) | |
download | ibus-anthy-c7e237e3e3110a5b5d321e31546812e08842e046.tar.gz |
Fix kasumi icon path to get prefix.
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | engine/engine.py | 13 | ||||
-rw-r--r-- | setup/Makefile.am | 1 | ||||
-rw-r--r-- | setup/anthyprefs.py.in | 1 |
4 files changed, 14 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 906a000..96f0e96 100644 --- a/configure.ac +++ b/configure.ac @@ -115,6 +115,14 @@ AC_ARG_WITH(kasumi-exec, [KASUMI_EXEC_FILE="$bindir/kasumi"]) AC_SUBST(KASUMI_EXEC_FILE) +dnl - check file path of kasumi icon +AC_ARG_WITH(kasumi-icon, + [AC_HELP_STRING([--with-kasumi-icon=FILE], + [file path of kasumi icon])], + [KASUMI_ICON_FILE="$withval"], + [KASUMI_ICON_FILE="$datadir/pixmaps/kasumi.png"]) +AC_SUBST(KASUMI_ICON_FILE) + dnl - define GETTEXT_* variables GETTEXT_PACKAGE=ibus-anthy AC_SUBST(GETTEXT_PACKAGE) diff --git a/engine/engine.py b/engine/engine.py index 8498a0d..f78212b 100644 --- a/engine/engine.py +++ b/engine/engine.py @@ -85,12 +85,6 @@ IMPORTED_EMBEDDED_DICT_DIR = "imported_words_default.d" IMPORTED_EMBEDDED_DICT_PREFIX = "ibus__" IMPORTED_SINGLE_DICT_PREFIX = "imported_words_ibus__" -''' FIXME: currently configuration values are extracted by enviroment values. - It's better to load config.py(.in) in engine and setup instead and - I will move KASUMI_IMG_PATH. -''' -KASUMI_IMG_PATH = "/usr/share/pixmaps/kasumi.png" - KP_Table = {} for s in dir(keysyms): if s.startswith('KP_'): @@ -318,12 +312,13 @@ class Engine(ibus.EngineBase): def __set_dict_config_props(self, anthy_props): admin_command = self.__prefs.get_value('common', 'dict_admin_command') + icon_path = self.__prefs.get_value('common', 'dict_config_icon') + if not path.exists(admin_command[0]): return - - if path.exists(KASUMI_IMG_PATH): + if icon_path and path.exists(icon_path): label = u"" - icon = unicode(KASUMI_IMG_PATH) + icon = unicode(icon_path) else: # Translators: "Dic" means 'dictionary', One kanji may be good. label = UN(_("Dic")) diff --git a/setup/Makefile.am b/setup/Makefile.am index e377e06..7d8acf1 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -57,6 +57,7 @@ EXTRA_DIST = \ anthyprefs.py: anthyprefs.py.in sed -e "s|\@ANTHY_ZIPCODE_FILE\@|$(ANTHY_ZIPCODE_FILE)|g" \ -e "s|\@KASUMI_EXEC_FILE\@|$(KASUMI_EXEC_FILE)|g" \ + -e "s|\@KASUMI_ICON_FILE\@|$(KASUMI_ICON_FILE)|g" \ -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ $< > $@ diff --git a/setup/anthyprefs.py.in b/setup/anthyprefs.py.in index 64dd4d7..65ca0db 100644 --- a/setup/anthyprefs.py.in +++ b/setup/anthyprefs.py.in @@ -171,6 +171,7 @@ _config = { 'dict_admin_command': ['@KASUMI_EXEC_FILE@', 'kasumi'], 'add_word_command': ['@KASUMI_EXEC_FILE@', 'kasumi', '-a'], + 'dict_config_icon': '@KASUMI_ICON_FILE@', }, 'thumb': { |