diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2012-07-09 15:36:42 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2012-07-09 15:36:42 +0900 |
commit | c2e158ad896f40202927610b87220159da4af84f (patch) | |
tree | f639fd6db6cc97c63e10d9da00af67ea4489302d | |
parent | f129804fe1103fbc89f3322f89bfb4f7ffa6e984 (diff) | |
download | ibus-anthy-c2e158ad896f40202927610b87220159da4af84f.tar.gz |
Added IBUS_VERSION_TEST to make sure the latest ibus is used.
-rw-r--r-- | configure.ac | 63 | ||||
-rw-r--r-- | engine/engine.py | 2 | ||||
-rw-r--r-- | setup/Makefile.am | 2 | ||||
-rw-r--r-- | setup/main.py | 20 | ||||
-rw-r--r-- | setup/setup.ui | 4 |
5 files changed, 59 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac index 5801945..ac4532e 100644 --- a/configure.ac +++ b/configure.ac @@ -163,6 +163,33 @@ fi dnl export $pyexecdir using existent $PYTHON AM_PATH_PYTHON([$IBUS_PYTHON_MIN_VERSION]) +dnl - check the supported ibus version +AC_MSG_CHECKING([if your ibus version is supported]) +IBUS_VERSION_TEST=" +def _ibus_check_version(major, minor, micro): + return (IBus.MAJOR_VERSION > (major) or \ + (IBus.MAJOR_VERSION == (major) and IBus.MINOR_VERSION > (minor)) or \ + (IBus.MAJOR_VERSION == (major) and IBus.MINOR_VERSION == (minor) and \ + IBus.MICRO_VERSION >= (micro))) + +from gi.repository import IBus +retval = _ibus_check_version (ibus_major_version, + ibus_minor_version, + ibus_micro_version) +if not retval: + print 'your ibus version %d.%d.%d is old against %d.%d.%d' \ + % ( IBus.MAJOR_VERSION, IBus.MINOR_VERSION, IBus.MICRO_VERSION, \ + ibus_major_version, ibus_minor_version, ibus_micro_version ) + exit (-1) +exit(0) +" +$PYTHON -c "$IBUS_VERSION_TEST" +if test $? -eq 0; then +AC_MSG_RESULT([yes]) +else +AC_MSG_ERROR([no]) +fi + dnl - engine-env AC_MSG_CHECKING([what are the enviroments for ibus-engine-anthy]) AC_ARG_WITH(engine-env, @@ -332,22 +359,22 @@ AC_OUTPUT echo " IBus-Anthy version ibus_version -GOBJECT2_CFLAGS $GOBJECT2_CFLAGS -GOBJECT2_LIBS $GOBJECT2_LIBS -ANTHY_GOBJECT_LIBDIR $ANTHY_GOBJECT_LIBDIR -ANTHY_GOBJECT_GIRDIR $ANTHY_GOBJECT_GIRDIR -ANTHY_GOBJECT_GIRDIR $ANTHY_GOBJECT_TYPELIBSDIR -LT_VERSION_INFO $LT_VERSION_INFO -ENV_IBUS_ENGINE $ENV_IBUS_ENGINE -HAVE_PYGTK2_ANTHY $enable_pygtk2_anthy -python $PYTHON -python-config $PYTHON_CONFIG -PYTHON_CFLAGS $PYTHON_CFLAGS -PYTHON_LIBS $PYTHON_LIBS -ANTHY_ZIPCODE_FILE $ANTHY_ZIPCODE_FILE -KASUMI_EXEC_FILE $KASUMI_EXEC_FILE -KASUMI_ICON_FILE $KASUMI_ICON_FILE -HOTKEYS_XML $HOTKEYS_XML -SYMBOL_XML $SYMBOL_XML -LAYOUT_XML $LAYOUT_XML +GOBJECT2_CFLAGS $GOBJECT2_CFLAGS +GOBJECT2_LIBS $GOBJECT2_LIBS +ANTHY_GOBJECT_LIBDIR $ANTHY_GOBJECT_LIBDIR +ANTHY_GOBJECT_GIRDIR $ANTHY_GOBJECT_GIRDIR +ANTHY_GOBJECT_TYPELIBSDIR $ANTHY_GOBJECT_TYPELIBSDIR +LT_VERSION_INFO $LT_VERSION_INFO +ENV_IBUS_ENGINE $ENV_IBUS_ENGINE +HAVE_PYGTK2_ANTHY $enable_pygtk2_anthy +python $PYTHON +python-config $PYTHON_CONFIG +PYTHON_CFLAGS $PYTHON_CFLAGS +PYTHON_LIBS $PYTHON_LIBS +ANTHY_ZIPCODE_FILE $ANTHY_ZIPCODE_FILE +KASUMI_EXEC_FILE $KASUMI_EXEC_FILE +KASUMI_ICON_FILE $KASUMI_ICON_FILE +HOTKEYS_XML $HOTKEYS_XML +SYMBOL_XML $SYMBOL_XML +LAYOUT_XML $LAYOUT_XML " diff --git a/engine/engine.py b/engine/engine.py index 59b5a04..bc8bd7e 100644 --- a/engine/engine.py +++ b/engine/engine.py @@ -206,7 +206,7 @@ class Engine(IBus.EngineSimple): props = IBus.PropList() props.append(IBus.Property(key=u'InputMode.Hiragana', prop_type=IBus.PropType.RADIO, - label=IBus.Text.new_from_string(UN(_('Hiragana'))), + label=IBus.Text.new_from_string(UN(_("Hiragana"))), icon=None, tooltip=None, sensitive=True, diff --git a/setup/Makefile.am b/setup/Makefile.am index efd0208..e38a141 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -90,7 +90,7 @@ _config.py: _config.py.in LIBEXECDIR=$(libexecdir); \ DATADIR=$(datadir); \ s=`cat $<`; \ - eval "echo \"$${s}\""; \ + eval "echo \"$${s}\""; \ ) > $@ # Need a time lag between .py and .py.in files to build .py files diff --git a/setup/main.py b/setup/main.py index d85b248..7e08073 100644 --- a/setup/main.py +++ b/setup/main.py @@ -808,11 +808,11 @@ class AnthySetup(object): Gtk.main_quit() return True dlg = self.__builder.get_object('quit_check') - dlg.set_markup('<big><b>%s</b></big>' % _('Confirm')) - dlg.format_secondary_text(_('Are you sure to close Setup?')) + dlg.set_markup('<big><b>%s</b></big>' % _("Confirm")) + dlg.format_secondary_text(_("Are you sure to close Setup?")) id = dlg.run() dlg.hide() - if id == Gtk.ResponseType.OK: + if id == Gtk.ResponseType.YES: self.prefs.commit_all() Gtk.main_quit() return True @@ -823,11 +823,11 @@ class AnthySetup(object): Gtk.main_quit() return True dlg = self.__builder.get_object('quit_check_without_save') - dlg.set_markup('<big><b>%s</b></big>' % _('Notice!')) - dlg.format_secondary_text(_('Are you sure to close Setup without save configure?')) + dlg.set_markup('<big><b>%s</b></big>' % _("Notice!")) + dlg.format_secondary_text(_("Are you sure to close Setup without save configure?")) id = dlg.run() dlg.hide() - if id == Gtk.ResponseType.OK: + if id == Gtk.ResponseType.YES: Gtk.main_quit() return True @@ -1317,8 +1317,8 @@ class AnthySetup(object): def on_button7_clicked(self, widget): dlg = self.__builder.get_object('key_input_dialog') - dlg.set_markup('<big><b>%s</b></big>' % _('Please press a key (or a key combination)')) - dlg.format_secondary_text(_('The dialog will be closed when the key is released')) + dlg.set_markup('<big><b>%s</b></big>' % _("Please press a key (or a key combination)")) + dlg.format_secondary_text(_("The dialog will be closed when the key is released")) id = dlg.run() dlg.hide() if id == Gtk.ResponseType.OK: @@ -1357,8 +1357,8 @@ class AnthySetup(object): s = self.__builder.get_object('entry2').get_text() if not s or not IBus.keyval_from_name(s): dlg = self.__builder.get_object('invalid_keysym') - dlg.set_markup('<big><b>%s</b></big>' % _('Invalid keysym')) - dlg.format_secondary_text(_('This keysym is not valid')) + dlg.set_markup('<big><b>%s</b></big>' % _("Invalid keysym")) + dlg.format_secondary_text(_("This keysym is not valid")) dlg.run() dlg.hide() return True diff --git a/setup/setup.ui b/setup/setup.ui index caeb969..8ea629f 100644 --- a/setup/setup.ui +++ b/setup/setup.ui @@ -2419,7 +2419,7 @@ <property name="type_hint">dialog</property> <property name="skip_taskbar_hint">True</property> <property name="message_type">question</property> - <property name="buttons">ok-cancel</property> + <property name="buttons">yes-no</property> <property name="text">Confirm</property> <property name="secondary_text">Are you sure to close Setup?</property> <child internal-child="vbox"> @@ -2454,7 +2454,7 @@ <property name="type_hint">dialog</property> <property name="skip_taskbar_hint">True</property> <property name="message_type">warning</property> - <property name="buttons">ok-cancel</property> + <property name="buttons">yes-no</property> <property name="text">Notice!</property> <property name="secondary_text">Are you sure to close Setup without save configure?</property> <child internal-child="vbox"> |