summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2012-12-25 15:05:20 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2012-12-25 15:05:20 +0900
commit1c632f884565d30fd3ba9689f93e7582608e6edd (patch)
treeb9a217a4f82f3d289241c917a997e0ec31fda0cf
parent29e42960417d42b1ea6e2fd2c79cda5a68118846 (diff)
downloadibus-anthy-1c632f884565d30fd3ba9689f93e7582608e6edd.tar.gz
Replaced the legacy icon gtk-preferences with preferences-desktop.
-rw-r--r--configure.ac14
-rw-r--r--engine/Makefile.am1
-rw-r--r--engine/_config.py.in2
-rw-r--r--engine/engine.py14
-rw-r--r--setup/Makefile.am1
-rw-r--r--setup/anthyprefs.py.in5
6 files changed, 32 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 5dab38f..19ab982 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,6 +270,19 @@ AC_ARG_WITH(kasumi-icon,
[KASUMI_ICON_FILE="$datadir/pixmaps/kasumi.png"])
AC_SUBST(KASUMI_ICON_FILE)
+dnl - check preference icon name
+# Replaced the legacy icon gtk-preferences with preferences-desktop
+# because the icon is included in gnome-icon-theme-legacy package.
+# The following fix would be needed for old non-GNOME desktops.
+# https://github.com/ibus/ibus/commit/dd6acfa5013b
+# Otherwise you can specify the preference icon for your desktop.
+AC_ARG_WITH(icon-preference,
+ [AC_HELP_STRING([--with-icon-preference=ICON_NAME],
+ [preference icon name.])],
+ [ICON_PREFERENCE="$withval"],
+ [ICON_PREFERENCE='preferences-desktop'])
+AC_SUBST(ICON_PREFERENCE)
+
dnl - check private png
AC_MSG_CHECKING([if you install the private png file])
AC_ARG_ENABLE(private-png,
@@ -419,6 +432,7 @@ PYTHON_LIBS $PYTHON_LIBS
ANTHY_ZIPCODE_FILE $ANTHY_ZIPCODE_FILE
KASUMI_EXEC_FILE $KASUMI_EXEC_FILE
KASUMI_ICON_FILE $KASUMI_ICON_FILE
+ICON_PREFERENCE $ICON_PREFERENCE
HOTKEYS_XML $HOTKEYS_XML
SYMBOL_XML $SYMBOL_XML
LAYOUT_XML $LAYOUT_XML
diff --git a/engine/Makefile.am b/engine/Makefile.am
index 8faf0b9..4ea3f1e 100644
--- a/engine/Makefile.am
+++ b/engine/Makefile.am
@@ -103,6 +103,7 @@ _config.py: _config.py.in
DATADIR=$(datadir); \
LAYOUT=$(LAYOUT); \
SYMBOL_CHAR_INT=$(SYMBOL_CHAR_INT); \
+ ICON_PREFERENCE=$(ICON_PREFERENCE); \
s=`cat $<`; \
eval "echo \"$${s}\""; \
) > $@
diff --git a/engine/_config.py.in b/engine/_config.py.in
index d543829..82c3c85 100644
--- a/engine/_config.py.in
+++ b/engine/_config.py.in
@@ -26,3 +26,5 @@ LIBEXECDIR = '${LIBEXECDIR}'
LOCALEDIR = '${DATADIR}/locale'
LAYOUT = '${LAYOUT}'
SYMBOL_CHAR = unichr(${SYMBOL_CHAR_INT})
+ICON_PREFERENCE = '${ICON_PREFERENCE}'
+DEBUG = False
diff --git a/engine/engine.py b/engine/engine.py
index ed4c117..5ffb232 100644
--- a/engine/engine.py
+++ b/engine/engine.py
@@ -344,7 +344,7 @@ class Engine(IBus.EngineSimple):
self.__set_dict_config_props(anthy_props)
anthy_props.append(IBus.Property(key=u'setup',
label=IBus.Text.new_from_string(_("Preferences - Anthy")),
- icon=u'gtk-preferences',
+ icon=config.ICON_PREFERENCE,
tooltip=IBus.Text.new_from_string(_("Configure Anthy")),
sensitive=True,
visible=True))
@@ -1561,7 +1561,8 @@ class Engine(IBus.EngineSimple):
#=======================================================================
@classmethod
def CONFIG_RELOADED(cls, bus):
- print 'RELOADED'
+ if config.DEBUG:
+ print 'RELOADED'
if not cls.__prefs:
cls.__prefs = AnthyPrefs(bus)
@@ -1571,7 +1572,8 @@ class Engine(IBus.EngineSimple):
@classmethod
def CONFIG_VALUE_CHANGED(cls, bus, section, name, variant):
- print 'VALUE_CHAMGED =', section, name, variant
+ if config.DEBUG:
+ print 'VALUE_CHAMGED =', section, name, variant
if not section.startswith('engine/anthy'):
# This value is used for IBus.config.set_value only.
@@ -1859,7 +1861,8 @@ class Engine(IBus.EngineSimple):
def cmd_exec(keyval, state=0):
key = self._mk_key(keyval, state)
for cmd in self.__keybind.get(key, []):
- print 'cmd =', cmd
+ if config.DEBUG:
+ print 'cmd =', cmd
try:
if getattr(self, cmd)(keyval, state):
return True
@@ -1982,7 +1985,8 @@ class Engine(IBus.EngineSimple):
key = self._mk_key(keyval, state)
for cmd in self.__keybind.get(key, []):
- print 'cmd =', cmd
+ if config.DEBUG:
+ print 'cmd =', cmd
try:
if getattr(self, cmd)(keyval, state):
return True
diff --git a/setup/Makefile.am b/setup/Makefile.am
index 93ff8af..5d1bcdf 100644
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -91,6 +91,7 @@ _config.py: _config.py.in
DATADIR=$(datadir); \
LAYOUT=$(LAYOUT); \
SYMBOL_CHAR_INT=$(SYMBOL_CHAR_INT); \
+ ICON_PREFERENCE=$(ICON_PREFERENCE); \
s=`cat $<`; \
eval "echo \"$${s}\""; \
) > $@
diff --git a/setup/anthyprefs.py.in b/setup/anthyprefs.py.in
index 57d5ae4..eb8af86 100644
--- a/setup/anthyprefs.py.in
+++ b/setup/anthyprefs.py.in
@@ -368,6 +368,11 @@ _config = {
'jp[ctrl:swapcaps]', 'us[ctrl:swapcaps]',
'jp[ctrl:swapcaps,compose:rctrl]',
'us[ctrl:swapcaps,compose:rctrl]',
+ 'jp[japan:kana_lock]',
+ 'jp[japan:nicola_f_bs]',
+ 'jp[japan:nicola_f_bs,ctrl:swapcaps]',
+ 'jp[japan:hztg_escape]',
+ 'jp[japan:hztg_escape,ctrl:swapcaps]',
],
},