summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2012-03-05 14:03:34 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2012-03-05 14:03:34 +0900
commit5ecd67f59c8aa8993dc6eb9afeb66c330b1eb8c8 (patch)
treefc64210b81701f5b8c30608692c01c9c73c39883
parent85e1b094985d6f8f61d324f45cf893c7c63c38b5 (diff)
downloadibus-anthy-5ecd67f59c8aa8993dc6eb9afeb66c330b1eb8c8.tar.gz
Converted pygtk2 to gir gtk3.
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac129
-rw-r--r--engine/Makefile.am46
-rw-r--r--engine/_config.py.in25
-rw-r--r--engine/engine.py1079
-rw-r--r--engine/factory.py55
-rw-r--r--engine/ibus-engine-anthy.in2
-rw-r--r--engine/jastring.py24
-rw-r--r--engine/kana.py38
-rw-r--r--engine/main.py70
-rw-r--r--engine/romaji.py33
-rw-r--r--engine/segment.py32
-rw-r--r--engine/tables.py1146
-rw-r--r--engine/thumb.py161
-rw-r--r--gir/Makefile.am102
-rw-r--r--gir/anthygcontext.c237
-rw-r--r--gir/anthygcontext.h204
-rw-r--r--gir/test.c34
-rw-r--r--gir/test.py18
-rw-r--r--ibus-anthy.spec.in32
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/fr.po693
-rw-r--r--po/ibus-anthy.pot525
-rw-r--r--po/ja.po692
-rw-r--r--po/zh_CN.po528
-rw-r--r--setup/Makefile.am17
l---------setup/_config.py.in1
-rw-r--r--setup/anthyprefs.py.in1045
-rw-r--r--setup/main.py719
-rw-r--r--setup/prefs.py97
-rw-r--r--setup/setup.ui (renamed from setup/setup.glade)1534
31 files changed, 5276 insertions, 4045 deletions
diff --git a/Makefile.am b/Makefile.am
index 658f650..5ef7bfc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,6 +23,7 @@ SUBDIRS = \
m4 \
po \
data \
+ gir \
engine \
icons \
setup \
diff --git a/configure.ac b/configure.ac
index 442d5aa..4e0ac31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,15 +20,20 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl - if not 1, append datestamp to the version number.
-m4_define([ibus_released], [1])
+m4_define([ibus_released], [0])
m4_define([ibus_major_version], [1])
-m4_define([ibus_minor_version], [2])
-m4_define([ibus_micro_version], [7])
+m4_define([ibus_minor_version], [3])
+m4_define([ibus_micro_version], [99])
+m4_define([ibus_abi_current], [4])
+m4_define([ibus_abi_revision],
+ [m4_eval(100 * ibus_minor_version + ibus_micro_version)])
+m4_define([ibus_abi_age], [0])
m4_define(ibus_maybe_datestamp,
m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
m4_define([ibus_version],
ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp)
+m4_define([glib_required_version], [2.26.0])
AC_INIT([ibus-anthy], [ibus_version], [http://code.google.com/p/ibus/issues/entry],[ibus-anthy])
AM_INIT_AUTOMAKE([1.10])
@@ -70,12 +75,36 @@ NTH_HALFKANA_CANDIDATE],,
AC_MSG_ERROR([Could not find NTH_*_CANDIDATE values in anthy.h]),
[[#include <anthy/anthy.h>]])
-dnl - check swig
-AC_PATH_PROG(SWIG, swig)
-if test x"$SWIG" = x""; then
- AC_MSG_ERROR([can not find swig])
-fi
-AC_SUBST(SWIG)
+PKG_CHECK_MODULES(GOBJECT2, [
+ gobject-2.0 >= glib_required_version
+])
+
+dnl - GObject introspection
+GOBJECT_INTROSPECTION_CHECK([0.6.8])
+
+dnl - check libanthy directory
+AC_ARG_WITH(anthygobject-libdir,
+ [AC_HELP_STRING([--with-anthygobject-libdir=PATH],
+ [file path of libanthygobject.so])],
+ [ANTHY_GOBJECT_LIBDIR="$withval"],
+ [ANTHY_GOBJECT_LIBDIR='$(libdir)'])
+AC_SUBST(ANTHY_GOBJECT_LIBDIR)
+
+dnl - check anthygir directory
+AC_ARG_WITH(anthygoject-girdir,
+ [AC_HELP_STRING([--with-anthygobject-girdir=PATH],
+ [file path of anthy.gir])],
+ [ANTHY_GOBJECT_GIRDIR="$withval"],
+ [ANTHY_GOBJECT_GIRDIR='$(datadir)/gir-1.0'])
+AC_SUBST(ANTHY_GOBJECT_GIRDIR)
+
+dnl - check anthygir directory
+AC_ARG_WITH(anthygobject-typelibsdir,
+ [AC_HELP_STRING([--with-anthygobject-typelibsdir=PATH],
+ [file path of anthy.typelibs])],
+ [ANTHY_GOBJECT_TYPELIBSDIR="$withval"],
+ [ANTHY_GOBJECT_TYPELIBSDIR='$(libdir)/girepository-1.0'])
+AC_SUBST(ANTHY_GOBJECT_TYPELIBSDIR)
dnl - check env
AC_PATH_PROG(ENV_IBUS_TEST, env)
@@ -84,19 +113,58 @@ AC_SUBST(ENV_IBUS_TEST)
dnl - check python
AM_PATH_PYTHON([2.5])
-AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
-if test x"$PYTHON_CONFIG" = x""; then
- AC_PATH_PROG(PYTHON_CONFIG, python-config)
+dnl - engine-env
+AC_MSG_CHECKING([what are the enviroments for ibus-engine-anthy])
+AC_ARG_WITH(engine-env,
+ [AC_HELP_STRING([--engine-env=ENVIRONMENTS],
+ [ibus-engine-anthy environments likes
+ "LD_LIBRARY_PATH=/usr/lib/anthy" for libanthy.so.
+ default is none])],
+ [engine_env="$withval"],
+ [engine_env='none'])
+AC_MSG_RESULT($engine_env)
+ENV_IBUS_ENGINE=""
+if test x"$engine_env" != xnone; then
+ ENV_IBUS_ENGINE="$ENV_IBUS_TEST $engine_env"
fi
-if test x"$PYTHON_CONFIG" != x""; then
- PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
- PYTHON_LIBS=`$PYTHON_CONFIG --libs`
+AC_SUBST(ENV_IBUS_ENGINE)
+
+dnl - check pygtk2
+AC_MSG_CHECKING([whether you enable pygtk2 anthy])
+AC_ARG_ENABLE(pygtk2-anthy,
+ AS_HELP_STRING([--enable-pygtk2-anthy=no/yes],
+ [Install pygtk2 anthy default=no]),
+ enable_pygtk2_anthy=yes,
+ enable_pygtk2_anthy=no)
+AC_MSG_RESULT($enable_pygtk2_anthy)
+
+if test x"$enable_pygtk2_anthy" = xyes; then
+ AM_CONDITIONAL(HAVE_PYGTK2_ANTHY, true)
+
+ dnl - check swig
+ AC_PATH_PROG(SWIG, swig)
+ if test x"$SWIG" = x""; then
+ AC_MSG_ERROR([can not find swig])
+ fi
+ AC_SUBST(SWIG)
+
+ AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
+ if test x"$PYTHON_CONFIG" = x""; then
+ AC_PATH_PROG(PYTHON_CONFIG, python-config)
+ fi
+ if test x"$PYTHON_CONFIG" != x""; then
+ PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
+ PYTHON_LIBS=`$PYTHON_CONFIG --libs`
+ else
+ PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
+ PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
+ fi
+ AC_SUBST(PYTHON_CFLAGS)
+ AC_SUBST(PYTHON_LIBS)
else
- PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
- PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
+ AM_CONDITIONAL(HAVE_PYGTK2_ANTHY, false)
fi
-AC_SUBST(PYTHON_CFLAGS)
-AC_SUBST(PYTHON_LIBS)
+
dnl - check file path of Anthy zipcode.t
AC_ARG_WITH(anthy-zipcode,
@@ -169,6 +237,20 @@ else
fi
AC_SUBST(LAYOUT_XML)
+dnl libtool versioning
+dnl
+dnl If LT_VERSION_INFO="lt_current:lt_revision:lt_age", libibus is
+dnl libibus-ibus_api_version.so.(lt_current - lt_age).lt_age.lt_revision
+dnl If the abi is changed, but it is compatible with last version,
+dnl ibus_abi_current++, ibus_abi_age++;
+dnl If the abi is not compatible with last version,
+dnl ibus_abi_current++, ibus_abi_age = 0;
+m4_define([lt_current], [ibus_abi_current])
+m4_define([lt_revision], [ibus_abi_revision])
+m4_define([lt_age], [ibus_abi_age])
+LT_VERSION_INFO="lt_current:lt_revision:lt_age"
+AC_SUBST(LT_VERSION_INFO)
+
dnl - define GETTEXT_* variables
GETTEXT_PACKAGE=ibus-anthy
AC_SUBST(GETTEXT_PACKAGE)
@@ -183,6 +265,7 @@ AC_CONFIG_FILES([ po/Makefile.in
Makefile
ibus-anthy.spec
data/Makefile
+gir/Makefile
engine/Makefile
engine/ibus-engine-anthy
engine/anthy.xml.in
@@ -196,6 +279,14 @@ 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-config: $PYTHON_CONFIG
PYTHON_CFLAGS $PYTHON_CFLAGS
PYTHON_LIBS $PYTHON_LIBS
diff --git a/engine/Makefile.am b/engine/Makefile.am
index 7171f90..263bc31 100644
--- a/engine/Makefile.am
+++ b/engine/Makefile.am
@@ -19,7 +19,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+BUILT_SOURCES = _config.py
+
engine_anthy_PYTHON = \
+ _config.py \
engine.py \
factory.py \
jastring.py \
@@ -31,6 +34,12 @@ engine_anthy_PYTHON = \
thumb.py \
$(NULL)
engine_anthydir = $(pkgdatadir)/engine
+engine_anthy_built_files = $(BUILT_SOURCES)
+engine_anthy_built_in_files = $(addsuffix .in, $(engine_anthy_built_files))
+
+if HAVE_PYGTK2_ANTHY
+PYGTK2_ANTHY_RAW = anthy.i
+PYGTK2_ANTHY_GEN = anthy.py anthy_wrap.c
anthy_DATA = \
anthy.py \
@@ -57,13 +66,17 @@ _anthy_la_LDFLAGS = \
-module \
$(NULL)
+anthy.py anthy_wrap.c: anthy.i
+ $(SWIG) -python $(ANTHY_CFLAGS) -I/usr/include -o anthy_wrap.c $(srcdir)/anthy.i
+else
+PYGTK2_ANTHY_RAW =
+PYGTK2_ANTHY_GEN =
+endif
+
libexec_SCRIPTS = ibus-engine-anthy
engine_DATA = anthy.xml
enginedir = $(datadir)/ibus/component
-anthy.py anthy_wrap.c: anthy.i
- $(SWIG) -python $(ANTHY_CFLAGS) -I/usr/include -o anthy_wrap.c $(srcdir)/anthy.i
-
anthy.xml: anthy.xml.in
( \
libexecdir=${libexecdir}; \
@@ -72,6 +85,15 @@ anthy.xml: anthy.xml.in
eval "echo \"$${s}\""; \
) > $@
+_config.py: _config.py.in
+ ( \
+ PKGDATADIR=$(pkgdatadir); \
+ LIBEXECDIR=$(libexecdir); \
+ DATADIR=$(datadir); \
+ s=`cat $<`; \
+ eval "echo \"$${s}\""; \
+ ) > $@
+
test:
$(ENV_IBUS_TEST) \
DBUS_DEBUG=true \
@@ -81,17 +103,29 @@ test:
$(srcdir)/main.py
EXTRA_DIST = \
- anthy.i \
+ $(engine_anthy_built_in_files) \
+ $(PYGTK2_ANTHY_RAW) \
anthy.xml.in.in \
ibus-engine-anthy.in \
$(NULL)
CLEANFILES = \
+ $(BUILT_SOURCES) \
+ $(PYGTK2_ANTHY_GEN) \
anthy.xml \
- anthy.py \
- anthy_wrap.* \
*.pyc \
$(NULL)
DISTCLEANFILES = \
$(NULL)
+
+# Need a time lag between .py and .py.in files to build .py files
+# because *_PYTHON valuables are installed in the tarball.
+dist-hook:
+ @sleep 1; \
+ for in_file in $(engine_anthy_built_in_files) ; do \
+ if [ -f $(distdir)/$(srcdir)/$$in_file ] ; then \
+ touch $(distdir)/$(srcdir)/$$in_file; \
+ fi; \
+ done;
+
diff --git a/engine/_config.py.in b/engine/_config.py.in
new file mode 100644
index 0000000..18081d8
--- /dev/null
+++ b/engine/_config.py.in
@@ -0,0 +1,25 @@
+# vim:set et sts=4 sw=4:
+# -*- coding: utf-8 -*-
+#
+# ibus-anthy - The Anthy engine for IBus
+#
+# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
+# Copyright (c) 2007-2011 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+PKGDATADIR = '${PKGDATADIR}'
+LIBEXECDIR = '${LIBEXECDIR}'
+LOCALEDIR= '${DATADIR}/locale'
diff --git a/engine/engine.py b/engine/engine.py
index 19fbcfe..14f230d 100644
--- a/engine/engine.py
+++ b/engine/engine.py
@@ -24,36 +24,39 @@ import os
from os import environ, path
import signal
import sys
-import gobject
-import ibus
-import anthy
-from anthy import NTH_UNCONVERTED_CANDIDATE
-from anthy import NTH_KATAKANA_CANDIDATE
-from anthy import NTH_HIRAGANA_CANDIDATE
-from anthy import NTH_HALFKANA_CANDIDATE
-from tables import *
-from ibus import keysyms
-from ibus import modifier
-import jastring
-from segment import unichar_half_to_full
+from gettext import dgettext
try:
from locale import getpreferredencoding
except:
pass
+from gi.repository import GObject
+from gi.repository import IBus
+
try:
- from gtk import clipboard_get
+ from gi.repository import Gtk
+ clipboard_get = Gtk.Clipboard.get
except ImportError:
clipboard_get = lambda a : None
-sys.path.append(path.join(os.getenv('IBUS_ANTHY_PKGDATADIR'), 'setup'))
+from gi.repository import Anthy
+NTH_UNCONVERTED_CANDIDATE = Anthy.NTH_UNCONVERTED_CANDIDATE
+NTH_KATAKANA_CANDIDATE = Anthy.NTH_KATAKANA_CANDIDATE
+NTH_HIRAGANA_CANDIDATE = Anthy.NTH_HIRAGANA_CANDIDATE
+NTH_HALFKANA_CANDIDATE = Anthy.NTH_HALFKANA_CANDIDATE
+
+import _config as config
+from tables import *
+import jastring
+from segment import unichar_half_to_full
+
+sys.path.append(path.join(config.PKGDATADIR, 'setup'))
from anthyprefs import AnthyPrefs
-from gettext import dgettext
-_ = lambda a : dgettext("ibus-anthy", a)
+_ = lambda a : dgettext('ibus-anthy', a)
N_ = lambda a : a
-UN = lambda a : unicode(a)
+UN = lambda a : unicode(a, 'utf-8')
INPUT_MODE_HIRAGANA, \
INPUT_MODE_KATAKANA, \
@@ -85,23 +88,25 @@ CLIPBOARD_RECONVERT = range(1)
LINK_DICT_EMBEDDED, \
LINK_DICT_SINGLE = range(2)
-IMPORTED_EMBEDDED_DICT_DIR = "imported_words_default.d"
-IMPORTED_EMBEDDED_DICT_PREFIX = "ibus__"
-IMPORTED_SINGLE_DICT_PREFIX = "imported_words_ibus__"
+IMPORTED_EMBEDDED_DICT_DIR = 'imported_words_default.d'
+IMPORTED_EMBEDDED_DICT_PREFIX = 'ibus__'
+IMPORTED_SINGLE_DICT_PREFIX = 'imported_words_ibus__'
KP_Table = {}
-for s in dir(keysyms):
- if s.startswith('KP_'):
- v = keysyms.name_to_keycode(s[3:])
+for s in dir(IBus):
+ if s.startswith('KEY_KP_'):
+ v = IBus.keyval_from_name(s[7:])
if v:
- KP_Table[keysyms.name_to_keycode(s)] = v
-for k, v in zip(['KP_Add', 'KP_Decimal', 'KP_Divide', 'KP_Enter', 'KP_Equal',
- 'KP_Multiply', 'KP_Separator', 'KP_Space', 'KP_Subtract'],
- ['plus', 'period', 'slash', 'Return', 'equal',
- 'asterisk', 'comma', 'space', 'minus']):
- KP_Table[keysyms.__getattribute__(k)] = keysyms.__getattribute__(v)
-
-class Engine(ibus.EngineBase):
+ KP_Table[IBus.keyval_from_name(s[4:])] = v
+for k, v in zip(['KEY_KP_Add', 'KEY_KP_Decimal', 'KEY_KP_Divide', 'KEY_KP_Enter',
+ 'KEY_KP_Equal', 'KEY_KP_Multiply', 'KEY_KP_Separator',
+ 'KEY_KP_Space', 'KEY_KP_Subtract'],
+ ['KEY_plus', 'KEY_period', 'KEY_slash', 'KEY_Return',
+ 'KEY_equal', 'KEY_asterisk', 'KEY_comma',
+ 'KEY_space', 'KEY_minus']):
+ KP_Table[getattr(IBus, k)] = getattr(IBus, v)
+
+class Engine(IBus.EngineSimple):
__typing_mode = jastring.TYPING_MODE_ROMAJI
__setup_pid = 0
@@ -110,11 +115,12 @@ class Engine(ibus.EngineBase):
__thumb = None
def __init__(self, bus, object_path):
- super(Engine, self).__init__(bus, object_path)
+ super(Engine, self).__init__(connection=bus.get_connection(),
+ object_path=object_path)
# create anthy context
- self.__context = anthy.anthy_context()
- self.__context._set_encoding(anthy.ANTHY_UTF8_ENCODING)
+ self.__context = Anthy.GContext()
+ self.__context.set_encoding(Anthy.UTF8_ENCODING)
# init state
self.__idle_id = 0
@@ -123,57 +129,54 @@ class Engine(ibus.EngineBase):
self.__dict_mode = 0
self.__prop_dict = {}
try:
- self.__is_utf8 = (getpreferredencoding().lower() == "utf-8")
+ self.__is_utf8 = (getpreferredencoding().lower() == 'utf-8')
except:
self.__is_utf8 = False
- self.__ibus_version = 0
+ self.__ibus_version = 0.0
-# self.__lookup_table = ibus.LookupTable(page_size=9, round=True)
+# self.__lookup_table = ibus.LookupTable.new(page_size=9,
+# cursor_pos=0,
+# cursor_visible=True,
+# round=True)
size = self.__prefs.get_value('common', 'page_size')
- self.__lookup_table = ibus.LookupTable(page_size=size, round=True)
+ self.__lookup_table = IBus.LookupTable.new(page_size=size,
+ cursor_pos=0,
+ cursor_visible=True,
+ round=True)
self.__prop_list = self.__init_props()
mode = self.__prefs.get_value('common', 'input_mode')
mode = 'InputMode.' + ['Hiragana', 'Katakana', 'HalfWidthKatakana',
'Latin', 'WideLatin'][mode]
- self.__input_mode_activate(mode, ibus.PROP_STATE_CHECKED)
+ self.__input_mode_activate(mode, IBus.PropState.CHECKED)
mode = self.__prefs.get_value('common', 'typing_method')
mode = 'TypingMode.' + ['Romaji', 'Kana', 'ThumbShift'][mode]
- self.__typing_mode_activate(mode, ibus.PROP_STATE_CHECKED)
+ self.__typing_mode_activate(mode, IBus.PropState.CHECKED)
mode = self.__prefs.get_value('common', 'conversion_segment_mode')
mode = 'SegmentMode.' + ['Multi', 'Single',
'ImmediateMulti', 'ImmediateSingle'][mode]
- self.__segment_mode_activate(mode, ibus.PROP_STATE_CHECKED)
-
- self.__init_ibus_version()
+ self.__segment_mode_activate(mode, IBus.PropState.CHECKED)
# use reset to init values
self.__reset()
- def __init_ibus_version(self):
- version_str = ibus.get_version()
- if version_str == None:
- return
- versions = version_str.split('.')
- if len(versions) < 3:
- print >> sys.stderr, \
- "ibus.get_version returns incorrect str \"" + \
- version_str + "\""
- return
- version_str = "%03d%03d%03d" % \
- (int(versions[0]), int(versions[1]), int(versions[2]))
- self.__ibus_version = long(version_str)
+ def __get_ibus_version(self):
+ if self.__ibus_version == 0.0:
+ self.__ibus_version = \
+ IBus.MAJOR_VERSION + IBus.MINOR_VERSION / 1000.0 + \
+ IBus.MICRO_VERSION / 1000000.0
+ return self.__ibus_version
# reset values of engine
def __reset(self):
self.__preedit_ja_string = jastring.JaString(Engine.__typing_mode)
- self.__convert_chars = u""
+ self.__convert_chars = u''
self.__cursor_pos = 0
self.__convert_mode = CONV_MODE_OFF
self.__segments = list()
- self.__lookup_table.clean()
+ self.__lookup_table.clear()
self.__lookup_table_visible = False
self._MM = 0
self._SS = 0
@@ -181,65 +184,129 @@ class Engine(ibus.EngineBase):
self._RMM = 0
self._RSS = 0
if self.__idle_id != 0:
- gobject.source_remove(self.__idle_id)
+ GObject.source_remove(self.__idle_id)
self.__idle_id = 0
def __init_props(self):
- anthy_props = ibus.PropList()
+ anthy_props = IBus.PropList()
# init input mode properties
- input_mode_prop = ibus.Property(key=u"InputMode",
- type=ibus.PROP_TYPE_MENU,
- label=u"あ",
- tooltip=UN(_("Switch input mode")))
- self.__prop_dict[u"InputMode"] = input_mode_prop
-
- props = ibus.PropList()
- props.append(ibus.Property(key=u"InputMode.Hiragana",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Hiragana"))))
- props.append(ibus.Property(key=u"InputMode.Katakana",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Katakana"))))
- props.append(ibus.Property(key=u"InputMode.HalfWidthKatakana",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Half width katakana"))))
- props.append(ibus.Property(key=u"InputMode.Latin",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Latin"))))
- props.append(ibus.Property(key=u"InputMode.WideLatin",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Wide Latin"))))
-
- props[self.__input_mode].set_state(ibus.PROP_STATE_CHECKED)
-
- for prop in props:
- self.__prop_dict[prop.key] = prop
+ input_mode_prop = IBus.Property(key=u'InputMode',
+ prop_type=IBus.PropType.MENU,
+ label=IBus.Text.new_from_string(u'あ'),
+ icon='',
+ tooltip=IBus.Text.new_from_string(UN(_("Switch input mode"))),
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None)
+ self.__prop_dict[u'InputMode'] = input_mode_prop
+
+ props = IBus.PropList()
+ props.append(IBus.Property(key=u'InputMode.Hiragana',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_('Hiragana'))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'InputMode.Katakana',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Katakana"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'InputMode.HalfWidthKatakana',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Half width katakana"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'InputMode.Latin',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Latin"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'InputMode.WideLatin',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Wide Latin"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+
+ props.get(self.__input_mode).set_state(IBus.PropState.CHECKED)
+
+ i = 0
+ while props.get(i) != None:
+ prop = props.get(i)
+ self.__prop_dict[prop.props.key] = prop
+ i += 1
input_mode_prop.set_sub_props(props)
anthy_props.append(input_mode_prop)
# typing input mode properties
- typing_mode_prop = ibus.Property(key=u"TypingMode",
- type=ibus.PROP_TYPE_MENU,
- label=u"R",
- tooltip=UN(_("Switch typing mode")))
- self.__prop_dict[u"TypingMode"] = typing_mode_prop
-
- props = ibus.PropList()
- props.append(ibus.Property(key=u"TypingMode.Romaji",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Romaji"))))
- props.append(ibus.Property(key=u"TypingMode.Kana",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Kana"))))
- props.append(ibus.Property(key=u"TypingMode.ThumbShift",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Thumb shift"))))
- props[Engine.__typing_mode].set_state(ibus.PROP_STATE_CHECKED)
-
- for prop in props:
- self.__prop_dict[prop.key] = prop
+ typing_mode_prop = IBus.Property(key=u'TypingMode',
+ prop_type=IBus.PropType.MENU,
+ label=IBus.Text.new_from_string(u'R'),
+ icon='',
+ tooltip=IBus.Text.new_from_string(UN(_("Switch typing mode"))),
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None)
+ self.__prop_dict[u'TypingMode'] = typing_mode_prop
+
+ props = IBus.PropList()
+ props.append(IBus.Property(key=u'TypingMode.Romaji',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Romaji"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'TypingMode.Kana',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Kana"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'TypingMode.ThumbShift',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Thumb shift"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.get(Engine.__typing_mode).set_state(IBus.PropState.CHECKED)
+
+ i = 0
+ while props.get(i) != None:
+ prop = props.get(i)
+ self.__prop_dict[prop.props.key] = prop
+ i += 1
typing_mode_prop.set_sub_props(props)
anthy_props.append(typing_mode_prop)
@@ -247,10 +314,10 @@ class Engine(ibus.EngineBase):
self.__set_segment_mode_props(anthy_props)
self.__set_dict_mode_props(anthy_props)
self.__set_dict_config_props(anthy_props)
- anthy_props.append(ibus.Property(key=u"setup",
- label=UN(_("Preferences - Anthy")),
- icon=u"gtk-preferences",
- tooltip=UN(_("Configure Anthy"))))
+ anthy_props.append(IBus.Property(key=u'setup',
+ label=IBus.Text.new_from_string(UN(_("Preferences - Anthy"))),
+ icon=u'gtk-preferences',
+ tooltip=IBus.Text.new_from_string(UN(_("Configure Anthy")))))
return anthy_props
@@ -267,29 +334,61 @@ class Engine(ibus.EngineBase):
os.kill(os.getpid(), signum)
def __set_segment_mode_props(self, anthy_props):
- segment_mode_prop = ibus.Property(key=u"SegmentMode",
- type=ibus.PROP_TYPE_MENU,
- label=u"連",
- tooltip=UN(_("Switch conversion mode")))
- self.__prop_dict[u"SegmentMode"] = segment_mode_prop
-
- props = ibus.PropList()
- props.append(ibus.Property(key=u"SegmentMode.Multi",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Multiple segment"))))
- props.append(ibus.Property(key=u"SegmentMode.Single",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Single segment"))))
- props.append(ibus.Property(key=u"SegmentMode.ImmediateMulti",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Immediate conversion (Multiple segment)"))))
- props.append(ibus.Property(key=u"SegmentMode.ImmediateSingle",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_("Immediate conversion (Single segment)"))))
- props[self.__segment_mode].set_state(ibus.PROP_STATE_CHECKED)
-
- for prop in props:
- self.__prop_dict[prop.key] = prop
+ segment_mode_prop = IBus.Property(key=u'SegmentMode',
+ prop_type=IBus.PropType.MENU,
+ label=IBus.Text.new_from_string(u'連'),
+ icon=None,
+ tooltip=IBus.Text.new_from_string(UN(_("Switch conversion mode"))),
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None)
+ self.__prop_dict[u'SegmentMode'] = segment_mode_prop
+
+ props = IBus.PropList()
+ props.append(IBus.Property(key=u'SegmentMode.Multi',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Multiple segment"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'SegmentMode.Single',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Single segment"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'SegmentMode.ImmediateMulti',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Immediate conversion (Multiple segment)"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'SegmentMode.ImmediateSingle',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_("Immediate conversion (Single segment)"))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.get(self.__segment_mode).set_state(IBus.PropState.CHECKED)
+
+ i = 0
+ while props.get(i) != None:
+ prop = props.get(i)
+ self.__prop_dict[prop.props.key] = prop
+ i += 1
segment_mode_prop.set_sub_props(props)
anthy_props.append(segment_mode_prop)
@@ -297,19 +396,29 @@ class Engine(ibus.EngineBase):
def __set_dict_mode_props(self, anthy_props):
short_label = self.__prefs.get_value('dict/file/embedded',
'short_label')
- dict_mode_prop = ibus.Property(key=u"DictMode",
- type=ibus.PROP_TYPE_MENU,
- label=UN(short_label),
- tooltip=UN(_("Switch Dictionary")))
- self.__prop_dict[u"DictMode"] = dict_mode_prop
- props = ibus.PropList()
+ dict_mode_prop = IBus.Property(key=u'DictMode',
+ prop_type=IBus.PropType.MENU,
+ label=IBus.Text.new_from_string(UN(short_label)),
+ icon=None,
+ tooltip=IBus.Text.new_from_string(UN(_("Switch Dictionary"))),
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None)
+ self.__prop_dict[u'DictMode'] = dict_mode_prop
+ props = IBus.PropList()
long_label = self.__prefs.get_value('dict/file/embedded',
'long_label')
- props.append(ibus.Property(key=u"DictMode.embedded",
- type=ibus.PROP_TYPE_RADIO,
- label=UN(_(long_label))))
-
+ props.append(IBus.Property(key=u'DictMode.embedded',
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(UN(_(long_label))),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
for file in self.__prefs.get_value('dict', 'files'):
self._link_dict_file(file)
id = self._get_dict_id_from_file(file)
@@ -318,20 +427,31 @@ class Engine(ibus.EngineBase):
section = 'dict/file/' + id
if not self.__prefs.get_value(section, 'single'):
continue
- key = "DictMode." + id
+ key = 'DictMode.' + id
long_label = self.__prefs.get_value(section, 'long_label')
if 'is_system' in self.__prefs.keys(section) and \
self.__prefs.get_value(section, 'is_system'):
uni_long_label = UN(_(long_label))
else:
uni_long_label = UN(long_label)
- props.append(ibus.Property(key=UN(key),
- type=ibus.PROP_TYPE_RADIO,
- label=uni_long_label))
+ props.append(IBus.Property(key=UN(key),
+ prop_type=IBus.PropType.RADIO,
+ label=IBus.Text.new_from_string(uni_long_label),
+ icon=None,
+ tooltip=None,
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+
+ props.get(self.__dict_mode).set_state(IBus.PropState.CHECKED)
+
+ i = 0
+ while props.get(i) != None:
+ prop = props.get(i)
+ self.__prop_dict[prop.props.key] = prop
+ i += 1
- props[self.__dict_mode].set_state(ibus.PROP_STATE_CHECKED)
- for prop in props:
- self.__prop_dict[prop.key] = prop
dict_mode_prop.set_sub_props(props)
anthy_props.append(dict_mode_prop)
self.__init_signal()
@@ -344,29 +464,48 @@ class Engine(ibus.EngineBase):
return
label = UN(_("Dictionary - Anthy"))
if icon_path and path.exists(icon_path):
- icon = unicode(icon_path)
+ icon = UN(icon_path)
else:
# Translators: "Dic" means 'dictionary', One kanji may be good.
label = UN(_("Dic"))
- icon = u""
+ icon = u''
- dict_prop = ibus.Property(key=u"setup-dict-kasumi",
- type=ibus.PROP_TYPE_MENU,
- label=label,
+ dict_prop = IBus.Property(key=u'setup-dict-kasumi',
+ prop_type=IBus.PropType.MENU,
+ label=IBus.Text.new_from_string(label),
icon=icon,
- tooltip=UN(_("Configure dictionaries")))
-
- props = ibus.PropList()
- props.append(ibus.Property(key=u"setup-dict-kasumi-admin",
- type=ibus.PROP_TYPE_NORMAL,
- label=UN(_("Edit dictionaries")),
+ tooltip=IBus.Text.new_from_string(UN(_("Configure dictionaries"))),
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None)
+ self.__prop_dict[u'setup-dict-kasumi'] = dict_prop
+
+ props = IBus.PropList()
+ props.append(IBus.Property(key=u'setup-dict-kasumi-admin',
+ prop_type=IBus.PropType.NORMAL,
+ label=IBus.Text.new_from_string(UN(_("Edit dictionaries"))),
icon=icon,
- tooltip=UN(_("Launch the dictionary tool"))))
- props.append(ibus.Property(key=u"setup-dict-kasumi-word",
- type=ibus.PROP_TYPE_NORMAL,
- label=UN(_("Add words")),
+ tooltip=IBus.Text.new_from_string(UN(_("Launch the dictionary tool"))),
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+ props.append(IBus.Property(key=u'setup-dict-kasumi-word',
+ prop_type=IBus.PropType.NORMAL,
+ label=IBus.Text.new_from_string(UN(_("Add words"))),
icon=icon,
- tooltip=UN(_("Add words in the dictionary"))))
+ tooltip=IBus.Text.new_from_string(UN(_("Add words in the dictionary"))),
+ sensitive=True,
+ visible=True,
+ state=IBus.PropState.UNCHECKED,
+ sub_props=None))
+
+ i = 0
+ while props.get(i) != None:
+ prop = props.get(i)
+ self.__prop_dict[prop.props.key] = prop
+ i += 1
dict_prop.set_sub_props(props)
anthy_props.append(dict_prop)
@@ -396,19 +535,37 @@ class Engine(ibus.EngineBase):
self._remove_dict_file(file)
def update_preedit(self, string, attrs, cursor_pos, visible):
+ text = IBus.Text.new_from_string(string)
+ i = 0
+ while attrs.get(i) != None:
+ attr = attrs.get(i)
+ text.append_attribute(attr.get_attr_type(),
+ attr.get_value(),
+ attr.get_start_index(),
+ attr.get_end_index())
+ i += 1
mode = self.__prefs.get_value('common', 'behavior_on_focus_out')
- if self.__ibus_version >= 1003000 and mode == 1:
- self.update_preedit_text(ibus.Text(string, attrs),
- cursor_pos, visible,
- ibus.common.IBUS_ENGINE_PREEDIT_COMMIT)
+ if self.__get_ibus_version() >= 1.003 and mode == 1:
+ self.update_preedit_text_with_mode(text,
+ cursor_pos, visible,
+ IBus.PreeditFocusMode.COMMIT)
else:
- self.update_preedit_text(ibus.Text(string, attrs),
+ self.update_preedit_text(text,
cursor_pos, visible)
def update_aux_string(self, string, attrs, visible):
- self.update_auxiliary_text(ibus.Text(string, attrs), visible)
-
- def page_up(self):
+ text = IBus.Text.new_from_string(string)
+ i = 0
+ while attrs.get(i) != None:
+ attr = attrs.get(i)
+ text.append_attribute(attr.get_attr_type(),
+ attr.get_value(),
+ attr.get_start_index(),
+ attr.get_end_index())
+ i += 1
+ self.update_auxiliary_text(text, visible)
+
+ def do_page_up(self):
# only process cursor down in convert mode
if self.__convert_mode != CONV_MODE_ANTHY:
return False
@@ -416,13 +573,13 @@ class Engine(ibus.EngineBase):
if not self.__lookup_table.page_up():
return False
- candidate = self.__lookup_table.get_current_candidate().text
index = self.__lookup_table.get_cursor_pos()
+ candidate = UN(self.__lookup_table.get_candidate(index).get_text())
self.__segments[self.__cursor_pos] = index, candidate
self.__invalidate()
return True
- def page_down(self):
+ def do_page_down(self):
# only process cursor down in convert mode
if self.__convert_mode != CONV_MODE_ANTHY:
return False
@@ -430,13 +587,13 @@ class Engine(ibus.EngineBase):
if not self.__lookup_table.page_down():
return False
- candidate = self.__lookup_table.get_current_candidate().text
index = self.__lookup_table.get_cursor_pos()
+ candidate = UN(self.__lookup_table.get_candidate(index).get_text())
self.__segments[self.__cursor_pos] = index, candidate
self.__invalidate()
return True
- def cursor_up(self):
+ def do_cursor_up(self):
# only process cursor down in convert mode
# if self.__convert_mode != CONV_MODE_ANTHY:
if self.__convert_mode != CONV_MODE_ANTHY and self.__convert_mode != CONV_MODE_PREDICTION:
@@ -445,13 +602,13 @@ class Engine(ibus.EngineBase):
if not self.__lookup_table.cursor_up():
return False
- candidate = self.__lookup_table.get_current_candidate().text
index = self.__lookup_table.get_cursor_pos()
+ candidate = UN(self.__lookup_table.get_candidate(index).get_text())
self.__segments[self.__cursor_pos] = index, candidate
self.__invalidate()
return True
- def cursor_down(self):
+ def do_cursor_down(self):
# only process cursor down in convert mode
# if self.__convert_mode != CONV_MODE_ANTHY:
if self.__convert_mode != CONV_MODE_ANTHY and self.__convert_mode != CONV_MODE_PREDICTION:
@@ -460,139 +617,60 @@ class Engine(ibus.EngineBase):
if not self.__lookup_table.cursor_down():
return False
- candidate = self.__lookup_table.get_current_candidate().text
index = self.__lookup_table.get_cursor_pos()
+ candidate = UN(self.__lookup_table.get_candidate(index).get_text())
self.__segments[self.__cursor_pos] = index, candidate
self.__invalidate()
return True
- def candidate_clicked(self, index, button, state):
+ def do_candidate_clicked(self, index, button, state):
if index == 9:
- keyval = keysyms._0
+ keyval = IBus.KEY_0
else:
- keyval = keysyms._1 + index
+ keyval = IBus.KEY_1 + index
self.__on_key_number(keyval)
def __commit_string(self, text):
self.__reset()
- self.commit_text(ibus.Text(text))
+ self.commit_text(IBus.Text.new_from_string(text))
self.__invalidate()
def __shrink_segment(self, relative_size):
self.__context.resize_segment(self.__cursor_pos, relative_size)
- conv_stat = anthy.anthy_conv_stat()
- self.__context.get_stat(conv_stat)
+ nr_segments = self.__context.get_nr_segments()
del self.__segments[self.__cursor_pos:]
- for i in xrange(self.__cursor_pos, conv_stat.nr_segment):
+ for i in xrange(self.__cursor_pos, nr_segments):
buf = self.__context.get_segment(i, 0)
- text = unicode(buf, "utf-8")
+ text = UN(buf)
self.__segments.append((0, text))
self.__lookup_table_visible = False
self.__fill_lookup_table()
self.__invalidate()
return True
- if ibus.get_version() >= '1.2.0':
- def process_key_event(self, keyval, keycode, state):
- try:
- return self.process_key_event_internal2(keyval, keycode, state)
- except:
- import traceback
- traceback.print_exc()
- return False
- else:
- def process_key_event(self, keyval, state):
- try:
- return self.process_key_event_internal2(keyval, 0, state)
- except:
- import traceback
- traceback.print_exc()
- return False
-
- '''def process_key_event_internal(self, keyval, state):
- is_press = (state & modifier.RELEASE_MASK) == 0
-
- state = state & (modifier.SHIFT_MASK |
- modifier.CONTROL_MASK |
- modifier.MOD1_MASK)
-
- # ignore key release events
- if not is_press:
+ def do_process_key_event(self, keyval, keycode, state):
+ try:
+ return self.__process_key_event_internal2(keyval, keycode, state)
+ except:
+ import traceback
+ traceback.print_exc()
return False
- if state == modifier.SHIFT_MASK:
- if self.__convert_mode == CONV_MODE_ANTHY:
- if keyval == keysyms.Left:
- self.__shrink_segment(-1)
- return True
- elif keyval == keysyms.Right:
- self.__shrink_segment(1)
- return True
+ def do_property_activate(self, prop_name, state):
- if state & (modifier.CONTROL_MASK | modifier.MOD1_MASK) != 0:
- if not self.__preedit_ja_string.is_empty():
- # if user has inputed some chars
- return True
- return False
-
- if keyval == keysyms.Return:
- return self.__on_key_return()
- elif keyval == keysyms.Escape:
- return self.__on_key_escape()
- elif keyval == keysyms.BackSpace:
- return self.__on_key_back_space()
- elif keyval == keysyms.Delete or keyval == keysyms.KP_Delete:
- return self.__on_key_delete()
- elif keyval == keysyms.space:
- return self.__on_key_space()
- elif keyval >= keysyms._0 and keyval <= keysyms._9:
- if self.__on_key_number(keyval):
- return True
- return self.__on_key_common(keyval)
- elif keyval == keysyms.Page_Up or keyval == keysyms.KP_Page_Up:
- return self.__on_key_page_up()
- elif keyval == keysyms.Page_Down or keyval == keysyms.KP_Page_Down:
- return self.__on_key_page_down()
- elif keyval == keysyms.Up:
- return self.__on_key_up()
- elif keyval == keysyms.Down:
- return self.__on_key_down()
- elif keyval == keysyms.Left:
- return self.__on_key_left()
- elif keyval == keysyms.Right:
- return self.__on_key_right()
- elif keyval == keysyms.Hiragana_Katakana: # or keyval == keysyms.F11:
- return self.__on_key_hiragana_katakana()
- elif keyval == keysyms.Muhenkan: # or keyval == keysyms.F11:
- return self.__on_key_muhenka()
- elif keyval == keysyms.Henkan: # or keyval == keysyms.F11:
- return self.__on_key_henkan()
- elif keyval >= keysyms.F6 and keyval <= keysyms.F9:
- return self.__on_key_conv(keyval - keysyms.F6)
- elif keyval >= keysyms.exclam and keyval <= keysyms.asciitilde:
- return self.__on_key_common(keyval)
- elif keyval == keysyms.yen:
- return self.__on_key_common(keyval)
- else:
- if not self.__preedit_ja_string.is_empty():
- return True
- return False'''
-
- def property_activate(self, prop_name, state):
-
- if state == ibus.PROP_STATE_CHECKED:
+ if state == IBus.PropState.CHECKED:
if prop_name == None:
return
- elif prop_name.startswith(u"InputMode."):
+ elif prop_name.startswith(u'InputMode.'):
self.__input_mode_activate(prop_name, state)
return
- elif prop_name.startswith(u"TypingMode."):
+ elif prop_name.startswith(u'TypingMode.'):
self.__typing_mode_activate(prop_name, state)
return
- elif prop_name.startswith(u"SegmentMode."):
+ elif prop_name.startswith(u'SegmentMode.'):
self.__segment_mode_activate(prop_name, state)
return
- elif prop_name.startswith(u"DictMode."):
+ elif prop_name.startswith(u'DictMode.'):
self.__dict_mode_activate(prop_name, state)
return
else:
@@ -604,24 +682,24 @@ class Engine(ibus.EngineBase):
self.__start_add_word()
else:
self.__prop_dict[prop_name].set_state(state)
- if prop_name == "DictMode":
+ if prop_name == 'DictMode':
sub_name = self.__dict_mode_get_prop_name(self.__dict_mode)
if sub_name == None:
return
self.__dict_mode_activate(sub_name,
- ibus.PROP_STATE_CHECKED)
+ IBus.PropState.CHECKED)
def __input_mode_activate(self, prop_name, state):
input_modes = {
- u"InputMode.Hiragana" : (INPUT_MODE_HIRAGANA, u"あ"),
- u"InputMode.Katakana" : (INPUT_MODE_KATAKANA, u"ア"),
- u"InputMode.HalfWidthKatakana" : (INPUT_MODE_HALF_WIDTH_KATAKANA, u"_ア"),
- u"InputMode.Latin" : (INPUT_MODE_LATIN, u"_A"),
- u"InputMode.WideLatin" : (INPUT_MODE_WIDE_LATIN, u"A"),
+ u'InputMode.Hiragana' : (INPUT_MODE_HIRAGANA, u'あ'),
+ u'InputMode.Katakana' : (INPUT_MODE_KATAKANA, u'ア'),
+ u'InputMode.HalfWidthKatakana' : (INPUT_MODE_HALF_WIDTH_KATAKANA, u'_ア'),
+ u'InputMode.Latin' : (INPUT_MODE_LATIN, u'_A'),
+ u'InputMode.WideLatin' : (INPUT_MODE_WIDE_LATIN, u'A'),
}
if prop_name not in input_modes:
- print >> sys.stderr, "Unknow prop_name = %s" % prop_name
+ print >> sys.stderr, 'Unknown prop_name = %s' % prop_name
return
self.__prop_dict[prop_name].set_state(state)
self.update_property(self.__prop_dict[prop_name])
@@ -631,7 +709,7 @@ class Engine(ibus.EngineBase):
return
self.__input_mode = mode
- prop = self.__prop_dict[u"InputMode"]
+ prop = self.__prop_dict[u'InputMode']
prop.label = label
self.update_property(prop)
@@ -640,23 +718,23 @@ class Engine(ibus.EngineBase):
def __typing_mode_activate(self, prop_name, state):
typing_modes = {
- u"TypingMode.Romaji" : (jastring.TYPING_MODE_ROMAJI, u"R"),
- u"TypingMode.Kana" : (jastring.TYPING_MODE_KANA, u"か"),
- u"TypingMode.ThumbShift" : (jastring.TYPING_MODE_THUMB_SHIFT, u"親"),
+ u'TypingMode.Romaji' : (jastring.TYPING_MODE_ROMAJI, u'R'),
+ u'TypingMode.Kana' : (jastring.TYPING_MODE_KANA, u'か'),
+ u'TypingMode.ThumbShift' : (jastring.TYPING_MODE_THUMB_SHIFT, u'親'),
}
if prop_name not in typing_modes:
- print >> sys.stderr, "Unknow prop_name = %s" % prop_name
+ print >> sys.stderr, 'Unknown prop_name = %s' % prop_name
return
self.__prop_dict[prop_name].set_state(state)
self.update_property(self.__prop_dict[prop_name])
- if prop_name == u"TypingMode.ThumbShift":
+ if prop_name == u'TypingMode.ThumbShift':
self._reset_thumb()
mode, label = typing_modes[prop_name]
Engine.__typing_mode = mode
- prop = self.__prop_dict[u"TypingMode"]
+ prop = self.__prop_dict[u'TypingMode']
prop.label = label
self.update_property(prop)
@@ -664,32 +742,32 @@ class Engine(ibus.EngineBase):
self.__invalidate()
def __refresh_typing_mode_property(self):
- prop = self.__prop_dict[u"TypingMode"]
+ prop = self.__prop_dict[u'TypingMode']
modes = {
- jastring.TYPING_MODE_ROMAJI : (u"TypingMode.Romaji", u"R"),
- jastring.TYPING_MODE_KANA : (u"TypingMode.Kana", u"か"),
- jastring.TYPING_MODE_THUMB_SHIFT : (u"TypingMode.ThumbShift", u"親"),
+ jastring.TYPING_MODE_ROMAJI : (u'TypingMode.Romaji', u'R'),
+ jastring.TYPING_MODE_KANA : (u'TypingMode.Kana', u'か'),
+ jastring.TYPING_MODE_THUMB_SHIFT : (u'TypingMode.ThumbShift', u'親'),
}
prop_name, label = modes.get(Engine.__typing_mode, (None, None))
if prop_name == None or label == None:
return
_prop = self.__prop_dict[prop_name]
- _prop.set_state(ibus.PROP_STATE_CHECKED)
+ _prop.set_state(IBus.PropState.CHECKED)
self.update_property(_prop)
prop.label = label
self.update_property(prop)
def __segment_mode_activate(self, prop_name, state):
segment_modes = {
- u"SegmentMode.Multi" : (SEGMENT_DEFAULT, u"連"),
- u"SegmentMode.Single" : (SEGMENT_SINGLE, u"単"),
- u"SegmentMode.ImmediateMulti" : (SEGMENT_IMMEDIATE, u"逐|連"),
- u"SegmentMode.ImmediateSingle" :
- (SEGMENT_IMMEDIATE | SEGMENT_SINGLE, u"逐|単"),
+ u'SegmentMode.Multi' : (SEGMENT_DEFAULT, u'連'),
+ u'SegmentMode.Single' : (SEGMENT_SINGLE, u'単'),
+ u'SegmentMode.ImmediateMulti' : (SEGMENT_IMMEDIATE, u'逐|連'),
+ u'SegmentMode.ImmediateSingle' :
+ (SEGMENT_IMMEDIATE | SEGMENT_SINGLE, u'逐|単'),
}
if prop_name not in segment_modes:
- print >> sys.stderr, "Unknow prop_name = %s" % prop_name
+ print >> sys.stderr, 'Unknown prop_name = %s' % prop_name
return
self.__prop_dict[prop_name].set_state(state)
self.update_property(self.__prop_dict[prop_name])
@@ -697,7 +775,7 @@ class Engine(ibus.EngineBase):
mode, label = segment_modes[prop_name]
self.__segment_mode = mode
- prop = self.__prop_dict[u"SegmentMode"]
+ prop = self.__prop_dict[u'SegmentMode']
prop.label = label
self.update_property(prop)
@@ -751,12 +829,18 @@ class Engine(ibus.EngineBase):
self.__context.init_personality()
self.__context.do_set_personality(dict_name)
- prop = self.__prop_dict[u"DictMode"]
+ prop = self.__prop_dict[u'DictMode']
section = 'dict/file/' + id
prop.label = self.__prefs.get_value(section, 'short_label')
self.update_property(prop)
- def focus_in(self):
+ def __argb(self, a, r, g, b):
+ return ((a & 0xff)<<24) + ((r & 0xff) << 16) + ((g & 0xff) << 8) + (b & 0xff)
+
+ def __rgb(self, r, g, b):
+ return self.__argb(255, r, g, b)
+
+ def do_focus_in(self):
self.register_properties(self.__prop_list)
self.__refresh_typing_mode_property()
mode = self.__prefs.get_value('common', 'behavior_on_focus_out')
@@ -768,32 +852,33 @@ class Engine(ibus.EngineBase):
if size != self.__lookup_table.get_page_size():
self.__lookup_table.set_page_size(size)
- def focus_out(self):
+ def do_focus_out(self):
mode = self.__prefs.get_value('common', 'behavior_on_focus_out')
if mode == 0 or mode == 1:
self.__reset()
self.__invalidate()
- def disable(self):
+ def do_disable(self):
self.__reset()
self.__invalidate()
- def reset(self):
+ def do_reset(self):
self.__reset()
self.__invalidate()
def do_destroy(self):
if self.__idle_id != 0:
- gobject.source_remove(self.__idle_id)
+ GObject.source_remove(self.__idle_id)
self.__idle_id = 0
self.__remove_dict_files()
- super(Engine,self).do_destroy()
+ # It seems the parent do_destroy and destroy are different.
+ # The parent do_destroy calls self destroy infinitely.
+ super(Engine,self).destroy()
def __join_all_segments(self):
while True:
- conv_stat = anthy.anthy_conv_stat()
- self.__context.get_stat(conv_stat)
- seg = conv_stat.nr_segment - self.__cursor_pos
+ nr_segments = self.__context.get_nr_segments()
+ seg = conv_stat.nr_segments - self.__cursor_pos
if seg > 1:
self.__context.resize_segment(self.__cursor_pos, 1)
@@ -821,19 +906,18 @@ class Engine(ibus.EngineBase):
text, cursor = self.__preedit_ja_string.get_hiragana(True)
text = self.__normalize_preedit(text)
- self.__context.set_string(text.encode("utf8"))
+ self.__context.set_string(text.encode('utf8'))
if self.__segment_mode & SEGMENT_SINGLE:
self.__join_all_segments()
- conv_stat = anthy.anthy_conv_stat()
- self.__context.get_stat(conv_stat)
+ nr_segments = self.__context.get_nr_segments()
- for i in xrange(0, conv_stat.nr_segment):
+ for i in xrange(0, nr_segments):
buf = self.__context.get_segment(i, 0)
- text = unicode(buf, "utf-8")
+ text = UN(buf)
self.__segments.append((0, text))
if self.__segment_mode & SEGMENT_IMMEDIATE:
- self.__cursor_pos = conv_stat.nr_segment - 1
+ self.__cursor_pos = nr_segments - 1
else:
self.__cursor_pos = 0
self.__fill_lookup_table()
@@ -844,10 +928,10 @@ class Engine(ibus.EngineBase):
return
self.__convert_mode = CONV_MODE_OFF
- self.__convert_chars = u""
+ self.__convert_chars = u''
self.__segments = list()
self.__cursor_pos = 0
- self.__lookup_table.clean()
+ self.__lookup_table.clear()
self.__lookup_table_visible = False
def __end_convert(self):
@@ -861,7 +945,7 @@ class Engine(ibus.EngineBase):
if candidate.find(key) >= 0:
for value in romaji_utf8_rule[key]:
candidate = candidate.replace(key, value)
- self.__lookup_table.append_candidate(ibus.Text(candidate))
+ self.__lookup_table.append_candidate(IBus.Text.new_from_string(candidate))
def __fill_anthy_zipcode_strip(self, dict_file, id):
import re
@@ -874,7 +958,7 @@ class Engine(ibus.EngineBase):
section = 'dict/file/default'
encoding = self.__prefs.get_value(section, 'encoding')
contents = unicode(open(dict_file).read(), encoding)
- expression = re.compile("^" + text + "[ \t]")
+ expression = re.compile('^' + text + '[ \t]')
found = False
dict_dest = None
@@ -882,10 +966,10 @@ class Engine(ibus.EngineBase):
matched = expression.search(line)
if matched:
found = True
- dict_dest = unicode(matched.string).split(' ')[2]
+ dict_dest = UN(matched.string).split(' ')[2]
break
if found:
- self.__lookup_table.append_candidate(ibus.Text(dict_dest))
+ self.__lookup_table.append_candidate(IBus.Text.new_from_string(dict_dest))
def __fill_lookup_table_dict_mode(self):
if self.__dict_mode <= 0:
@@ -902,28 +986,26 @@ class Engine(ibus.EngineBase):
def __fill_lookup_table(self):
if self.__convert_mode == CONV_MODE_PREDICTION:
- seg_stat = anthy.anthy_prediction_stat()
- self.__context.get_prediction_stat(seg_stat)
+ nr_predictions = self.__context.get_nr_predictions()
# fill lookup_table
- self.__lookup_table.clean()
- for i in xrange(0, seg_stat.nr_prediction):
+ self.__lookup_table.clear()
+ for i in xrange(0, seg_stat.nr_predictions):
buf = self.__context.get_prediction(i)
- candidate = unicode(buf, "utf-8")
- self.__lookup_table.append_candidate(ibus.Text(candidate))
+ candidate = UN(buf)
+ self.__lookup_table.append_candidate(IBus.Text.new_from_string(candidate))
self.__candidate_cb(candidate)
return
# get segment stat
- seg_stat = anthy.anthy_segment_stat()
- self.__context.get_segment_stat(self.__cursor_pos, seg_stat)
+ nr_candidates = self.__context.get_nr_candidates(self.__cursor_pos)
# fill lookup_table
- self.__lookup_table.clean()
- for i in xrange(0, seg_stat.nr_candidate):
+ self.__lookup_table.clear()
+ for i in xrange(0, nr_candidates):
buf = self.__context.get_segment(self.__cursor_pos, i)
- candidate = unicode(buf, "utf-8")
- self.__lookup_table.append_candidate(ibus.Text(candidate))
+ candidate = UN(buf)
+ self.__lookup_table.append_candidate(IBus.Text.new_from_string(candidate))
self.__candidate_cb(candidate)
self.__fill_lookup_table_dict_mode()
@@ -931,8 +1013,8 @@ class Engine(ibus.EngineBase):
def __invalidate(self):
if self.__idle_id != 0:
return
- self.__idle_id = gobject.idle_add(self.__update,
- priority = gobject.PRIORITY_LOW)
+ self.__idle_id = GObject.idle_add(self.__update,
+ priority = GObject.PRIORITY_LOW)
# def __get_preedit(self):
def __get_preedit(self, commit=False):
@@ -946,19 +1028,19 @@ class Engine(ibus.EngineBase):
# text, cursor = self.__preedit_ja_string.get_half_width_katakana()
text, cursor = self.__preedit_ja_string.get_half_width_katakana(commit)
else:
- text, cursor = u"", 0
+ text, cursor = u'', 0
return text, cursor
def __update_input_chars(self):
text, cursor = self.__get_preedit()
- attrs = ibus.AttrList()
- attrs.append(ibus.AttributeUnderline(
- ibus.ATTR_UNDERLINE_SINGLE, 0,
+ attrs = IBus.AttrList()
+ attrs.append(IBus.attr_underline_new(
+ IBus.AttrUnderline.SINGLE, 0,
len(text)))
self.update_preedit(text,
attrs, cursor, not self.__preedit_ja_string.is_empty())
- self.update_aux_string(u"", ibus.AttrList(), False)
+ self.update_aux_string(u'', IBus.AttrList(), False)
self.update_lookup_table(self.__lookup_table,
self.__lookup_table_visible)
@@ -1003,38 +1085,38 @@ class Engine(ibus.EngineBase):
text, cursor = self.__preedit_ja_string.get_wide_latin()
text = text.capitalize()
self.__convert_chars = text
- attrs = ibus.AttrList()
- attrs.append(ibus.AttributeUnderline(
- ibus.ATTR_UNDERLINE_SINGLE, 0, len(text)))
- attrs.append(ibus.AttributeBackground(ibus.RGB(200, 200, 240),
+ attrs = IBus.AttrList()
+ attrs.append(IBus.attr_underline_new(
+ IBus.AttrUnderline.SINGLE, 0, len(text)))
+ attrs.append(IBus.attr_background_new(self.__rgb(200, 200, 240),
0, len(text)))
- attrs.append(ibus.AttributeForeground(ibus.RGB(0, 0, 0),
+ attrs.append(IBus.attr_foreground_new(self.__rgb(0, 0, 0),
0, len(text)))
self.update_preedit(text, attrs, len(text), True)
- self.update_aux_string(u"",
- ibus.AttrList(), self.__lookup_table_visible)
+ self.update_aux_string(u'',
+ IBus.AttrList(), self.__lookup_table_visible)
self.update_lookup_table(self.__lookup_table,
self.__lookup_table_visible)
def __update_anthy_convert_chars(self):
- self.__convert_chars = u""
+ self.__convert_chars = u''
pos = 0
for i, (seg_index, text) in enumerate(self.__segments):
self.__convert_chars += text
if i < self.__cursor_pos:
pos += len(text)
- attrs = ibus.AttrList()
- attrs.append(ibus.AttributeUnderline(
- ibus.ATTR_UNDERLINE_SINGLE, 0, len(self.__convert_chars)))
- attrs.append(ibus.AttributeBackground(ibus.RGB(200, 200, 240),
+ attrs = IBus.AttrList()
+ attrs.append(IBus.attr_underline_new(
+ IBus.AttrUnderline.SINGLE, 0, len(self.__convert_chars)))
+ attrs.append(IBus.attr_background_new(self.__rgb(200, 200, 240),
pos, pos + len(self.__segments[self.__cursor_pos][1])))
- attrs.append(ibus.AttributeForeground(ibus.RGB(0, 0, 0),
+ attrs.append(IBus.attr_foreground_new(self.__rgb(0, 0, 0),
pos, pos + len(self.__segments[self.__cursor_pos][1])))
self.update_preedit(self.__convert_chars, attrs, pos, True)
- aux_string = u"( %d / %d )" % (self.__lookup_table.get_cursor_pos() + 1, self.__lookup_table.get_number_of_candidates())
+ aux_string = u'( %d / %d )' % (self.__lookup_table.get_cursor_pos() + 1, self.__lookup_table.get_number_of_candidates())
self.update_aux_string(aux_string,
- ibus.AttrList(), self.__lookup_table_visible)
+ IBus.AttrList(), self.__lookup_table_visible)
self.update_lookup_table(self.__lookup_table,
self.__lookup_table_visible)
@@ -1106,11 +1188,11 @@ class Engine(ibus.EngineBase):
else:
self.__input_mode = INPUT_MODE_HIRAGANA
- modes = { INPUT_MODE_HIRAGANA: u"あ",
- INPUT_MODE_KATAKANA: u"ア",
- INPUT_MODE_HALF_WIDTH_KATAKANA: u"_ア" }
+ modes = { INPUT_MODE_HIRAGANA: u'あ',
+ INPUT_MODE_KATAKANA: u'ア',
+ INPUT_MODE_HALF_WIDTH_KATAKANA: u'_ア' }
- prop = self.__prop_dict[u"InputMode"]
+ prop = self.__prop_dict[u'InputMode']
prop.label = modes[self.__input_mode]
self.update_property(prop)
@@ -1143,25 +1225,25 @@ class Engine(ibus.EngineBase):
self.__invalidate()
elif self.__convert_mode == CONV_MODE_ANTHY:
self.__lookup_table_visible = True
- self.cursor_down()
+ self.do_cursor_down()
return True'''
'''def __on_key_space(self, wide=False):
if self.__input_mode == INPUT_MODE_WIDE_LATIN or wide:
# Input Wide space U+3000
- wide_char = symbol_rule[unichr(keysyms.space)]
+ wide_char = symbol_rule[unichr(IBus.KEY_space)]
self.__commit_string(wide_char)
return True
if self.__preedit_ja_string.is_empty():
if self.__input_mode in (INPUT_MODE_HIRAGANA, INPUT_MODE_KATAKANA):
# Input Wide space U+3000
- wide_char = symbol_rule[unichr(keysyms.space)]
+ wide_char = symbol_rule[unichr(IBus.KEY_space)]
self.__commit_string(wide_char)
return True
else:
# Input Half space U+0020
- self.__commit_string(unichr(keysyms.space))
+ self.__commit_string(unichr(IBus.KEY_space))
return True
if self.__convert_mode != CONV_MODE_ANTHY:
@@ -1169,35 +1251,35 @@ class Engine(ibus.EngineBase):
self.__invalidate()
elif self.__convert_mode == CONV_MODE_ANTHY:
self.__lookup_table_visible = True
- self.cursor_down()
+ self.do_cursor_down()
return True'''
def __on_key_up(self):
if self.__preedit_ja_string.is_empty():
return False
self.__lookup_table_visible = True
- self.cursor_up()
+ self.do_cursor_up()
return True
def __on_key_down(self):
if self.__preedit_ja_string.is_empty():
return False
self.__lookup_table_visible = True
- self.cursor_down()
+ self.do_cursor_down()
return True
def __on_key_page_up(self):
if self.__preedit_ja_string.is_empty():
return False
if self.__lookup_table_visible == True:
- self.page_up()
+ self.do_page_up()
return True
def __on_key_page_down(self):
if self.__preedit_ja_string.is_empty():
return False
if self.__lookup_table_visible == True:
- self.page_down()
+ self.do_page_down()
return True
'''def __on_key_left(self):
@@ -1247,19 +1329,11 @@ class Engine(ibus.EngineBase):
if not self.__lookup_table_visible:
return False
- if keyval == keysyms._0:
- keyval = keysyms._9 + 1
- index = keyval - keysyms._1
+ if keyval == IBus.KEY_0:
+ keyval = IBus.KEY_9 + 1
+ index = keyval - IBus.KEY_1
- candidates = self.__lookup_table.get_candidates_in_current_page()
- if self.__lookup_table.set_cursor_pos_in_current_page(index):
- index = self.__lookup_table.get_cursor_pos()
- candidate = self.__lookup_table.get_current_candidate().text
- self.__segments[self.__cursor_pos] = index, candidate
- self.__lookup_table_visible = False
- self.__on_key_right()
- self.__invalidate()
- return True
+ return self.__on_candidate_index_in_page(index)
def __on_key_conv(self, mode):
if self.__preedit_ja_string.is_empty():
@@ -1291,7 +1365,7 @@ class Engine(ibus.EngineBase):
else:
self.__convert_mode = CONV_MODE_LATIN_0
else:
- print >> sys.stderr, "Unkown convert mode (%d)!" % mode
+ print >> sys.stderr, 'Unkown convert mode (%d)!' % mode
return False
self.__invalidate()
return True
@@ -1324,10 +1398,10 @@ class Engine(ibus.EngineBase):
elif self.__convert_mode != CONV_MODE_OFF:
self.__commit_string(self.__convert_chars)
- # "n" + "'" == "nn" in romaji
+ # 'n' + '\'' == 'nn' in romaji
if (keyval >= ord('A') and keyval <= ord('Z')) or \
(keyval >= ord('a') and keyval <= ord('z')):
- shift = (state & modifier.SHIFT_MASK) != 0
+ shift = (state & IBus.ModifierType.SHIFT_MASK) != 0
else:
shift = False
self.__preedit_ja_string.set_shift(shift)
@@ -1349,13 +1423,21 @@ class Engine(ibus.EngineBase):
jastring.JaString._prefs = cls.__prefs
@classmethod
- def CONFIG_VALUE_CHANGED(cls, bus, section, name, value):
- print 'VALUE_CHAMGED =', section, name, value
+ def CONFIG_VALUE_CHANGED(cls, bus, section, name, variant):
+ print 'VALUE_CHAMGED =', section, name, variant
+
+ if not section.startswith('engine/anthy'):
+ # This value is used for IBus.config.set_value only.
+ return
- if not section.startswith("engine/anthy"):
- # This value is used for ibus.config.set_value only.
+ # The key was deleted by dconf.
+ # test case: update /desktop/ibus/engine/anthy/thumb/ls
+ # and reset the key with dconf direclty.
+ if variant.get_type_string() == '()':
+ cls.__prefs.undo_item(section, name)
return
+ value = cls.__prefs.variant_to_value(variant)
base_sec = section[len(cls.__prefs._prefix) + 1:]
sec = cls._get_shortcut_type()
if base_sec == sec:
@@ -1410,11 +1492,11 @@ class Engine(ibus.EngineBase):
@classmethod
def _s_to_key(cls, s):
- keyval = keysyms.name_to_keycode(s.split('+')[-1])
+ keyval = IBus.keyval_from_name(s.split('+')[-1])
s = s.lower()
- state = ('shift+' in s and modifier.SHIFT_MASK or 0) | (
- 'ctrl+' in s and modifier.CONTROL_MASK or 0) | (
- 'alt+' in s and modifier.MOD1_MASK or 0)
+ state = ('shift+' in s and IBus.ModifierType.SHIFT_MASK or 0) | (
+ 'ctrl+' in s and IBus.ModifierType.CONTROL_MASK or 0) | (
+ 'alt+' in s and IBus.ModifierType.MOD1_MASK or 0)
return cls._mk_key(keyval, state)
@classmethod
@@ -1470,21 +1552,21 @@ class Engine(ibus.EngineBase):
@classmethod
def _link_dict_file_with_id(cls, file, id, link_mode):
if not path.exists(file):
- print >> sys.stderr, file + " does not exist"
+ print >> sys.stderr, file + ' does not exist'
return
if id == None:
return
if link_mode == LINK_DICT_EMBEDDED:
- directory = cls._get_userhome() + "/.anthy/" + IMPORTED_EMBEDDED_DICT_DIR
+ directory = cls._get_userhome() + '/.anthy/' + IMPORTED_EMBEDDED_DICT_DIR
name = IMPORTED_EMBEDDED_DICT_PREFIX + id
elif link_mode == LINK_DICT_SINGLE:
- directory = cls._get_userhome() + "/.anthy"
+ directory = cls._get_userhome() + '/.anthy'
name = IMPORTED_SINGLE_DICT_PREFIX + id
else:
return
if path.exists(directory):
if not path.isdir(directory):
- print >> sys.stderr, directory + " is not a directory"
+ print >> sys.stderr, directory + ' is not a directory'
return
else:
os.makedirs(directory, 0700)
@@ -1492,11 +1574,11 @@ class Engine(ibus.EngineBase):
os.chdir(directory)
if path.lexists(directory + '/' + name):
if path.islink(directory + '/' + name):
- print >> sys.stderr, "Removing " + name
+ print >> sys.stderr, 'Removing ' + name
os.unlink(directory + '/' + name)
else:
alternate = name + str(os.getpid())
- print >> sys.stderr, "Moving " + name + " to " + alternate
+ print >> sys.stderr, 'Moving ' + name + ' to ' + alternate
os.rename(name, alternate)
os.symlink(file, directory + '/' + name)
if backup_dir != None:
@@ -1507,16 +1589,16 @@ class Engine(ibus.EngineBase):
if id == None:
return
if link_mode == LINK_DICT_EMBEDDED:
- directory = cls._get_userhome() + "/.anthy/" + IMPORTED_EMBEDDED_DICT_DIR
+ directory = cls._get_userhome() + '/.anthy/' + IMPORTED_EMBEDDED_DICT_DIR
name = IMPORTED_EMBEDDED_DICT_PREFIX + id
elif link_mode == LINK_DICT_SINGLE:
- directory = cls._get_userhome() + "/.anthy"
+ directory = cls._get_userhome() + '/.anthy'
name = IMPORTED_SINGLE_DICT_PREFIX + id
else:
return
if path.exists(directory):
if not path.isdir(directory):
- print >> sys.stderr, directory + " is not a directory"
+ print >> sys.stderr, directory + ' is not a directory'
return
backup_dir = os.getcwd()
os.chdir(directory)
@@ -1556,7 +1638,7 @@ class Engine(ibus.EngineBase):
if name == 'files':
str_list = []
for file in value:
- str_list.append(str(file))
+ str_list.append(cls.__prefs.str(file))
old_files = cls.__prefs.get_value(base_sec, name)
for file in old_files:
if file in str_list:
@@ -1590,11 +1672,11 @@ class Engine(ibus.EngineBase):
@staticmethod
def _mk_key(keyval, state):
- if state & (modifier.CONTROL_MASK | modifier.MOD1_MASK):
+ if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK):
if unichr(keyval) in u'!"#$%^\'()*+,-./:;<=>?@[\]^_`{|}~':
- state |= modifier.SHIFT_MASK
- elif keysyms.a <= keyval <= keysyms.z:
- keyval -= (keysyms.a - keysyms.A)
+ state |= IBus.ModifierType.SHIFT_MASK
+ elif IBus.KEY_a <= keyval <= IBus.KEY_z:
+ keyval -= (IBus.KEY_a - IBus.KEY_A)
return repr([int(state), int(keyval)])
@@ -1610,11 +1692,11 @@ class Engine(ibus.EngineBase):
self._H = None
def start(t):
- self._H = gobject.timeout_add(t, on_timeout, keyval)
+ self._H = GObject.timeout_add(t, on_timeout, keyval)
def stop():
if self._H:
- gobject.source_remove(self._H)
+ GObject.source_remove(self._H)
self._H = None
return True
return False
@@ -1638,7 +1720,7 @@ class Engine(ibus.EngineBase):
if getattr(self, cmd)(keyval, state):
return True
except:
- print >> sys.stderr, 'Unknow command = %s' % cmd
+ print >> sys.stderr, 'Unknown command = %s' % cmd
return False
def RS():
@@ -1653,16 +1735,16 @@ class Engine(ibus.EngineBase):
def T2():
return self.__thumb.get_t2()
- state = state & (modifier.SHIFT_MASK |
- modifier.CONTROL_MASK |
- modifier.MOD1_MASK |
- modifier.RELEASE_MASK)
+ state = state & (IBus.ModifierType.SHIFT_MASK |
+ IBus.ModifierType.CONTROL_MASK |
+ IBus.ModifierType.MOD1_MASK |
+ IBus.ModifierType.RELEASE_MASK)
if keyval in KP_Table and self.__prefs.get_value('common',
'ten_key_mode'):
keyval = KP_Table[keyval]
- if state & modifier.RELEASE_MASK:
+ if state & IBus.ModifierType.RELEASE_MASK:
if keyval == self._MM:
if stop():
insert(self.__thumb.get_char(self._MM)[self._SS])
@@ -1723,8 +1805,9 @@ class Engine(ibus.EngineBase):
cmd_exec([0, RS(), LS()][self._SS])
if cmd_exec(keyval, state):
return True
- elif 0x21 <= keyval <= 0x7e and state & (modifier.CONTROL_MASK | modifier.MOD1_MASK) == 0:
- if state & modifier.SHIFT_MASK:
+ elif 0x21 <= keyval <= 0x7e and state & \
+ (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK) == 0:
+ if state & IBus.ModifierType.SHIFT_MASK:
insert(self.__thumb.get_shift_char(keyval, unichr(keyval)))
elif self._SS == 0:
insert(unichr(keyval))
@@ -1734,16 +1817,16 @@ class Engine(ibus.EngineBase):
return False
return True
- def process_key_event_internal2(self, keyval, keycode, state):
+ def __process_key_event_internal2(self, keyval, keycode, state):
if self.__typing_mode == jastring.TYPING_MODE_THUMB_SHIFT and \
self.__input_mode not in [INPUT_MODE_LATIN, INPUT_MODE_WIDE_LATIN]:
return self.process_key_event_thumb(keyval, keycode, state)
- is_press = (state & modifier.RELEASE_MASK) == 0
+ is_press = (state & IBus.ModifierType.RELEASE_MASK) == 0
- state = state & (modifier.SHIFT_MASK |
- modifier.CONTROL_MASK |
- modifier.MOD1_MASK)
+ state = state & (IBus.ModifierType.SHIFT_MASK |
+ IBus.ModifierType.CONTROL_MASK |
+ IBus.ModifierType.MOD1_MASK)
# ignore key release events
if not is_press:
@@ -1760,18 +1843,18 @@ class Engine(ibus.EngineBase):
if getattr(self, cmd)(keyval, state):
return True
except:
- print >> sys.stderr, 'Unknow command = %s' % cmd
+ print >> sys.stderr, 'Unknown command = %s' % cmd
- if state & (modifier.CONTROL_MASK | modifier.MOD1_MASK):
+ if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK):
return False
- if (keysyms.exclam <= keyval <= keysyms.asciitilde or
- keyval == keysyms.yen):
+ if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or
+ keyval == IBus.KEY_yen):
if self.__typing_mode == jastring.TYPING_MODE_KANA:
- if keyval == keysyms._0 and state == modifier.SHIFT_MASK:
- keyval = keysyms.asciitilde
- elif keyval == keysyms.backslash and keycode in [132-8, 133-8]:
- keyval = keysyms.yen
+ if keyval == IBus.KEY_0 and state == IBus.ModifierType.SHIFT_MASK:
+ keyval = IBus.KEY_asciitilde
+ elif keyval == IBus.KEY_backslash and keycode in [132-8, 133-8]:
+ keyval = IBus.KEY_yen
ret = self.__on_key_common(keyval, state)
if (unichr(keyval) in u',.' and
self.__prefs.get_value('common', 'behavior_on_period')):
@@ -1809,7 +1892,7 @@ class Engine(ibus.EngineBase):
if not self._chk_mode('0'):
return False
- self.__input_mode_activate(mode, ibus.PROP_STATE_CHECKED)
+ self.__input_mode_activate(mode, IBus.PropState.CHECKED)
return True
@@ -1821,21 +1904,21 @@ class Engine(ibus.EngineBase):
def __cmd_circle_input_mode(self, keyval, state):
modes = {
- INPUT_MODE_HIRAGANA: u"InputMode.Katakana",
- INPUT_MODE_KATAKANA: u"InputMode.HalfWidthKatakana",
- INPUT_MODE_HALF_WIDTH_KATAKANA: u"InputMode.Latin",
- INPUT_MODE_LATIN: u"InputMode.WideLatin",
- INPUT_MODE_WIDE_LATIN: u"InputMode.Hiragana"
+ INPUT_MODE_HIRAGANA: u'InputMode.Katakana',
+ INPUT_MODE_KATAKANA: u'InputMode.HalfWidthKatakana',
+ INPUT_MODE_HALF_WIDTH_KATAKANA: u'InputMode.Latin',
+ INPUT_MODE_LATIN: u'InputMode.WideLatin',
+ INPUT_MODE_WIDE_LATIN: u'InputMode.Hiragana'
}
return self.__set_input_mode(modes[self.__input_mode])
def __cmd_circle_kana_mode(self, keyval, state):
modes = {
- INPUT_MODE_HIRAGANA: u"InputMode.Katakana",
- INPUT_MODE_KATAKANA: u"InputMode.HalfWidthKatakana",
- INPUT_MODE_HALF_WIDTH_KATAKANA: u"InputMode.Hiragana",
- INPUT_MODE_LATIN: u"InputMode.Hiragana",
- INPUT_MODE_WIDE_LATIN: u"InputMode.Hiragana"
+ INPUT_MODE_HIRAGANA: u'InputMode.Katakana',
+ INPUT_MODE_KATAKANA: u'InputMode.HalfWidthKatakana',
+ INPUT_MODE_HALF_WIDTH_KATAKANA: u'InputMode.Hiragana',
+ INPUT_MODE_LATIN: u'InputMode.Hiragana',
+ INPUT_MODE_WIDE_LATIN: u'InputMode.Hiragana'
}
return self.__set_input_mode(modes[self.__input_mode])
@@ -1862,12 +1945,12 @@ class Engine(ibus.EngineBase):
return False
modes = {
- jastring.TYPING_MODE_THUMB_SHIFT: u"TypingMode.Romaji",
- jastring.TYPING_MODE_KANA: u"TypingMode.ThumbShift",
- jastring.TYPING_MODE_ROMAJI: u"TypingMode.Kana",
+ jastring.TYPING_MODE_THUMB_SHIFT: u'TypingMode.Romaji',
+ jastring.TYPING_MODE_KANA: u'TypingMode.ThumbShift',
+ jastring.TYPING_MODE_ROMAJI: u'TypingMode.Kana',
}
self.__typing_mode_activate(modes[self.__typing_mode],
- ibus.PROP_STATE_CHECKED)
+ IBus.PropState.CHECKED)
return True
def __cmd_circle_dict_method(self, keyval, state):
@@ -1883,7 +1966,7 @@ class Engine(ibus.EngineBase):
if prop_name == None:
return False
self.__dict_mode_activate(prop_name,
- ibus.PROP_STATE_CHECKED)
+ IBus.PropState.CHECKED)
return True
#edit_keys
@@ -1909,7 +1992,7 @@ class Engine(ibus.EngineBase):
if not self.__preedit_ja_string.is_empty():
return False
- self.__commit_string(unichr(keysyms.space))
+ self.__commit_string(unichr(IBus.KEY_space))
return True
def __cmd_insert_wide_space(self, keyval, state):
@@ -1918,7 +2001,7 @@ class Engine(ibus.EngineBase):
if not self.__preedit_ja_string.is_empty():
return False
- char = unichr(keysyms.space)
+ char = unichr(IBus.KEY_space)
wide_char = symbol_rule.get(char, None)
if wide_char == None:
wide_char = unichar_half_to_full(char)
@@ -1958,18 +2041,17 @@ class Engine(ibus.EngineBase):
text, cursor = self.__preedit_ja_string.get_hiragana(True)
- self.__context.set_prediction_string(text.encode("utf8"))
- ps = anthy.anthy_prediction_stat()
- self.__context.get_prediction_stat(ps)
+ self.__context.set_prediction_string(text.encode('utf8'))
+ nr_predictions = self.__context.get_nr_predictions()
-# for i in range(ps.nr_prediction):
+# for i in range(nr_predictions):
# print self.__context.get_prediction(i)
buf = self.__context.get_prediction(0)
if not buf:
return False
- text = unicode(buf, "utf-8")
+ text = UN(buf)
self.__segments.append((0, text))
self.__convert_mode = CONV_MODE_PREDICTION
@@ -1999,9 +2081,9 @@ class Engine(ibus.EngineBase):
# if user has inputed some chars
return False
- # Use gtk.Clipboard.request_text() instead of
- # gtk.Clipboard.wait_for_text() because DBus is timed out.
- clipboard = clipboard_get ("PRIMARY")
+ # Use Gtk.Clipboard.request_text() instead of
+ # Gtk.Clipboard.wait_for_text() because DBus is timed out.
+ clipboard = clipboard_get ('PRIMARY')
if clipboard:
clipboard.request_text (self.__get_clipboard, CLIPBOARD_RECONVERT)
@@ -2011,18 +2093,17 @@ class Engine(ibus.EngineBase):
if clipboard_text == None:
return False
- self.__convert_chars = unicode (clipboard_text, "utf-8")
+ self.__convert_chars = UN(clipboard_text)
for i in xrange(0, len(self.__convert_chars)):
keyval = self.__convert_chars[i]
self.__preedit_ja_string.insert(unichr(ord (keyval)))
- self.__context.set_string(self.__convert_chars.encode("utf-8"))
- conv_stat = anthy.anthy_conv_stat()
- self.__context.get_stat(conv_stat)
+ self.__context.set_string(self.__convert_chars.encode('utf-8'))
+ nr_segments = self.__context.get_nr_segments()
- for i in xrange(0, conv_stat.nr_segment):
+ for i in xrange(0, nr_segments):
buf = self.__context.get_segment(i, 0)
- text = unicode(buf, "utf-8")
+ text = UN(buf)
self.__segments.append((0, text))
self.__convert_mode = CONV_MODE_ANTHY
@@ -2126,13 +2207,13 @@ class Engine(ibus.EngineBase):
if self.__convert_mode == CONV_MODE_ANTHY:
for i in xrange(0, commit_index + 1):
(seg_index, text) = self.__segments[i]
- self.commit_text(ibus.Text(text))
+ self.commit_text(IBus.Text.new_from_string(text))
text, cursor = self.__get_preedit()
commit_length = 0
for i in xrange(0, commit_index + 1):
buf = self.__context.get_segment(i, NTH_UNCONVERTED_CANDIDATE)
- commit_length += len(unicode(buf, "utf-8"))
+ commit_length += len(UN(buf))
self.__move_cursor_char_length(commit_length - cursor)
for i in xrange(0, commit_length):
self.__preedit_ja_string.remove_before()
@@ -2149,12 +2230,12 @@ class Engine(ibus.EngineBase):
self.__cursor_pos = 0
text, cursor = self.__get_preedit()
self.__convert_chars = text
- self.__context.set_string(text.encode ("utf-8"))
+ self.__context.set_string(text.encode ('utf-8'))
- self.__lookup_table.clean()
+ self.__lookup_table.clear()
self.__lookup_table.show_cursor (False)
self.__lookup_table_visible = False
- self.update_aux_string(u"", ibus.AttrList(),
+ self.update_aux_string(u'', IBus.AttrList(),
self.__lookup_table_visible)
self.__fill_lookup_table()
self.__invalidate()
@@ -2169,24 +2250,32 @@ class Engine(ibus.EngineBase):
return self.__commit_nth_segment(self.__cursor_pos, keyval, state)
#candidates_keys
- def __select_candidate(self, pos):
+ def __on_candidate_index_in_page(self, index):
if not self._chk_mode('5'):
return False
- if not self.__lookup_table.set_cursor_pos_in_current_page(pos):
+ if index >= self.__lookup_table.get_page_size():
return False
-
- candidate = self.__lookup_table.get_current_candidate().text
+ cursor_pos = self.__lookup_table.get_cursor_pos()
+ cursor_in_page = self.__lookup_table.get_cursor_in_page()
+ real_index = cursor_pos - cursor_in_page + index
+ if real_index >= self.__lookup_table.get_number_of_candidates():
+ return False
+ self.__lookup_table.set_cursor_pos(real_index)
index = self.__lookup_table.get_cursor_pos()
+ candidate = UN(self.__lookup_table.get_candidate(index).get_text())
self.__segments[self.__cursor_pos] = index, candidate
+ self.__lookup_table_visible = False
+ self.__on_key_right()
self.__invalidate()
return True
def __cmd_select_first_candidate(self, keyval, state):
- return self.__select_candidate(0)
+ return self.__on_candidate_index_in_page(0)
def __cmd_select_last_candidate(self, keyval, state):
- return self.__select_candidate(self.__lookup_table.get_page_size() - 1)
+ return self.__on_candidate_index_in_page(
+ self.__lookup_table.get_page_size() - 1)
def __cmd_select_next_candidate(self, keyval, state):
if not self._chk_mode('235'):
@@ -2213,41 +2302,41 @@ class Engine(ibus.EngineBase):
return self.__on_key_page_down()
#direct_select_keys
- def __select_candidates(self, keyval):
+ def __select_keyval(self, keyval):
if not self._chk_mode('5'):
return False
return self.__on_key_number(keyval)
def __cmd_select_candidates_1(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_2(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_3(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_4(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_5(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_6(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_7(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_8(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_9(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
def __cmd_select_candidates_0(self, keyval, state):
- return self.__select_candidates(keyval)
+ return self.__select_keyval(keyval)
#convert_keys
def __cmd_convert_to_char_type_forward(self, keyval, state):
@@ -2305,7 +2394,7 @@ class Engine(ibus.EngineBase):
def __convert_segment_to_kana(self, n):
if self.__convert_mode == CONV_MODE_ANTHY and -4 <= n <= -2:
buf = self.__context.get_segment(self.__cursor_pos, n)
- self.__segments[self.__cursor_pos] = n, unicode(buf, "utf-8")
+ self.__segments[self.__cursor_pos] = n, UN(buf)
self.__lookup_table_visible = False
self.__invalidate()
return True
@@ -2361,8 +2450,8 @@ class Engine(ibus.EngineBase):
if self.__convert_mode == CONV_MODE_ANTHY and n in [-100, -101]:
start = 0
for i in range(self.__cursor_pos):
- start += len(unicode(self.__context.get_segment(i, NTH_UNCONVERTED_CANDIDATE), 'utf-8'))
- end = start + len(unicode(self.__context.get_segment(self.__cursor_pos, NTH_UNCONVERTED_CANDIDATE), 'utf-8'))
+ start += len(UN(self.__context.get_segment(i, NTH_UNCONVERTED_CANDIDATE)))
+ end = start + len(UN(self.__context.get_segment(self.__cursor_pos, NTH_UNCONVERTED_CANDIDATE)))
i, s = self.__segments[self.__cursor_pos]
s2 = self.__preedit_ja_string.get_raw(start, end)
if n == -101:
@@ -2435,6 +2524,6 @@ class Engine(ibus.EngineBase):
if pid != Engine.__setup_pid:
return
Engine.__setup_pid = 0
- setup_cmd = path.join(os.getenv('LIBEXECDIR'), "ibus-setup-anthy")
- Engine.__setup_pid = os.spawnl(os.P_NOWAIT, setup_cmd, "ibus-setup-anthy")
+ setup_cmd = path.join(config.LIBEXECDIR, 'ibus-setup-anthy')
+ Engine.__setup_pid = os.spawnl(os.P_NOWAIT, setup_cmd, 'ibus-setup-anthy')
diff --git a/engine/factory.py b/engine/factory.py
index 5550674..e540ba0 100644
--- a/engine/factory.py
+++ b/engine/factory.py
@@ -20,45 +20,54 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-import ibus
-import engine
import os
-from gettext import dgettext
-_ = lambda a : dgettext("ibus-anthy", a)
-N_ = lambda a : a
+from gi.repository import IBus
+
+import _config as config
+import engine
-class EngineFactory(ibus.EngineFactoryBase):
- FACTORY_PATH = "/com/redhat/IBus/engines/Anthy/Factory"
- ENGINE_PATH = "/com/redhat/IBus/engines/Anthy/Engine"
- NAME = _("Anthy")
- LANG = "ja"
- ICON = os.getenv("IBUS_ANTHY_PKGDATADIR") + "/icons/ibus-anthy.png"
- AUTHORS = "Huang Peng <shawn.p.huang@gmail.com>"
- CREDITS = "GPLv2"
+class EngineFactory(IBus.Factory):
+ FACTORY_PATH = '/com/redhat/IBus/engines/Anthy/Factory'
+ ENGINE_PATH = '/com/redhat/IBus/engines/Anthy/Engine'
+ NAME = 'Anthy'
+ LANG = 'ja'
+ ICON = config.PKGDATADIR + '/icons/ibus-anthy.png'
+ AUTHORS = 'Huang Peng <shawn.p.huang@gmail.com>'
+ CREDITS = 'GPLv2'
def __init__(self, bus):
self.__bus = bus
engine.Engine.CONFIG_RELOADED(bus)
- super(EngineFactory, self).__init__(bus)
+ super(EngineFactory, self).__init__(object_path=IBus.PATH_FACTORY,
+ connection=bus.get_connection())
self.__id = 0
self.__config = self.__bus.get_config()
- self.__config.connect("reloaded", self.__config_reloaded_cb)
- self.__config.connect("value-changed", self.__config_value_changed_cb)
+ self.__config.connect('value-changed', self.__config_value_changed_cb)
+ bus.get_connection().signal_subscribe('org.freedesktop.DBus',
+ 'org.freedesktop.DBus',
+ 'NameOwnerChanged',
+ '/org/freedesktop/DBus',
+ None,
+ 0,
+ self.__name_owner_changed_cb,
+ bus)
- def create_engine(self, engine_name):
- if engine_name == "anthy":
+ def do_create_engine(self, engine_name):
+ if engine_name == 'anthy':
self.__id += 1
- return engine.Engine(self.__bus, "%s/%d" % (self.ENGINE_PATH, self.__id))
-
- return super(EngineFactory, self).create_engine(engine_name)
+ return engine.Engine(self.__bus, '%s/%d' % (self.ENGINE_PATH, self.__id))
- def __config_reloaded_cb(self, config):
- engine.Engine.CONFIG_RELOADED(self.__bus)
+ return super(EngineFactory, self).do_create_engine(engine_name)
def __config_value_changed_cb(self, config, section, name, value):
engine.Engine.CONFIG_VALUE_CHANGED(self.__bus, section, name, value)
+ def __name_owner_changed_cb(self, connection, sender_name, object_path,
+ interface_name, signal_name, parameters,
+ user_data):
+ if signal_name == 'NameOwnerChanged':
+ engine.Engine.CONFIG_RELOADED(self.__bus)
diff --git a/engine/ibus-engine-anthy.in b/engine/ibus-engine-anthy.in
index 7d28e84..e80b71f 100644
--- a/engine/ibus-engine-anthy.in
+++ b/engine/ibus-engine-anthy.in
@@ -30,5 +30,5 @@ export PYTHONPATH=@pyexecdir@:$PYTHONPATH
export IBUS_PREFIX=@prefix@
export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@
export LIBEXECDIR=$libexecdir
-exec @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@
+exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@
diff --git a/engine/jastring.py b/engine/jastring.py
index fd26c0c..253dd92 100644
--- a/engine/jastring.py
+++ b/engine/jastring.py
@@ -87,9 +87,9 @@ class JaString:
else:
new_segments = segment_after.prepend(c)
else:
- if c != u"\0" and c != u"":
+ if c != u'\0' and c != u'':
if self.__mode == TYPING_MODE_ROMAJI:
- new_segments = [romaji.RomajiSegment(c, u"", self.__shift)]
+ new_segments = [romaji.RomajiSegment(c, u'', self.__shift)]
elif self.__mode == TYPING_MODE_KANA:
# kana mode doesn't have shift latin in MS.
new_segments = [kana.KanaSegment(c)]
@@ -222,34 +222,34 @@ class JaString:
def get_hiragana(self, commit=False):
conv = lambda s: s.to_hiragana()
R = lambda s: s if not (commit and s[-1:] == u'n') else s[:-1] + u'ん'
- text_before = R(u"".join(map(conv, self.__segments[:self.__cursor])))
- text_after = R(u"".join(map(conv, self.__segments[self.__cursor:])))
+ text_before = R(u''.join(map(conv, self.__segments[:self.__cursor])))
+ text_after = R(u''.join(map(conv, self.__segments[self.__cursor:])))
return self._chk_text(text_before + text_after), len(text_before)
def get_katakana(self, commit=False):
conv = lambda s: s.to_katakana()
R = lambda s: s if not (commit and s[-1:] == u'n') else s[:-1] + u'ン'
- text_before = R(u"".join(map(conv, self.__segments[:self.__cursor])))
- text_after = R(u"".join(map(conv, self.__segments[self.__cursor:])))
+ text_before = R(u''.join(map(conv, self.__segments[:self.__cursor])))
+ text_after = R(u''.join(map(conv, self.__segments[self.__cursor:])))
return self._chk_text(text_before + text_after), len(text_before)
def get_half_width_katakana(self, commit=False):
conv = lambda s: s.to_half_width_katakana()
R = lambda s: s if not (commit and s[-1:] == u'n') else s[:-1] + u'ン'
- text_before = R(u"".join(map(conv, self.__segments[:self.__cursor])))
- text_after = R(u"".join(map(conv, self.__segments[self.__cursor:])))
+ text_before = R(u''.join(map(conv, self.__segments[:self.__cursor])))
+ text_after = R(u''.join(map(conv, self.__segments[self.__cursor:])))
return self._chk_text(text_before + text_after), len(text_before)
def get_latin(self):
conv = lambda s: s.to_latin()
- text_before = u"".join(map(conv, self.__segments[:self.__cursor]))
- text_after = u"".join(map(conv, self.__segments[self.__cursor:]))
+ text_before = u''.join(map(conv, self.__segments[:self.__cursor]))
+ text_after = u''.join(map(conv, self.__segments[self.__cursor:]))
return text_before + text_after, len(text_before)
def get_wide_latin(self):
conv = lambda s: s.to_wide_latin()
- text_before = u"".join(map(conv, self.__segments[:self.__cursor]))
- text_after = u"".join(map(conv, self.__segments[self.__cursor:]))
+ text_before = u''.join(map(conv, self.__segments[:self.__cursor]))
+ text_after = u''.join(map(conv, self.__segments[self.__cursor:]))
return text_before + text_after, len(text_before)
def is_empty(self):
diff --git a/engine/kana.py b/engine/kana.py
index 066b047..f3ef400 100644
--- a/engine/kana.py
+++ b/engine/kana.py
@@ -20,20 +20,20 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-from ibus import unichar_half_to_full
+import sys
+
from tables import *
import segment
-import sys
-_UNFINISHED_HIRAGANA = set(u"かきくけこさしすせそたちつてとはひふへほ")
+_UNFINISHED_HIRAGANA = set(u'かきくけこさしすせそたちつてとはひふへほ')
class KanaSegment(segment.Segment):
_prefs = None
_kana_typing_rule_section = None
- def __init__(self, enchars=u"", jachars=u""):
+ def __init__(self, enchars=u'', jachars=u''):
if not jachars:
- jachars = self.__get_kana_typing_rule(enchars, u"")
+ jachars = self.__get_kana_typing_rule(enchars, u'')
super(KanaSegment, self).__init__(enchars, jachars)
@classmethod
@@ -60,13 +60,15 @@ class KanaSegment(segment.Segment):
enchars = enchars.encode('utf-8')
except:
print >> sys.stderr, \
- "Failed to encode UTF-8:", enchars
+ 'Failed to encode UTF-8:', enchars
if enchars in prefs.keys(section):
- value = unicode(str(prefs.get_value(section, enchars)))
+ value = prefs.unicode(prefs.str(prefs.get_value(section, enchars)))
else:
+ prefs.set_no_key_warning(True)
value = prefs.get_value_direct(section, enchars)
+ prefs.set_no_key_warning(False)
if value != None:
- value = unicode(str(value))
+ value = prefs.unicode(prefs.str(value))
if value == '':
value = None
if value == None:
@@ -79,7 +81,7 @@ class KanaSegment(segment.Segment):
return not (self._jachars in _UNFINISHED_HIRAGANA)
def append(self, enchar):
- if enchar == u"\0" or enchar == u"":
+ if enchar == u'\0' or enchar == u'':
return []
if self._jachars:
text = self._jachars + enchar
@@ -90,15 +92,15 @@ class KanaSegment(segment.Segment):
return []
return [KanaSegment(enchar)]
self._enchars = self._enchars + enchar
- self._jachars = self.__get_kana_typing_rule(self._enchars, u"")
+ self._jachars = self.__get_kana_typing_rule(self._enchars, u'')
return []
def prepend(self, enchar):
- if enchar == u"\0" or enchar == u"":
+ if enchar == u'\0' or enchar == u'':
return []
- if self._enchars == u"":
+ if self._enchars == u'':
self._enchars = enchar
- self._jachars = self.__get_kana_typing_rule(self._enchars, u"")
+ self._jachars = self.__get_kana_typing_rule(self._enchars, u'')
return []
return [KanaSegment(enchar)]
@@ -106,12 +108,12 @@ class KanaSegment(segment.Segment):
if index == -1:
index = len(self._enchars) - 1
if index < 0 or index >= len(self._enchars):
- raise IndexError("Out of bound")
+ raise IndexError('Out of bound')
if self.is_finished():
- self._enchars = u""
- self._jachars = u""
+ self._enchars = u''
+ self._jachars = u''
else:
enchars = list(self._enchars)
del enchars[index]
- self._enchars = u"".join(enchars)
- self._jachars = self.__get_kana_typing_rule(self._enchars, u"")
+ self._enchars = u''.join(enchars)
+ self._jachars = self.__get_kana_typing_rule(self._enchars, u'')
diff --git a/engine/main.py b/engine/main.py
index bf56034..21bec24 100644
--- a/engine/main.py
+++ b/engine/main.py
@@ -23,32 +23,40 @@
import os
import sys
import getopt
-import ibus
-import factory
-import gobject
import locale
+from gi.repository import GObject
+from gi.repository import IBus
+
+import _config as config
+import factory
+
class IMApp:
def __init__(self, exec_by_ibus):
- self.__component = ibus.Component("org.freedesktop.IBus.Anthy",
- "Anthy Component",
- "0.1.0",
- "GPL",
- "Peng Huang <shawn.p.huang@gmail.com>")
- self.__component.add_engine("anthy",
- "anthy",
- "Japanese Anthy",
- "ja",
- "GPL",
- "Peng Huang <shawn.p.huang@gmail.com>",
- "",
- "en")
- self.__mainloop = gobject.MainLoop()
- self.__bus = ibus.Bus()
- self.__bus.connect("disconnected", self.__bus_disconnected_cb)
+ command_line = config.LIBEXECDIR + '/ibus-engine-anthy --ibus'
+ self.__component = IBus.Component(name='org.freedesktop.IBus.Anthy',
+ description='Anthy Component',
+ version='0.1.0',
+ license='GPL',
+ author='Peng Huang <shawn.p.huang@gmail.com>',
+ homepage='http://code.google.com/p/ibus/',
+ command_line=command_line,
+ textdomain='ibus-anthy')
+ engine = IBus.EngineDesc(name='anthy',
+ longname='anthy',
+ description='Japanese Anthy',
+ language='ja',
+ license='GPL',
+ author='Peng Huang <shawn.p.huang@gmail.com>',
+ icon='ibus-anthy',
+ layout='en')
+ self.__component.add_engine(engine)
+ self.__mainloop = GObject.MainLoop()
+ self.__bus = IBus.Bus()
+ self.__bus.connect('disconnected', self.__bus_disconnected_cb)
self.__factory = factory.EngineFactory(self.__bus)
if exec_by_ibus:
- self.__bus.request_name("org.freedesktop.IBus.Anthy", 0)
+ self.__bus.request_name('org.freedesktop.IBus.Anthy', 0)
else:
self.__bus.register_component(self.__component)
@@ -63,22 +71,22 @@ def launch_engine(exec_by_ibus):
IMApp(exec_by_ibus).run()
def print_help(out, v = 0):
- print >> out, "-i, --ibus executed by ibus."
- print >> out, "-h, --help show this message."
- print >> out, "-d, --daemonize daemonize ibus"
+ print >> out, '-i, --ibus executed by ibus.'
+ print >> out, '-h, --help show this message.'
+ print >> out, '-d, --daemonize daemonize ibus.'
sys.exit(v)
def main():
try:
- locale.setlocale(locale.LC_ALL, "")
+ locale.setlocale(locale.LC_ALL, '')
except:
pass
exec_by_ibus = False
daemonize = False
- shortopt = "ihd"
- longopt = ["ibus", "help", "daemonize"]
+ shortopt = 'ihd'
+ longopt = ['ibus', 'helpn', 'daemonize']
try:
opts, args = getopt.getopt(sys.argv[1:], shortopt, longopt)
@@ -86,14 +94,14 @@ def main():
print_help(sys.stderr, 1)
for o, a in opts:
- if o in ("-h", "--help"):
+ if o in ('-h', '--help'):
print_help(sys.stdout)
- elif o in ("-d", "--daemonize"):
+ elif o in ('-d', '--daemonize'):
daemonize = True
- elif o in ("-i", "--ibus"):
+ elif o in ('-i', '--ibus'):
exec_by_ibus = True
else:
- print >> sys.stderr, "Unknown argument: %s" % o
+ print >> sys.stderr, 'Unknown argument: %s' % o
print_help(sys.stderr, 1)
if daemonize:
@@ -102,5 +110,5 @@ def main():
launch_engine(exec_by_ibus)
-if __name__ == "__main__":
+if __name__ == '__main__':
main()
diff --git a/engine/romaji.py b/engine/romaji.py
index 4474fba..328f910 100644
--- a/engine/romaji.py
+++ b/engine/romaji.py
@@ -20,10 +20,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-from ibus import unichar_half_to_full
+import sys
+
from tables import *
import segment
-import sys
def romaji_correction_rule_get(k, d):
return (u'ん', k[1:2]) if k[0:1] == u'n' and not k[1:2] in u"aiueony'" else d
@@ -32,11 +32,11 @@ class RomajiSegment(segment.Segment):
_prefs = None
_romaji_typing_rule_section = None
- def __init__(self, enchars=u"", jachars=u"", shift=False):
+ def __init__(self, enchars=u'', jachars=u'', shift=False):
if not jachars and not shift:
jachars = self.__get_romaji_typing_rule(enchars, None)
if jachars == None:
- jachars = symbol_rule.get(enchars, u"")
+ jachars = symbol_rule.get(enchars, u'')
super(RomajiSegment, self).__init__(enchars, jachars)
@classmethod
@@ -63,13 +63,16 @@ class RomajiSegment(segment.Segment):
enchars = enchars.encode('utf-8')
except:
print >> sys.stderr, \
- "Failed to encode UTF-8:", enchars
+ 'Failed to encode UTF-8:', enchars
if enchars in prefs.keys(section):
- value = unicode(str(prefs.get_value(section, enchars)))
+ value = prefs.unicode(prefs.str(
+ prefs.get_value(section, enchars)))
else:
+ prefs.set_no_key_warning(True)
value = prefs.get_value_direct(section, enchars)
+ prefs.set_no_key_warning(False)
if value != None:
- value = unicode(str(value))
+ value = prefs.unicode(prefs.str(value))
if value == '':
value = None
if value == None:
@@ -79,11 +82,11 @@ class RomajiSegment(segment.Segment):
return value
def is_finished(self):
- return self._jachars != u""
+ return self._jachars != u''
def append(self, enchar, shift=False):
if self.is_finished():
- if enchar == u"" and enchar == u"\0":
+ if enchar == u'' and enchar == u'\0':
return []
return [RomajiSegment(enchar)]
@@ -145,7 +148,7 @@ class RomajiSegment(segment.Segment):
return []
def prepend(self, enchar, shift=False):
- if enchar == u"" or enchar == u"\0":
+ if enchar == u'' or enchar == u'\0':
return []
if self.is_finished():
@@ -204,17 +207,17 @@ class RomajiSegment(segment.Segment):
if index == -1:
index = len(self._enchars) - 1
if index < 0 or index >= len(self._enchars):
- raise IndexError("Out of bound")
+ raise IndexError('Out of bound')
if self.is_finished():
- self._enchars = u""
- self._jachars = u""
+ self._enchars = u''
+ self._jachars = u''
else:
enchars = list(self._enchars)
del enchars[index]
- self._enchars = u"".join(enchars)
+ self._enchars = u''.join(enchars)
jachars = self.__get_romaji_typing_rule(self._enchars, None)
if jachars == None:
- jachars = symbol_rule.get(self._enchars, u"")
+ jachars = symbol_rule.get(self._enchars, u'')
self._jachars = jachars
diff --git a/engine/segment.py b/engine/segment.py
index 4e96119..6ab0f4c 100644
--- a/engine/segment.py
+++ b/engine/segment.py
@@ -20,30 +20,40 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#from ibus import unichar_half_to_full
-from ibus import unichar_half_to_full as h_to_f
from tables import *
+_half_full_table = [
+ (0x0020, 0x3000, 1),
+ (0x0021, 0xFF01, 0x5E),
+]
+
+def _h_to_f(c):
+ code = ord (c)
+ for half, full, size in _half_full_table:
+ if code >= half and code < half + size:
+ return unichr (full + code - half)
+ return c
+
def unichar_half_to_full(c):
tdl = {'"': u'\u201d', "'": u'\u2019', '`': u'\u2018'}
- return tdl[c] if c in tdl else h_to_f(c)
+ return tdl[c] if c in tdl else _h_to_f(c)
class Segment(object):
- def __init__(self, enchars=u"", jachars=u""):
+ def __init__(self, enchars=u'', jachars=u''):
self._enchars = enchars
self._jachars = jachars
def append(self, enchar):
- raise NotImplementedError("append() is not implemented")
+ raise NotImplementedError('append() is not implemented')
def prepend(self, enchar):
- raise NotImplementedError("prepend() is not implemented")
+ raise NotImplementedError('prepend() is not implemented')
def pop(self, index=-1):
- raise NotImplementedError("pop() is not implemented")
+ raise NotImplementedError('pop() is not implemented')
def is_finished(self):
- raise NotImplementedError("is_finised() is not implemented")
+ raise NotImplementedError('is_finised() is not implemented')
def set_enchars(self, enchars):
self.enchars = enchars
@@ -64,19 +74,19 @@ class Segment(object):
def to_katakana(self):
if self._jachars:
- return u"".join(map(lambda c: hiragana_katakana_table.get(c, (c, c, c))[0], self._jachars))
+ return u''.join(map(lambda c: hiragana_katakana_table.get(c, (c, c, c))[0], self._jachars))
return self._enchars
def to_half_width_katakana(self):
if self._jachars:
- return u"".join(map(lambda c: hiragana_katakana_table.get(c, (c, c, c))[1], self._jachars))
+ return u''.join(map(lambda c: hiragana_katakana_table.get(c, (c, c, c))[1], self._jachars))
return self._enchars
def to_latin(self):
return self._enchars
def to_wide_latin(self):
- return u"".join(map(unichar_half_to_full, self._enchars))
+ return u''.join(map(unichar_half_to_full, self._enchars))
def is_empty(self):
if self._enchars or self._jachars:
diff --git a/engine/tables.py b/engine/tables.py
index e312d72..b58f82a 100644
--- a/engine/tables.py
+++ b/engine/tables.py
@@ -22,279 +22,279 @@
# string, result, cont
romaji_typing_rule_static = {
- u"-" : u"ー",
- u"a" : u"あ",
- u"i" : u"い",
- u"u" : u"う",
- u"e" : u"え",
- u"o" : u"お",
- u"xa" : u"ぁ",
- u"xi" : u"ぃ",
- u"xu" : u"ぅ",
- u"xe" : u"ぇ",
- u"xo" : u"ぉ",
- u"la" : u"ぁ",
- u"li" : u"ぃ",
- u"lu" : u"ぅ",
- u"le" : u"ぇ",
- u"lo" : u"ぉ",
- u"wha" : u"うぁ",
- u"whi" : u"うぃ",
- u"whe" : u"うぇ",
- u"who" : u"うぉ",
- u"va" : u"ヴぁ",
- u"vi" : u"ヴぃ",
- u"vu" : u"ヴ",
- u"ve" : u"ヴぇ",
- u"vo" : u"ヴぉ",
- u"ka" : u"か",
- u"ki" : u"き",
- u"ku" : u"く",
- u"ke" : u"け",
- u"ko" : u"こ",
- u"lka" : u"ヵ",
- u"lke" : u"ヶ",
-# u"xka" : u"ゕ",
- u"xka" : u"ヵ",
-# u"xke" : u"ゖ",
- u"xke" : u"ヶ",
- u"ga" : u"が",
- u"gi" : u"ぎ",
- u"gu" : u"ぐ",
- u"ge" : u"げ",
- u"go" : u"ご",
- u"kya" : u"きゃ",
- u"kyi" : u"きぃ",
- u"kyu" : u"きゅ",
- u"kye" : u"きぇ",
- u"kyo" : u"きょ",
- u"kwa" : u"くぁ",
- u"gya" : u"ぎゃ",
- u"gyi" : u"ぎぃ",
- u"gyu" : u"ぎゅ",
- u"gye" : u"ぎぇ",
- u"gyo" : u"ぎょ",
- u"gwa" : u"ぐぁ",
- u"sa" : u"さ",
- u"si" : u"し",
- u"su" : u"す",
- u"se" : u"せ",
- u"so" : u"そ",
- u"za" : u"ざ",
- u"zi" : u"じ",
- u"zu" : u"ず",
- u"ze" : u"ぜ",
- u"zo" : u"ぞ",
- u"sya" : u"しゃ",
- u"syi" : u"しぃ",
- u"syu" : u"しゅ",
- u"sye" : u"しぇ",
- u"syo" : u"しょ",
- u"sha" : u"しゃ",
- u"shi" : u"し",
- u"shu" : u"しゅ",
- u"she" : u"しぇ",
- u"sho" : u"しょ",
- u"zya" : u"じゃ",
- u"zyi" : u"じぃ",
- u"zyu" : u"じゅ",
- u"zye" : u"じぇ",
- u"zyo" : u"じょ",
- u"ja" : u"じゃ",
- u"jya" : u"じゃ",
- u"ji" : u"じ",
- u"jyi" : u"じぃ",
- u"ju" : u"じゅ",
- u"jyu" : u"じゅ",
- u"je" : u"じぇ",
- u"jye" : u"じぇ",
- u"jo" : u"じょ",
- u"jyo" : u"じょ",
- u"ta" : u"た",
- u"ti" : u"ち",
- u"tu" : u"つ",
- u"tsu" : u"つ",
- u"te" : u"て",
- u"to" : u"と",
- u"da" : u"だ",
- u"di" : u"ぢ",
- u"du" : u"づ",
- u"de" : u"で",
- u"do" : u"ど",
- u"xtu" : u"っ",
- u"xtsu" : u"っ",
- u"ltu" : u"っ",
- u"ltsu" : u"っ",
- u"tya" : u"ちゃ",
- u"tyi" : u"ちぃ",
- u"tyu" : u"ちゅ",
- u"tye" : u"ちぇ",
- u"tyo" : u"ちょ",
- u"cya" : u"ちゃ",
- u"cyi" : u"ちぃ",
- u"cyu" : u"ちゅ",
- u"cye" : u"ちぇ",
- u"cyo" : u"ちょ",
- u"cha" : u"ちゃ",
- u"chi" : u"ち",
- u"chu" : u"ちゅ",
- u"che" : u"ちぇ",
- u"cho" : u"ちょ",
- u"dya" : u"ぢゃ",
- u"dyi" : u"ぢぃ",
- u"dyu" : u"ぢゅ",
- u"dye" : u"ぢぇ",
- u"dyo" : u"ぢょ",
- u"tsa" : u"つぁ",
- u"tsi" : u"つぃ",
- u"tse" : u"つぇ",
- u"tso" : u"つぉ",
- u"tha" : u"てゃ",
- u"thi" : u"てぃ",
- u"thu" : u"てゅ",
- u"the" : u"てぇ",
- u"tho" : u"てょ",
- u"twu" : u"とぅ",
- u"dha" : u"でゃ",
- u"dhi" : u"でぃ",
- u"dhu" : u"でゅ",
- u"dhe" : u"でぇ",
- u"dho" : u"でょ",
- u"dwu" : u"どぅ",
- u"na" : u"な",
- u"ni" : u"に",
- u"nu" : u"ぬ",
- u"ne" : u"ね",
- u"no" : u"の",
- u"nya" : u"にゃ",
- u"nyi" : u"にぃ",
- u"nyu" : u"にゅ",
- u"nye" : u"にぇ",
- u"nyo" : u"にょ",
- u"ha" : u"は",
- u"hi" : u"ひ",
- u"hu" : u"ふ",
- u"he" : u"へ",
- u"ho" : u"ほ",
- u"ba" : u"ば",
- u"bi" : u"び",
- u"bu" : u"ぶ",
- u"be" : u"べ",
- u"bo" : u"ぼ",
- u"pa" : u"ぱ",
- u"pi" : u"ぴ",
- u"pu" : u"ぷ",
- u"pe" : u"ぺ",
- u"po" : u"ぽ",
- u"hya" : u"ひゃ",
- u"hyi" : u"ひぃ",
- u"hyu" : u"ひゅ",
- u"hye" : u"ひぇ",
- u"hyo" : u"ひょ",
- u"bya" : u"びゃ",
- u"byi" : u"びぃ",
- u"byu" : u"びゅ",
- u"bye" : u"びぇ",
- u"byo" : u"びょ",
- u"pya" : u"ぴゃ",
- u"pyi" : u"ぴぃ",
- u"pyu" : u"ぴゅ",
- u"pye" : u"ぴぇ",
- u"pyo" : u"ぴょ",
- u"fa" : u"ふぁ",
- u"fi" : u"ふぃ",
- u"fu" : u"ふ",
- u"fe" : u"ふぇ",
- u"fo" : u"ふぉ",
- u"fya" : u"ふゃ",
- u"fyi" : u"ふぃ",
- u"fyu" : u"ふゅ",
- u"fye" : u"ふぇ",
- u"fyo" : u"ふょ",
- u"ma" : u"ま",
- u"mi" : u"み",
- u"mu" : u"む",
- u"me" : u"め",
- u"mo" : u"も",
- u"mya" : u"みゃ",
- u"myi" : u"みぃ",
- u"myu" : u"みゅ",
- u"mye" : u"みぇ",
- u"myo" : u"みょ",
- u"ya" : u"や",
- u"yi" : u"い",
- u"yu" : u"ゆ",
- u"ye" : u"いぇ",
- u"yo" : u"よ",
- u"lya" : u"ゃ",
- u"lyi" : u"ぃ",
- u"lyu" : u"ゅ",
- u"lye" : u"ぇ",
- u"lyo" : u"ょ",
- u"xya" : u"ゃ",
- u"xyi" : u"ぃ",
- u"xyu" : u"ゅ",
- u"xye" : u"ぇ",
- u"xyo" : u"ょ",
- u"ra" : u"ら",
- u"ri" : u"り",
- u"ru" : u"る",
- u"re" : u"れ",
- u"ro" : u"ろ",
- u"rya" : u"りゃ",
- u"ryi" : u"りぃ",
- u"ryu" : u"りゅ",
- u"rye" : u"りぇ",
- u"ryo" : u"りょ",
- u"wa" : u"わ",
- u"wi" : u"うぃ",
- u"wu" : u"う",
- u"we" : u"うぇ",
- u"wo" : u"を",
- u"lwa" : u"ゎ",
- u"xwa" : u"ゎ",
- u"n'" : u"ん",
- u"nn" : u"ん",
- u"wyi" : u"ゐ",
- u"wye" : u"ゑ",
+ u'-' : u'ー',
+ u'a' : u'あ',
+ u'i' : u'い',
+ u'u' : u'う',
+ u'e' : u'え',
+ u'o' : u'お',
+ u'xa' : u'ぁ',
+ u'xi' : u'ぃ',
+ u'xu' : u'ぅ',
+ u'xe' : u'ぇ',
+ u'xo' : u'ぉ',
+ u'la' : u'ぁ',
+ u'li' : u'ぃ',
+ u'lu' : u'ぅ',
+ u'le' : u'ぇ',
+ u'lo' : u'ぉ',
+ u'wha' : u'うぁ',
+ u'whi' : u'うぃ',
+ u'whe' : u'うぇ',
+ u'who' : u'うぉ',
+ u'va' : u'ヴぁ',
+ u'vi' : u'ヴぃ',
+ u'vu' : u'ヴ',
+ u've' : u'ヴぇ',
+ u'vo' : u'ヴぉ',
+ u'ka' : u'か',
+ u'ki' : u'き',
+ u'ku' : u'く',
+ u'ke' : u'け',
+ u'ko' : u'こ',
+ u'lka' : u'ヵ',
+ u'lke' : u'ヶ',
+# u'xka' : u'ゕ',
+ u'xka' : u'ヵ',
+# u'xke' : u'ゖ',
+ u'xke' : u'ヶ',
+ u'ga' : u'が',
+ u'gi' : u'ぎ',
+ u'gu' : u'ぐ',
+ u'ge' : u'げ',
+ u'go' : u'ご',
+ u'kya' : u'きゃ',
+ u'kyi' : u'きぃ',
+ u'kyu' : u'きゅ',
+ u'kye' : u'きぇ',
+ u'kyo' : u'きょ',
+ u'kwa' : u'くぁ',
+ u'gya' : u'ぎゃ',
+ u'gyi' : u'ぎぃ',
+ u'gyu' : u'ぎゅ',
+ u'gye' : u'ぎぇ',
+ u'gyo' : u'ぎょ',
+ u'gwa' : u'ぐぁ',
+ u'sa' : u'さ',
+ u'si' : u'し',
+ u'su' : u'す',
+ u'se' : u'せ',
+ u'so' : u'そ',
+ u'za' : u'ざ',
+ u'zi' : u'じ',
+ u'zu' : u'ず',
+ u'ze' : u'ぜ',
+ u'zo' : u'ぞ',
+ u'sya' : u'しゃ',
+ u'syi' : u'しぃ',
+ u'syu' : u'しゅ',
+ u'sye' : u'しぇ',
+ u'syo' : u'しょ',
+ u'sha' : u'しゃ',
+ u'shi' : u'し',
+ u'shu' : u'しゅ',
+ u'she' : u'しぇ',
+ u'sho' : u'しょ',
+ u'zya' : u'じゃ',
+ u'zyi' : u'じぃ',
+ u'zyu' : u'じゅ',
+ u'zye' : u'じぇ',
+ u'zyo' : u'じょ',
+ u'ja' : u'じゃ',
+ u'jya' : u'じゃ',
+ u'ji' : u'じ',
+ u'jyi' : u'じぃ',
+ u'ju' : u'じゅ',
+ u'jyu' : u'じゅ',
+ u'je' : u'じぇ',
+ u'jye' : u'じぇ',
+ u'jo' : u'じょ',
+ u'jyo' : u'じょ',
+ u'ta' : u'た',
+ u'ti' : u'ち',
+ u'tu' : u'つ',
+ u'tsu' : u'つ',
+ u'te' : u'て',
+ u'to' : u'と',
+ u'da' : u'だ',
+ u'di' : u'ぢ',
+ u'du' : u'づ',
+ u'de' : u'で',
+ u'do' : u'ど',
+ u'xtu' : u'っ',
+ u'xtsu' : u'っ',
+ u'ltu' : u'っ',
+ u'ltsu' : u'っ',
+ u'tya' : u'ちゃ',
+ u'tyi' : u'ちぃ',
+ u'tyu' : u'ちゅ',
+ u'tye' : u'ちぇ',
+ u'tyo' : u'ちょ',
+ u'cya' : u'ちゃ',
+ u'cyi' : u'ちぃ',
+ u'cyu' : u'ちゅ',
+ u'cye' : u'ちぇ',
+ u'cyo' : u'ちょ',
+ u'cha' : u'ちゃ',
+ u'chi' : u'ち',
+ u'chu' : u'ちゅ',
+ u'che' : u'ちぇ',
+ u'cho' : u'ちょ',
+ u'dya' : u'ぢゃ',
+ u'dyi' : u'ぢぃ',
+ u'dyu' : u'ぢゅ',
+ u'dye' : u'ぢぇ',
+ u'dyo' : u'ぢょ',
+ u'tsa' : u'つぁ',
+ u'tsi' : u'つぃ',
+ u'tse' : u'つぇ',
+ u'tso' : u'つぉ',
+ u'tha' : u'てゃ',
+ u'thi' : u'てぃ',
+ u'thu' : u'てゅ',
+ u'the' : u'てぇ',
+ u'tho' : u'てょ',
+ u'twu' : u'とぅ',
+ u'dha' : u'でゃ',
+ u'dhi' : u'でぃ',
+ u'dhu' : u'でゅ',
+ u'dhe' : u'でぇ',
+ u'dho' : u'でょ',
+ u'dwu' : u'どぅ',
+ u'na' : u'な',
+ u'ni' : u'に',
+ u'nu' : u'ぬ',
+ u'ne' : u'ね',
+ u'no' : u'の',
+ u'nya' : u'にゃ',
+ u'nyi' : u'にぃ',
+ u'nyu' : u'にゅ',
+ u'nye' : u'にぇ',
+ u'nyo' : u'にょ',
+ u'ha' : u'は',
+ u'hi' : u'ひ',
+ u'hu' : u'ふ',
+ u'he' : u'へ',
+ u'ho' : u'ほ',
+ u'ba' : u'ば',
+ u'bi' : u'び',
+ u'bu' : u'ぶ',
+ u'be' : u'べ',
+ u'bo' : u'ぼ',
+ u'pa' : u'ぱ',
+ u'pi' : u'ぴ',
+ u'pu' : u'ぷ',
+ u'pe' : u'ぺ',
+ u'po' : u'ぽ',
+ u'hya' : u'ひゃ',
+ u'hyi' : u'ひぃ',
+ u'hyu' : u'ひゅ',
+ u'hye' : u'ひぇ',
+ u'hyo' : u'ひょ',
+ u'bya' : u'びゃ',
+ u'byi' : u'びぃ',
+ u'byu' : u'びゅ',
+ u'bye' : u'びぇ',
+ u'byo' : u'びょ',
+ u'pya' : u'ぴゃ',
+ u'pyi' : u'ぴぃ',
+ u'pyu' : u'ぴゅ',
+ u'pye' : u'ぴぇ',
+ u'pyo' : u'ぴょ',
+ u'fa' : u'ふぁ',
+ u'fi' : u'ふぃ',
+ u'fu' : u'ふ',
+ u'fe' : u'ふぇ',
+ u'fo' : u'ふぉ',
+ u'fya' : u'ふゃ',
+ u'fyi' : u'ふぃ',
+ u'fyu' : u'ふゅ',
+ u'fye' : u'ふぇ',
+ u'fyo' : u'ふょ',
+ u'ma' : u'ま',
+ u'mi' : u'み',
+ u'mu' : u'む',
+ u'me' : u'め',
+ u'mo' : u'も',
+ u'mya' : u'みゃ',
+ u'myi' : u'みぃ',
+ u'myu' : u'みゅ',
+ u'mye' : u'みぇ',
+ u'myo' : u'みょ',
+ u'ya' : u'や',
+ u'yi' : u'い',
+ u'yu' : u'ゆ',
+ u'ye' : u'いぇ',
+ u'yo' : u'よ',
+ u'lya' : u'ゃ',
+ u'lyi' : u'ぃ',
+ u'lyu' : u'ゅ',
+ u'lye' : u'ぇ',
+ u'lyo' : u'ょ',
+ u'xya' : u'ゃ',
+ u'xyi' : u'ぃ',
+ u'xyu' : u'ゅ',
+ u'xye' : u'ぇ',
+ u'xyo' : u'ょ',
+ u'ra' : u'ら',
+ u'ri' : u'り',
+ u'ru' : u'る',
+ u're' : u'れ',
+ u'ro' : u'ろ',
+ u'rya' : u'りゃ',
+ u'ryi' : u'りぃ',
+ u'ryu' : u'りゅ',
+ u'rye' : u'りぇ',
+ u'ryo' : u'りょ',
+ u'wa' : u'わ',
+ u'wi' : u'うぃ',
+ u'wu' : u'う',
+ u'we' : u'うぇ',
+ u'wo' : u'を',
+ u'lwa' : u'ゎ',
+ u'xwa' : u'ゎ',
+ u'n\'' : u'ん',
+ u'nn' : u'ん',
+ u'wyi' : u'ゐ',
+ u'wye' : u'ゑ',
}
symbol_rule = {
# symbols
- u" " : u" ",
- u"," : u"、",
- u"." : u"。",
- u"!" : u"!",
- u"\"" : u"\u201d",
- u"#" : u"#",
- u"$" : u"$",
- u"%" : u"%",
- u"&" : u"&",
- u"'" : u"\u2019",
- u"(" : u"(",
- u")" : u")",
- u"~" : u"\uff5e",
- u"-" : u"ー",
- u"=" : u"=",
- u"^" : u"^",
- u"\\" : u"\",
- u"|" : u"|",
- u"`" : u"\u2018",
- u"@" : u"@",
- u"{" : u"{",
- u"[" : u"「",
- u"+" : u"+",
- u";" : u";",
- u"*" : u"*",
- u":" : u":",
- u"}" : u"}",
- u"]" : u"」",
- u"<" : u"<",
- u">" : u">",
- u"?" : u"?",
- u"/" : u"/",
- u"_" : u"_",
- u"¥" : u"¥",
+ u' ' : u' ',
+ u',' : u'、',
+ u'.' : u'。',
+ u'!' : u'!',
+ u'"' : u'\u201d',
+ u'#' : u'#',
+ u'$' : u'$',
+ u'%' : u'%',
+ u'&' : u'&',
+ u'\'' : u'\u2019',
+ u'(' : u'(',
+ u')' : u')',
+ u'~' : u'\uff5e',
+ u'-' : u'ー',
+ u'=' : u'=',
+ u'^' : u'^',
+ u'\\' : u'\',
+ u'|' : u'|',
+ u'`' : u'\u2018',
+ u'@' : u'@',
+ u'{' : u'{',
+ u'[' : u'「',
+ u'+' : u'+',
+ u';' : u';',
+ u'*' : u'*',
+ u':' : u':',
+ u'}' : u'}',
+ u']' : u'」',
+ u'<' : u'<',
+ u'>' : u'>',
+ u'?' : u'?',
+ u'/' : u'/',
+ u'_' : u'_',
+ u'¥' : u'¥',
# numbers
u'0': u'0',
@@ -312,348 +312,348 @@ symbol_rule = {
# this is only used with romaji_typing_rule
romaji_double_consonat_typing_rule = {
# double consonant rule
- u"bb" : (u"っ", u"b"),
- u"cc" : (u"っ", u"c"),
- u"dd" : (u"っ", u"d"),
- u"ff" : (u"っ", u"f"),
- u"gg" : (u"っ", u"g"),
- u"hh" : (u"っ", u"h"),
- u"jj" : (u"っ", u"j"),
- u"kk" : (u"っ", u"k"),
- u"mm" : (u"っ", u"m"),
- u"pp" : (u"っ", u"p"),
- u"rr" : (u"っ", u"r"),
- u"ss" : (u"っ", u"s"),
- u"tt" : (u"っ", u"t"),
- u"vv" : (u"っ", u"v"),
- u"ww" : (u"っ", u"w"),
- u"xx" : (u"っ", u"x"),
- u"yy" : (u"っ", u"y"),
- u"zz" : (u"っ", u"z"),
+ u'bb' : (u'っ', u'b'),
+ u'cc' : (u'っ', u'c'),
+ u'dd' : (u'っ', u'd'),
+ u'ff' : (u'っ', u'f'),
+ u'gg' : (u'っ', u'g'),
+ u'hh' : (u'っ', u'h'),
+ u'jj' : (u'っ', u'j'),
+ u'kk' : (u'っ', u'k'),
+ u'mm' : (u'っ', u'm'),
+ u'pp' : (u'っ', u'p'),
+ u'rr' : (u'っ', u'r'),
+ u'ss' : (u'っ', u's'),
+ u'tt' : (u'っ', u't'),
+ u'vv' : (u'っ', u'v'),
+ u'ww' : (u'っ', u'w'),
+ u'xx' : (u'っ', u'x'),
+ u'yy' : (u'っ', u'y'),
+ u'zz' : (u'っ', u'z'),
}
# this is only used with romaji_typing_rule
romaji_correction_rule = {
- u"nb" : (u"ん", u"b"),
- u"nc" : (u"ん", u"c"),
- u"nd" : (u"ん", u"d"),
- u"nf" : (u"ん", u"f"),
- u"ng" : (u"ん", u"g"),
- u"nh" : (u"ん", u"h"),
- u"nj" : (u"ん", u"j"),
- u"nk" : (u"ん", u"k"),
- u"nl" : (u"ん", u"l"),
- u"nm" : (u"ん", u"m"),
- u"np" : (u"ん", u"p"),
- u"nr" : (u"ん", u"r"),
- u"ns" : (u"ん", u"s"),
- u"nt" : (u"ん", u"t"),
- u"nv" : (u"ん", u"v"),
- u"nw" : (u"ん", u"w"),
- u"nx" : (u"ん", u"x"),
- u"nz" : (u"ん", u"z"),
- u"n\0" : (u"ん", u""),
- u"n," : (u"ん", u","),
- u"n." : (u"ん", u"."),
+ u'nb' : (u'ん', u'b'),
+ u'nc' : (u'ん', u'c'),
+ u'nd' : (u'ん', u'd'),
+ u'nf' : (u'ん', u'f'),
+ u'ng' : (u'ん', u'g'),
+ u'nh' : (u'ん', u'h'),
+ u'nj' : (u'ん', u'j'),
+ u'nk' : (u'ん', u'k'),
+ u'nl' : (u'ん', u'l'),
+ u'nm' : (u'ん', u'm'),
+ u'np' : (u'ん', u'p'),
+ u'nr' : (u'ん', u'r'),
+ u'ns' : (u'ん', u's'),
+ u'nt' : (u'ん', u't'),
+ u'nv' : (u'ん', u'v'),
+ u'nw' : (u'ん', u'w'),
+ u'nx' : (u'ん', u'x'),
+ u'nz' : (u'ん', u'z'),
+ u'n\0' : (u'ん', u''),
+ u'n,' : (u'ん', u','),
+ u'n.' : (u'ん', u'.'),
}
# EUC-JP and SJIS do not have the chars
romaji_utf8_rule = {
- u"う゛" : [u"ゔ"],
+ u'う゛' : [u'ゔ'],
}
# Hiragana normalization is needed for the personal dict.
romaji_normalize_rule = {
- u"ヴ" : [u"う゛"],
+ u'ヴ' : [u'う゛'],
}
# a port of 101kana.sty from scim-anthy
kana_typing_rule_static = {
# no modifiers keys
- u"1" : u"ぬ",
- u"2" : u"ふ",
- u"3" : u"あ",
- u"4" : u"う",
- u"5" : u"え",
- u"6" : u"お",
- u"7" : u"や",
- u"8" : u"ゆ",
- u"9" : u"よ",
- u"0" : u"わ",
- u"-" : u"ほ",
- u"^" : u"へ",
+ u'1' : u'ぬ',
+ u'2' : u'ふ',
+ u'3' : u'あ',
+ u'4' : u'う',
+ u'5' : u'え',
+ u'6' : u'お',
+ u'7' : u'や',
+ u'8' : u'ゆ',
+ u'9' : u'よ',
+ u'0' : u'わ',
+ u'-' : u'ほ',
+ u'^' : u'へ',
- u"q" : u"た",
- u"w" : u"て",
- u"e" : u"い",
- u"r" : u"す",
- u"t" : u"か",
- u"y" : u"ん",
- u"u" : u"な",
- u"i" : u"に",
- u"o" : u"ら",
- u"p" : u"せ",
- u"@" : u"゛",
- u"[" : u"゜",
+ u'q' : u'た',
+ u'w' : u'て',
+ u'e' : u'い',
+ u'r' : u'す',
+ u't' : u'か',
+ u'y' : u'ん',
+ u'u' : u'な',
+ u'i' : u'に',
+ u'o' : u'ら',
+ u'p' : u'せ',
+ u'@' : u'゛',
+ u'[' : u'゜',
- u"a" : u"ち",
- u"s" : u"と",
- u"d" : u"し",
- u"f" : u"は",
- u"g" : u"き",
- u"h" : u"く",
- u"j" : u"ま",
- u"k" : u"の",
- u"l" : u"り",
- u";" : u"れ",
- u":" : u"け",
- u"]" : u"む",
+ u'a' : u'ち',
+ u's' : u'と',
+ u'd' : u'し',
+ u'f' : u'は',
+ u'g' : u'き',
+ u'h' : u'く',
+ u'j' : u'ま',
+ u'k' : u'の',
+ u'l' : u'り',
+ u';' : u'れ',
+ u':' : u'け',
+ u']' : u'む',
- u"z" : u"つ",
- u"x" : u"さ",
- u"c" : u"そ",
- u"v" : u"ひ",
- u"b" : u"こ",
- u"n" : u"み",
- u"m" : u"も",
- u"," : u"ね",
- u"." : u"る",
- u"/" : u"め",
- # u"\\" : u"ー",
- u"\\" : u"ろ",
+ u'z' : u'つ',
+ u'x' : u'さ',
+ u'c' : u'そ',
+ u'v' : u'ひ',
+ u'b' : u'こ',
+ u'n' : u'み',
+ u'm' : u'も',
+ u',' : u'ね',
+ u'.' : u'る',
+ u'/' : u'め',
+ # u'\\' : u'ー',
+ u'\\' : u'ろ',
# shift modifiered keys
- u"!" : u"ぬ",
- u"\"" : u"ふ",
- u"#" : u"ぁ",
- u"$" : u"ぅ",
- u"%" : u"ぇ",
- u"&" : u"ぉ",
- u"'" : u"ゃ",
- u"(" : u"ゅ",
- u")" : u"ょ",
- u"~" : u"を",
- u"=" : u"ほ",
- u"|" : u"ー",
+ u'!' : u'ぬ',
+ u'"' : u'ふ',
+ u'#' : u'ぁ',
+ u'$' : u'ぅ',
+ u'%' : u'ぇ',
+ u'&' : u'ぉ',
+ u'\'' : u'ゃ',
+ u'(' : u'ゅ',
+ u')' : u'ょ',
+ u'~' : u'を',
+ u'=' : u'ほ',
+ u'|' : u'ー',
- u"Q" : u"た",
- u"W" : u"て",
- u"E" : u"ぃ",
- u"R" : u"す",
- u"T" : u"ヵ",
- u"Y" : u"ん",
- u"U" : u"な",
- u"I" : u"に",
- u"O" : u"ら",
- u"P" : u"せ",
- u"`" : u"゛",
+ u'Q' : u'た',
+ u'W' : u'て',
+ u'E' : u'ぃ',
+ u'R' : u'す',
+ u'T' : u'ヵ',
+ u'Y' : u'ん',
+ u'U' : u'な',
+ u'I' : u'に',
+ u'O' : u'ら',
+ u'P' : u'せ',
+ u'`' : u'゛',
- u"{" : u"「",
+ u'{' : u'「',
- u"A" : u"ち",
- u"S" : u"と",
- u"D" : u"し",
- u"F" : u"ゎ",
- u"G" : u"き",
- u"H" : u"く",
- u"J" : u"ま",
- u"K" : u"の",
- u"L" : u"り",
- u"+" : u"れ",
- u"*" : u"ヶ",
+ u'A' : u'ち',
+ u'S' : u'と',
+ u'D' : u'し',
+ u'F' : u'ゎ',
+ u'G' : u'き',
+ u'H' : u'く',
+ u'J' : u'ま',
+ u'K' : u'の',
+ u'L' : u'り',
+ u'+' : u'れ',
+ u'*' : u'ヶ',
- u"}" : u"」",
+ u'}' : u'」',
- u"Z" : u"っ",
- u"X" : u"さ",
- u"C" : u"そ",
- u"V" : u"ゐ",
- u"B" : u"こ",
- u"M" : u"も",
- u"N" : u"み",
- u"<" : u"、",
- u">" : u"。",
+ u'Z' : u'っ',
+ u'X' : u'さ',
+ u'C' : u'そ',
+ u'V' : u'ゐ',
+ u'B' : u'こ',
+ u'M' : u'も',
+ u'N' : u'み',
+ u'<' : u'、',
+ u'>' : u'。',
- u"?" : u"・",
- u"_" : u"ろ",
+ u'?' : u'・',
+ u'_' : u'ろ',
- u"¥" : u"ー",
+ u'¥' : u'ー',
}
kana_voiced_consonant_rule = {
- u"か@" : u"が",
- u"き@" : u"ぎ",
- u"く@" : u"ぐ",
- u"け@" : u"げ",
- u"こ@" : u"ご",
- u"さ@" : u"ざ",
- u"し@" : u"じ",
- u"す@" : u"ず",
- u"せ@" : u"ぜ",
- u"そ@" : u"ぞ",
- u"た@" : u"だ",
- u"ち@" : u"ぢ",
- u"つ@" : u"づ",
- u"て@" : u"で",
- u"と@" : u"ど",
- u"は@" : u"ば",
- u"ひ@" : u"び",
- u"ふ@" : u"ぶ",
- u"へ@" : u"べ",
- u"ほ@" : u"ぼ",
- u"か`" : u"が",
- u"き`" : u"ぎ",
- u"く`" : u"ぐ",
- u"け`" : u"げ",
- u"こ`" : u"ご",
- u"さ`" : u"ざ",
- u"し`" : u"じ",
- u"す`" : u"ず",
- u"せ`" : u"ぜ",
- u"そ`" : u"ぞ",
- u"た`" : u"だ",
- u"ち`" : u"ぢ",
- u"つ`" : u"づ",
- u"て`" : u"で",
- u"と`" : u"ど",
- u"は`" : u"ば",
- u"ひ`" : u"び",
- u"ふ`" : u"ぶ",
- u"へ`" : u"べ",
- u"ほ`" : u"ぼ",
- u"は[" : u"ぱ",
- u"ひ[" : u"ぴ",
- u"ふ[" : u"ぷ",
- u"へ[" : u"ぺ",
- u"ほ[" : u"ぽ",
+ u'か@' : u'が',
+ u'き@' : u'ぎ',
+ u'く@' : u'ぐ',
+ u'け@' : u'げ',
+ u'こ@' : u'ご',
+ u'さ@' : u'ざ',
+ u'し@' : u'じ',
+ u'す@' : u'ず',
+ u'せ@' : u'ぜ',
+ u'そ@' : u'ぞ',
+ u'た@' : u'だ',
+ u'ち@' : u'ぢ',
+ u'つ@' : u'づ',
+ u'て@' : u'で',
+ u'と@' : u'ど',
+ u'は@' : u'ば',
+ u'ひ@' : u'び',
+ u'ふ@' : u'ぶ',
+ u'へ@' : u'べ',
+ u'ほ@' : u'ぼ',
+ u'か`' : u'が',
+ u'き`' : u'ぎ',
+ u'く`' : u'ぐ',
+ u'け`' : u'げ',
+ u'こ`' : u'ご',
+ u'さ`' : u'ざ',
+ u'し`' : u'じ',
+ u'す`' : u'ず',
+ u'せ`' : u'ぜ',
+ u'そ`' : u'ぞ',
+ u'た`' : u'だ',
+ u'ち`' : u'ぢ',
+ u'つ`' : u'づ',
+ u'て`' : u'で',
+ u'と`' : u'ど',
+ u'は`' : u'ば',
+ u'ひ`' : u'び',
+ u'ふ`' : u'ぶ',
+ u'へ`' : u'べ',
+ u'ほ`' : u'ぼ',
+ u'は[' : u'ぱ',
+ u'ひ[' : u'ぴ',
+ u'ふ[' : u'ぷ',
+ u'へ[' : u'ぺ',
+ u'ほ[' : u'ぽ',
}
#hiragana, katakana, half_katakana
hiragana_katakana_table = {
- u"あ" : (u"ア", u"ア"),
- u"い" : (u"イ", u"イ"),
- u"う" : (u"ウ", u"ウ"),
- u"え" : (u"エ", u"エ"),
- u"お" : (u"オ", u"オ"),
- u"か" : (u"カ", u"カ"),
- u"き" : (u"キ", u"キ"),
- u"く" : (u"ク", u"ク"),
- u"け" : (u"ケ", u"ケ"),
- u"こ" : (u"コ", u"コ"),
- u"が" : (u"ガ", u"ガ"),
- u"ぎ" : (u"ギ", u"ギ"),
- u"ぐ" : (u"グ", u"グ"),
- u"げ" : (u"ゲ", u"ゲ"),
- u"ご" : (u"ゴ", u"ゴ"),
- u"さ" : (u"サ", u"サ"),
- u"し" : (u"シ", u"シ"),
- u"す" : (u"ス", u"ス"),
- u"せ" : (u"セ", u"セ"),
- u"そ" : (u"ソ", u"ソ"),
- u"ざ" : (u"ザ", u"ザ"),
- u"じ" : (u"ジ", u"ジ"),
- u"ず" : (u"ズ", u"ズ"),
- u"ぜ" : (u"ゼ", u"ゼ"),
- u"ぞ" : (u"ゾ", u"ゾ"),
- u"た" : (u"タ", u"タ"),
- u"ち" : (u"チ", u"チ"),
- u"つ" : (u"ツ", u"ツ"),
- u"て" : (u"テ", u"テ"),
- u"と" : (u"ト", u"ト"),
- u"だ" : (u"ダ", u"ダ"),
- u"ぢ" : (u"ヂ", u"ヂ"),
- u"づ" : (u"ヅ", u"ヅ"),
- u"で" : (u"デ", u"デ"),
- u"ど" : (u"ド", u"ド"),
- u"な" : (u"ナ", u"ナ"),
- u"に" : (u"ニ", u"ニ"),
- u"ぬ" : (u"ヌ", u"ヌ"),
- u"ね" : (u"ネ", u"ネ"),
- u"の" : (u"ノ", u"ノ"),
- u"は" : (u"ハ", u"ハ"),
- u"ひ" : (u"ヒ", u"ヒ"),
- u"ふ" : (u"フ", u"フ"),
- u"へ" : (u"ヘ", u"ヘ"),
- u"ほ" : (u"ホ", u"ホ"),
- u"ば" : (u"バ", u"バ"),
- u"び" : (u"ビ", u"ビ"),
- u"ぶ" : (u"ブ", u"ブ"),
- u"べ" : (u"ベ", u"ベ"),
- u"ぼ" : (u"ボ", u"ボ"),
- u"ぱ" : (u"パ", u"パ"),
- u"ぴ" : (u"ピ", u"ピ"),
- u"ぷ" : (u"プ", u"プ"),
- u"ぺ" : (u"ペ", u"ペ"),
- u"ぽ" : (u"ポ", u"ポ"),
- u"ま" : (u"マ", u"マ"),
- u"み" : (u"ミ", u"ミ"),
- u"む" : (u"ム", u"ム"),
- u"め" : (u"メ", u"メ"),
- u"も" : (u"モ", u"モ"),
- u"や" : (u"ヤ", u"ヤ"),
- u"ゆ" : (u"ユ", u"ユ"),
- u"よ" : (u"ヨ", u"ヨ"),
- u"ら" : (u"ラ", u"ラ"),
- u"り" : (u"リ", u"リ"),
- u"る" : (u"ル", u"ル"),
- u"れ" : (u"レ", u"レ"),
- u"ろ" : (u"ロ", u"ロ"),
- u"わ" : (u"ワ", u"ワ"),
- u"を" : (u"ヲ", u"ヲ"),
- u"ん" : (u"ン", u"ン"),
- u"ぁ" : (u"ァ", u"ァ"),
- u"ぃ" : (u"ィ", u"ィ"),
- u"ぅ" : (u"ゥ", u"ゥ"),
- u"ぇ" : (u"ェ", u"ェ"),
- u"ぉ" : (u"ォ", u"ォ"),
- u"っ" : (u"ッ", u"ッ"),
- u"ゃ" : (u"ャ", u"ャ"),
- u"ゅ" : (u"ュ", u"ュ"),
- u"ょ" : (u"ョ", u"ョ"),
- u"ヵ" : (u"ヵ", u"カ"),
- u"ヶ" : (u"ヶ", u"ケ"),
- u"ゎ" : (u"ヮ", u"ワ"),
- u"ゐ" : (u"ヰ", u"ィ"),
- u"ゑ" : (u"ヱ", u"ェ"),
- u"ヴ" : (u"ヴ", u"ヴ"),
+ u'あ' : (u'ア', u'ア'),
+ u'い' : (u'イ', u'イ'),
+ u'う' : (u'ウ', u'ウ'),
+ u'え' : (u'エ', u'エ'),
+ u'お' : (u'オ', u'オ'),
+ u'か' : (u'カ', u'カ'),
+ u'き' : (u'キ', u'キ'),
+ u'く' : (u'ク', u'ク'),
+ u'け' : (u'ケ', u'ケ'),
+ u'こ' : (u'コ', u'コ'),
+ u'が' : (u'ガ', u'ガ'),
+ u'ぎ' : (u'ギ', u'ギ'),
+ u'ぐ' : (u'グ', u'グ'),
+ u'げ' : (u'ゲ', u'ゲ'),
+ u'ご' : (u'ゴ', u'ゴ'),
+ u'さ' : (u'サ', u'サ'),
+ u'し' : (u'シ', u'シ'),
+ u'す' : (u'ス', u'ス'),
+ u'せ' : (u'セ', u'セ'),
+ u'そ' : (u'ソ', u'ソ'),
+ u'ざ' : (u'ザ', u'ザ'),
+ u'じ' : (u'ジ', u'ジ'),
+ u'ず' : (u'ズ', u'ズ'),
+ u'ぜ' : (u'ゼ', u'ゼ'),
+ u'ぞ' : (u'ゾ', u'ゾ'),
+ u'た' : (u'タ', u'タ'),
+ u'ち' : (u'チ', u'チ'),
+ u'つ' : (u'ツ', u'ツ'),
+ u'て' : (u'テ', u'テ'),
+ u'と' : (u'ト', u'ト'),
+ u'だ' : (u'ダ', u'ダ'),
+ u'ぢ' : (u'ヂ', u'ヂ'),
+ u'づ' : (u'ヅ', u'ヅ'),
+ u'で' : (u'デ', u'デ'),
+ u'ど' : (u'ド', u'ド'),
+ u'な' : (u'ナ', u'ナ'),
+ u'に' : (u'ニ', u'ニ'),
+ u'ぬ' : (u'ヌ', u'ヌ'),
+ u'ね' : (u'ネ', u'ネ'),
+ u'の' : (u'ノ', u'ノ'),
+ u'は' : (u'ハ', u'ハ'),
+ u'ひ' : (u'ヒ', u'ヒ'),
+ u'ふ' : (u'フ', u'フ'),
+ u'へ' : (u'ヘ', u'ヘ'),
+ u'ほ' : (u'ホ', u'ホ'),
+ u'ば' : (u'バ', u'バ'),
+ u'び' : (u'ビ', u'ビ'),
+ u'ぶ' : (u'ブ', u'ブ'),
+ u'べ' : (u'ベ', u'ベ'),
+ u'ぼ' : (u'ボ', u'ボ'),
+ u'ぱ' : (u'パ', u'パ'),
+ u'ぴ' : (u'ピ', u'ピ'),
+ u'ぷ' : (u'プ', u'プ'),
+ u'ぺ' : (u'ペ', u'ペ'),
+ u'ぽ' : (u'ポ', u'ポ'),
+ u'ま' : (u'マ', u'マ'),
+ u'み' : (u'ミ', u'ミ'),
+ u'む' : (u'ム', u'ム'),
+ u'め' : (u'メ', u'メ'),
+ u'も' : (u'モ', u'モ'),
+ u'や' : (u'ヤ', u'ヤ'),
+ u'ゆ' : (u'ユ', u'ユ'),
+ u'よ' : (u'ヨ', u'ヨ'),
+ u'ら' : (u'ラ', u'ラ'),
+ u'り' : (u'リ', u'リ'),
+ u'る' : (u'ル', u'ル'),
+ u'れ' : (u'レ', u'レ'),
+ u'ろ' : (u'ロ', u'ロ'),
+ u'わ' : (u'ワ', u'ワ'),
+ u'を' : (u'ヲ', u'ヲ'),
+ u'ん' : (u'ン', u'ン'),
+ u'ぁ' : (u'ァ', u'ァ'),
+ u'ぃ' : (u'ィ', u'ィ'),
+ u'ぅ' : (u'ゥ', u'ゥ'),
+ u'ぇ' : (u'ェ', u'ェ'),
+ u'ぉ' : (u'ォ', u'ォ'),
+ u'っ' : (u'ッ', u'ッ'),
+ u'ゃ' : (u'ャ', u'ャ'),
+ u'ゅ' : (u'ュ', u'ュ'),
+ u'ょ' : (u'ョ', u'ョ'),
+ u'ヵ' : (u'ヵ', u'カ'),
+ u'ヶ' : (u'ヶ', u'ケ'),
+ u'ゎ' : (u'ヮ', u'ワ'),
+ u'ゐ' : (u'ヰ', u'ィ'),
+ u'ゑ' : (u'ヱ', u'ェ'),
+ u'ヴ' : (u'ヴ', u'ヴ'),
# symbols
- u"ー" : (u"ー", u"ー"),
- u"、" : (u"、", u"、"),
- u"。" : (u"。", u"。"),
- u"!" : (u"!", u"!"),
- u"\u201d" : (u"\u201d", u"\""),
- u"#" : (u"#", u"#"),
- u"$" : (u"$", u"$"),
- u"%" : (u"%", u"%"),
- u"&" : (u"&", u"&"),
- u"\u2019" : (u"\u2019", u"'"),
- u"(" : (u"(", u"("),
- u")" : (u")", u")"),
- u"\uff5e" : (u"\uff5e", u"~"),
- u"=" : (u"=", u"="),
- u"^" : (u"^", u"^"),
- u"\" : (u"\", u"\\"),
- u"|" : (u"|", u"|"),
- u"\u2018" : (u"\u2018", u"`"),
- u"@" : (u"@", u"@"),
- u"゛" : (u"゛", u"゙"),
- u"{" : (u"{", u"{"),
- u"゜" : (u"゜", u"゚"),
- u"「" : (u"「", u"「"),
- u"+" : (u"+", u"+"),
- u";" : (u";", u";"),
- u"*" : (u"*", u"*"),
- u":" : (u":", u":"),
- u"}" : (u"}", u"}"),
- u"」" : (u"」", u"」"),
- u"<" : (u"<", u"<"),
- u">" : (u">", u">"),
- u"?" : (u"?", u"?"),
- u"・" : (u"・", u"・"),
- u"/" : (u"/", u"/"),
- u"_" : (u"_", u"_"),
- u"¥" : (u"¥", u"¥"),
+ u'ー' : (u'ー', u'ー'),
+ u'、' : (u'、', u'、'),
+ u'。' : (u'。', u'。'),
+ u'!' : (u'!', u'!'),
+ u'\u201d' : (u'\u201d', u'"'),
+ u'#' : (u'#', u'#'),
+ u'$' : (u'$', u'$'),
+ u'%' : (u'%', u'%'),
+ u'&' : (u'&', u'&'),
+ u'\u2019' : (u'\u2019', u'\''),
+ u'(' : (u'(', u'('),
+ u')' : (u')', u')'),
+ u'\uff5e' : (u'\uff5e', u'~'),
+ u'=' : (u'=', u'='),
+ u'^' : (u'^', u'^'),
+ u'\' : (u'\', u'\\'),
+ u'|' : (u'|', u'|'),
+ u'\u2018' : (u'\u2018', u'`'),
+ u'@' : (u'@', u'@'),
+ u'゛' : (u'゛', u'゙'),
+ u'{' : (u'{', u'{'),
+ u'゜' : (u'゜', u'゚'),
+ u'「' : (u'「', u'「'),
+ u'+' : (u'+', u'+'),
+ u';' : (u';', u';'),
+ u'*' : (u'*', u'*'),
+ u':' : (u':', u':'),
+ u'}' : (u'}', u'}'),
+ u'」' : (u'」', u'」'),
+ u'<' : (u'<', u'<'),
+ u'>' : (u'>', u'>'),
+ u'?' : (u'?', u'?'),
+ u'・' : (u'・', u'・'),
+ u'/' : (u'/', u'/'),
+ u'_' : (u'_', u'_'),
+ u'¥' : (u'¥', u'¥'),
# numbers
u'0': (u'0', u'0'),
diff --git a/engine/thumb.py b/engine/thumb.py
index c119b04..68fa743 100644
--- a/engine/thumb.py
+++ b/engine/thumb.py
@@ -22,18 +22,23 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
__all__ = (
- "ThumbShiftKeyboard",
- "ThumbShiftSegment",
+ 'ThumbShiftKeyboard',
+ 'ThumbShiftSegment',
)
-from ibus import keysyms
-from ibus import modifier
-import segment
+from gi.repository import IBus
try:
- from gtk.gdk import get_default_root_window
+ from gi.repository import Gdk
+ get_default_root_window = Gdk.get_default_root_window
+ property_get = Gdk.property_get
+ intern = Gdk.Atom.intern
except ImportError:
get_default_root_window = lambda : None
+ property_get = lambda : None
+ intern = lambda : None
+
+import segment
_THUMB_BASIC_METHOD = 'base'
@@ -186,34 +191,34 @@ for k in _table_static.keys():
r_table_static[c] = k
kana_voiced_consonant_rule = {
- u"か゛" : u"が",
- u"き゛" : u"ぎ",
- u"く゛" : u"ぐ",
- u"け゛" : u"げ",
- u"こ゛" : u"ご",
- u"さ゛" : u"ざ",
- u"し゛" : u"じ",
- u"す゛" : u"ず",
- u"せ゛" : u"ぜ",
- u"そ゛" : u"ぞ",
- u"た゛" : u"だ",
- u"ち゛" : u"ぢ",
- u"つ゛" : u"づ",
- u"て゛" : u"で",
- u"と゛" : u"ど",
- u"は゛" : u"ば",
- u"ひ゛" : u"び",
- u"ふ゛" : u"ぶ",
- u"へ゛" : u"べ",
- u"ほ゛" : u"ぼ",
- u"は゜" : u"ぱ",
- u"ひ゜" : u"ぴ",
- u"ふ゜" : u"ぷ",
- u"へ゜" : u"ぺ",
- u"ほ゜" : u"ぽ",
+ u'か゛' : u'が',
+ u'き゛' : u'ぎ',
+ u'く゛' : u'ぐ',
+ u'け゛' : u'げ',
+ u'こ゛' : u'ご',
+ u'さ゛' : u'ざ',
+ u'し゛' : u'じ',
+ u'す゛' : u'ず',
+ u'せ゛' : u'ぜ',
+ u'そ゛' : u'ぞ',
+ u'た゛' : u'だ',
+ u'ち゛' : u'ぢ',
+ u'つ゛' : u'づ',
+ u'て゛' : u'で',
+ u'と゛' : u'ど',
+ u'は゛' : u'ば',
+ u'ひ゛' : u'び',
+ u'ふ゛' : u'ぶ',
+ u'へ゛' : u'べ',
+ u'ほ゛' : u'ぼ',
+ u'は゜' : u'ぱ',
+ u'ひ゜' : u'ぴ',
+ u'ふ゜' : u'ぷ',
+ u'へ゜' : u'ぺ',
+ u'ほ゜' : u'ぽ',
}
-_UNFINISHED_HIRAGANA = set(u"かきくけこさしすせそたちつてとはひふへほ")
+_UNFINISHED_HIRAGANA = set(u'かきくけこさしすせそたちつてとはひふへほ')
class ThumbShiftKeyboard:
def __init__(self, prefs=None):
@@ -272,13 +277,15 @@ class ThumbShiftKeyboard:
self.__r_table[c] = k
def __set_bus_table(self, key, value):
- if value == None or len(value) != 3 or \
- (str(value[0]) == '' and \
- str(value[1]) == '' and str(value[2]) == ''):
+ prefs = self.__prefs
+ if value == None or len(value) != 3:
+ return
+ value = [prefs.unicode(prefs.str(value[0])),
+ prefs.unicode(prefs.str(value[1])),
+ prefs.unicode(prefs.str(value[2]))]
+ if value[0] == u'' and \
+ value[1] == u'' and value[2] == u'':
return
- value = [unicode(str(value[0])),
- unicode(str(value[1])),
- unicode(str(value[2]))]
self.__table[ord(key)] = value
for c in value:
self.__r_table[c] = key
@@ -321,29 +328,29 @@ class ThumbShiftKeyboard:
def __reset_extension_table(self, init):
self.__reset_layout_table(init,
- "nicola_j_table",
+ 'nicola_j_table',
_nicola_j_table_static,
- "nicola_a_table",
+ 'nicola_a_table',
_nicola_a_table_static,
- "nicola_f_table",
+ 'nicola_f_table',
_nicola_f_table_static)
if self.__fmv_extension == 0:
return
if self.__fmv_extension >= 1:
self.__reset_layout_table(False,
- "kb231_j_fmv_table",
+ 'kb231_j_fmv_table',
_kb231_j_fmv_table_static,
- "kb231_a_fmv_table",
+ 'kb231_a_fmv_table',
_kb231_a_fmv_table_static,
- "kb231_f_fmv_table",
+ 'kb231_f_fmv_table',
_kb231_f_fmv_table_static)
if self.__fmv_extension >= 2:
self.__reset_layout_table(False,
- "kb611_j_fmv_table",
+ 'kb611_j_fmv_table',
_kb611_j_fmv_table_static,
- "kb611_a_fmv_table",
+ 'kb611_a_fmv_table',
_kb611_a_fmv_table_static,
- "kb611_f_fmv_table",
+ 'kb611_f_fmv_table',
_kb611_f_fmv_table_static)
def __reset_shift_table(self, init):
@@ -360,28 +367,40 @@ class ThumbShiftKeyboard:
del self.__r_table[_shift_table[k]]
def __s_to_key_raw(self, s):
- keyval = keysyms.name_to_keycode(s.split('+')[-1])
+ keyval = IBus.keyval_from_name(s.split('+')[-1])
s = s.lower()
- state = ('shift+' in s and modifier.SHIFT_MASK or 0) | (
- 'ctrl+' in s and modifier.CONTROL_MASK or 0) | (
- 'alt+' in s and modifier.MOD1_MASK or 0)
+ state = ('shift+' in s and IBus.ModifierType.SHIFT_MASK or 0) | (
+ 'ctrl+' in s and IBus.ModifierType.CONTROL_MASK or 0) | (
+ 'alt+' in s and IBus.ModifierType.MOD1_MASK or 0)
return (keyval, state)
def __get_xkb_layout(self):
root_window = get_default_root_window()
if not root_window:
return 0
- prop = root_window.property_get("_XKB_RULES_NAMES")[2]
- list = prop.split('\0')
+ xkb_rules_names = intern('_XKB_RULES_NAMES', False)
+ xa_string = intern('STRING', False)
+ try:
+ prop = property_get(root_window,
+ xkb_rules_names, xa_string,
+ 0, 1024, 0)[3]
+ layout_list = prop.split('\0')
+ except TypeError:
+ import sys
+ print >> sys.stderr, \
+ 'This problem is fixed in the latest gobject-introspection'
+ print >> sys.stderr, \
+ 'https://bugzilla.gnome.org/show_bug.cgi?id=670509'
+ return 0
layout = 0
- for data in list:
- if data == "jp":
+ for data in layout_list:
+ if data == 'jp':
layout = 0
- elif data == "us":
+ elif data == 'us':
layout = 1
- elif data.find("japan:nicola_f_bs") >= 0:
+ elif data.find('japan:nicola_f_bs') >= 0:
layout = 2
- elif data.find("japan:") >= 0:
+ elif data.find('japan:') >= 0:
layout = 0
return layout
@@ -389,13 +408,13 @@ class ThumbShiftKeyboard:
s = self.__prefs.get_value('thumb', 'ls')
ls, state = self.__s_to_key_raw(s)
if ls == 0xffffff:
- ls = keysyms.Muhenkan
+ ls = IBus.KEY_Muhenkan
self.set_ls(ls)
s = self.__prefs.get_value('thumb', 'rs')
rs, state = self.__s_to_key_raw(s)
if rs == 0xffffff:
- rs = keysyms.Henkan
+ rs = IBus.KEY_Henkan
self.set_rs(rs)
t1 = self.__prefs.get_value('thumb', 't1')
@@ -492,7 +511,7 @@ class ThumbShiftSegment(segment.Segment):
_thumb_typing_rule_section = None
_r_table = {}
- def __init__(self, enchars=u"", jachars=u""):
+ def __init__(self, enchars=u'', jachars=u''):
if not jachars:
if u'!' <= enchars <= u'~':
jachars = segment.unichar_half_to_full(enchars)
@@ -538,13 +557,15 @@ class ThumbShiftSegment(segment.Segment):
@classmethod
def _set_bus_table(cls, key, value):
- if value == None or len(value) != 3 or \
- (str(value[0]) == '' and \
- str(value[1]) == '' and str(value[2]) == ''):
+ prefs = cls._prefs
+ if value == None or len(value) != 3:
+ return
+ value = [prefs.unicode(prefs.str(value[0])),
+ prefs.unicode(prefs.str(value[1])),
+ prefs.unicode(prefs.str(value[2]))]
+ if value[0] == u'' and \
+ value[1] == u'' and value[2] == u'':
return
- value = [unicode(str(value[0])),
- unicode(str(value[1])),
- unicode(str(value[2]))]
for c in value:
cls._r_table[c] = key
@@ -552,7 +573,7 @@ class ThumbShiftSegment(segment.Segment):
return not (self._jachars in _UNFINISHED_HIRAGANA)
def append(self, enchar):
- if enchar == u"\0" or enchar == u"":
+ if enchar == u'\0' or enchar == u'':
return []
text = self._jachars + enchar
jachars = kana_voiced_consonant_rule.get(text, None)
@@ -563,9 +584,9 @@ class ThumbShiftSegment(segment.Segment):
return [ThumbShiftSegment(enchar)]
def prepend(self, enchar):
- if enchar == u"\0" or enchar == u"":
+ if enchar == u'\0' or enchar == u'':
return []
- if self._jachars == u"":
+ if self._jachars == u'':
if 0x21 <= enchars <= 0x7e:
self._enchars = enchar
self._jachars = segment.unichar_half_to_full(enchars)
diff --git a/gir/Makefile.am b/gir/Makefile.am
new file mode 100644
index 0000000..1a26bf1
--- /dev/null
+++ b/gir/Makefile.am
@@ -0,0 +1,102 @@
+# vim:set noet ts=4:
+#
+# ibus-anthy - The Anthy engine for IBus
+#
+# Copyright (c) 2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2012 Peng Huang <shawn.p.huang@gmail.com>
+# Copyright (c) 2012 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+INTROSPECTION_GIRS =
+
+libanthygobject = libanthygobject-1.0.la
+
+AM_CPPFLAGS = \
+ @GOBJECT2_CFLAGS@ \
+ @ANTHY_CFLAGS@ \
+ $(NULL)
+
+libanthygobject_LTLIBRARIES = $(libanthygobject)
+libanthygobjectdir = @ANTHY_GOBJECT_LIBDIR@
+
+libanthygobject_1_0_la_SOURCES = \
+ anthygcontext.c \
+ $(NULL)
+
+libanthygobject_1_0_la_LIBADD = \
+ @GOBJECT2_LIBS@ \
+ @ANTHY_LIBS@ \
+ $(NULL)
+
+libanthygobject_1_0_la_LDFLAGS = \
+ -no-undefined \
+ -export-symbols-regex "anthy_.*" \
+ -version-info @LT_VERSION_INFO@ \
+ $(NULL)
+
+ANTHY_INCLUDEDIR = $(shell pkg-config --variable=includedir anthy)
+
+anthyincludedir = $(includedir)/ibus-anthy-1.0
+anthyinclude_HEADERS = \
+ anthygcontext.h \
+ $(NULL)
+
+# gobject introspection
+-include $(INTROSPECTION_MAKEFILE)
+
+Anthy-9000.gir: $(libanthygobject) Makefile
+Anthy_9000_gir_SCANNERFLAGS = \
+ --pkg=anthy \
+ --external-library \
+ --reparse-validate \
+ --identifier-prefix=Anthy \
+ --symbol-prefix=anthy \
+ --accept-unprefixed \
+ --warn-all \
+ $(NULL)
+Anthy_9000_gir_INCLUDES = GObject-2.0
+Anthy_9000_gir_LIBS = $(libanthygobject) anthy
+Anthy_9000_gir_CFLAGS = @ANTHY_CFLAGS@
+Anthy_9000_gir_FILES = \
+ $(libanthygobject_1_0_la_SOURCES) \
+ $(anthyinclude_HEADERS) \
+ $(ANTHY_INCLUDEDIR)/anthy/anthy.h \
+ $(NULL)
+INTROSPECTION_GIRS += Anthy-9000.gir
+
+girdir = @ANTHY_GOBJECT_GIRDIR@
+dist_gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibsdir = @ANTHY_GOBJECT_TYPELIBSDIR@
+typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+noinst_PROGRAMS = test
+
+test_SOURCES = test.c
+test_LDADD = \
+ $(libanthygobject) \
+ @GOBJECT2_LIBS@ \
+ @ANTHY_LIBS@ \
+ $(NULL)
+
+CLEANFILES = \
+ $(dist_gir_DATA) \
+ $(typelibs_DATA) \
+ $(NULL)
+
+DISTCLEANFILES = \
+ $(NULL)
+
diff --git a/gir/anthygcontext.c b/gir/anthygcontext.c
new file mode 100644
index 0000000..ed3d587
--- /dev/null
+++ b/gir/anthygcontext.c
@@ -0,0 +1,237 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/* vim:set et sts=4: */
+/* ibus-anthy - The Anthy engine for IBus
+ * Copyright (c) 2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * Copyright (c) 2012 Peng Huang <shawn.p.huang@gmail.com>
+ * Copyright (c) 2012 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+#include <anthy/anthy.h>
+
+extern void anthy_init_personality (void);
+extern int anthy_do_set_personality (const char *id);
+
+#include "anthygcontext.h"
+
+#define ANTHY_GCONTEXT_GET_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), ANTHY_TYPE_GCONTEXT, AnthyGContextPrivate))
+
+struct _AnthyGContextPrivate {
+ anthy_context_t context;
+};
+
+static GObject *anthy_gcontext_constructor (GType type,
+ guint n,
+ GObjectConstructParam *args);
+static void anthy_gcontext_dispose (GObject *gobject);
+static void anthy_gcontext_finalize (GObject *gobject);
+
+G_DEFINE_TYPE (AnthyGContext, anthy_gcontext, G_TYPE_INITIALLY_UNOWNED)
+
+static void
+anthy_gcontext_class_init (AnthyGContextClass *class)
+{
+
+ GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+ gobject_class->constructor = anthy_gcontext_constructor;
+ gobject_class->dispose = anthy_gcontext_dispose;
+ gobject_class->finalize = anthy_gcontext_finalize;
+
+ g_type_class_add_private (class, sizeof (AnthyGContextPrivate));
+}
+
+static void
+anthy_gcontext_init (AnthyGContext *obj)
+{
+ obj->priv = ANTHY_GCONTEXT_GET_PRIVATE (obj);
+
+ anthy_init ();
+ obj->priv->context = anthy_create_context ();
+}
+
+static GObject *
+anthy_gcontext_constructor (GType type,
+ guint n,
+ GObjectConstructParam *args)
+{
+ GObject *object;
+
+ object = G_OBJECT_CLASS (anthy_gcontext_parent_class)->constructor (type, n ,args);
+ return object;
+}
+
+static void
+anthy_gcontext_dispose (GObject *gobject)
+{
+ G_OBJECT_CLASS (anthy_gcontext_parent_class)->dispose (gobject);
+}
+
+static void
+anthy_gcontext_finalize (GObject *gobject)
+{
+ G_OBJECT_CLASS (anthy_gcontext_parent_class)->finalize (gobject);
+}
+
+AnthyGContext *
+anthy_gcontext_new (void)
+{
+ GObject *gobject = g_object_new (ANTHY_TYPE_GCONTEXT, NULL);
+ return ANTHY_GCONTEXT (gobject);
+}
+
+#define ANTHY_OBJECT_FUNCTION_ASSERTIONS() \
+{ \
+ g_assert (obj != NULL); \
+ g_assert (obj->priv != NULL); \
+ g_assert (obj->priv->context != NULL); \
+}
+
+int
+anthy_gcontext_set_encoding (AnthyGContext *obj, int encoding)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ return anthy_context_set_encoding (obj->priv->context, encoding);
+}
+
+void
+anthy_gcontext_init_personality (AnthyGContext *obj)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ anthy_init_personality ();
+}
+
+int
+anthy_gcontext_do_set_personality (AnthyGContext *obj, const gchar *dict_name)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ return anthy_do_set_personality (dict_name);
+}
+
+void
+anthy_gcontext_resize_segment (AnthyGContext *obj,
+ int nth,
+ int resize)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ anthy_resize_segment (obj->priv->context, nth, resize);
+}
+
+int
+anthy_gcontext_set_string (AnthyGContext *obj, const gchar * string)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ return anthy_set_string (obj->priv->context, string);
+}
+
+int
+anthy_gcontext_get_nr_segments (AnthyGContext *obj)
+{
+ struct anthy_conv_stat conv_stat = { 0, };
+
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ anthy_get_stat(obj->priv->context, &conv_stat);
+ return conv_stat.nr_segment;
+}
+
+gchar *
+anthy_gcontext_get_segment (AnthyGContext *obj, int nth_seg, int nth_lookup)
+{
+ int length;
+ static char temp[512];
+
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ length = anthy_get_segment (obj->priv->context, nth_seg, nth_lookup,
+ temp, sizeof (temp));
+ if (length >= 0) {
+ return g_strdup (temp);
+ } else {
+ return NULL;
+ }
+}
+
+int
+anthy_gcontext_commit_segment(AnthyGContext *obj, int nth_seg, int nth_lookup)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ return anthy_commit_segment (obj->priv->context, nth_seg, nth_lookup);
+}
+
+int
+anthy_gcontext_get_nr_candidates (AnthyGContext *obj, int nth_seg)
+{
+ struct anthy_segment_stat seg_stat = { 0, };
+
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ anthy_get_segment_stat (obj->priv->context, nth_seg, &seg_stat);
+ return seg_stat.nr_candidate;
+}
+
+int
+anthy_gcontext_set_prediction_string (AnthyGContext *obj, const gchar * string)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ return anthy_set_prediction_string (obj->priv->context, string);
+}
+
+int
+anthy_gcontext_get_nr_predictions (AnthyGContext *obj)
+{
+ struct anthy_prediction_stat seg_stat = { 0, };
+
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ anthy_get_prediction_stat (obj->priv->context, &seg_stat);
+ return seg_stat.nr_prediction;
+}
+
+gchar *
+anthy_gcontext_get_prediction (AnthyGContext *obj, int nth_seg)
+{
+ int length;
+ static char temp[512];
+
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ length = anthy_get_prediction (obj->priv->context, nth_seg,
+ temp, sizeof (temp));
+ if (length >= 0) {
+ return g_strdup (temp);
+ } else {
+ return NULL;
+ }
+}
+
+int
+anthy_gcontext_commit_prediction (AnthyGContext *obj, int nth_seg)
+{
+ ANTHY_OBJECT_FUNCTION_ASSERTIONS ();
+
+ return anthy_commit_prediction (obj->priv->context, nth_seg);
+}
+
+#undef ANTHY_OBJECT_FUNCTION_ASSERTIONS
diff --git a/gir/anthygcontext.h b/gir/anthygcontext.h
new file mode 100644
index 0000000..93c4538
--- /dev/null
+++ b/gir/anthygcontext.h
@@ -0,0 +1,204 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/* vim:set et sts=4: */
+/* ibus-anthy - The Anthy engine for IBus
+ * Copyright (c) 2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * Copyright (c) 2012 Peng Huang <shawn.p.huang@gmail.com>
+ * Copyright (c) 2012 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ANTHY_GCONTEXT_H_
+#define __ANTHY_GCONTEXT_H_
+
+#include <glib-object.h>
+#include <anthy/anthy.h>
+
+/*
+ * Type macros.
+ */
+#define ANTHY_TYPE_GCONTEXT \
+ (anthy_gcontext_get_type ())
+#define ANTHY_GCONTEXT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANTHY_TYPE_GCONTEXT, AnthyGContext))
+#define ANTHY_GCONTEXT_CLASS(class) \
+ (G_TYPE_CHECK_CLASS_CAST ((class), ANTHY_TYPE_GCONTEXT, AnthyGContextClass))
+#define ANTHY_IS_GCONTEXT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANTHY_TYPE_GCONTEXT))
+#define ANTHY_IS_GCONTEXT_CLASS(class) \
+ (G_TYPE_CHECK_CLASS_TYPE ((class), ANTHY_TYPE_GCONTEXT))
+#define ANTHY_GCONTEXT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), ANTHY_TYPE_GCONTEXT, AnthyGContextClass))
+
+typedef struct _AnthyGContext AnthyGContext;
+typedef struct _AnthyGContextPrivate AnthyGContextPrivate;
+typedef struct _AnthyGContextClass AnthyGContextClass;
+
+G_BEGIN_DECLS
+
+/**
+ * AnthyGContext:
+ *
+ * An #AnthyGContext is an object that handles conversion strings.
+ */
+struct _AnthyGContext {
+ GInitiallyUnowned parent;
+
+ AnthyGContextPrivate *priv;
+
+ /*< private >*/
+ gpointer pdummy[8];
+};
+
+struct _AnthyGContextClass {
+ GInitiallyUnownedClass parent;
+
+ /*< private >*/
+ gpointer pdummy[8];
+};
+
+GType anthy_gcontext_get_type (void);
+
+/**
+ * anthy_gcontext_new:
+ * @returns: A newly allocated #AnthyGContext
+ *
+ * New an #AnthyGobject.
+ */
+AnthyGContext *anthy_gcontext_new (void);
+
+/**
+ * anthy_gcontext_set_encoding:
+ * @encoding: An encoding
+ *
+ * Set an encoding.
+ */
+int anthy_gcontext_set_encoding (AnthyGContext *obj,
+ int encoding);
+
+/**
+ * anthy_gcontext_init_personality:
+ *
+ * Initialize the personal dictionaries.
+ */
+void anthy_gcontext_init_personality (AnthyGContext *obj);
+
+/**
+ * anthy_gcontext_do_set_personality:
+ * @dict_name: a Dictionary name
+ *
+ * Set a personal dictionary.
+ */
+int anthy_gcontext_do_set_personality (AnthyGContext *obj,
+ const gchar *dict_name);
+
+/**
+ * anthy_gcontext_resize_segment:
+ * @nth: nth segment
+ * @resize: size
+ *
+ * Resize the nth segment.
+ */
+void anthy_gcontext_resize_segment (AnthyGContext *obj,
+ int nth,
+ int resize);
+/**
+ * anthy_gcontext_set_string:
+ * @string: A conversion string
+ *
+ * Set a conversion string.
+ */
+int anthy_gcontext_set_string (AnthyGContext *obj,
+ const gchar * string);
+/**
+ * anthy_gcontext_get_nr_segments:
+ * @returns: The number of the converted segments
+ *
+ * The number of the converted segments
+ */
+int anthy_gcontext_get_nr_segments (AnthyGContext *obj);
+
+/**
+ * anthy_gcontext_get_segment:
+ * @nth_seg: Nth segment
+ * @nth_lookup: Nth lookup
+ * @returns: A newly assigned string.
+ *
+ * A newly assigned string with @ntg_seg and @nth_lookup .
+ */
+gchar * anthy_gcontext_get_segment (AnthyGContext *obj,
+ int nth_seg,
+ int nth_lookup);
+
+/**
+ * anthy_gcontext_commit_segment:
+ * @nth_seg: Nth segment
+ * @nth_lookup: Nth lookup
+ *
+ * Commit a string with @ntg_seg and @nth_lookup.
+ */
+int anthy_gcontext_commit_segment (AnthyGContext *obj,
+ int nth_seg,
+ int nth_lookup);
+
+/**
+ * anthy_gcontext_get_nr_candidates:
+ * @returns: The number of the candidates
+ *
+ * The number of the candidates
+ */
+int anthy_gcontext_get_nr_candidates (AnthyGContext *obj,
+ int nth_seg);
+
+/**
+ * anthy_gcontext_set_prediction_string:
+ * @string: A prediction string
+ *
+ * Set a prediction string.
+ */
+int anthy_gcontext_set_prediction_string
+ (AnthyGContext *obj,
+ const gchar * string);
+
+/**
+ * anthy_gcontext_get_nr_predictions:
+ * @returns: The number of the converted segments in the current
+ * prediction string.
+ *
+ * The number of the converted segments in the current prediction string.
+ */
+int anthy_gcontext_get_nr_predictions
+ (AnthyGContext *obj);
+
+/**
+ * anthy_gcontext_get_prediction:
+ * @nth_seg: Nth segment
+ * @returns: A newly assigned string.
+ *
+ * A newly assigned string with @ntg_seg .
+ */
+gchar * anthy_gcontext_get_prediction (AnthyGContext *obj,
+ int nth_seg);
+
+/**
+ * anthy_gcontext_commit_prediction:
+ * @nth_seg: Nth segment
+ *
+ * Commit a prediction string with @ntg_seg .
+ */
+int anthy_gcontext_commit_prediction (AnthyGContext *obj,
+ int nth_seg);
+G_END_DECLS
+#endif
diff --git a/gir/test.c b/gir/test.c
new file mode 100644
index 0000000..c7b9d60
--- /dev/null
+++ b/gir/test.c
@@ -0,0 +1,34 @@
+#include <stdio.h>
+
+#include "anthygcontext.h"
+
+int
+main (int argc, char *argv[])
+{
+ AnthyGContext *obj = NULL;
+ gchar *string = NULL;
+
+ g_type_init ();
+
+ obj = anthy_gcontext_new ();
+
+ anthy_gcontext_set_encoding (obj, ANTHY_UTF8_ENCODING);
+ anthy_gcontext_init_personality (obj);
+ anthy_gcontext_do_set_personality(obj, "ibus__ibus_symbol");
+ anthy_gcontext_set_string (obj, "てすと");
+ anthy_gcontext_resize_segment (obj, 0, -1);
+ printf ("%d\n", anthy_gcontext_get_nr_segments (obj));
+ printf ("%d\n", anthy_gcontext_get_nr_candidates (obj, 0));
+ string = anthy_gcontext_get_segment (obj, 0, 0);
+ printf ("%s\n", string ? string : "(null)");
+ anthy_gcontext_commit_segment (obj, 0, 0);
+ anthy_gcontext_set_prediction_string (obj, "てすと");
+ printf ("%d\n", anthy_gcontext_get_nr_predictions (obj));
+ string = anthy_gcontext_get_prediction (obj, 0);
+ printf ("%s\n", string ? string : "(null)");
+ anthy_gcontext_commit_prediction (obj, 0);
+
+ g_object_unref (obj);
+
+ return 0;
+}
diff --git a/gir/test.py b/gir/test.py
new file mode 100644
index 0000000..3a4e701
--- /dev/null
+++ b/gir/test.py
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+from gi.repository import GObject
+from gi.repository import Anthy
+
+anthy = Anthy.GContext()
+anthy.set_encoding(Anthy.UTF8_ENCODING)
+anthy.init_personality()
+anthy.do_set_personality('ibus__ibus_symbol')
+anthy.set_string('てすと')
+anthy.resize_segment(0, -1)
+print anthy.get_nr_segments()
+print anthy.get_nr_candidates(0)
+print anthy.get_segment(0, 0)
+print anthy.commit_segment(0, 0)
+anthy.set_prediction_string('てすと')
+print anthy.get_nr_predictions()
+print anthy.get_prediction(0)
+print anthy.commit_prediction(0)
diff --git a/ibus-anthy.spec.in b/ibus-anthy.spec.in
index e2a5fc4..5fbe6df 100644
--- a/ibus-anthy.spec.in
+++ b/ibus-anthy.spec.in
@@ -1,9 +1,9 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?enable_kasumi: %define enable_kasumi 0}
-%define require_ibus_version 1.2.0.20100111
+%define sub_version 1.0
+%define require_ibus_version 1.4.2
%define require_intltool_version 0.41.1
-%define require_pygtk2_version 2.15.2
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
@@ -17,16 +17,16 @@ Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: anthy-devel
+BuildRequires: glib2-devel
BuildRequires: gettext-devel
BuildRequires: ibus
BuildRequires: intltool >= %require_intltool_version
BuildRequires: libtool
BuildRequires: pkgconfig
-BuildRequires: python2-devel
-BuildRequires: swig
+BuildRequires: gobject-introspection-devel
-Requires: pygtk2 >= %require_pygtk2_version
Requires: ibus >= %require_ibus_version
+Requires: pygobject3
Requires: anthy
%if %enable_kasumi
Requires: kasumi
@@ -36,6 +36,17 @@ Requires: kasumi
The Anthy engine for IBus platform. It provides Japanese input method from
libanthy.
+%package devel
+Summary: Development tools for ibus
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: glib2-devel
+Requires: anthy-devel
+
+%description devel
+The ibus-anthy-devel package contains .so file and .gir files
+for developers.
+
%prep
%setup -q
@@ -47,7 +58,7 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} install
-rm -f $RPM_BUILD_ROOT%{python_sitearch}/_anthy.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la
%find_lang %{name}
@@ -58,12 +69,17 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
# %dir %{python_sitearch}/ibus
-%{python_sitearch}/anthy.py*
-%{python_sitearch}/_anthy.so
+%{_libdir}/libanthygobject-%{sub_version}.so.*
+%{_libdir}/girepository-1.0/Anthy*.typelib
%{_libexecdir}/ibus-*-anthy
%{_datadir}/ibus-anthy
%{_datadir}/ibus/component/*
+%files devel
+%{_datadir}/gir-1.0/Anthy*.gir
+%{_includedir}/ibus-anthy-%{sub_version}
+%{_libdir}/libanthygobject-%{sub_version}.so
+
%changelog
* @DATE_DISPLAY@ Peng Huang <shawn.p.huang@gmail.com> - @PACKAGE_VERSION@-1
- Current version.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0653797..36b57fb 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,4 +4,4 @@ engine/engine.py
engine/factory.py
setup/anthyprefs.py.in
setup/main.py
-setup/setup.glade
+[type: gettext/glade]setup/setup.ui
diff --git a/po/fr.po b/po/fr.po
index 6b6b9ac..40e6307 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,6 +1,6 @@
# French translation of ibus-anthy.
# Copyright (C) 2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (C) 1999-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
# This file is distributed under the same license as the ibus-anthy package.
#
# Julien Humbert <julroy67@gmail.com>, 2009-2011.
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ibus-anthy 1.2\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
-"POT-Creation-Date: 2011-05-13 14:45+0900\n"
+"POT-Creation-Date: 2012-03-02 20:04+0900\n"
"PO-Revision-Date: 2011-05-13 13:55+0200\n"
"Last-Translator: Julien Humbert <julroy67@gmail.com>\n"
"Language-Team: French <kde-i18n-doc@kde.org>\n"
@@ -19,586 +19,542 @@ msgstr ""
"X-Generator: Lokalize 1.2\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: ../engine/engine.py:187
+#: ../engine/engine.py:198
msgid "Switch input mode"
msgstr "Changer de méthode d'entrée"
-#: ../engine/engine.py:193
+#: ../engine/engine.py:208 ../setup/setup.ui.h:1
msgid "Hiragana"
msgstr "Hiragana"
-#: ../engine/engine.py:196
+#: ../engine/engine.py:217 ../setup/setup.ui.h:2
msgid "Katakana"
msgstr "Katakana"
-#: ../engine/engine.py:199
+#: ../engine/engine.py:226
msgid "Half width katakana"
msgstr "Half width katakana"
-#: ../engine/engine.py:202
+#: ../engine/engine.py:235 ../setup/setup.ui.h:4
msgid "Latin"
msgstr "Latin"
-#: ../engine/engine.py:205
+#: ../engine/engine.py:244 ../setup/setup.ui.h:5
msgid "Wide Latin"
msgstr "Latin large"
-#: ../engine/engine.py:219
+#: ../engine/engine.py:268
msgid "Switch typing mode"
msgstr "Changer de méthode d'écriture"
-#: ../engine/engine.py:225
+#: ../engine/engine.py:278 ../setup/setup.ui.h:12
msgid "Romaji"
msgstr "Romaji"
-#: ../engine/engine.py:228
+#: ../engine/engine.py:287 ../setup/setup.ui.h:13
msgid "Kana"
msgstr "Kana"
-#: ../engine/engine.py:231
+#: ../engine/engine.py:296 ../setup/setup.ui.h:14
msgid "Thumb shift"
msgstr "Thumb shift"
-#: ../engine/engine.py:244
+#: ../engine/engine.py:318
msgid "Preferences - Anthy"
msgstr "Préférences – Anthy"
-#: ../engine/engine.py:246
+#: ../engine/engine.py:320
msgid "Configure Anthy"
msgstr "Configurer Anthy"
-#: ../engine/engine.py:266
+#: ../engine/engine.py:341
msgid "Switch conversion mode"
msgstr "Changer de méthode de conversion"
-#: ../engine/engine.py:272
+#: ../engine/engine.py:351 ../setup/setup.ui.h:15
msgid "Multiple segment"
msgstr "Segments multiples"
-#: ../engine/engine.py:275
+#: ../engine/engine.py:360 ../setup/setup.ui.h:16
msgid "Single segment"
msgstr "Segments simples"
-#: ../engine/engine.py:278
+#: ../engine/engine.py:369 ../setup/setup.ui.h:17
msgid "Immediate conversion (Multiple segment)"
msgstr "Conversion immédiate (Segments multiples)"
-#: ../engine/engine.py:281
+#: ../engine/engine.py:378 ../setup/setup.ui.h:18
msgid "Immediate conversion (Single segment)"
msgstr "Conversion immédiate (Segments simples)"
-#: ../engine/engine.py:296
+#: ../engine/engine.py:403
msgid "Switch Dictionary"
msgstr "Changer de dictionnaire"
-#: ../engine/engine.py:338
+#: ../engine/engine.py:465
msgid "Dictionary - Anthy"
msgstr "Dictionnaire – Anthy"
#. Translators: "Dic" means 'dictionary', One kanji may be good.
-#: ../engine/engine.py:343
+#: ../engine/engine.py:470
msgid "Dic"
msgstr "Dico"
-#: ../engine/engine.py:350
+#: ../engine/engine.py:477
msgid "Configure dictionaries"
msgstr "Configurer les dictionnaires"
-#: ../engine/engine.py:355
+#: ../engine/engine.py:487
msgid "Edit dictionaries"
msgstr "Éditer les dictionnaires"
-#: ../engine/engine.py:357
+#: ../engine/engine.py:489
msgid "Launch the dictionary tool"
msgstr "Lancer l'utilitaire d'édition du dictionnaire"
-#: ../engine/engine.py:360
+#: ../engine/engine.py:496
msgid "Add words"
msgstr "Ajouter de nouveaux mots"
-#: ../engine/engine.py:362
+#: ../engine/engine.py:498
msgid "Add words in the dictionary"
msgstr "Ajouter de nouveaux mots dans le dictionnaire"
-#: ../engine/factory.py:35
-msgid "Anthy"
-msgstr "Anthy"
-
-#: ../setup/anthyprefs.py.in:845
+#: ../setup/anthyprefs.py.in:838
msgid "General"
msgstr "Général"
-#: ../setup/anthyprefs.py.in:856
+#: ../setup/anthyprefs.py.in:849
msgid "Zip Code Conversion"
msgstr "Conversion de Codes Postaux"
-#: ../setup/anthyprefs.py.in:868
+#: ../setup/anthyprefs.py.in:861
msgid "Symbol"
msgstr "Symboles"
-#: ../setup/anthyprefs.py.in:879
+#: ../setup/anthyprefs.py.in:872
msgid "Old Character Style"
msgstr "Anciens caractères"
-#: ../setup/main.py:86
+#. self.__run_message_dialog needs self.__builder.
+#: ../setup/main.py:60
+msgid "ibus is not running."
+msgstr ""
+
+#: ../setup/main.py:98
msgid "Command"
msgstr "Commande"
-#: ../setup/main.py:90
+#: ../setup/main.py:102
msgid "Shortcut"
msgstr "Raccourci"
-#: ../setup/main.py:131
+#: ../setup/main.py:143
msgid "Description"
msgstr "Description"
#. Translators: "Embd" means a short word of 'embedded'.
-#: ../setup/main.py:139
+#: ../setup/main.py:151
msgid "Embd"
msgstr "Embarqué"
#. Translators: "Sgl" means a short word of 'single'.
-#: ../setup/main.py:147
+#: ../setup/main.py:159
msgid "Sgl"
msgstr "Seul"
-#: ../setup/main.py:269 ../setup/main.py:298
+#: ../setup/main.py:287 ../setup/main.py:316
msgid "Input Chars"
msgstr "Caractères d'entrée"
-#: ../setup/main.py:271 ../setup/main.py:300
+#: ../setup/main.py:289 ../setup/main.py:318
msgid "Output Chars"
msgstr "Caractères de sortie"
-#: ../setup/main.py:339
+#: ../setup/main.py:357
msgid "Input"
msgstr "Entrée"
-#: ../setup/main.py:341
+#: ../setup/main.py:359
msgid "Single"
msgstr "Seul"
-#: ../setup/main.py:343
+#: ../setup/main.py:361
msgid "Left"
msgstr "Gauche"
-#: ../setup/main.py:345
+#: ../setup/main.py:363
msgid "Right"
msgstr "Droite"
-#: ../setup/main.py:420
+#: ../setup/main.py:438
msgid "Customize Romaji Key Table"
msgstr "Modifier la table des touches Romaji"
-#: ../setup/main.py:421 ../setup/setup.glade.h:90
+#: ../setup/main.py:439 ../setup/setup.ui.h:49
msgid "_Romaji Key Table:"
msgstr "Table des touches _Romaji :"
-#: ../setup/main.py:422 ../setup/main.py:428 ../setup/setup.glade.h:87
+#: ../setup/main.py:440 ../setup/main.py:446 ../setup/setup.ui.h:86
msgid "_Output Chars"
msgstr "Caractères de s_ortie"
-#: ../setup/main.py:423 ../setup/main.py:429
+#: ../setup/main.py:441 ../setup/main.py:447 ../setup/setup.ui.h:26
msgid "Default"
msgstr "Défaut"
-#: ../setup/main.py:426
+#: ../setup/main.py:444
msgid "Customize Kana Key Table"
msgstr "Modifier la table des touches Kana"
-#: ../setup/main.py:427 ../setup/setup.glade.h:84
+#: ../setup/main.py:445 ../setup/setup.ui.h:51
msgid "_Kana Key Table:"
msgstr "Table des touches _Kana :"
-#: ../setup/main.py:432
+#: ../setup/main.py:450
msgid "Customize Thumb Shift Key Table"
msgstr "Modifier la table des touches de la méthode Thumb Shift"
-#: ../setup/main.py:433
+#: ../setup/main.py:451
msgid "_Thumb Shift Key Table:"
msgstr "Table des touches de la méthode _Thumb Shift :"
-#: ../setup/main.py:434
+#: ../setup/main.py:452
msgid "Single _Output Chars"
msgstr "Caractère de s_ortie seul"
-#: ../setup/main.py:435
+#: ../setup/main.py:453
msgid "Base"
msgstr "Base"
-#: ../setup/main.py:436
+#: ../setup/main.py:454
msgid "NICOLA-J key extension"
msgstr "NICOLA-J key extension"
-#: ../setup/main.py:437
+#: ../setup/main.py:455
msgid "NICOLA-A key extension"
msgstr "NICOLA-A key extension"
-#: ../setup/main.py:438
+#: ../setup/main.py:456
msgid "NICOLA-F key extension"
msgstr "NICOLA-F key extension"
-#: ../setup/main.py:439
+#: ../setup/main.py:457
msgid "FMV KB231-J key extension"
msgstr "FMV KB231-J key extension"
-#: ../setup/main.py:440
+#: ../setup/main.py:458
msgid "FMV KB231-A key extension"
msgstr "FMV KB231-A key extension"
-#: ../setup/main.py:441
+#: ../setup/main.py:459
msgid "FMV KB231-F key extension"
msgstr "FMV KB231-F key extension"
-#: ../setup/main.py:442
+#: ../setup/main.py:460
msgid "FMV KB611-J key extension"
msgstr "FMV KB611-J key extension"
-#: ../setup/main.py:443
+#: ../setup/main.py:461
msgid "FMV KB611-A key extension"
msgstr "FMV KB611-A key extension"
-#: ../setup/main.py:444
+#: ../setup/main.py:462
msgid "FMV KB611-F key extension"
msgstr "FMV KB611-F key extension"
-#: ../setup/main.py:593
+#: ../setup/main.py:617
msgid "Your choosed file has already been added: "
msgstr "Le fichier que vous avez selectionné a déjà été ajouté : "
-#: ../setup/main.py:597
+#: ../setup/main.py:621
msgid "Your choosed file does not exist: "
msgstr "Le fichier que vous avez selectionné n'existe pas : "
-#: ../setup/main.py:601
+#: ../setup/main.py:625
msgid "Your choosed file is a directory: "
msgstr "Le fichier que vous avez selectionné est un dossier : "
-#: ../setup/main.py:605
+#: ../setup/main.py:629
msgid "You cannot add dictionaries in the anthy private directory: "
msgstr ""
"Vous ne pouvez pas ajouter de dictionnaire dans le dossier privé d'Anthy : "
-#: ../setup/main.py:612
+#: ../setup/main.py:636
msgid "Your file path is not good: "
msgstr "Le chemin du fichier selectionné est incorrect : "
-#: ../setup/main.py:768
+#: ../setup/main.py:793
msgid "Confirm"
msgstr "Confirmer"
-#: ../setup/main.py:769
+#: ../setup/main.py:794
msgid "Are you sure to close Setup?"
msgstr "Êtes-vous sûr de vouloir fermer la fenêtre de configuration ?"
-#: ../setup/main.py:782
+#: ../setup/main.py:808
msgid "Notice!"
msgstr "Attention !"
-#: ../setup/main.py:783
+#: ../setup/main.py:809
msgid "Are you sure to close Setup without save configure?"
msgstr ""
"Êtes-vous sûr de fermer la fenêtre de configuration sans sauver les "
"modifications ?"
-#: ../setup/main.py:887
+#: ../setup/main.py:914
msgid "Please specify Input Chars"
msgstr "Veuillez spécifier les caractères d'entrée"
-#: ../setup/main.py:890
+#: ../setup/main.py:917
msgid "Please specify Output Chars"
msgstr "Veuillez spécifier les caractères de sortie"
-#: ../setup/main.py:893
+#: ../setup/main.py:920
msgid "Please specify Left Thumb Shift Chars"
msgstr "Veuillez spécifier les caractères Thumb Shift Gauche"
-#: ../setup/main.py:896
+#: ../setup/main.py:923
msgid "Please specify Right Thumb Shift Chars"
msgstr "Veuillez spécifier les caractères Thumb Shift Droit"
-#: ../setup/main.py:909 ../setup/main.py:949
+#: ../setup/main.py:936 ../setup/main.py:976
msgid "Your custom key is not assigned in any sections. Maybe a bug."
msgstr ""
"Votre touche personnalisée n'est assignée à aucune section. Sans doute un "
"bogue."
-#: ../setup/main.py:1009 ../setup/main.py:1095
+#: ../setup/main.py:1036 ../setup/main.py:1122
msgid "Your file does not exist: "
msgstr "Le fichier que vous avez selectionné n'existe pas : "
-#: ../setup/main.py:1019
+#: ../setup/main.py:1046
msgid "Open Dictionary File"
msgstr "Ouvrir un fichier de dictionnaire"
-#: ../setup/main.py:1025
+#: ../setup/main.py:1052
msgid "Edit Dictionary File"
msgstr "Éditer le fichier de dictionnaire"
-#: ../setup/main.py:1039
+#: ../setup/main.py:1066
msgid "Your choosed file is not correct."
msgstr "Le fichier que vous avez selectionné est incorrect."
-#: ../setup/main.py:1068
+#: ../setup/main.py:1095
msgid "You cannot delete the system dictionary."
msgstr "Vous ne pouvez pas supprimer le dictionnaire système."
-#: ../setup/main.py:1091
+#: ../setup/main.py:1118
msgid "Your file is not good."
msgstr "Le fichier que vous avez selectionné n'est pas bon."
-#: ../setup/main.py:1120
+#: ../setup/main.py:1147
msgid "View Dictionary File"
msgstr "Voir le fichier de dictionnaire"
-#: ../setup/main.py:1270
+#: ../setup/main.py:1301
msgid "Please press a key (or a key combination)"
msgstr "Veuillez appuyer sur une touche (ou une combinaison de touches)"
-#: ../setup/main.py:1271
+#: ../setup/main.py:1302
msgid "The dialog will be closed when the key is released"
msgstr "La fenêtre se fermera lorsque la touche sera relâchée"
-#: ../setup/main.py:1290 ../setup/main.py:1310
+#: ../setup/main.py:1321 ../setup/main.py:1341
msgid "Invalid keysym"
msgstr "« keysym » invalide"
-#: ../setup/main.py:1291 ../setup/main.py:1311
+#: ../setup/main.py:1322 ../setup/main.py:1342
msgid "This keysym is not valid"
msgstr "Le « keysym » est invalide"
-#: ../setup/setup.glade.h:1
-msgid "'~', 『', '¢', '£' and so on can be output with Thumb Shift key"
-msgstr ""
-"'~', 『', '¢', '£', etc. peuvent être tapées avec la méthode Thumb Shift"
+#: ../setup/setup.ui.h:3
+msgid "Half Width Katakana"
+msgstr "Half Width Katakana"
-#: ../setup/setup.glade.h:2
-msgid "<b>Behavior</b>"
-msgstr "<b>Comportement</b>"
+#: ../setup/setup.ui.h:6
+msgid "NICOLA-J"
+msgstr "NICOLA-J"
-#: ../setup/setup.glade.h:3
-msgid "<b>Default Dictionary Configuration</b>"
-msgstr "<b>Configuration du Dictionnaire par Défaut</b>"
+#: ../setup/setup.ui.h:7
+msgid "NICOLA-A"
+msgstr "NICOLA-A"
-#: ../setup/setup.glade.h:4
-msgid "<b>Extended Dictionaries</b>"
-msgstr "<b>Dictionnaires supplémentaires</b>"
+#: ../setup/setup.ui.h:8
+msgid "NICOLA-F"
+msgstr "NICOLA-F"
-#: ../setup/setup.glade.h:5
-msgid "<b>Initial Setting</b>"
-msgstr "<b>Configuration initiale</b>"
+#: ../setup/setup.ui.h:9
+msgid "None"
+msgstr "Aucun"
-#: ../setup/setup.glade.h:6
-msgid "<b>Kana</b>"
-msgstr "<b>Kana</b>"
+#: ../setup/setup.ui.h:10
+msgid "FMV KB231 key extension"
+msgstr "FMV KB231 key extension"
-#: ../setup/setup.glade.h:7
-msgid "<b>Other</b>"
-msgstr "<b>Autres options</b>"
+#: ../setup/setup.ui.h:11
+msgid "FMV KB611 key extension"
+msgstr "FMV KB611 key extension"
-#: ../setup/setup.glade.h:8
-msgid "<b>Romaji</b>"
-msgstr "<b>Romaji</b>"
+#: ../setup/setup.ui.h:19
+msgid "Keep Numpad Codes"
+msgstr "Conserver les codes du pavé numérique"
-#: ../setup/setup.glade.h:9
-msgid "<b>Thumb Shift Layout</b>"
-msgstr "<b>Disposition Thumb Shift</b>"
+#: ../setup/setup.ui.h:20
+msgid "Convert Characters"
+msgstr "Convertir les caractères"
-#: ../setup/setup.glade.h:10
-msgid "A_lternate"
-msgstr "A_lternatif"
+#: ../setup/setup.ui.h:21
+msgid "Do Nothing"
+msgstr "Ne rien faire"
-#: ../setup/setup.glade.h:11
-msgid "Abo_ut"
-msgstr "À _propos"
+#: ../setup/setup.ui.h:22
+msgid "Auto Convert"
+msgstr "Convertir automatiquement"
-#: ../setup/setup.glade.h:12
-msgid "Adjust IM layout to XKB layout"
-msgstr "Utilise la disposition clavier utilisée dans XKB pour l'IME"
+#: ../setup/setup.ui.h:23
+msgid "Clear"
+msgstr "Effacer"
-#: ../setup/setup.glade.h:13
-msgid "Adjust _input method layout to system keyboard layout"
-msgstr ""
-"Utiliser la d_isposition clavier système comme disposition pour la méthode "
-"d'entrée"
+#: ../setup/setup.ui.h:24
+msgid "Commit"
+msgstr "Valider"
-#: ../setup/setup.glade.h:14
-msgid "Behavior on _Focus Out:"
-msgstr "Comportement à la perte du _Focus :"
+#: ../setup/setup.ui.h:25
+msgid "Hold"
+msgstr "Garder"
-#: ../setup/setup.glade.h:15
-msgid "Candidate _Window Page Size:"
-msgstr "_Taille de la fenêtre de la liste des candidats :"
+#: ../setup/setup.ui.h:27
+msgid "ATOK"
+msgstr "ATOK"
-#: ../setup/setup.glade.h:16
-msgid ""
-"Clear\n"
-"Commit\n"
-"Hold\n"
-msgstr ""
-"Effacer\n"
-"Valider\n"
-"Garder\n"
+#: ../setup/setup.ui.h:28
+msgid "Wnn"
+msgstr "Wnn"
-#: ../setup/setup.glade.h:20
-msgid "Co_ntrol"
-msgstr "Co_ntrol"
+#: ../setup/setup.ui.h:29
+msgid "Setup - IBus-Anthy"
+msgstr "Configuration – IBus-Anthy"
-#: ../setup/setup.glade.h:21
-msgid "Con_vert spaces with the one column width"
-msgstr "Convertir les _espaces en espaces d'une seule colonne de largeur"
+#: ../setup/setup.ui.h:30
+msgid "_Input Mode:"
+msgstr "Méthode d'E_ntrée :"
+
+#: ../setup/setup.ui.h:31
+msgid "_Typing Method:"
+msgstr "Méthode d'Éc_riture :"
-#: ../setup/setup.glade.h:22
+#: ../setup/setup.ui.h:32
msgid "Conversion _Mode:"
msgstr "Mode de _Conversion :"
-#: ../setup/setup.glade.h:23
-msgid "Convert _numbers with the one column width"
-msgstr "Convertir les ch_iffres en chiffres d'une seule colonne de largeur"
+#: ../setup/setup.ui.h:33
+msgid "<b>Initial Setting</b>"
+msgstr "<b>Configuration initiale</b>"
-#: ../setup/setup.glade.h:24
-msgid "Convert _symbols with the one column width"
-msgstr "Convertir les s_ymboles en symboles d'une seule colonne de largeur"
+#: ../setup/setup.ui.h:34
+msgid "_Period Style:"
+msgstr "Style de _Ponctuation :"
-#: ../setup/setup.glade.h:25
-msgid "De_fault"
-msgstr "Dé_faut"
+#: ../setup/setup.ui.h:35
+msgid "Symbo_l Style:"
+msgstr "Style de _Symboles :"
-#: ../setup/setup.glade.h:26
-msgid ""
-"Default\n"
-"ATOK\n"
-"Wnn\n"
-msgstr ""
-"Par Défaut\n"
-"ATOK\n"
-"Wnn\n"
+#: ../setup/setup.ui.h:36
+msgid "Numpad _Key Type:"
+msgstr "Touches du Pa_vé Numérique :"
-#: ../setup/setup.glade.h:30
-msgid "Dictionar_y"
-msgstr "_Dictionnaire"
+#: ../setup/setup.ui.h:37
+msgid "_Behavior on Period:"
+msgstr "Comportement _lors de la ponctuation :"
-#: ../setup/setup.glade.h:31
-msgid ""
-"Do Nothing\n"
-"Auto Convert"
-msgstr ""
-"Ne rien faire\n"
-"Convertir automatiquement"
+#: ../setup/setup.ui.h:38
+msgid "Behavior on _Focus Out:"
+msgstr "Comportement à la perte du _Focus :"
-#: ../setup/setup.glade.h:33
-msgid "Edit Shortcut"
-msgstr "Éditer le raccourci"
+#: ../setup/setup.ui.h:39
+msgid "<b>Behavior</b>"
+msgstr "<b>Comportement</b>"
-#: ../setup/setup.glade.h:34
-msgid "Enable the _reverse conversion"
-msgstr "Activer la conversion inversée"
+#: ../setup/setup.ui.h:40
+msgid "Convert _numbers with the one column width"
+msgstr "Convertir les ch_iffres en chiffres d'une seule colonne de largeur"
-#: ../setup/setup.glade.h:35
-msgid ""
-"Hiragana\n"
-"Katakana\n"
-"Half Width Katakana\n"
-"Latin\n"
-"Wide Latin"
-msgstr ""
-"Hiragana\n"
-"Katakana\n"
-"Half Width Katakana\n"
-"Latin\n"
-"Latin large"
+#: ../setup/setup.ui.h:41
+msgid "Candidate _Window Page Size:"
+msgstr "_Taille de la fenêtre de la liste des candidats :"
-#: ../setup/setup.glade.h:40
-msgid "Input _Method Layout:"
-msgstr "Disposition de la _Méthode d'entrée :"
+#: ../setup/setup.ui.h:42
+msgid "Convert _symbols with the one column width"
+msgstr "Convertir les s_ymboles en symboles d'une seule colonne de largeur"
-#: ../setup/setup.glade.h:41
-msgid ""
-"Keep Numpad Codes\n"
-"Convert Characters\n"
-msgstr ""
-"Conserver les codes du pavé numérique\n"
-"Convertir les caractères\n"
+#: ../setup/setup.ui.h:43
+msgid "Con_vert spaces with the one column width"
+msgstr "Convertir les _espaces en espaces d'une seule colonne de largeur"
-#: ../setup/setup.glade.h:44
-msgid "Key Code:"
-msgstr "Touche :"
+#: ../setup/setup.ui.h:44
+msgid "<b>Other</b>"
+msgstr "<b>Autres options</b>"
-#: ../setup/setup.glade.h:45
-msgid "Key bin_ding"
-msgstr "_Raccourcis claviers"
+#: ../setup/setup.ui.h:45
+msgid "_General"
+msgstr "_Général"
-#: ../setup/setup.glade.h:46
-msgid "Modifier:"
-msgstr "Modificateur :"
+#: ../setup/setup.ui.h:46
+msgid "_Shortcut Type:"
+msgstr "Raccourcis _claviers :"
-#: ../setup/setup.glade.h:47
-msgid ""
-"Multiple segment\n"
-"Single segment\n"
-"Immediate conversion (Multiple segment)\n"
-"Immediate conversion (Single segment)"
-msgstr ""
-"Segments multiples\n"
-"Segments simples\n"
-"Conversion immédiate (Segments multiples)\n"
-"Conversion immédiate (Segments simples)"
+#: ../setup/setup.ui.h:47
+msgid "De_fault"
+msgstr "Dé_faut"
-#: ../setup/setup.glade.h:51
-msgid ""
-"NICOLA-J\n"
-"NICOLA-A\n"
-"NICOLA-F"
-msgstr ""
-"NICOLA-J\n"
-"NICOLA-A\n"
-"NICOLA-F"
+#: ../setup/setup.ui.h:48
+msgid "Key bin_ding"
+msgstr "_Raccourcis claviers"
-#: ../setup/setup.glade.h:54
-msgid ""
-"None\n"
-"FMV KB231 key extension\n"
-"FMV KB611 key extension"
-msgstr ""
-"Aucun\n"
-"FMV KB231 key extension\n"
-"FMV KB611 key extension"
+#: ../setup/setup.ui.h:50
+msgid "<b>Romaji</b>"
+msgstr "<b>Romaji</b>"
-#: ../setup/setup.glade.h:57
-msgid "Numpad _Key Type:"
-msgstr "Touches du Pa_vé Numérique :"
+#: ../setup/setup.ui.h:52
+msgid "<b>Kana</b>"
+msgstr "<b>Kana</b>"
-#: ../setup/setup.glade.h:58
-msgid "Restart ibus when you change XKB"
-msgstr "Redémarrez ibus lorsque vous changer la configuration dans XKB"
+#: ../setup/setup.ui.h:53
+msgid "_Typing Method"
+msgstr "Méthode d'Écri_ture"
-#: ../setup/setup.glade.h:59
-msgid "Restart ibus when you change the keyboard layout."
-msgstr "Redémarrez ibus lorsque vous changer la disposition clavier système."
+#: ../setup/setup.ui.h:54
+msgid "_Left Thumb Shift Key:"
+msgstr "Touche Thumb Shift _Gauche"
-#: ../setup/setup.glade.h:60
+#: ../setup/setup.ui.h:55
msgid "Right _Thumb Shift Key:"
msgstr "Touche _Thumb Shift Droit"
-#: ../setup/setup.glade.h:61
-msgid ""
-"Romaji\n"
-"Kana\n"
-"Thumb shift"
+#: ../setup/setup.ui.h:56
+msgid "Adjust _input method layout to system keyboard layout"
msgstr ""
-"Romaji\n"
-"Kana\n"
-"Thumb shift"
+"Utiliser la d_isposition clavier système comme disposition pour la méthode "
+"d'entrée"
-#: ../setup/setup.glade.h:64
-msgid "Seion + Shift can output Handakuon"
-msgstr "Seion + Majuscule peut imprimer Handakuon"
+#: ../setup/setup.ui.h:57
+msgid "Adjust IM layout to XKB layout"
+msgstr "Utilise la disposition clavier utilisée dans XKB pour l'IME"
-#: ../setup/setup.glade.h:65
-msgid "Setup - IBus-Anthy"
-msgstr "Configuration – IBus-Anthy"
+#: ../setup/setup.ui.h:58
+msgid "Input _Method Layout:"
+msgstr "Disposition de la _Méthode d'entrée :"
-#: ../setup/setup.glade.h:66
+#: ../setup/setup.ui.h:59
+msgid "Restart ibus when you change the keyboard layout."
+msgstr "Redémarrez ibus lorsque vous changer la disposition clavier système."
+
+#: ../setup/setup.ui.h:60
+msgid "Restart ibus when you change XKB"
+msgstr "Redémarrez ibus lorsque vous changer la configuration dans XKB"
+
+#: ../setup/setup.ui.h:61
msgid ""
"Strongly recommend to enable \"Use system keyboard layout\" check button in "
"\"Advanced\" tab using 'ibus-setup' command"
@@ -607,35 +563,19 @@ msgstr ""
"disposition clavier système » dans l'onglet « Avancé » en utilisant la "
"commande « ibus-setup »"
-#: ../setup/setup.glade.h:67
-msgid "Symbo_l Style:"
-msgstr "Style de _Symboles :"
-
-#: ../setup/setup.glade.h:68
-msgid "The Anthy engine for IBus input platform"
-msgstr "Le moteur Anthy pour la plateforme de saisie IBus"
-
-#: ../setup/setup.glade.h:69
-msgid "Thumb S_hift"
-msgstr "_Thumb Shift"
-
-#: ../setup/setup.glade.h:70
-msgid "Thumb _Shift Key Table:"
-msgstr "Table des touches Thumb _Shift :"
-
-#: ../setup/setup.glade.h:71
-msgid "You can change the order on language bar"
-msgstr "Vous pouvez changer l'odre dans la barre de langue"
+#: ../setup/setup.ui.h:62
+msgid "_Additional Key Arrangement:"
+msgstr "_Arrangement des Touches Additionnelles :"
-#: ../setup/setup.glade.h:72
+#: ../setup/setup.ui.h:63
msgid ""
-"You do not have to reconfigure XKB since this option changes IM layout only "
-"with IM on."
+"'&#xFF5E;', '&#x300E;', '&#xA2;', '&#xA3;' and so on can be output with "
+"Thumb Shift key"
msgstr ""
-"Vous n'avez pas besoin de reconfigurer XKB, puisque cette option ne change "
-"que la disposition de l'IME lorsque l'IME est activé."
+"'&#xFF5E;', '&#x300E;', '&#xA2;', '&#xA3;', etc. peuvent être tapées avec la "
+"méthode Thumb Shift"
-#: ../setup/setup.glade.h:73
+#: ../setup/setup.ui.h:64
msgid ""
"You do not have to reconfigure the system keyboard layout for \"Additional "
"Key Arrangement\" since this option changes input method layout only in case "
@@ -646,95 +586,134 @@ msgstr ""
"option ne change la disposition de la méthode d'entrée que lorsque la "
"méthode d'entrée est activée."
-#: ../setup/setup.glade.h:74
-msgid "_Add Word Command:"
-msgstr "Commande permettant l'a_jout d'un mot :"
+#: ../setup/setup.ui.h:65
+msgid ""
+"You do not have to reconfigure XKB since this option changes IM layout only "
+"with IM on."
+msgstr ""
+"Vous n'avez pas besoin de reconfigurer XKB, puisque cette option ne change "
+"que la disposition de l'IME lorsque l'IME est activé."
-#: ../setup/setup.glade.h:75
-msgid "_Additional Key Arrangement:"
-msgstr "_Arrangement des Touches Additionnelles :"
+#: ../setup/setup.ui.h:66
+msgid "_Enable semi-voiced sound mark with Shift key"
+msgstr "Activer les « semi-_voiced sound mark » avec la touche Majuscule"
-#: ../setup/setup.glade.h:76
-msgid "_Behavior on Period:"
-msgstr "Comportement _lors de la ponctuation :"
+#: ../setup/setup.ui.h:67
+msgid "Seion + Shift can output Handakuon"
+msgstr "Seion + Majuscule peut imprimer Handakuon"
-#: ../setup/setup.glade.h:77
-msgid "_Description:"
-msgstr "_Description :"
+#: ../setup/setup.ui.h:68
+msgid "Thumb _Shift Key Table:"
+msgstr "Table des touches Thumb _Shift :"
+
+#: ../setup/setup.ui.h:69
+msgid "<b>Thumb Shift Layout</b>"
+msgstr "<b>Disposition Thumb Shift</b>"
+
+#: ../setup/setup.ui.h:70
+msgid "Thumb S_hift"
+msgstr "_Thumb Shift"
-#: ../setup/setup.glade.h:78
+#: ../setup/setup.ui.h:71
msgid "_Edit Dictionary Command:"
msgstr "Commande permettant l'éd_ition du Dictionnaire :"
-#: ../setup/setup.glade.h:79
-msgid "_Embed your dictionary in the system dictionary"
-msgstr "Inclur_e votre dictionnaire dans le dictionnaire système"
+#: ../setup/setup.ui.h:72
+msgid "_Add Word Command:"
+msgstr "Commande permettant l'a_jout d'un mot :"
-#: ../setup/setup.glade.h:80
-msgid "_Enable semi-voiced sound mark with Shift key"
-msgstr "Activer les « semi-_voiced sound mark » avec la touche Majuscule"
+#: ../setup/setup.ui.h:73
+msgid "<b>Default Dictionary Configuration</b>"
+msgstr "<b>Configuration du Dictionnaire par Défaut</b>"
-#: ../setup/setup.glade.h:81
-msgid "_General"
-msgstr "_Général"
+#: ../setup/setup.ui.h:74
+msgid "_View"
+msgstr "_Voir"
-#: ../setup/setup.glade.h:82
-msgid "_Input Chars"
-msgstr "Caractères d'ent_rée"
+#: ../setup/setup.ui.h:75
+msgid "You can change the order on language bar"
+msgstr "Vous pouvez changer l'odre dans la barre de langue"
-#: ../setup/setup.glade.h:83
-msgid "_Input Mode:"
-msgstr "Méthode d'E_ntrée :"
+#: ../setup/setup.ui.h:76
+msgid "<b>Extended Dictionaries</b>"
+msgstr "<b>Dictionnaires supplémentaires</b>"
-#: ../setup/setup.glade.h:85
-msgid "_Left Thumb Shift"
-msgstr "Thumb Shift _Gauche"
+#: ../setup/setup.ui.h:77
+msgid "Dictionar_y"
+msgstr "_Dictionnaire"
-#: ../setup/setup.glade.h:86
-msgid "_Left Thumb Shift Key:"
-msgstr "Touche Thumb Shift _Gauche"
+#: ../setup/setup.ui.h:78
+msgid "Abo_ut"
+msgstr "À _propos"
-#: ../setup/setup.glade.h:88
-msgid "_Period Style:"
-msgstr "Style de _Ponctuation :"
+#: ../setup/setup.ui.h:79
+msgid "Edit Shortcut"
+msgstr "Éditer le raccourci"
-#: ../setup/setup.glade.h:89
-msgid "_Right Thumb Shift"
-msgstr "Thumb Shift D_roit"
+#: ../setup/setup.ui.h:80
+msgid "Key Code:"
+msgstr "Touche :"
+
+#: ../setup/setup.ui.h:81
+msgid "Modifier:"
+msgstr "Modificateur :"
+
+#: ../setup/setup.ui.h:82
+msgid "A_lternate"
+msgstr "A_lternatif"
-#: ../setup/setup.glade.h:91
+#: ../setup/setup.ui.h:83
+msgid "Co_ntrol"
+msgstr "Co_ntrol"
+
+#: ../setup/setup.ui.h:84
msgid "_Shift"
msgstr "_Majuscule"
-#: ../setup/setup.glade.h:92
-msgid "_Short Label:"
-msgstr "_Label court :"
+#: ../setup/setup.ui.h:85
+msgid "_Input Chars"
+msgstr "Caractères d'ent_rée"
-#: ../setup/setup.glade.h:93
-msgid "_Shortcut Type:"
-msgstr "Raccourcis _claviers :"
+#: ../setup/setup.ui.h:87
+msgid "_Left Thumb Shift"
+msgstr "Thumb Shift _Gauche"
-#: ../setup/setup.glade.h:94
-msgid "_Typing Method"
-msgstr "Méthode d'Écri_ture"
+#: ../setup/setup.ui.h:88
+msgid "_Right Thumb Shift"
+msgstr "Thumb Shift D_roit"
-#: ../setup/setup.glade.h:95
-msgid "_Typing Method:"
-msgstr "Méthode d'Éc_riture :"
+#: ../setup/setup.ui.h:89
+msgid "_Short Label:"
+msgstr "_Label court :"
+
+#: ../setup/setup.ui.h:90
+msgid "_Description:"
+msgstr "_Description :"
-#: ../setup/setup.glade.h:96
+#: ../setup/setup.ui.h:91
msgid "_Use your dictionary alone with switching dictionaries"
msgstr ""
"_Utiliser votre dictionnaire seul lors du basculement des dictionnaires"
-#: ../setup/setup.glade.h:97
-msgid "_View"
-msgstr "_Voir"
+#: ../setup/setup.ui.h:92
+msgid "_Embed your dictionary in the system dictionary"
+msgstr "Inclur_e votre dictionnaire dans le dictionnaire système"
+
+#: ../setup/setup.ui.h:93
+msgid "Enable the _reverse conversion"
+msgstr "Activer la conversion inversée"
-#: ../setup/setup.glade.h:98
+#: ../setup/setup.ui.h:94
+msgid "The Anthy engine for IBus input platform"
+msgstr "Le moteur Anthy pour la plateforme de saisie IBus"
+
+#: ../setup/setup.ui.h:95
msgid "translator_credits"
msgstr "Humbert Julien"
+#~ msgid "Anthy"
+#~ msgstr "Anthy"
+
#~ msgid "_Romaji Key Table"
#~ msgstr "Table des touches _Romaji"
diff --git a/po/ibus-anthy.pot b/po/ibus-anthy.pot
index c23f57f..68e7925 100644
--- a/po/ibus-anthy.pot
+++ b/po/ibus-anthy.pot
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ibus-anthy HEAD\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
-"POT-Creation-Date: 2011-05-13 14:54+0900\n"
+"POT-Creation-Date: 2012-03-02 20:04+0900\n"
"PO-Revision-Date: 2011-05-13 14:54+0900\n"
"Last-Translator: Takao Fujiwara <takao.fujiwara1@gmail.com>\n"
"Language-Team: Source\n"
@@ -15,672 +15,675 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../engine/engine.py:187
+#: ../engine/engine.py:198
msgid "Switch input mode"
msgstr ""
-#: ../engine/engine.py:193
+#: ../engine/engine.py:208 ../setup/setup.ui.h:1
msgid "Hiragana"
msgstr ""
-#: ../engine/engine.py:196
+#: ../engine/engine.py:217 ../setup/setup.ui.h:2
msgid "Katakana"
msgstr ""
-#: ../engine/engine.py:199
+#: ../engine/engine.py:226
msgid "Half width katakana"
msgstr ""
-#: ../engine/engine.py:202
+#: ../engine/engine.py:235 ../setup/setup.ui.h:4
msgid "Latin"
msgstr ""
-#: ../engine/engine.py:205
+#: ../engine/engine.py:244 ../setup/setup.ui.h:5
msgid "Wide Latin"
msgstr ""
-#: ../engine/engine.py:219
+#: ../engine/engine.py:268
msgid "Switch typing mode"
msgstr ""
-#: ../engine/engine.py:225
+#: ../engine/engine.py:278 ../setup/setup.ui.h:12
msgid "Romaji"
msgstr ""
-#: ../engine/engine.py:228
+#: ../engine/engine.py:287 ../setup/setup.ui.h:13
msgid "Kana"
msgstr ""
-#: ../engine/engine.py:231
+#: ../engine/engine.py:296 ../setup/setup.ui.h:14
msgid "Thumb shift"
msgstr ""
-#: ../engine/engine.py:244
+#: ../engine/engine.py:318
msgid "Preferences - Anthy"
msgstr ""
-#: ../engine/engine.py:246
+#: ../engine/engine.py:320
msgid "Configure Anthy"
msgstr ""
-#: ../engine/engine.py:266
+#: ../engine/engine.py:341
msgid "Switch conversion mode"
msgstr ""
-#: ../engine/engine.py:272
+#: ../engine/engine.py:351 ../setup/setup.ui.h:15
msgid "Multiple segment"
msgstr ""
-#: ../engine/engine.py:275
+#: ../engine/engine.py:360 ../setup/setup.ui.h:16
msgid "Single segment"
msgstr ""
-#: ../engine/engine.py:278
+#: ../engine/engine.py:369 ../setup/setup.ui.h:17
msgid "Immediate conversion (Multiple segment)"
msgstr ""
-#: ../engine/engine.py:281
+#: ../engine/engine.py:378 ../setup/setup.ui.h:18
msgid "Immediate conversion (Single segment)"
msgstr ""
-#: ../engine/engine.py:296
+#: ../engine/engine.py:403
msgid "Switch Dictionary"
msgstr ""
-#: ../engine/engine.py:338
+#: ../engine/engine.py:465
msgid "Dictionary - Anthy"
msgstr ""
#. Translators: "Dic" means 'dictionary', One kanji may be good.
-#: ../engine/engine.py:343
+#: ../engine/engine.py:470
msgid "Dic"
msgstr ""
-#: ../engine/engine.py:350
+#: ../engine/engine.py:477
msgid "Configure dictionaries"
msgstr ""
-#: ../engine/engine.py:355
+#: ../engine/engine.py:487
msgid "Edit dictionaries"
msgstr ""
-#: ../engine/engine.py:357
+#: ../engine/engine.py:489
msgid "Launch the dictionary tool"
msgstr ""
-#: ../engine/engine.py:360
+#: ../engine/engine.py:496
msgid "Add words"
msgstr ""
-#: ../engine/engine.py:362
+#: ../engine/engine.py:498
msgid "Add words in the dictionary"
msgstr ""
-#: ../engine/factory.py:35
-msgid "Anthy"
-msgstr ""
-
-#: ../setup/anthyprefs.py.in:845
+#: ../setup/anthyprefs.py.in:838
msgid "General"
msgstr ""
-#: ../setup/anthyprefs.py.in:856
+#: ../setup/anthyprefs.py.in:849
msgid "Zip Code Conversion"
msgstr ""
-#: ../setup/anthyprefs.py.in:868
+#: ../setup/anthyprefs.py.in:861
msgid "Symbol"
msgstr ""
-#: ../setup/anthyprefs.py.in:879
+#: ../setup/anthyprefs.py.in:872
msgid "Old Character Style"
msgstr ""
-#: ../setup/main.py:86
+#. self.__run_message_dialog needs self.__builder.
+#: ../setup/main.py:60
+msgid "ibus is not running."
+msgstr ""
+
+#: ../setup/main.py:98
msgid "Command"
msgstr ""
-#: ../setup/main.py:90
+#: ../setup/main.py:102
msgid "Shortcut"
msgstr ""
-#: ../setup/main.py:131
+#: ../setup/main.py:143
msgid "Description"
msgstr ""
#. Translators: "Embd" means a short word of 'embedded'.
-#: ../setup/main.py:139
+#: ../setup/main.py:151
msgid "Embd"
msgstr ""
#. Translators: "Sgl" means a short word of 'single'.
-#: ../setup/main.py:147
+#: ../setup/main.py:159
msgid "Sgl"
msgstr ""
-#: ../setup/main.py:269 ../setup/main.py:298
+#: ../setup/main.py:287 ../setup/main.py:316
msgid "Input Chars"
msgstr ""
-#: ../setup/main.py:271 ../setup/main.py:300
+#: ../setup/main.py:289 ../setup/main.py:318
msgid "Output Chars"
msgstr ""
-#: ../setup/main.py:339
+#: ../setup/main.py:357
msgid "Input"
msgstr ""
-#: ../setup/main.py:341
+#: ../setup/main.py:359
msgid "Single"
msgstr ""
-#: ../setup/main.py:343
+#: ../setup/main.py:361
msgid "Left"
msgstr ""
-#: ../setup/main.py:345
+#: ../setup/main.py:363
msgid "Right"
msgstr ""
-#: ../setup/main.py:420
+#: ../setup/main.py:438
msgid "Customize Romaji Key Table"
msgstr ""
-#: ../setup/main.py:421 ../setup/setup.glade.h:90
+#: ../setup/main.py:439 ../setup/setup.ui.h:49
msgid "_Romaji Key Table:"
msgstr ""
-#: ../setup/main.py:422 ../setup/main.py:428 ../setup/setup.glade.h:87
+#: ../setup/main.py:440 ../setup/main.py:446 ../setup/setup.ui.h:86
msgid "_Output Chars"
msgstr ""
-#: ../setup/main.py:423 ../setup/main.py:429
+#: ../setup/main.py:441 ../setup/main.py:447 ../setup/setup.ui.h:26
msgid "Default"
msgstr ""
-#: ../setup/main.py:426
+#: ../setup/main.py:444
msgid "Customize Kana Key Table"
msgstr ""
-#: ../setup/main.py:427 ../setup/setup.glade.h:84
+#: ../setup/main.py:445 ../setup/setup.ui.h:51
msgid "_Kana Key Table:"
msgstr ""
-#: ../setup/main.py:432
+#: ../setup/main.py:450
msgid "Customize Thumb Shift Key Table"
msgstr ""
-#: ../setup/main.py:433
+#: ../setup/main.py:451
msgid "_Thumb Shift Key Table:"
msgstr ""
-#: ../setup/main.py:434
+#: ../setup/main.py:452
msgid "Single _Output Chars"
msgstr ""
-#: ../setup/main.py:435
+#: ../setup/main.py:453
msgid "Base"
msgstr ""
-#: ../setup/main.py:436
+#: ../setup/main.py:454
msgid "NICOLA-J key extension"
msgstr ""
-#: ../setup/main.py:437
+#: ../setup/main.py:455
msgid "NICOLA-A key extension"
msgstr ""
-#: ../setup/main.py:438
+#: ../setup/main.py:456
msgid "NICOLA-F key extension"
msgstr ""
-#: ../setup/main.py:439
+#: ../setup/main.py:457
msgid "FMV KB231-J key extension"
msgstr ""
-#: ../setup/main.py:440
+#: ../setup/main.py:458
msgid "FMV KB231-A key extension"
msgstr ""
-#: ../setup/main.py:441
+#: ../setup/main.py:459
msgid "FMV KB231-F key extension"
msgstr ""
-#: ../setup/main.py:442
+#: ../setup/main.py:460
msgid "FMV KB611-J key extension"
msgstr ""
-#: ../setup/main.py:443
+#: ../setup/main.py:461
msgid "FMV KB611-A key extension"
msgstr ""
-#: ../setup/main.py:444
+#: ../setup/main.py:462
msgid "FMV KB611-F key extension"
msgstr ""
-#: ../setup/main.py:593
+#: ../setup/main.py:617
msgid "Your choosed file has already been added: "
msgstr ""
-#: ../setup/main.py:597
+#: ../setup/main.py:621
msgid "Your choosed file does not exist: "
msgstr ""
-#: ../setup/main.py:601
+#: ../setup/main.py:625
msgid "Your choosed file is a directory: "
msgstr ""
-#: ../setup/main.py:605
+#: ../setup/main.py:629
msgid "You cannot add dictionaries in the anthy private directory: "
msgstr ""
-#: ../setup/main.py:612
+#: ../setup/main.py:636
msgid "Your file path is not good: "
msgstr ""
-#: ../setup/main.py:768
+#: ../setup/main.py:793
msgid "Confirm"
msgstr ""
-#: ../setup/main.py:769
+#: ../setup/main.py:794
msgid "Are you sure to close Setup?"
msgstr ""
-#: ../setup/main.py:782
+#: ../setup/main.py:808
msgid "Notice!"
msgstr ""
-#: ../setup/main.py:783
+#: ../setup/main.py:809
msgid "Are you sure to close Setup without save configure?"
msgstr ""
-#: ../setup/main.py:887
+#: ../setup/main.py:914
msgid "Please specify Input Chars"
msgstr ""
-#: ../setup/main.py:890
+#: ../setup/main.py:917
msgid "Please specify Output Chars"
msgstr ""
-#: ../setup/main.py:893
+#: ../setup/main.py:920
msgid "Please specify Left Thumb Shift Chars"
msgstr ""
-#: ../setup/main.py:896
+#: ../setup/main.py:923
msgid "Please specify Right Thumb Shift Chars"
msgstr ""
-#: ../setup/main.py:909 ../setup/main.py:949
+#: ../setup/main.py:936 ../setup/main.py:976
msgid "Your custom key is not assigned in any sections. Maybe a bug."
msgstr ""
-#: ../setup/main.py:1009 ../setup/main.py:1095
+#: ../setup/main.py:1036 ../setup/main.py:1122
msgid "Your file does not exist: "
msgstr ""
-#: ../setup/main.py:1019
+#: ../setup/main.py:1046
msgid "Open Dictionary File"
msgstr ""
-#: ../setup/main.py:1025
+#: ../setup/main.py:1052
msgid "Edit Dictionary File"
msgstr ""
-#: ../setup/main.py:1039
+#: ../setup/main.py:1066
msgid "Your choosed file is not correct."
msgstr ""
-#: ../setup/main.py:1068
+#: ../setup/main.py:1095
msgid "You cannot delete the system dictionary."
msgstr ""
-#: ../setup/main.py:1091
+#: ../setup/main.py:1118
msgid "Your file is not good."
msgstr ""
-#: ../setup/main.py:1120
+#: ../setup/main.py:1147
msgid "View Dictionary File"
msgstr ""
-#: ../setup/main.py:1270
+#: ../setup/main.py:1301
msgid "Please press a key (or a key combination)"
msgstr ""
-#: ../setup/main.py:1271
+#: ../setup/main.py:1302
msgid "The dialog will be closed when the key is released"
msgstr ""
-#: ../setup/main.py:1290 ../setup/main.py:1310
+#: ../setup/main.py:1321 ../setup/main.py:1341
msgid "Invalid keysym"
msgstr ""
-#: ../setup/main.py:1291 ../setup/main.py:1311
+#: ../setup/main.py:1322 ../setup/main.py:1342
msgid "This keysym is not valid"
msgstr ""
-#: ../setup/setup.glade.h:1
-msgid "'~', 『', '¢', '£' and so on can be output with Thumb Shift key"
+#: ../setup/setup.ui.h:3
+msgid "Half Width Katakana"
msgstr ""
-#: ../setup/setup.glade.h:2
-msgid "<b>Behavior</b>"
+#: ../setup/setup.ui.h:6
+msgid "NICOLA-J"
msgstr ""
-#: ../setup/setup.glade.h:3
-msgid "<b>Default Dictionary Configuration</b>"
+#: ../setup/setup.ui.h:7
+msgid "NICOLA-A"
msgstr ""
-#: ../setup/setup.glade.h:4
-msgid "<b>Extended Dictionaries</b>"
+#: ../setup/setup.ui.h:8
+msgid "NICOLA-F"
msgstr ""
-#: ../setup/setup.glade.h:5
-msgid "<b>Initial Setting</b>"
+#: ../setup/setup.ui.h:9
+msgid "None"
msgstr ""
-#: ../setup/setup.glade.h:6
-msgid "<b>Kana</b>"
+#: ../setup/setup.ui.h:10
+msgid "FMV KB231 key extension"
msgstr ""
-#: ../setup/setup.glade.h:7
-msgid "<b>Other</b>"
+#: ../setup/setup.ui.h:11
+msgid "FMV KB611 key extension"
msgstr ""
-#: ../setup/setup.glade.h:8
-msgid "<b>Romaji</b>"
+#: ../setup/setup.ui.h:19
+msgid "Keep Numpad Codes"
msgstr ""
-#: ../setup/setup.glade.h:9
-msgid "<b>Thumb Shift Layout</b>"
+#: ../setup/setup.ui.h:20
+msgid "Convert Characters"
msgstr ""
-#: ../setup/setup.glade.h:10
-msgid "A_lternate"
+#: ../setup/setup.ui.h:21
+msgid "Do Nothing"
msgstr ""
-#: ../setup/setup.glade.h:11
-msgid "Abo_ut"
+#: ../setup/setup.ui.h:22
+msgid "Auto Convert"
msgstr ""
-#: ../setup/setup.glade.h:12
-msgid "Adjust IM layout to XKB layout"
+#: ../setup/setup.ui.h:23
+msgid "Clear"
msgstr ""
-#: ../setup/setup.glade.h:13
-msgid "Adjust _input method layout to system keyboard layout"
+#: ../setup/setup.ui.h:24
+msgid "Commit"
msgstr ""
-#: ../setup/setup.glade.h:14
-msgid "Behavior on _Focus Out:"
+#: ../setup/setup.ui.h:25
+msgid "Hold"
msgstr ""
-#: ../setup/setup.glade.h:15
-msgid "Candidate _Window Page Size:"
+#: ../setup/setup.ui.h:27
+msgid "ATOK"
msgstr ""
-#: ../setup/setup.glade.h:16
-msgid ""
-"Clear\n"
-"Commit\n"
-"Hold\n"
+#: ../setup/setup.ui.h:28
+msgid "Wnn"
msgstr ""
-#: ../setup/setup.glade.h:20
-msgid "Co_ntrol"
+#: ../setup/setup.ui.h:29
+msgid "Setup - IBus-Anthy"
msgstr ""
-#: ../setup/setup.glade.h:21
-msgid "Con_vert spaces with the one column width"
+#: ../setup/setup.ui.h:30
+msgid "_Input Mode:"
+msgstr ""
+
+#: ../setup/setup.ui.h:31
+msgid "_Typing Method:"
msgstr ""
-#: ../setup/setup.glade.h:22
+#: ../setup/setup.ui.h:32
msgid "Conversion _Mode:"
msgstr ""
-#: ../setup/setup.glade.h:23
-msgid "Convert _numbers with the one column width"
+#: ../setup/setup.ui.h:33
+msgid "<b>Initial Setting</b>"
msgstr ""
-#: ../setup/setup.glade.h:24
-msgid "Convert _symbols with the one column width"
+#: ../setup/setup.ui.h:34
+msgid "_Period Style:"
msgstr ""
-#: ../setup/setup.glade.h:25
-msgid "De_fault"
+#: ../setup/setup.ui.h:35
+msgid "Symbo_l Style:"
msgstr ""
-#: ../setup/setup.glade.h:26
-msgid ""
-"Default\n"
-"ATOK\n"
-"Wnn\n"
+#: ../setup/setup.ui.h:36
+msgid "Numpad _Key Type:"
msgstr ""
-#: ../setup/setup.glade.h:30
-msgid "Dictionar_y"
+#: ../setup/setup.ui.h:37
+msgid "_Behavior on Period:"
msgstr ""
-#: ../setup/setup.glade.h:31
-msgid ""
-"Do Nothing\n"
-"Auto Convert"
+#: ../setup/setup.ui.h:38
+msgid "Behavior on _Focus Out:"
msgstr ""
-#: ../setup/setup.glade.h:33
-msgid "Edit Shortcut"
+#: ../setup/setup.ui.h:39
+msgid "<b>Behavior</b>"
msgstr ""
-#: ../setup/setup.glade.h:34
-msgid "Enable the _reverse conversion"
+#: ../setup/setup.ui.h:40
+msgid "Convert _numbers with the one column width"
msgstr ""
-#: ../setup/setup.glade.h:35
-msgid ""
-"Hiragana\n"
-"Katakana\n"
-"Half Width Katakana\n"
-"Latin\n"
-"Wide Latin"
+#: ../setup/setup.ui.h:41
+msgid "Candidate _Window Page Size:"
msgstr ""
-#: ../setup/setup.glade.h:40
-msgid "Input _Method Layout:"
+#: ../setup/setup.ui.h:42
+msgid "Convert _symbols with the one column width"
msgstr ""
-#: ../setup/setup.glade.h:41
-msgid ""
-"Keep Numpad Codes\n"
-"Convert Characters\n"
+#: ../setup/setup.ui.h:43
+msgid "Con_vert spaces with the one column width"
msgstr ""
-#: ../setup/setup.glade.h:44
-msgid "Key Code:"
+#: ../setup/setup.ui.h:44
+msgid "<b>Other</b>"
msgstr ""
-#: ../setup/setup.glade.h:45
-msgid "Key bin_ding"
+#: ../setup/setup.ui.h:45
+msgid "_General"
msgstr ""
-#: ../setup/setup.glade.h:46
-msgid "Modifier:"
+#: ../setup/setup.ui.h:46
+msgid "_Shortcut Type:"
msgstr ""
-#: ../setup/setup.glade.h:47
-msgid ""
-"Multiple segment\n"
-"Single segment\n"
-"Immediate conversion (Multiple segment)\n"
-"Immediate conversion (Single segment)"
+#: ../setup/setup.ui.h:47
+msgid "De_fault"
msgstr ""
-#: ../setup/setup.glade.h:51
-msgid ""
-"NICOLA-J\n"
-"NICOLA-A\n"
-"NICOLA-F"
+#: ../setup/setup.ui.h:48
+msgid "Key bin_ding"
msgstr ""
-#: ../setup/setup.glade.h:54
-msgid ""
-"None\n"
-"FMV KB231 key extension\n"
-"FMV KB611 key extension"
+#: ../setup/setup.ui.h:50
+msgid "<b>Romaji</b>"
msgstr ""
-#: ../setup/setup.glade.h:57
-msgid "Numpad _Key Type:"
+#: ../setup/setup.ui.h:52
+msgid "<b>Kana</b>"
msgstr ""
-#: ../setup/setup.glade.h:58
-msgid "Restart ibus when you change XKB"
+#: ../setup/setup.ui.h:53
+msgid "_Typing Method"
msgstr ""
-#: ../setup/setup.glade.h:59
-msgid "Restart ibus when you change the keyboard layout."
+#: ../setup/setup.ui.h:54
+msgid "_Left Thumb Shift Key:"
msgstr ""
-#: ../setup/setup.glade.h:60
+#: ../setup/setup.ui.h:55
msgid "Right _Thumb Shift Key:"
msgstr ""
-#: ../setup/setup.glade.h:61
-msgid ""
-"Romaji\n"
-"Kana\n"
-"Thumb shift"
+#: ../setup/setup.ui.h:56
+msgid "Adjust _input method layout to system keyboard layout"
msgstr ""
-#: ../setup/setup.glade.h:64
-msgid "Seion + Shift can output Handakuon"
+#: ../setup/setup.ui.h:57
+msgid "Adjust IM layout to XKB layout"
msgstr ""
-#: ../setup/setup.glade.h:65
-msgid "Setup - IBus-Anthy"
+#: ../setup/setup.ui.h:58
+msgid "Input _Method Layout:"
msgstr ""
-#: ../setup/setup.glade.h:66
-msgid ""
-"Strongly recommend to enable \"Use system keyboard layout\" check button in "
-"\"Advanced\" tab using 'ibus-setup' command"
+#: ../setup/setup.ui.h:59
+msgid "Restart ibus when you change the keyboard layout."
msgstr ""
-#: ../setup/setup.glade.h:67
-msgid "Symbo_l Style:"
+#: ../setup/setup.ui.h:60
+msgid "Restart ibus when you change XKB"
msgstr ""
-#: ../setup/setup.glade.h:68
-msgid "The Anthy engine for IBus input platform"
+#: ../setup/setup.ui.h:61
+msgid ""
+"Strongly recommend to enable \"Use system keyboard layout\" check button in "
+"\"Advanced\" tab using 'ibus-setup' command"
msgstr ""
-#: ../setup/setup.glade.h:69
-msgid "Thumb S_hift"
+#: ../setup/setup.ui.h:62
+msgid "_Additional Key Arrangement:"
msgstr ""
-#: ../setup/setup.glade.h:70
-msgid "Thumb _Shift Key Table:"
+#: ../setup/setup.ui.h:63
+msgid ""
+"'&#xFF5E;', '&#x300E;', '&#xA2;', '&#xA3;' and so on can be output with "
+"Thumb Shift key"
msgstr ""
-#: ../setup/setup.glade.h:71
-msgid "You can change the order on language bar"
+#: ../setup/setup.ui.h:64
+msgid ""
+"You do not have to reconfigure the system keyboard layout for \"Additional "
+"Key Arrangement\" since this option changes input method layout only in case "
+"input method is turned on."
msgstr ""
-#: ../setup/setup.glade.h:72
+#: ../setup/setup.ui.h:65
msgid ""
"You do not have to reconfigure XKB since this option changes IM layout only "
"with IM on."
msgstr ""
-#: ../setup/setup.glade.h:73
-msgid ""
-"You do not have to reconfigure the system keyboard layout for \"Additional "
-"Key Arrangement\" since this option changes input method layout only in case "
-"input method is turned on."
+#: ../setup/setup.ui.h:66
+msgid "_Enable semi-voiced sound mark with Shift key"
msgstr ""
-#: ../setup/setup.glade.h:74
-msgid "_Add Word Command:"
+#: ../setup/setup.ui.h:67
+msgid "Seion + Shift can output Handakuon"
msgstr ""
-#: ../setup/setup.glade.h:75
-msgid "_Additional Key Arrangement:"
+#: ../setup/setup.ui.h:68
+msgid "Thumb _Shift Key Table:"
msgstr ""
-#: ../setup/setup.glade.h:76
-msgid "_Behavior on Period:"
+#: ../setup/setup.ui.h:69
+msgid "<b>Thumb Shift Layout</b>"
msgstr ""
-#: ../setup/setup.glade.h:77
-msgid "_Description:"
+#: ../setup/setup.ui.h:70
+msgid "Thumb S_hift"
msgstr ""
-#: ../setup/setup.glade.h:78
+#: ../setup/setup.ui.h:71
msgid "_Edit Dictionary Command:"
msgstr ""
-#: ../setup/setup.glade.h:79
-msgid "_Embed your dictionary in the system dictionary"
+#: ../setup/setup.ui.h:72
+msgid "_Add Word Command:"
msgstr ""
-#: ../setup/setup.glade.h:80
-msgid "_Enable semi-voiced sound mark with Shift key"
+#: ../setup/setup.ui.h:73
+msgid "<b>Default Dictionary Configuration</b>"
msgstr ""
-#: ../setup/setup.glade.h:81
-msgid "_General"
+#: ../setup/setup.ui.h:74
+msgid "_View"
msgstr ""
-#: ../setup/setup.glade.h:82
-msgid "_Input Chars"
+#: ../setup/setup.ui.h:75
+msgid "You can change the order on language bar"
msgstr ""
-#: ../setup/setup.glade.h:83
-msgid "_Input Mode:"
+#: ../setup/setup.ui.h:76
+msgid "<b>Extended Dictionaries</b>"
msgstr ""
-#: ../setup/setup.glade.h:85
-msgid "_Left Thumb Shift"
+#: ../setup/setup.ui.h:77
+msgid "Dictionar_y"
msgstr ""
-#: ../setup/setup.glade.h:86
-msgid "_Left Thumb Shift Key:"
+#: ../setup/setup.ui.h:78
+msgid "Abo_ut"
msgstr ""
-#: ../setup/setup.glade.h:88
-msgid "_Period Style:"
+#: ../setup/setup.ui.h:79
+msgid "Edit Shortcut"
msgstr ""
-#: ../setup/setup.glade.h:89
-msgid "_Right Thumb Shift"
+#: ../setup/setup.ui.h:80
+msgid "Key Code:"
+msgstr ""
+
+#: ../setup/setup.ui.h:81
+msgid "Modifier:"
+msgstr ""
+
+#: ../setup/setup.ui.h:82
+msgid "A_lternate"
+msgstr ""
+
+#: ../setup/setup.ui.h:83
+msgid "Co_ntrol"
msgstr ""
-#: ../setup/setup.glade.h:91
+#: ../setup/setup.ui.h:84
msgid "_Shift"
msgstr ""
-#: ../setup/setup.glade.h:92
-msgid "_Short Label:"
+#: ../setup/setup.ui.h:85
+msgid "_Input Chars"
msgstr ""
-#: ../setup/setup.glade.h:93
-msgid "_Shortcut Type:"
+#: ../setup/setup.ui.h:87
+msgid "_Left Thumb Shift"
msgstr ""
-#: ../setup/setup.glade.h:94
-msgid "_Typing Method"
+#: ../setup/setup.ui.h:88
+msgid "_Right Thumb Shift"
msgstr ""
-#: ../setup/setup.glade.h:95
-msgid "_Typing Method:"
+#: ../setup/setup.ui.h:89
+msgid "_Short Label:"
msgstr ""
-#: ../setup/setup.glade.h:96
+#: ../setup/setup.ui.h:90
+msgid "_Description:"
+msgstr ""
+
+#: ../setup/setup.ui.h:91
msgid "_Use your dictionary alone with switching dictionaries"
msgstr ""
-#: ../setup/setup.glade.h:97
-msgid "_View"
+#: ../setup/setup.ui.h:92
+msgid "_Embed your dictionary in the system dictionary"
+msgstr ""
+
+#: ../setup/setup.ui.h:93
+msgid "Enable the _reverse conversion"
+msgstr ""
+
+#: ../setup/setup.ui.h:94
+msgid "The Anthy engine for IBus input platform"
msgstr ""
-#: ../setup/setup.glade.h:98
+#: ../setup/setup.ui.h:95
msgid "translator_credits"
msgstr ""
diff --git a/po/ja.po b/po/ja.po
index dbdb25b..b6e0040 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1,6 +1,6 @@
# Japanese translation of ibus-anthy.
# Copyright (C) 2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (C) 1999-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
# This file is distributed under the same license as the ibus-anthy package.
#
# UTUMI Hirosi <utuhiro78@yahoo.co.jp>, 2008.
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ibus-anthy 1.2\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
-"POT-Creation-Date: 2011-05-13 14:45+0900\n"
-"PO-Revision-Date: 2011-05-13 14:45+0900\n"
+"POT-Creation-Date: 2012-03-02 20:04+0900\n"
+"PO-Revision-Date: 2012-02-14 18:07+0900\n"
"Last-Translator: UTUMI Hirosi <utuhiro78@yahoo.co.jp>\n"
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
"Language: ja\n"
@@ -17,580 +17,537 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../engine/engine.py:187
+#: ../engine/engine.py:198
msgid "Switch input mode"
msgstr "入力モードを切り替えます"
-#: ../engine/engine.py:193
+#: ../engine/engine.py:208 ../setup/setup.ui.h:1
msgid "Hiragana"
msgstr "ひらがな"
-#: ../engine/engine.py:196
+#: ../engine/engine.py:217 ../setup/setup.ui.h:2
msgid "Katakana"
msgstr "カタカナ"
-#: ../engine/engine.py:199
+#: ../engine/engine.py:226
msgid "Half width katakana"
msgstr "半角カタカナ"
-#: ../engine/engine.py:202
+#: ../engine/engine.py:235 ../setup/setup.ui.h:4
msgid "Latin"
msgstr "英数"
-#: ../engine/engine.py:205
+#: ../engine/engine.py:244 ../setup/setup.ui.h:5
msgid "Wide Latin"
msgstr "全角英数"
-#: ../engine/engine.py:219
+#: ../engine/engine.py:268
msgid "Switch typing mode"
msgstr "入力タイプを切り替えます"
-#: ../engine/engine.py:225
+#: ../engine/engine.py:278 ../setup/setup.ui.h:12
msgid "Romaji"
msgstr "ローマ字"
-#: ../engine/engine.py:228
+#: ../engine/engine.py:287 ../setup/setup.ui.h:13
msgid "Kana"
msgstr "かな"
-#: ../engine/engine.py:231
+#: ../engine/engine.py:296 ../setup/setup.ui.h:14
msgid "Thumb shift"
msgstr "親指シフト"
-#: ../engine/engine.py:244
+#: ../engine/engine.py:318
msgid "Preferences - Anthy"
msgstr "設定 - Anthy"
-#: ../engine/engine.py:246
+#: ../engine/engine.py:320
msgid "Configure Anthy"
msgstr "Anthy を構成します"
-#: ../engine/engine.py:266
+#: ../engine/engine.py:341
msgid "Switch conversion mode"
msgstr "変換モードを切り替えます"
-#: ../engine/engine.py:272
+#: ../engine/engine.py:351 ../setup/setup.ui.h:15
msgid "Multiple segment"
msgstr "連文節"
-#: ../engine/engine.py:275
+#: ../engine/engine.py:360 ../setup/setup.ui.h:16
msgid "Single segment"
msgstr "単文節"
-#: ../engine/engine.py:278
+#: ../engine/engine.py:369 ../setup/setup.ui.h:17
msgid "Immediate conversion (Multiple segment)"
msgstr "逐次変換 (連文節)"
-#: ../engine/engine.py:281
+#: ../engine/engine.py:378 ../setup/setup.ui.h:18
msgid "Immediate conversion (Single segment)"
msgstr "逐次変換 (単文節)"
-#: ../engine/engine.py:296
+#: ../engine/engine.py:403
msgid "Switch Dictionary"
msgstr "辞書を切り替えます"
-#: ../engine/engine.py:338
+#: ../engine/engine.py:465
msgid "Dictionary - Anthy"
msgstr "辞書 - Anthy"
#. Translators: "Dic" means 'dictionary', One kanji may be good.
-#: ../engine/engine.py:343
+#: ../engine/engine.py:470
msgid "Dic"
msgstr "辞"
-#: ../engine/engine.py:350
+#: ../engine/engine.py:477
msgid "Configure dictionaries"
msgstr "辞書を構成します"
-#: ../engine/engine.py:355
+#: ../engine/engine.py:487
msgid "Edit dictionaries"
msgstr "辞書を編集する"
-#: ../engine/engine.py:357
+#: ../engine/engine.py:489
msgid "Launch the dictionary tool"
msgstr "辞書ツールを起動する"
-#: ../engine/engine.py:360
+#: ../engine/engine.py:496
msgid "Add words"
msgstr "単語を追加する"
-#: ../engine/engine.py:362
+#: ../engine/engine.py:498
msgid "Add words in the dictionary"
msgstr "辞書に単語を追加する"
-#: ../engine/factory.py:35
-msgid "Anthy"
-msgstr "Anthy"
-
-#: ../setup/anthyprefs.py.in:845
+#: ../setup/anthyprefs.py.in:838
msgid "General"
msgstr "一般"
-#: ../setup/anthyprefs.py.in:856
+#: ../setup/anthyprefs.py.in:849
msgid "Zip Code Conversion"
msgstr "郵便番号変換"
-#: ../setup/anthyprefs.py.in:868
+#: ../setup/anthyprefs.py.in:861
msgid "Symbol"
msgstr "記号"
-#: ../setup/anthyprefs.py.in:879
+#: ../setup/anthyprefs.py.in:872
msgid "Old Character Style"
msgstr "旧字体"
-#: ../setup/main.py:86
+#. self.__run_message_dialog needs self.__builder.
+#: ../setup/main.py:60
+msgid "ibus is not running."
+msgstr "ibus が起動していません。"
+
+#: ../setup/main.py:98
msgid "Command"
msgstr "コマンド"
-#: ../setup/main.py:90
+#: ../setup/main.py:102
msgid "Shortcut"
msgstr "ショートカット"
-#: ../setup/main.py:131
+#: ../setup/main.py:143
msgid "Description"
msgstr "説明"
#. Translators: "Embd" means a short word of 'embedded'.
-#: ../setup/main.py:139
+#: ../setup/main.py:151
msgid "Embd"
msgstr "組"
#. Translators: "Sgl" means a short word of 'single'.
-#: ../setup/main.py:147
+#: ../setup/main.py:159
msgid "Sgl"
msgstr "単"
-#: ../setup/main.py:269 ../setup/main.py:298
+#: ../setup/main.py:287 ../setup/main.py:316
msgid "Input Chars"
msgstr "入力文字"
-#: ../setup/main.py:271 ../setup/main.py:300
+#: ../setup/main.py:289 ../setup/main.py:318
msgid "Output Chars"
msgstr "出力文字"
-#: ../setup/main.py:339
+#: ../setup/main.py:357
msgid "Input"
msgstr "入力"
-#: ../setup/main.py:341
+#: ../setup/main.py:359
msgid "Single"
msgstr "単"
-#: ../setup/main.py:343
+#: ../setup/main.py:361
msgid "Left"
msgstr "左"
-#: ../setup/main.py:345
+#: ../setup/main.py:363
msgid "Right"
msgstr "右"
-#: ../setup/main.py:420
+#: ../setup/main.py:438
msgid "Customize Romaji Key Table"
msgstr "ローマ字キーテーブルのカスタマイズ"
-#: ../setup/main.py:421 ../setup/setup.glade.h:90
+#: ../setup/main.py:439 ../setup/setup.ui.h:49
msgid "_Romaji Key Table:"
msgstr "ローマ字キーテーブル(_R):"
-#: ../setup/main.py:422 ../setup/main.py:428 ../setup/setup.glade.h:87
+#: ../setup/main.py:440 ../setup/main.py:446 ../setup/setup.ui.h:86
msgid "_Output Chars"
msgstr "出力文字(_O)"
-#: ../setup/main.py:423 ../setup/main.py:429
+#: ../setup/main.py:441 ../setup/main.py:447 ../setup/setup.ui.h:26
msgid "Default"
msgstr "デフォルト"
-#: ../setup/main.py:426
+#: ../setup/main.py:444
msgid "Customize Kana Key Table"
msgstr "かなキーテーブルのカスタマイズ"
-#: ../setup/main.py:427 ../setup/setup.glade.h:84
+#: ../setup/main.py:445 ../setup/setup.ui.h:51
msgid "_Kana Key Table:"
msgstr "かなキーテーブル(_K):"
-#: ../setup/main.py:432
+#: ../setup/main.py:450
msgid "Customize Thumb Shift Key Table"
msgstr "親指シフトキーテーブルのカスタマイズ"
-#: ../setup/main.py:433
+#: ../setup/main.py:451
msgid "_Thumb Shift Key Table:"
msgstr "親指シフトキーテーブル(_T):"
-#: ../setup/main.py:434
+#: ../setup/main.py:452
msgid "Single _Output Chars"
msgstr "単出力文字(_O)"
-#: ../setup/main.py:435
+#: ../setup/main.py:453
msgid "Base"
msgstr "基本"
-#: ../setup/main.py:436
+#: ../setup/main.py:454
msgid "NICOLA-J key extension"
msgstr "NICOLA-J キー拡張"
-#: ../setup/main.py:437
+#: ../setup/main.py:455
msgid "NICOLA-A key extension"
msgstr "NICOLA-A キー拡張"
-#: ../setup/main.py:438
+#: ../setup/main.py:456
msgid "NICOLA-F key extension"
msgstr "NICOLA-F キー拡張"
-#: ../setup/main.py:439
+#: ../setup/main.py:457
msgid "FMV KB231-J key extension"
msgstr "FMV KB231-J キー拡張"
-#: ../setup/main.py:440
+#: ../setup/main.py:458
msgid "FMV KB231-A key extension"
msgstr "FMV KB231-A キー拡張"
-#: ../setup/main.py:441
+#: ../setup/main.py:459
msgid "FMV KB231-F key extension"
msgstr "FMV KB231-F キー拡張"
-#: ../setup/main.py:442
+#: ../setup/main.py:460
msgid "FMV KB611-J key extension"
msgstr "FMV KB611-J キー拡張"
-#: ../setup/main.py:443
+#: ../setup/main.py:461
msgid "FMV KB611-A key extension"
msgstr "FMV KB611-A キー拡張"
-#: ../setup/main.py:444
+#: ../setup/main.py:462
msgid "FMV KB611-F key extension"
msgstr "FMV KB611-F キー拡張"
-#: ../setup/main.py:593
+#: ../setup/main.py:617
msgid "Your choosed file has already been added: "
msgstr "選択したファイルはすでに追加されています: "
-#: ../setup/main.py:597
+#: ../setup/main.py:621
msgid "Your choosed file does not exist: "
msgstr "選択したファイルは存在しません: "
-#: ../setup/main.py:601
+#: ../setup/main.py:625
msgid "Your choosed file is a directory: "
msgstr "選択したファイルはディレクトリです: "
-#: ../setup/main.py:605
+#: ../setup/main.py:629
msgid "You cannot add dictionaries in the anthy private directory: "
msgstr "Anthy 私用ディレクトリにあるファイルを追加することはできません: "
-#: ../setup/main.py:612
+#: ../setup/main.py:636
msgid "Your file path is not good: "
msgstr "ファイルパスはよくないです: "
-#: ../setup/main.py:768
+#: ../setup/main.py:793
msgid "Confirm"
msgstr "確認"
-#: ../setup/main.py:769
+#: ../setup/main.py:794
msgid "Are you sure to close Setup?"
msgstr "この設定ツールを終了します。よろしいですか?"
-#: ../setup/main.py:782
+#: ../setup/main.py:808
msgid "Notice!"
msgstr "注意!"
-#: ../setup/main.py:783
+#: ../setup/main.py:809
msgid "Are you sure to close Setup without save configure?"
msgstr "変更を保存せずに終了します。よろしいですか?"
-#: ../setup/main.py:887
+#: ../setup/main.py:914
msgid "Please specify Input Chars"
msgstr "入力文字を指定してください"
-#: ../setup/main.py:890
+#: ../setup/main.py:917
msgid "Please specify Output Chars"
msgstr "出力文字を指定してください"
-#: ../setup/main.py:893
+#: ../setup/main.py:920
msgid "Please specify Left Thumb Shift Chars"
msgstr "左親指シフト文字を指定してください"
-#: ../setup/main.py:896
+#: ../setup/main.py:923
msgid "Please specify Right Thumb Shift Chars"
msgstr "右親指シフト文字を指定してください"
-#: ../setup/main.py:909 ../setup/main.py:949
+#: ../setup/main.py:936 ../setup/main.py:976
msgid "Your custom key is not assigned in any sections. Maybe a bug."
msgstr ""
"カスタムキーがどのセクションにも割り当てられていません。たぶんバグです。"
-#: ../setup/main.py:1009 ../setup/main.py:1095
+#: ../setup/main.py:1036 ../setup/main.py:1122
msgid "Your file does not exist: "
msgstr "ファイルは存在しません: "
-#: ../setup/main.py:1019
+#: ../setup/main.py:1046
msgid "Open Dictionary File"
msgstr "辞書ファイルを開く"
-#: ../setup/main.py:1025
+#: ../setup/main.py:1052
msgid "Edit Dictionary File"
msgstr "辞書ファイルの編集"
-#: ../setup/main.py:1039
+#: ../setup/main.py:1066
msgid "Your choosed file is not correct."
msgstr "選択したファイルは正しくありません。"
-#: ../setup/main.py:1068
+#: ../setup/main.py:1095
msgid "You cannot delete the system dictionary."
msgstr "システム辞書を削除することはできません。"
-#: ../setup/main.py:1091
+#: ../setup/main.py:1118
msgid "Your file is not good."
msgstr "ファイルは良くないです。"
-#: ../setup/main.py:1120
+#: ../setup/main.py:1147
msgid "View Dictionary File"
msgstr "辞書ファイルの表示"
-#: ../setup/main.py:1270
+#: ../setup/main.py:1301
msgid "Please press a key (or a key combination)"
msgstr "キーを入力してください"
-#: ../setup/main.py:1271
+#: ../setup/main.py:1302
msgid "The dialog will be closed when the key is released"
msgstr "このダイアログはキーリリース時に閉じられます"
-#: ../setup/main.py:1290 ../setup/main.py:1310
+#: ../setup/main.py:1321 ../setup/main.py:1341
msgid "Invalid keysym"
msgstr "無効なキーシンボル"
-#: ../setup/main.py:1291 ../setup/main.py:1311
+#: ../setup/main.py:1322 ../setup/main.py:1342
msgid "This keysym is not valid"
msgstr "このキーシンボルは有効ではありません"
-#: ../setup/setup.glade.h:1
-msgid "'~', 『', '¢', '£' and so on can be output with Thumb Shift key"
-msgstr "親指シフトキーで '~', 『', '¢', '£' 等を入力することが可能です"
+#: ../setup/setup.ui.h:3
+msgid "Half Width Katakana"
+msgstr "半角カタカナ"
-#: ../setup/setup.glade.h:2
-msgid "<b>Behavior</b>"
-msgstr "<b>動作</b>"
+#: ../setup/setup.ui.h:6
+msgid "NICOLA-J"
+msgstr "NICOLA-J"
-#: ../setup/setup.glade.h:3
-msgid "<b>Default Dictionary Configuration</b>"
-msgstr "<b>デフォルト辞書の構成</b>"
+#: ../setup/setup.ui.h:7
+msgid "NICOLA-A"
+msgstr "NICOLA-A"
-#: ../setup/setup.glade.h:4
-msgid "<b>Extended Dictionaries</b>"
-msgstr "<b>拡張辞書</b>"
+#: ../setup/setup.ui.h:8
+msgid "NICOLA-F"
+msgstr "NICOLA-F"
-#: ../setup/setup.glade.h:5
-msgid "<b>Initial Setting</b>"
-msgstr "<b>初期値の設定</b>"
+#: ../setup/setup.ui.h:9
+msgid "None"
+msgstr "なし"
-#: ../setup/setup.glade.h:6
-msgid "<b>Kana</b>"
-msgstr "<b>かな</b>"
+#: ../setup/setup.ui.h:10
+msgid "FMV KB231 key extension"
+msgstr "FMV KB231 キー拡張"
-#: ../setup/setup.glade.h:7
-msgid "<b>Other</b>"
-msgstr "<b>その他</b>"
+#: ../setup/setup.ui.h:11
+msgid "FMV KB611 key extension"
+msgstr "FMV KB611 キー拡張"
-#: ../setup/setup.glade.h:8
-msgid "<b>Romaji</b>"
-msgstr "<b>ローマ字</b>"
+#: ../setup/setup.ui.h:19
+msgid "Keep Numpad Codes"
+msgstr "テンキーコードのまま"
-#: ../setup/setup.glade.h:9
-msgid "<b>Thumb Shift Layout</b>"
-msgstr "<b>親指シフトレイアウト</b>"
+#: ../setup/setup.ui.h:20
+msgid "Convert Characters"
+msgstr "文字を変換"
-#: ../setup/setup.glade.h:10
-msgid "A_lternate"
-msgstr "A_lt"
+#: ../setup/setup.ui.h:21
+msgid "Do Nothing"
+msgstr "何もしない"
-#: ../setup/setup.glade.h:11
-msgid "Abo_ut"
-msgstr "情報(_U)"
+#: ../setup/setup.ui.h:22
+msgid "Auto Convert"
+msgstr "自動変換"
-#: ../setup/setup.glade.h:12
-msgid "Adjust IM layout to XKB layout"
-msgstr "IM レイアウトを XKB レイアウトに合わせる"
+#: ../setup/setup.ui.h:23
+msgid "Clear"
+msgstr "消去"
-#: ../setup/setup.glade.h:13
-msgid "Adjust _input method layout to system keyboard layout"
-msgstr ""
-"インプットメソッドレイアウトをシステムキーボードレイアウトに合わせる(_I)"
+#: ../setup/setup.ui.h:24
+msgid "Commit"
+msgstr "確定"
-#: ../setup/setup.glade.h:14
-msgid "Behavior on _Focus Out:"
-msgstr "フォーカスアウト時の動作(_F):"
+#: ../setup/setup.ui.h:25
+msgid "Hold"
+msgstr "保持"
-#: ../setup/setup.glade.h:15
-msgid "Candidate _Window Page Size:"
-msgstr "候補ウインドウの項目数(_W):"
+#: ../setup/setup.ui.h:27
+msgid "ATOK"
+msgstr "ATOK"
-#: ../setup/setup.glade.h:16
-msgid ""
-"Clear\n"
-"Commit\n"
-"Hold\n"
-msgstr ""
-"消去\n"
-"確定\n"
-"保持\n"
+#: ../setup/setup.ui.h:28
+msgid "Wnn"
+msgstr "Wnn"
-#: ../setup/setup.glade.h:20
-msgid "Co_ntrol"
-msgstr "Co_ntrol"
+#: ../setup/setup.ui.h:29
+msgid "Setup - IBus-Anthy"
+msgstr "IBus-Anthy の設定"
-#: ../setup/setup.glade.h:21
-msgid "Con_vert spaces with the one column width"
-msgstr "空白を半角で変換する(_V)"
+#: ../setup/setup.ui.h:30
+msgid "_Input Mode:"
+msgstr "入力モード(_I):"
+
+#: ../setup/setup.ui.h:31
+msgid "_Typing Method:"
+msgstr "入力タイプ(_T):"
-#: ../setup/setup.glade.h:22
+#: ../setup/setup.ui.h:32
msgid "Conversion _Mode:"
msgstr "変換モード(_M):"
-#: ../setup/setup.glade.h:23
-msgid "Convert _numbers with the one column width"
-msgstr "数字を半角で変換する(_N)"
+#: ../setup/setup.ui.h:33
+msgid "<b>Initial Setting</b>"
+msgstr "<b>初期値の設定</b>"
-#: ../setup/setup.glade.h:24
-msgid "Convert _symbols with the one column width"
-msgstr "記号を半角で変換する(_S)"
+#: ../setup/setup.ui.h:34
+msgid "_Period Style:"
+msgstr "句読点スタイル(_P):"
-#: ../setup/setup.glade.h:25
-msgid "De_fault"
-msgstr "デフォルト(_F)"
+#: ../setup/setup.ui.h:35
+msgid "Symbo_l Style:"
+msgstr "記号スタイル(_L):"
-#: ../setup/setup.glade.h:26
-msgid ""
-"Default\n"
-"ATOK\n"
-"Wnn\n"
-msgstr ""
-"デフォルト\n"
-"ATOK\n"
-"Wnn\n"
+#: ../setup/setup.ui.h:36
+msgid "Numpad _Key Type:"
+msgstr "テンキータイプ(_K):"
-#: ../setup/setup.glade.h:30
-msgid "Dictionar_y"
-msgstr "辞書(_Y)"
+#: ../setup/setup.ui.h:37
+msgid "_Behavior on Period:"
+msgstr "句読点入力時の動作(_B):"
-#: ../setup/setup.glade.h:31
-msgid ""
-"Do Nothing\n"
-"Auto Convert"
-msgstr ""
-"何もしない\n"
-"自動変換"
+#: ../setup/setup.ui.h:38
+msgid "Behavior on _Focus Out:"
+msgstr "フォーカスアウト時の動作(_F):"
-#: ../setup/setup.glade.h:33
-msgid "Edit Shortcut"
-msgstr "ショートカットの編集"
+#: ../setup/setup.ui.h:39
+msgid "<b>Behavior</b>"
+msgstr "<b>動作</b>"
-#: ../setup/setup.glade.h:34
-msgid "Enable the _reverse conversion"
-msgstr "逆変換を可能にする(_R)"
+#: ../setup/setup.ui.h:40
+msgid "Convert _numbers with the one column width"
+msgstr "数字を半角で変換する(_N)"
-#: ../setup/setup.glade.h:35
-msgid ""
-"Hiragana\n"
-"Katakana\n"
-"Half Width Katakana\n"
-"Latin\n"
-"Wide Latin"
-msgstr ""
-"ひらがな\n"
-"カタカナ\n"
-"半角カタカナ\n"
-"英数\n"
-"全角英数"
+#: ../setup/setup.ui.h:41
+msgid "Candidate _Window Page Size:"
+msgstr "候補ウインドウの項目数(_W):"
-#: ../setup/setup.glade.h:40
-msgid "Input _Method Layout:"
-msgstr "インプットメソッドレイアウト(_M):"
+#: ../setup/setup.ui.h:42
+msgid "Convert _symbols with the one column width"
+msgstr "記号を半角で変換する(_S)"
-#: ../setup/setup.glade.h:41
-msgid ""
-"Keep Numpad Codes\n"
-"Convert Characters\n"
-msgstr ""
-"テンキーコードのまま\n"
-"文字を変換\n"
+#: ../setup/setup.ui.h:43
+msgid "Con_vert spaces with the one column width"
+msgstr "空白を半角で変換する(_V)"
-#: ../setup/setup.glade.h:44
-msgid "Key Code:"
-msgstr "キーコード:"
+#: ../setup/setup.ui.h:44
+msgid "<b>Other</b>"
+msgstr "<b>その他</b>"
-#: ../setup/setup.glade.h:45
-msgid "Key bin_ding"
-msgstr "キー割り当て(_D)"
+#: ../setup/setup.ui.h:45
+msgid "_General"
+msgstr "一般(_G)"
-#: ../setup/setup.glade.h:46
-msgid "Modifier:"
-msgstr "キー修飾:"
+#: ../setup/setup.ui.h:46
+msgid "_Shortcut Type:"
+msgstr "ショートカットタイプ(_S):"
-#: ../setup/setup.glade.h:47
-msgid ""
-"Multiple segment\n"
-"Single segment\n"
-"Immediate conversion (Multiple segment)\n"
-"Immediate conversion (Single segment)"
-msgstr ""
-"連文節\n"
-"単文節\n"
-"逐次変換 (連文節)\n"
-"逐次変換 (単文節)"
+#: ../setup/setup.ui.h:47
+msgid "De_fault"
+msgstr "デフォルト(_F)"
-#: ../setup/setup.glade.h:51
-msgid ""
-"NICOLA-J\n"
-"NICOLA-A\n"
-"NICOLA-F"
-msgstr ""
-"NICOLA-J\n"
-"NICOLA-A\n"
-"NICOLA-F"
+#: ../setup/setup.ui.h:48
+msgid "Key bin_ding"
+msgstr "キー割り当て(_D)"
-#: ../setup/setup.glade.h:54
-msgid ""
-"None\n"
-"FMV KB231 key extension\n"
-"FMV KB611 key extension"
-msgstr ""
-"なし\n"
-"FMV KB231 キー拡張\n"
-"FMV KB611 キー拡張"
+#: ../setup/setup.ui.h:50
+msgid "<b>Romaji</b>"
+msgstr "<b>ローマ字</b>"
-#: ../setup/setup.glade.h:57
-msgid "Numpad _Key Type:"
-msgstr "テンキータイプ(_K):"
+#: ../setup/setup.ui.h:52
+msgid "<b>Kana</b>"
+msgstr "<b>かな</b>"
-#: ../setup/setup.glade.h:58
-msgid "Restart ibus when you change XKB"
-msgstr "XKB を変更するときは ibus を再起動してください"
+#: ../setup/setup.ui.h:53
+msgid "_Typing Method"
+msgstr "入力タイプ(_T)"
-#: ../setup/setup.glade.h:59
-msgid "Restart ibus when you change the keyboard layout."
-msgstr "キーボードレイアウトを変更するときは ibus をリスタートしてください"
+#: ../setup/setup.ui.h:54
+msgid "_Left Thumb Shift Key:"
+msgstr "左親指シフトキー(_L):"
-#: ../setup/setup.glade.h:60
+#: ../setup/setup.ui.h:55
msgid "Right _Thumb Shift Key:"
msgstr "右親指シフトキー(_T):"
-#: ../setup/setup.glade.h:61
-msgid ""
-"Romaji\n"
-"Kana\n"
-"Thumb shift"
+#: ../setup/setup.ui.h:56
+msgid "Adjust _input method layout to system keyboard layout"
msgstr ""
-"ローマ字\n"
-"かな\n"
-"親指シフト"
+"インプットメソッドレイアウトをシステムキーボードレイアウトに合わせる(_I)"
-#: ../setup/setup.glade.h:64
-msgid "Seion + Shift can output Handakuon"
-msgstr "清音 + シフトで半濁音を出力することが可能です"
+#: ../setup/setup.ui.h:57
+msgid "Adjust IM layout to XKB layout"
+msgstr "IM レイアウトを XKB レイアウトに合わせる"
-#: ../setup/setup.glade.h:65
-msgid "Setup - IBus-Anthy"
-msgstr "IBus-Anthy の設定"
+#: ../setup/setup.ui.h:58
+msgid "Input _Method Layout:"
+msgstr "インプットメソッドレイアウト(_M):"
+
+#: ../setup/setup.ui.h:59
+msgid "Restart ibus when you change the keyboard layout."
+msgstr "キーボードレイアウトを変更するときは ibus をリスタートしてください"
-#: ../setup/setup.glade.h:66
+#: ../setup/setup.ui.h:60
+msgid "Restart ibus when you change XKB"
+msgstr "XKB を変更するときは ibus を再起動してください"
+
+#: ../setup/setup.ui.h:61
msgid ""
"Strongly recommend to enable \"Use system keyboard layout\" check button in "
"\"Advanced\" tab using 'ibus-setup' command"
@@ -598,35 +555,19 @@ msgstr ""
"'ibus-setup' コマンドを使用して「詳細」 タブにある「システムキーボードを使用"
"する」を有功にすることを強く推奨します"
-#: ../setup/setup.glade.h:67
-msgid "Symbo_l Style:"
-msgstr "記号スタイル(_L):"
-
-#: ../setup/setup.glade.h:68
-msgid "The Anthy engine for IBus input platform"
-msgstr "IBus 入力プラットフォーム用 Anthy エンジン"
-
-#: ../setup/setup.glade.h:69
-msgid "Thumb S_hift"
-msgstr "親指シフト(_H)"
-
-#: ../setup/setup.glade.h:70
-msgid "Thumb _Shift Key Table:"
-msgstr "親指シフトキーテーブル(_S):"
-
-#: ../setup/setup.glade.h:71
-msgid "You can change the order on language bar"
-msgstr "言語バー上で順序を変更することが可能です"
+#: ../setup/setup.ui.h:62
+msgid "_Additional Key Arrangement:"
+msgstr "追加のキー割り当て(_A):"
-#: ../setup/setup.glade.h:72
+#: ../setup/setup.ui.h:63
msgid ""
-"You do not have to reconfigure XKB since this option changes IM layout only "
-"with IM on."
+"'&#xFF5E;', '&#x300E;', '&#xA2;', '&#xA3;' and so on can be output with "
+"Thumb Shift key"
msgstr ""
-"このオプションは IM オンで IM レイアウトのみを変更するので XKB を再構成する必"
-"要はありません。"
+"親指シフトキーで '&#xFF5E;', '&#x300E;', '&#xA2;', '&#xA3;' 等を入力すること"
+"が可能です"
-#: ../setup/setup.glade.h:73
+#: ../setup/setup.ui.h:64
msgid ""
"You do not have to reconfigure the system keyboard layout for \"Additional "
"Key Arrangement\" since this option changes input method layout only in case "
@@ -636,90 +577,129 @@ msgstr ""
"のみを変更するので「追加のキー割り当て」のためにシステムキーボードレイアウト"
"を再構成する必要はありません。"
-#: ../setup/setup.glade.h:74
-msgid "_Add Word Command:"
-msgstr "単語の追加コマンド(_A):"
+#: ../setup/setup.ui.h:65
+msgid ""
+"You do not have to reconfigure XKB since this option changes IM layout only "
+"with IM on."
+msgstr ""
+"このオプションは IM オンで IM レイアウトのみを変更するので XKB を再構成する必"
+"要はありません。"
-#: ../setup/setup.glade.h:75
-msgid "_Additional Key Arrangement:"
-msgstr "追加のキー割り当て(_A):"
+#: ../setup/setup.ui.h:66
+msgid "_Enable semi-voiced sound mark with Shift key"
+msgstr "シフトキーで半濁点を可能にする(_E)"
-#: ../setup/setup.glade.h:76
-msgid "_Behavior on Period:"
-msgstr "句読点入力時の動作(_B):"
+#: ../setup/setup.ui.h:67
+msgid "Seion + Shift can output Handakuon"
+msgstr "清音 + シフトで半濁音を出力することが可能です"
-#: ../setup/setup.glade.h:77
-msgid "_Description:"
-msgstr "説明(_D):"
+#: ../setup/setup.ui.h:68
+msgid "Thumb _Shift Key Table:"
+msgstr "親指シフトキーテーブル(_S):"
+
+#: ../setup/setup.ui.h:69
+msgid "<b>Thumb Shift Layout</b>"
+msgstr "<b>親指シフトレイアウト</b>"
-#: ../setup/setup.glade.h:78
+#: ../setup/setup.ui.h:70
+msgid "Thumb S_hift"
+msgstr "親指シフト(_H)"
+
+#: ../setup/setup.ui.h:71
msgid "_Edit Dictionary Command:"
msgstr "辞書の編集コマンド(_E):"
-#: ../setup/setup.glade.h:79
-msgid "_Embed your dictionary in the system dictionary"
-msgstr "システム辞書にユーザー辞書を組み込む(_E)"
+#: ../setup/setup.ui.h:72
+msgid "_Add Word Command:"
+msgstr "単語の追加コマンド(_A):"
-#: ../setup/setup.glade.h:80
-msgid "_Enable semi-voiced sound mark with Shift key"
-msgstr "シフトキーで半濁点を可能にする(_E)"
+#: ../setup/setup.ui.h:73
+msgid "<b>Default Dictionary Configuration</b>"
+msgstr "<b>デフォルト辞書の構成</b>"
-#: ../setup/setup.glade.h:81
-msgid "_General"
-msgstr "一般(_G)"
+#: ../setup/setup.ui.h:74
+msgid "_View"
+msgstr "表示(_V)"
-#: ../setup/setup.glade.h:82
-msgid "_Input Chars"
-msgstr "入力文字(_I)"
+#: ../setup/setup.ui.h:75
+msgid "You can change the order on language bar"
+msgstr "言語バー上で順序を変更することが可能です"
-#: ../setup/setup.glade.h:83
-msgid "_Input Mode:"
-msgstr "入力モード(_I):"
+#: ../setup/setup.ui.h:76
+msgid "<b>Extended Dictionaries</b>"
+msgstr "<b>拡張辞書</b>"
-#: ../setup/setup.glade.h:85
-msgid "_Left Thumb Shift"
-msgstr "左親指シフト(_L)"
+#: ../setup/setup.ui.h:77
+msgid "Dictionar_y"
+msgstr "辞書(_Y)"
-#: ../setup/setup.glade.h:86
-msgid "_Left Thumb Shift Key:"
-msgstr "左親指シフトキー(_L):"
+#: ../setup/setup.ui.h:78
+msgid "Abo_ut"
+msgstr "情報(_U)"
-#: ../setup/setup.glade.h:88
-msgid "_Period Style:"
-msgstr "句読点スタイル(_P):"
+#: ../setup/setup.ui.h:79
+msgid "Edit Shortcut"
+msgstr "ショートカットの編集"
-#: ../setup/setup.glade.h:89
-msgid "_Right Thumb Shift"
-msgstr "右親指シフト(_R)"
+#: ../setup/setup.ui.h:80
+msgid "Key Code:"
+msgstr "キーコード:"
+
+#: ../setup/setup.ui.h:81
+msgid "Modifier:"
+msgstr "キー修飾:"
+
+#: ../setup/setup.ui.h:82
+msgid "A_lternate"
+msgstr "A_lt"
-#: ../setup/setup.glade.h:91
+#: ../setup/setup.ui.h:83
+msgid "Co_ntrol"
+msgstr "Co_ntrol"
+
+#: ../setup/setup.ui.h:84
msgid "_Shift"
msgstr "_Shift"
-#: ../setup/setup.glade.h:92
-msgid "_Short Label:"
-msgstr "短ラベル(_S):"
+#: ../setup/setup.ui.h:85
+msgid "_Input Chars"
+msgstr "入力文字(_I)"
-#: ../setup/setup.glade.h:93
-msgid "_Shortcut Type:"
-msgstr "ショートカットタイプ(_S):"
+#: ../setup/setup.ui.h:87
+msgid "_Left Thumb Shift"
+msgstr "左親指シフト(_L)"
-#: ../setup/setup.glade.h:94
-msgid "_Typing Method"
-msgstr "入力タイプ(_T)"
+#: ../setup/setup.ui.h:88
+msgid "_Right Thumb Shift"
+msgstr "右親指シフト(_R)"
-#: ../setup/setup.glade.h:95
-msgid "_Typing Method:"
-msgstr "入力タイプ(_T):"
+#: ../setup/setup.ui.h:89
+msgid "_Short Label:"
+msgstr "短ラベル(_S):"
+
+#: ../setup/setup.ui.h:90
+msgid "_Description:"
+msgstr "説明(_D):"
-#: ../setup/setup.glade.h:96
+#: ../setup/setup.ui.h:91
msgid "_Use your dictionary alone with switching dictionaries"
msgstr "辞書を切り替えることで選択した辞書を単独で使用する(_U)"
-#: ../setup/setup.glade.h:97
-msgid "_View"
-msgstr "表示(_V)"
+#: ../setup/setup.ui.h:92
+msgid "_Embed your dictionary in the system dictionary"
+msgstr "システム辞書にユーザー辞書を組み込む(_E)"
+
+#: ../setup/setup.ui.h:93
+msgid "Enable the _reverse conversion"
+msgstr "逆変換を可能にする(_R)"
-#: ../setup/setup.glade.h:98
+#: ../setup/setup.ui.h:94
+msgid "The Anthy engine for IBus input platform"
+msgstr "IBus 入力プラットフォーム用 Anthy エンジン"
+
+#: ../setup/setup.ui.h:95
msgid "translator_credits"
msgstr "UTUMI Hirosi <utuhiro78@yahoo.co.jp>"
+
+#~ msgid "Anthy"
+#~ msgstr "Anthy"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index fb469a5..73e855f 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -1,6 +1,6 @@
# Chinese translation for ibus-anthy.
# Copyright (C) 2008 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (C) 1999-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
# This file is distributed under the same license as the ibus-anthy package.
#
# Peng Huang <shawn.p.huang@gmail.com>, 2008.
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ibus-anthy 1.2\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
-"POT-Creation-Date: 2011-05-13 14:45+0900\n"
+"POT-Creation-Date: 2012-03-02 20:04+0900\n"
"PO-Revision-Date: 2008-08-21 21:37+0800\n"
"Last-Translator: Peng Huang <shawn.p.huang@gmail.com>\n"
"Language-Team: Peng Huang <shawn.p.huang@gmail.com>\n"
@@ -17,675 +17,679 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../engine/engine.py:187
+#: ../engine/engine.py:198
msgid "Switch input mode"
msgstr "切换输入模式"
-#: ../engine/engine.py:193
+#: ../engine/engine.py:208 ../setup/setup.ui.h:1
msgid "Hiragana"
msgstr "平假名"
-#: ../engine/engine.py:196
+#: ../engine/engine.py:217 ../setup/setup.ui.h:2
msgid "Katakana"
msgstr "片假名"
-#: ../engine/engine.py:199
+#: ../engine/engine.py:226
msgid "Half width katakana"
msgstr "半角片假名"
-#: ../engine/engine.py:202
+#: ../engine/engine.py:235 ../setup/setup.ui.h:4
msgid "Latin"
msgstr "英数"
-#: ../engine/engine.py:205
+#: ../engine/engine.py:244 ../setup/setup.ui.h:5
msgid "Wide Latin"
msgstr "全角英数"
-#: ../engine/engine.py:219
+#: ../engine/engine.py:268
msgid "Switch typing mode"
msgstr "切换输入模式"
-#: ../engine/engine.py:225
+#: ../engine/engine.py:278 ../setup/setup.ui.h:12
msgid "Romaji"
msgstr ""
-#: ../engine/engine.py:228
+#: ../engine/engine.py:287 ../setup/setup.ui.h:13
#, fuzzy
msgid "Kana"
msgstr "片假名"
-#: ../engine/engine.py:231
+#: ../engine/engine.py:296 ../setup/setup.ui.h:14
msgid "Thumb shift"
msgstr ""
-#: ../engine/engine.py:244
+#: ../engine/engine.py:318
msgid "Preferences - Anthy"
msgstr ""
-#: ../engine/engine.py:246
+#: ../engine/engine.py:320
msgid "Configure Anthy"
msgstr ""
-#: ../engine/engine.py:266
+#: ../engine/engine.py:341
#, fuzzy
msgid "Switch conversion mode"
msgstr "切换输入模式"
-#: ../engine/engine.py:272
+#: ../engine/engine.py:351 ../setup/setup.ui.h:15
msgid "Multiple segment"
msgstr ""
-#: ../engine/engine.py:275
+#: ../engine/engine.py:360 ../setup/setup.ui.h:16
msgid "Single segment"
msgstr ""
-#: ../engine/engine.py:278
+#: ../engine/engine.py:369 ../setup/setup.ui.h:17
msgid "Immediate conversion (Multiple segment)"
msgstr ""
-#: ../engine/engine.py:281
+#: ../engine/engine.py:378 ../setup/setup.ui.h:18
msgid "Immediate conversion (Single segment)"
msgstr ""
-#: ../engine/engine.py:296
+#: ../engine/engine.py:403
msgid "Switch Dictionary"
msgstr ""
-#: ../engine/engine.py:338
+#: ../engine/engine.py:465
msgid "Dictionary - Anthy"
msgstr ""
#. Translators: "Dic" means 'dictionary', One kanji may be good.
-#: ../engine/engine.py:343
+#: ../engine/engine.py:470
msgid "Dic"
msgstr ""
-#: ../engine/engine.py:350
+#: ../engine/engine.py:477
msgid "Configure dictionaries"
msgstr ""
-#: ../engine/engine.py:355
+#: ../engine/engine.py:487
msgid "Edit dictionaries"
msgstr ""
-#: ../engine/engine.py:357
+#: ../engine/engine.py:489
msgid "Launch the dictionary tool"
msgstr ""
-#: ../engine/engine.py:360
+#: ../engine/engine.py:496
msgid "Add words"
msgstr ""
-#: ../engine/engine.py:362
+#: ../engine/engine.py:498
msgid "Add words in the dictionary"
msgstr ""
-#: ../engine/factory.py:35
-msgid "Anthy"
-msgstr ""
-
-#: ../setup/anthyprefs.py.in:845
+#: ../setup/anthyprefs.py.in:838
msgid "General"
msgstr ""
-#: ../setup/anthyprefs.py.in:856
+#: ../setup/anthyprefs.py.in:849
msgid "Zip Code Conversion"
msgstr ""
-#: ../setup/anthyprefs.py.in:868
+#: ../setup/anthyprefs.py.in:861
msgid "Symbol"
msgstr ""
-#: ../setup/anthyprefs.py.in:879
+#: ../setup/anthyprefs.py.in:872
msgid "Old Character Style"
msgstr ""
-#: ../setup/main.py:86
+#. self.__run_message_dialog needs self.__builder.
+#: ../setup/main.py:60
+msgid "ibus is not running."
+msgstr ""
+
+#: ../setup/main.py:98
msgid "Command"
msgstr ""
-#: ../setup/main.py:90
+#: ../setup/main.py:102
msgid "Shortcut"
msgstr ""
-#: ../setup/main.py:131
+#: ../setup/main.py:143
msgid "Description"
msgstr ""
#. Translators: "Embd" means a short word of 'embedded'.
-#: ../setup/main.py:139
+#: ../setup/main.py:151
msgid "Embd"
msgstr ""
#. Translators: "Sgl" means a short word of 'single'.
-#: ../setup/main.py:147
+#: ../setup/main.py:159
msgid "Sgl"
msgstr ""
-#: ../setup/main.py:269 ../setup/main.py:298
+#: ../setup/main.py:287 ../setup/main.py:316
msgid "Input Chars"
msgstr ""
-#: ../setup/main.py:271 ../setup/main.py:300
+#: ../setup/main.py:289 ../setup/main.py:318
msgid "Output Chars"
msgstr ""
-#: ../setup/main.py:339
+#: ../setup/main.py:357
msgid "Input"
msgstr ""
-#: ../setup/main.py:341
+#: ../setup/main.py:359
msgid "Single"
msgstr ""
-#: ../setup/main.py:343
+#: ../setup/main.py:361
msgid "Left"
msgstr ""
-#: ../setup/main.py:345
+#: ../setup/main.py:363
msgid "Right"
msgstr ""
-#: ../setup/main.py:420
+#: ../setup/main.py:438
msgid "Customize Romaji Key Table"
msgstr ""
-#: ../setup/main.py:421 ../setup/setup.glade.h:90
+#: ../setup/main.py:439 ../setup/setup.ui.h:49
msgid "_Romaji Key Table:"
msgstr ""
-#: ../setup/main.py:422 ../setup/main.py:428 ../setup/setup.glade.h:87
+#: ../setup/main.py:440 ../setup/main.py:446 ../setup/setup.ui.h:86
msgid "_Output Chars"
msgstr ""
-#: ../setup/main.py:423 ../setup/main.py:429
+#: ../setup/main.py:441 ../setup/main.py:447 ../setup/setup.ui.h:26
msgid "Default"
msgstr ""
-#: ../setup/main.py:426
+#: ../setup/main.py:444
msgid "Customize Kana Key Table"
msgstr ""
-#: ../setup/main.py:427 ../setup/setup.glade.h:84
+#: ../setup/main.py:445 ../setup/setup.ui.h:51
msgid "_Kana Key Table:"
msgstr ""
-#: ../setup/main.py:432
+#: ../setup/main.py:450
msgid "Customize Thumb Shift Key Table"
msgstr ""
-#: ../setup/main.py:433
+#: ../setup/main.py:451
msgid "_Thumb Shift Key Table:"
msgstr ""
-#: ../setup/main.py:434
+#: ../setup/main.py:452
msgid "Single _Output Chars"
msgstr ""
-#: ../setup/main.py:435
+#: ../setup/main.py:453
msgid "Base"
msgstr ""
-#: ../setup/main.py:436
+#: ../setup/main.py:454
msgid "NICOLA-J key extension"
msgstr ""
-#: ../setup/main.py:437
+#: ../setup/main.py:455
msgid "NICOLA-A key extension"
msgstr ""
-#: ../setup/main.py:438
+#: ../setup/main.py:456
msgid "NICOLA-F key extension"
msgstr ""
-#: ../setup/main.py:439
+#: ../setup/main.py:457
msgid "FMV KB231-J key extension"
msgstr ""
-#: ../setup/main.py:440
+#: ../setup/main.py:458
msgid "FMV KB231-A key extension"
msgstr ""
-#: ../setup/main.py:441
+#: ../setup/main.py:459
msgid "FMV KB231-F key extension"
msgstr ""
-#: ../setup/main.py:442
+#: ../setup/main.py:460
msgid "FMV KB611-J key extension"
msgstr ""
-#: ../setup/main.py:443
+#: ../setup/main.py:461
msgid "FMV KB611-A key extension"
msgstr ""
-#: ../setup/main.py:444
+#: ../setup/main.py:462
msgid "FMV KB611-F key extension"
msgstr ""
-#: ../setup/main.py:593
+#: ../setup/main.py:617
msgid "Your choosed file has already been added: "
msgstr ""
-#: ../setup/main.py:597
+#: ../setup/main.py:621
msgid "Your choosed file does not exist: "
msgstr ""
-#: ../setup/main.py:601
+#: ../setup/main.py:625
msgid "Your choosed file is a directory: "
msgstr ""
-#: ../setup/main.py:605
+#: ../setup/main.py:629
msgid "You cannot add dictionaries in the anthy private directory: "
msgstr ""
-#: ../setup/main.py:612
+#: ../setup/main.py:636
msgid "Your file path is not good: "
msgstr ""
-#: ../setup/main.py:768
+#: ../setup/main.py:793
msgid "Confirm"
msgstr ""
-#: ../setup/main.py:769
+#: ../setup/main.py:794
msgid "Are you sure to close Setup?"
msgstr ""
-#: ../setup/main.py:782
+#: ../setup/main.py:808
msgid "Notice!"
msgstr ""
-#: ../setup/main.py:783
+#: ../setup/main.py:809
msgid "Are you sure to close Setup without save configure?"
msgstr ""
-#: ../setup/main.py:887
+#: ../setup/main.py:914
msgid "Please specify Input Chars"
msgstr ""
-#: ../setup/main.py:890
+#: ../setup/main.py:917
msgid "Please specify Output Chars"
msgstr ""
-#: ../setup/main.py:893
+#: ../setup/main.py:920
msgid "Please specify Left Thumb Shift Chars"
msgstr ""
-#: ../setup/main.py:896
+#: ../setup/main.py:923
msgid "Please specify Right Thumb Shift Chars"
msgstr ""
-#: ../setup/main.py:909 ../setup/main.py:949
+#: ../setup/main.py:936 ../setup/main.py:976
msgid "Your custom key is not assigned in any sections. Maybe a bug."
msgstr ""
-#: ../setup/main.py:1009 ../setup/main.py:1095
+#: ../setup/main.py:1036 ../setup/main.py:1122
msgid "Your file does not exist: "
msgstr ""
-#: ../setup/main.py:1019
+#: ../setup/main.py:1046
msgid "Open Dictionary File"
msgstr ""
-#: ../setup/main.py:1025
+#: ../setup/main.py:1052
msgid "Edit Dictionary File"
msgstr ""
-#: ../setup/main.py:1039
+#: ../setup/main.py:1066
msgid "Your choosed file is not correct."
msgstr ""
-#: ../setup/main.py:1068
+#: ../setup/main.py:1095
msgid "You cannot delete the system dictionary."
msgstr ""
-#: ../setup/main.py:1091
+#: ../setup/main.py:1118
msgid "Your file is not good."
msgstr ""
-#: ../setup/main.py:1120
+#: ../setup/main.py:1147
msgid "View Dictionary File"
msgstr ""
-#: ../setup/main.py:1270
+#: ../setup/main.py:1301
msgid "Please press a key (or a key combination)"
msgstr ""
-#: ../setup/main.py:1271
+#: ../setup/main.py:1302
msgid "The dialog will be closed when the key is released"
msgstr ""
-#: ../setup/main.py:1290 ../setup/main.py:1310
+#: ../setup/main.py:1321 ../setup/main.py:1341
msgid "Invalid keysym"
msgstr ""
-#: ../setup/main.py:1291 ../setup/main.py:1311
+#: ../setup/main.py:1322 ../setup/main.py:1342
msgid "This keysym is not valid"
msgstr ""
-#: ../setup/setup.glade.h:1
-msgid "'~', 『', '¢', '£' and so on can be output with Thumb Shift key"
+#: ../setup/setup.ui.h:3
+#, fuzzy
+msgid "Half Width Katakana"
+msgstr "半角片假名"
+
+#: ../setup/setup.ui.h:6
+msgid "NICOLA-J"
msgstr ""
-#: ../setup/setup.glade.h:2
-msgid "<b>Behavior</b>"
+#: ../setup/setup.ui.h:7
+msgid "NICOLA-A"
msgstr ""
-#: ../setup/setup.glade.h:3
-msgid "<b>Default Dictionary Configuration</b>"
+#: ../setup/setup.ui.h:8
+msgid "NICOLA-F"
msgstr ""
-#: ../setup/setup.glade.h:4
-msgid "<b>Extended Dictionaries</b>"
+#: ../setup/setup.ui.h:9
+msgid "None"
msgstr ""
-#: ../setup/setup.glade.h:5
-msgid "<b>Initial Setting</b>"
+#: ../setup/setup.ui.h:10
+msgid "FMV KB231 key extension"
msgstr ""
-#: ../setup/setup.glade.h:6
-msgid "<b>Kana</b>"
+#: ../setup/setup.ui.h:11
+msgid "FMV KB611 key extension"
msgstr ""
-#: ../setup/setup.glade.h:7
-msgid "<b>Other</b>"
+#: ../setup/setup.ui.h:19
+msgid "Keep Numpad Codes"
msgstr ""
-#: ../setup/setup.glade.h:8
-msgid "<b>Romaji</b>"
+#: ../setup/setup.ui.h:20
+msgid "Convert Characters"
msgstr ""
-#: ../setup/setup.glade.h:9
-msgid "<b>Thumb Shift Layout</b>"
+#: ../setup/setup.ui.h:21
+msgid "Do Nothing"
msgstr ""
-#: ../setup/setup.glade.h:10
-msgid "A_lternate"
+#: ../setup/setup.ui.h:22
+msgid "Auto Convert"
msgstr ""
-#: ../setup/setup.glade.h:11
-msgid "Abo_ut"
+#: ../setup/setup.ui.h:23
+msgid "Clear"
msgstr ""
-#: ../setup/setup.glade.h:12
-msgid "Adjust IM layout to XKB layout"
+#: ../setup/setup.ui.h:24
+msgid "Commit"
msgstr ""
-#: ../setup/setup.glade.h:13
-msgid "Adjust _input method layout to system keyboard layout"
+#: ../setup/setup.ui.h:25
+msgid "Hold"
msgstr ""
-#: ../setup/setup.glade.h:14
-msgid "Behavior on _Focus Out:"
+#: ../setup/setup.ui.h:27
+msgid "ATOK"
msgstr ""
-#: ../setup/setup.glade.h:15
-msgid "Candidate _Window Page Size:"
+#: ../setup/setup.ui.h:28
+msgid "Wnn"
msgstr ""
-#: ../setup/setup.glade.h:16
-msgid ""
-"Clear\n"
-"Commit\n"
-"Hold\n"
+#: ../setup/setup.ui.h:29
+msgid "Setup - IBus-Anthy"
msgstr ""
-#: ../setup/setup.glade.h:20
-msgid "Co_ntrol"
+#: ../setup/setup.ui.h:30
+msgid "_Input Mode:"
msgstr ""
-#: ../setup/setup.glade.h:21
-msgid "Con_vert spaces with the one column width"
+#: ../setup/setup.ui.h:31
+msgid "_Typing Method:"
msgstr ""
-#: ../setup/setup.glade.h:22
+#: ../setup/setup.ui.h:32
msgid "Conversion _Mode:"
msgstr ""
-#: ../setup/setup.glade.h:23
-msgid "Convert _numbers with the one column width"
+#: ../setup/setup.ui.h:33
+msgid "<b>Initial Setting</b>"
msgstr ""
-#: ../setup/setup.glade.h:24
-msgid "Convert _symbols with the one column width"
+#: ../setup/setup.ui.h:34
+msgid "_Period Style:"
msgstr ""
-#: ../setup/setup.glade.h:25
-msgid "De_fault"
+#: ../setup/setup.ui.h:35
+msgid "Symbo_l Style:"
msgstr ""
-#: ../setup/setup.glade.h:26
-msgid ""
-"Default\n"
-"ATOK\n"
-"Wnn\n"
+#: ../setup/setup.ui.h:36
+msgid "Numpad _Key Type:"
msgstr ""
-#: ../setup/setup.glade.h:30
-msgid "Dictionar_y"
+#: ../setup/setup.ui.h:37
+msgid "_Behavior on Period:"
msgstr ""
-#: ../setup/setup.glade.h:31
-msgid ""
-"Do Nothing\n"
-"Auto Convert"
+#: ../setup/setup.ui.h:38
+msgid "Behavior on _Focus Out:"
msgstr ""
-#: ../setup/setup.glade.h:33
-msgid "Edit Shortcut"
+#: ../setup/setup.ui.h:39
+msgid "<b>Behavior</b>"
msgstr ""
-#: ../setup/setup.glade.h:34
-msgid "Enable the _reverse conversion"
+#: ../setup/setup.ui.h:40
+msgid "Convert _numbers with the one column width"
msgstr ""
-#: ../setup/setup.glade.h:35
-msgid ""
-"Hiragana\n"
-"Katakana\n"
-"Half Width Katakana\n"
-"Latin\n"
-"Wide Latin"
+#: ../setup/setup.ui.h:41
+msgid "Candidate _Window Page Size:"
msgstr ""
-#: ../setup/setup.glade.h:40
-msgid "Input _Method Layout:"
+#: ../setup/setup.ui.h:42
+msgid "Convert _symbols with the one column width"
msgstr ""
-#: ../setup/setup.glade.h:41
-msgid ""
-"Keep Numpad Codes\n"
-"Convert Characters\n"
+#: ../setup/setup.ui.h:43
+msgid "Con_vert spaces with the one column width"
msgstr ""
-#: ../setup/setup.glade.h:44
-msgid "Key Code:"
+#: ../setup/setup.ui.h:44
+msgid "<b>Other</b>"
msgstr ""
-#: ../setup/setup.glade.h:45
-msgid "Key bin_ding"
+#: ../setup/setup.ui.h:45
+msgid "_General"
msgstr ""
-#: ../setup/setup.glade.h:46
-msgid "Modifier:"
+#: ../setup/setup.ui.h:46
+msgid "_Shortcut Type:"
msgstr ""
-#: ../setup/setup.glade.h:47
-msgid ""
-"Multiple segment\n"
-"Single segment\n"
-"Immediate conversion (Multiple segment)\n"
-"Immediate conversion (Single segment)"
+#: ../setup/setup.ui.h:47
+msgid "De_fault"
msgstr ""
-#: ../setup/setup.glade.h:51
-msgid ""
-"NICOLA-J\n"
-"NICOLA-A\n"
-"NICOLA-F"
+#: ../setup/setup.ui.h:48
+msgid "Key bin_ding"
msgstr ""
-#: ../setup/setup.glade.h:54
-msgid ""
-"None\n"
-"FMV KB231 key extension\n"
-"FMV KB611 key extension"
+#: ../setup/setup.ui.h:50
+msgid "<b>Romaji</b>"
msgstr ""
-#: ../setup/setup.glade.h:57
-msgid "Numpad _Key Type:"
+#: ../setup/setup.ui.h:52
+msgid "<b>Kana</b>"
msgstr ""
-#: ../setup/setup.glade.h:58
-msgid "Restart ibus when you change XKB"
+#: ../setup/setup.ui.h:53
+msgid "_Typing Method"
msgstr ""
-#: ../setup/setup.glade.h:59
-msgid "Restart ibus when you change the keyboard layout."
+#: ../setup/setup.ui.h:54
+msgid "_Left Thumb Shift Key:"
msgstr ""
-#: ../setup/setup.glade.h:60
+#: ../setup/setup.ui.h:55
msgid "Right _Thumb Shift Key:"
msgstr ""
-#: ../setup/setup.glade.h:61
-msgid ""
-"Romaji\n"
-"Kana\n"
-"Thumb shift"
+#: ../setup/setup.ui.h:56
+msgid "Adjust _input method layout to system keyboard layout"
msgstr ""
-#: ../setup/setup.glade.h:64
-msgid "Seion + Shift can output Handakuon"
+#: ../setup/setup.ui.h:57
+msgid "Adjust IM layout to XKB layout"
msgstr ""
-#: ../setup/setup.glade.h:65
-msgid "Setup - IBus-Anthy"
+#: ../setup/setup.ui.h:58
+msgid "Input _Method Layout:"
msgstr ""
-#: ../setup/setup.glade.h:66
-msgid ""
-"Strongly recommend to enable \"Use system keyboard layout\" check button in "
-"\"Advanced\" tab using 'ibus-setup' command"
+#: ../setup/setup.ui.h:59
+msgid "Restart ibus when you change the keyboard layout."
msgstr ""
-#: ../setup/setup.glade.h:67
-msgid "Symbo_l Style:"
+#: ../setup/setup.ui.h:60
+msgid "Restart ibus when you change XKB"
msgstr ""
-#: ../setup/setup.glade.h:68
-msgid "The Anthy engine for IBus input platform"
+#: ../setup/setup.ui.h:61
+msgid ""
+"Strongly recommend to enable \"Use system keyboard layout\" check button in "
+"\"Advanced\" tab using 'ibus-setup' command"
msgstr ""
-#: ../setup/setup.glade.h:69
-msgid "Thumb S_hift"
+#: ../setup/setup.ui.h:62
+msgid "_Additional Key Arrangement:"
msgstr ""
-#: ../setup/setup.glade.h:70
-msgid "Thumb _Shift Key Table:"
+#: ../setup/setup.ui.h:63
+msgid ""
+"'&#xFF5E;', '&#x300E;', '&#xA2;', '&#xA3;' and so on can be output with "
+"Thumb Shift key"
msgstr ""
-#: ../setup/setup.glade.h:71
-msgid "You can change the order on language bar"
+#: ../setup/setup.ui.h:64
+msgid ""
+"You do not have to reconfigure the system keyboard layout for \"Additional "
+"Key Arrangement\" since this option changes input method layout only in case "
+"input method is turned on."
msgstr ""
-#: ../setup/setup.glade.h:72
+#: ../setup/setup.ui.h:65
msgid ""
"You do not have to reconfigure XKB since this option changes IM layout only "
"with IM on."
msgstr ""
-#: ../setup/setup.glade.h:73
-msgid ""
-"You do not have to reconfigure the system keyboard layout for \"Additional "
-"Key Arrangement\" since this option changes input method layout only in case "
-"input method is turned on."
+#: ../setup/setup.ui.h:66
+msgid "_Enable semi-voiced sound mark with Shift key"
msgstr ""
-#: ../setup/setup.glade.h:74
-msgid "_Add Word Command:"
+#: ../setup/setup.ui.h:67
+msgid "Seion + Shift can output Handakuon"
msgstr ""
-#: ../setup/setup.glade.h:75
-msgid "_Additional Key Arrangement:"
+#: ../setup/setup.ui.h:68
+msgid "Thumb _Shift Key Table:"
msgstr ""
-#: ../setup/setup.glade.h:76
-msgid "_Behavior on Period:"
+#: ../setup/setup.ui.h:69
+msgid "<b>Thumb Shift Layout</b>"
msgstr ""
-#: ../setup/setup.glade.h:77
-msgid "_Description:"
+#: ../setup/setup.ui.h:70
+msgid "Thumb S_hift"
msgstr ""
-#: ../setup/setup.glade.h:78
+#: ../setup/setup.ui.h:71
msgid "_Edit Dictionary Command:"
msgstr ""
-#: ../setup/setup.glade.h:79
-msgid "_Embed your dictionary in the system dictionary"
+#: ../setup/setup.ui.h:72
+msgid "_Add Word Command:"
msgstr ""
-#: ../setup/setup.glade.h:80
-msgid "_Enable semi-voiced sound mark with Shift key"
+#: ../setup/setup.ui.h:73
+msgid "<b>Default Dictionary Configuration</b>"
msgstr ""
-#: ../setup/setup.glade.h:81
-msgid "_General"
+#: ../setup/setup.ui.h:74
+msgid "_View"
msgstr ""
-#: ../setup/setup.glade.h:82
-msgid "_Input Chars"
+#: ../setup/setup.ui.h:75
+msgid "You can change the order on language bar"
msgstr ""
-#: ../setup/setup.glade.h:83
-msgid "_Input Mode:"
+#: ../setup/setup.ui.h:76
+msgid "<b>Extended Dictionaries</b>"
msgstr ""
-#: ../setup/setup.glade.h:85
-msgid "_Left Thumb Shift"
+#: ../setup/setup.ui.h:77
+msgid "Dictionar_y"
msgstr ""
-#: ../setup/setup.glade.h:86
-msgid "_Left Thumb Shift Key:"
+#: ../setup/setup.ui.h:78
+msgid "Abo_ut"
msgstr ""
-#: ../setup/setup.glade.h:88
-msgid "_Period Style:"
+#: ../setup/setup.ui.h:79
+msgid "Edit Shortcut"
msgstr ""
-#: ../setup/setup.glade.h:89
-msgid "_Right Thumb Shift"
+#: ../setup/setup.ui.h:80
+msgid "Key Code:"
+msgstr ""
+
+#: ../setup/setup.ui.h:81
+msgid "Modifier:"
+msgstr ""
+
+#: ../setup/setup.ui.h:82
+msgid "A_lternate"
+msgstr ""
+
+#: ../setup/setup.ui.h:83
+msgid "Co_ntrol"
msgstr ""
-#: ../setup/setup.glade.h:91
+#: ../setup/setup.ui.h:84
msgid "_Shift"
msgstr ""
-#: ../setup/setup.glade.h:92
-msgid "_Short Label:"
+#: ../setup/setup.ui.h:85
+msgid "_Input Chars"
msgstr ""
-#: ../setup/setup.glade.h:93
-msgid "_Shortcut Type:"
+#: ../setup/setup.ui.h:87
+msgid "_Left Thumb Shift"
msgstr ""
-#: ../setup/setup.glade.h:94
-msgid "_Typing Method"
+#: ../setup/setup.ui.h:88
+msgid "_Right Thumb Shift"
msgstr ""
-#: ../setup/setup.glade.h:95
-msgid "_Typing Method:"
+#: ../setup/setup.ui.h:89
+msgid "_Short Label:"
msgstr ""
-#: ../setup/setup.glade.h:96
+#: ../setup/setup.ui.h:90
+msgid "_Description:"
+msgstr ""
+
+#: ../setup/setup.ui.h:91
msgid "_Use your dictionary alone with switching dictionaries"
msgstr ""
-#: ../setup/setup.glade.h:97
-msgid "_View"
+#: ../setup/setup.ui.h:92
+msgid "_Embed your dictionary in the system dictionary"
+msgstr ""
+
+#: ../setup/setup.ui.h:93
+msgid "Enable the _reverse conversion"
+msgstr ""
+
+#: ../setup/setup.ui.h:94
+msgid "The Anthy engine for IBus input platform"
msgstr ""
-#: ../setup/setup.glade.h:98
+#: ../setup/setup.ui.h:95
msgid "translator_credits"
msgstr ""
diff --git a/setup/Makefile.am b/setup/Makefile.am
index b59b58a..6fcec7b 100644
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -20,15 +20,19 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-BUILT_SOURCES = anthyprefs.py
+BUILT_SOURCES = \
+ _config.py \
+ anthyprefs.py \
+ $(NULL)
libexec_SCRIPTS = ibus-setup-anthy
setup_anthy_PYTHON = \
+ _config.py \
anthyprefs.py \
main.py \
prefs.py \
- setup.glade \
+ setup.ui \
$(NULL)
setup_anthy_built_files = \
@@ -62,6 +66,15 @@ anthyprefs.py: anthyprefs.py.in
-e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \
$< > $@
+_config.py: _config.py.in
+ ( \
+ PKGDATADIR=$(pkgdatadir); \
+ LIBEXECDIR=$(libexecdir); \
+ DATADIR=$(datadir); \
+ s=`cat $<`; \
+ eval "echo \"$${s}\""; \
+ ) > $@
+
# Need a time lag between .py and .py.in files to build .py files
# because *_PYTHON valuables are installed in the tarball.
dist-hook:
diff --git a/setup/_config.py.in b/setup/_config.py.in
new file mode 120000
index 0000000..d646d61
--- /dev/null
+++ b/setup/_config.py.in
@@ -0,0 +1 @@
+../engine/_config.py.in \ No newline at end of file
diff --git a/setup/anthyprefs.py.in b/setup/anthyprefs.py.in
index fe238a5..5357763 100644
--- a/setup/anthyprefs.py.in
+++ b/setup/anthyprefs.py.in
@@ -21,7 +21,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-import gtk
import sys
from prefs import Prefs
@@ -37,26 +36,20 @@ class AnthyPrefs(Prefs):
def __init__(self, bus=None, config=None):
super(AnthyPrefs, self).__init__(bus, config)
self.default = _config
-
- # The keys will be EOSL in the near future.
- self.__update_key ("common",
- "behivior_on_focus_out",
- "behavior_on_focus_out")
- self.__update_key ("common",
- "behivior_on_period",
- "behavior_on_period")
+ self.set_no_key_warning(True)
self.fetch_all()
+ self.set_no_key_warning(False)
def __update_key (self, section, old_key, new_key):
file = __file__
if __file__.find('/') >= 0:
file = __file__[__file__.rindex('/') + 1:]
warning_message = \
- "(" + file + ") ibus-anthy-WARNING **: " \
- "The key (" + old_key + ") will be removed in the future. " \
- "Currently the key (" + new_key + ") is used instead. " \
- "The ibus keys are defined in " + \
- "/".join(["/desktop/ibus", self._prefix, section]) + " ."
+ '(' + file + ') ibus-anthy-WARNING **: ' \
+ 'The key (' + old_key + ') will be removed in the future. ' \
+ 'Currently the key (' + new_key + ') is used instead. ' \
+ 'The ibus keys are defined in ' + \
+ '/'.join(['/desktop/ibus', self._prefix, section]) + ' .'
if not self.fetch_item(section, old_key, True):
return
@@ -86,144 +79,144 @@ class AnthyPrefs(Prefs):
# Unicode order is wrong in Japanese large 'a' and small 'a'.
# The workaround is to save the order here...
_japanese_ordered_list = [
- "あ", "い", "う", "え", "お",
- "ぁ", "ぃ", "ぅ", "ぇ", "ぉ",
- "いぇ",
- "うぁ", "うぃ", "うぅ", "うぇ", "うぉ",
- "うゃ", "うゅ", "うょ",
- "か", "き", "く", "け", "こ",
- "ゕ", "ゖ", "ヵ", "ヶ",
- "が", "ぎ", "ぐ", "げ", "ご",
- "きゃ", "きぃ", "きゅ", "きぇ", "きょ",
- "くぁ", "くぃ", "くぅ", "くぇ", "くぉ",
- "ぎゃ", "ぎぃ", "ぎゅ", "ぎぇ", "ぎょ",
- "ぐぁ", "ぐぃ", "ぐぅ", "ぐぇ", "ぐぉ",
- "さ", "し", "す", "せ", "そ",
- "ざ", "じ", "ず", "ぜ", "ぞ",
- "しゃ", "しぃ", "しゅ", "しぇ", "しょ",
- "じゃ", "じぃ", "じゅ", "じぇ", "じょ",
- "すぅぃ", "すぇ",
- "ずぇ",
- "た", "ち", "つ", "て", "と",
- "だ", "ぢ", "づ", "で", "ど",
- "っ",
- "ちゃ", "ちぃ", "ちゅ", "ちぇ", "ちょ",
- "ぢぃ", "ぢぇ",
- "ぢゃ", "ぢゅ", "ぢょ",
- "つぁ", "つぃ", "つぇ", "つぉ",
- "つゃ", "つぃぇ", "つゅ", "つょ",
- "づぁ", "づぃ", "づぇ", "づぉ",
- "づゃ", "づぃぇ", "づゅ", "づょ",
- "てぃ", "てぇ",
- "てゃ", "てゅ", "てょ",
- "とぅ",
- "でぃ", "でぇ",
- "でゃ", "でゅ", "でょ",
- "どぅ",
- "な", "に", "ぬ", "ね", "の",
- "にぃ", "にぇ",
- "にゃ", "にゅ", "にょ",
- "は", "ひ", "ふ", "へ", "ほ",
- "ば", "び", "ぶ", "べ", "ぼ",
- "ぱ", "ぴ", "ぷ", "ぺ", "ぽ",
- "ひぃ", "ひぇ",
- "ひゃ", "ひゅ", "ひょ",
- "びぃ", "びぇ",
- "びゃ", "びゅ", "びょ",
- "ぴぃ", "ぴぇ",
- "ぴゃ", "ぴゅ", "ぴょ",
- "ふぁ", "ふぃ", "ふぇ", "ふぉ",
- "ふゃ", "ふゅ", "ふょ",
- "ぶぁ", "ぶぇ", "ぶぉ",
- "ぷぁ", "ぷぇ", "ぷぉ",
- "ま", "み", "む", "め", "も",
- "みぃ", "みぇ",
- "みゃ", "みゅ", "みょ",
- "や", "ゆ", "よ",
- "ゃ", "ゅ", "ょ",
- "ら", "り", "る", "れ", "ろ",
- "りぃ", "りぇ",
- "りゃ", "りゅ", "りょ",
- "わ", "を", "ん",
- "ゎ",
- "ゐ", "ゑ",
- "ー",
- "ヴぁ", "ヴぃ", "ヴ", "ヴぇ", "ヴぉ",
- "ヴゃ", "ヴぃぇ", "ヴゅ", "ヴょ",
+ 'あ', 'い', 'う', 'え', 'お',
+ 'ぁ', 'ぃ', 'ぅ', 'ぇ', 'ぉ',
+ 'いぇ',
+ 'うぁ', 'うぃ', 'うぅ', 'うぇ', 'うぉ',
+ 'うゃ', 'うゅ', 'うょ',
+ 'か', 'き', 'く', 'け', 'こ',
+ 'ゕ', 'ゖ', 'ヵ', 'ヶ',
+ 'が', 'ぎ', 'ぐ', 'げ', 'ご',
+ 'きゃ', 'きぃ', 'きゅ', 'きぇ', 'きょ',
+ 'くぁ', 'くぃ', 'くぅ', 'くぇ', 'くぉ',
+ 'ぎゃ', 'ぎぃ', 'ぎゅ', 'ぎぇ', 'ぎょ',
+ 'ぐぁ', 'ぐぃ', 'ぐぅ', 'ぐぇ', 'ぐぉ',
+ 'さ', 'し', 'す', 'せ', 'そ',
+ 'ざ', 'じ', 'ず', 'ぜ', 'ぞ',
+ 'しゃ', 'しぃ', 'しゅ', 'しぇ', 'しょ',
+ 'じゃ', 'じぃ', 'じゅ', 'じぇ', 'じょ',
+ 'すぅぃ', 'すぇ',
+ 'ずぇ',
+ 'た', 'ち', 'つ', 'て', 'と',
+ 'だ', 'ぢ', 'づ', 'で', 'ど',
+ 'っ',
+ 'ちゃ', 'ちぃ', 'ちゅ', 'ちぇ', 'ちょ',
+ 'ぢぃ', 'ぢぇ',
+ 'ぢゃ', 'ぢゅ', 'ぢょ',
+ 'つぁ', 'つぃ', 'つぇ', 'つぉ',
+ 'つゃ', 'つぃぇ', 'つゅ', 'つょ',
+ 'づぁ', 'づぃ', 'づぇ', 'づぉ',
+ 'づゃ', 'づぃぇ', 'づゅ', 'づょ',
+ 'てぃ', 'てぇ',
+ 'てゃ', 'てゅ', 'てょ',
+ 'とぅ',
+ 'でぃ', 'でぇ',
+ 'でゃ', 'でゅ', 'でょ',
+ 'どぅ',
+ 'な', 'に', 'ぬ', 'ね', 'の',
+ 'にぃ', 'にぇ',
+ 'にゃ', 'にゅ', 'にょ',
+ 'は', 'ひ', 'ふ', 'へ', 'ほ',
+ 'ば', 'び', 'ぶ', 'べ', 'ぼ',
+ 'ぱ', 'ぴ', 'ぷ', 'ぺ', 'ぽ',
+ 'ひぃ', 'ひぇ',
+ 'ひゃ', 'ひゅ', 'ひょ',
+ 'びぃ', 'びぇ',
+ 'びゃ', 'びゅ', 'びょ',
+ 'ぴぃ', 'ぴぇ',
+ 'ぴゃ', 'ぴゅ', 'ぴょ',
+ 'ふぁ', 'ふぃ', 'ふぇ', 'ふぉ',
+ 'ふゃ', 'ふゅ', 'ふょ',
+ 'ぶぁ', 'ぶぇ', 'ぶぉ',
+ 'ぷぁ', 'ぷぇ', 'ぷぉ',
+ 'ま', 'み', 'む', 'め', 'も',
+ 'みぃ', 'みぇ',
+ 'みゃ', 'みゅ', 'みょ',
+ 'や', 'ゆ', 'よ',
+ 'ゃ', 'ゅ', 'ょ',
+ 'ら', 'り', 'る', 'れ', 'ろ',
+ 'りぃ', 'りぇ',
+ 'りゃ', 'りゅ', 'りょ',
+ 'わ', 'を', 'ん',
+ 'ゎ',
+ 'ゐ', 'ゑ',
+ 'ー',
+ 'ヴぁ', 'ヴぃ', 'ヴ', 'ヴぇ', 'ヴぉ',
+ 'ヴゃ', 'ヴぃぇ', 'ヴゅ', 'ヴょ',
]
_cmd_keys = [
- "on_off",
- "circle_input_mode",
- "circle_kana_mode",
- "latin_mode",
- "wide_latin_mode",
- "hiragana_mode",
- "katakana_mode",
- "half_katakana_mode",
-# "cancel_pseudo_ascii_mode_key",
- "circle_typing_method",
- "circle_dict_method",
-
- "insert_space",
- "insert_alternate_space",
- "insert_half_space",
- "insert_wide_space",
- "backspace",
- "delete",
- "commit",
- "convert",
- "predict",
- "cancel",
- "cancel_all",
- "reconvert",
-# "do_nothing",
-
- "select_first_candidate",
- "select_last_candidate",
- "select_next_candidate",
- "select_prev_candidate",
- "candidates_page_up",
- "candidates_page_down",
-
- "move_caret_first",
- "move_caret_last",
- "move_caret_forward",
- "move_caret_backward",
-
- "select_first_segment",
- "select_last_segment",
- "select_next_segment",
- "select_prev_segment",
- "shrink_segment",
- "expand_segment",
- "commit_first_segment",
- "commit_selected_segment",
-
- "select_candidates_1",
- "select_candidates_2",
- "select_candidates_3",
- "select_candidates_4",
- "select_candidates_5",
- "select_candidates_6",
- "select_candidates_7",
- "select_candidates_8",
- "select_candidates_9",
- "select_candidates_0",
-
- "convert_to_char_type_forward",
- "convert_to_char_type_backward",
- "convert_to_hiragana",
- "convert_to_katakana",
- "convert_to_half",
- "convert_to_half_katakana",
- "convert_to_wide_latin",
- "convert_to_latin",
-
- "dict_admin",
- "add_word",
-
- "start_setup",
+ 'on_off',
+ 'circle_input_mode',
+ 'circle_kana_mode',
+ 'latin_mode',
+ 'wide_latin_mode',
+ 'hiragana_mode',
+ 'katakana_mode',
+ 'half_katakana_mode',
+# 'cancel_pseudo_ascii_mode_key',
+ 'circle_typing_method',
+ 'circle_dict_method',
+
+ 'insert_space',
+ 'insert_alternate_space',
+ 'insert_half_space',
+ 'insert_wide_space',
+ 'backspace',
+ 'delete',
+ 'commit',
+ 'convert',
+ 'predict',
+ 'cancel',
+ 'cancel_all',
+ 'reconvert',
+# 'do_nothing',
+
+ 'select_first_candidate',
+ 'select_last_candidate',
+ 'select_next_candidate',
+ 'select_prev_candidate',
+ 'candidates_page_up',
+ 'candidates_page_down',
+
+ 'move_caret_first',
+ 'move_caret_last',
+ 'move_caret_forward',
+ 'move_caret_backward',
+
+ 'select_first_segment',
+ 'select_last_segment',
+ 'select_next_segment',
+ 'select_prev_segment',
+ 'shrink_segment',
+ 'expand_segment',
+ 'commit_first_segment',
+ 'commit_selected_segment',
+
+ 'select_candidates_1',
+ 'select_candidates_2',
+ 'select_candidates_3',
+ 'select_candidates_4',
+ 'select_candidates_5',
+ 'select_candidates_6',
+ 'select_candidates_7',
+ 'select_candidates_8',
+ 'select_candidates_9',
+ 'select_candidates_0',
+
+ 'convert_to_char_type_forward',
+ 'convert_to_char_type_backward',
+ 'convert_to_hiragana',
+ 'convert_to_katakana',
+ 'convert_to_half',
+ 'convert_to_half_katakana',
+ 'convert_to_wide_latin',
+ 'convert_to_latin',
+
+ 'dict_admin',
+ 'add_word',
+
+ 'start_setup',
]
_config = {
@@ -267,277 +260,277 @@ _config = {
##3 ANSI/BSI Suggestions http://en.wikipedia.org/wiki/Katakana
# Maybe we need a compatibility between MS-IME and ibus-anthy.
'romaji_typing_rule/default': {
- "-": "ー",
- "a" : "あ",
- "i" : "い",
- "u" : "う",
- "e" : "え",
- "o" : "お",
- "xa" : "ぁ",
- "xi" : "ぃ",
- "xu" : "ぅ",
- "xe" : "ぇ",
- "xo" : "ぉ",
- "la" : "ぁ",
- "li" : "ぃ",
- "lu" : "ぅ",
- "le" : "ぇ",
- "lo" : "ぉ",
- "wha" : "うぁ",
- "whi" : "うぃ",
- "whe" : "うぇ",
- "who" : "うぉ",
- "wya" : "うゃ", ##2
- "wyu" : "うゅ", ##2
- "wyo" : "うょ", ##2
- "va" : "ヴぁ",
- "vi" : "ヴぃ",
- "vu" : "ヴ",
- "ve" : "ヴぇ",
- "vo" : "ヴぉ",
- "vya" : "ヴゃ", ##2
- "vyu" : "ヴゅ", ##2
- "vye" : "ヴぃぇ", ##2
- "vyo" : "ヴょ", ##2
- "ka" : "か",
- "ki" : "き",
- "ku" : "く",
- "ke" : "け",
- "ko" : "こ",
- "lka" : "ヵ",
- "lke" : "ヶ",
-# "xka" : "ゕ",
- "xka" : "ヵ",
-# "xke" : "ゖ",
- "xke" : "ヶ",
- "ga" : "が",
- "gi" : "ぎ",
- "gu" : "ぐ",
- "ge" : "げ",
- "go" : "ご",
- "kya" : "きゃ",
- "kyi" : "きぃ",
- "kyu" : "きゅ",
- "kye" : "きぇ",
- "kyo" : "きょ",
- "kwa" : "くぁ",
- "kwi" : "くぃ", ##2
- "kwu" : "くぅ", ##2
- "kwe" : "くぇ", ##2
- "kwo" : "くぉ", ##2
- "gya" : "ぎゃ",
- "gyi" : "ぎぃ",
- "gyu" : "ぎゅ",
- "gye" : "ぎぇ",
- "gyo" : "ぎょ",
- "gwa" : "ぐぁ",
- "gwi" : "ぐぃ", ##2
- "gwu" : "ぐぅ", ##2
- "gwe" : "ぐぇ", ##2
- "gwo" : "ぐぉ", ##2
- "sa" : "さ",
- "si" : "し",
- "su" : "す",
- "se" : "せ",
- "so" : "そ",
- "za" : "ざ",
- "zi" : "じ",
- "zu" : "ず",
- "ze" : "ぜ",
- "zo" : "ぞ",
- "sya" : "しゃ",
- "syi" : "しぃ",
- "syu" : "しゅ",
- "sye" : "しぇ",
- "syo" : "しょ",
- "sha" : "しゃ",
- "shi" : "し",
- "shu" : "しゅ",
- "she" : "しぇ",
- "sho" : "しょ",
- "zya" : "じゃ",
- "zyi" : "じぃ",
- "zyu" : "じゅ",
- "zye" : "じぇ",
- "zyo" : "じょ",
- "ja" : "じゃ",
- "jya" : "じゃ",
- "ji" : "じ",
- "jyi" : "じぃ",
- "ju" : "じゅ",
- "jyu" : "じゅ",
- "je" : "じぇ",
- "jye" : "じぇ",
- "jo" : "じょ",
- "jyo" : "じょ",
- "swi" : "すぅぃ", ##2
- "swe" : "すぇ", ##2
- "zwe" : "ずぇ", ##2
- "ta" : "た",
- "ti" : "ち",
- "tu" : "つ",
- "tsu" : "つ",
- "te" : "て",
- "to" : "と",
- "da" : "だ",
- "di" : "ぢ",
- "du" : "づ",
- "de" : "で",
- "do" : "ど",
- "xtu" : "っ",
- "xtsu" : "っ",
- "ltu" : "っ",
- "ltsu" : "っ",
- "tya" : "ちゃ",
- "tyi" : "ちぃ",
- "tyu" : "ちゅ",
- "tye" : "ちぇ",
- "tyo" : "ちょ",
- "cya" : "ちゃ",
- "cyi" : "ちぃ",
- "cyu" : "ちゅ",
- "cye" : "ちぇ",
- "cyo" : "ちょ",
- "cha" : "ちゃ",
- "chi" : "ち",
- "chu" : "ちゅ",
- "che" : "ちぇ",
- "cho" : "ちょ",
- "dya" : "ぢゃ",
- "dyi" : "ぢぃ",
- "dyu" : "ぢゅ",
- "dye" : "ぢぇ",
- "dyo" : "ぢょ",
- "tsa" : "つぁ",
- "tsi" : "つぃ",
- "tse" : "つぇ",
- "tso" : "つぉ",
- "tsya" : "つゃ", ##3
- "tsyu" : "つゅ", ##3
- "tsye" : "つぃぇ", ##3
- "tsyo" : "つょ", ##3
- "dza" : "づぁ", ##3
- "dzi" : "づぃ", ##3
- "dze" : "づぇ", ##3
- "dzo" : "づぉ", ##3
- "dzya" : "づゃ", ##3
- "dzyu" : "づゅ", ##3
- "dzye" : "づぃぇ", ##3
- "dzyo" : "づょ", ##3
- "tha" : "てゃ",
- "thi" : "てぃ",
- "thu" : "てゅ",
- "the" : "てぇ",
- "tho" : "てょ",
- "twu" : "とぅ",
- "dha" : "でゃ",
- "dhi" : "でぃ",
- "dhu" : "でゅ",
- "dhe" : "でぇ",
- "dho" : "でょ",
- "dwu" : "どぅ",
- "na" : "な",
- "ni" : "に",
- "nu" : "ぬ",
- "ne" : "ね",
- "no" : "の",
- "nya" : "にゃ",
- "nyi" : "にぃ",
- "nyu" : "にゅ",
- "nye" : "にぇ",
- "nyo" : "にょ",
- "ha" : "は",
- "hi" : "ひ",
- "hu" : "ふ",
- "he" : "へ",
- "ho" : "ほ",
- "ba" : "ば",
- "bi" : "び",
- "bu" : "ぶ",
- "be" : "べ",
- "bo" : "ぼ",
- "pa" : "ぱ",
- "pi" : "ぴ",
- "pu" : "ぷ",
- "pe" : "ぺ",
- "po" : "ぽ",
- "hya" : "ひゃ",
- "hyi" : "ひぃ",
- "hyu" : "ひゅ",
- "hye" : "ひぇ",
- "hyo" : "ひょ",
- "bya" : "びゃ",
- "byi" : "びぃ",
- "byu" : "びゅ",
- "bye" : "びぇ",
- "byo" : "びょ",
- "pya" : "ぴゃ",
- "pyi" : "ぴぃ",
- "pyu" : "ぴゅ",
- "pye" : "ぴぇ",
- "pyo" : "ぴょ",
- "fa" : "ふぁ",
- "fi" : "ふぃ",
- "fu" : "ふ",
- "fe" : "ふぇ",
- "fo" : "ふぉ",
- "fya" : "ふゃ",
- "fyi" : "ふぃ",
- "fyu" : "ふゅ",
- "fye" : "ふぇ",
- "fyo" : "ふょ",
- "bwa" : "ぶぁ", ##2
- "bwe" : "ぶぇ", ##2
- "bwo" : "ぶぉ", ##2
- "pwa" : "ぷぁ", ##2
- "pwe" : "ぷぇ", ##2
- "pwo" : "ぷぉ", ##2
- "ma" : "ま",
- "mi" : "み",
- "mu" : "む",
- "me" : "め",
- "mo" : "も",
- "mya" : "みゃ",
- "myi" : "みぃ",
- "myu" : "みゅ",
- "mye" : "みぇ",
- "myo" : "みょ",
- "ya" : "や",
- "yi" : "い",
- "yu" : "ゆ",
- "ye" : "いぇ",
- "yo" : "よ",
- "lya" : "ゃ",
- "lyi" : "ぃ",
- "lyu" : "ゅ",
- "lye" : "ぇ",
- "lyo" : "ょ",
- "xya" : "ゃ",
- "xyi" : "ぃ",
- "xyu" : "ゅ",
- "xye" : "ぇ",
- "xyo" : "ょ",
- "ra" : "ら",
- "ri" : "り",
- "ru" : "る",
- "re" : "れ",
- "ro" : "ろ",
- "rya" : "りゃ",
- "ryi" : "りぃ",
- "ryu" : "りゅ",
- "rye" : "りぇ",
- "ryo" : "りょ",
- "wa" : "わ",
- "wi" : "うぃ",
- "wu" : "う",
- "we" : "うぇ",
- "wo" : "を",
- "lwa" : "ゎ",
- "xwa" : "ゎ",
- "n'" : "ん",
- "nn" : "ん",
- "wyi" : "ゐ",
- "wye" : "ゑ",
+ '-': 'ー',
+ 'a' : 'あ',
+ 'i' : 'い',
+ 'u' : 'う',
+ 'e' : 'え',
+ 'o' : 'お',
+ 'xa' : 'ぁ',
+ 'xi' : 'ぃ',
+ 'xu' : 'ぅ',
+ 'xe' : 'ぇ',
+ 'xo' : 'ぉ',
+ 'la' : 'ぁ',
+ 'li' : 'ぃ',
+ 'lu' : 'ぅ',
+ 'le' : 'ぇ',
+ 'lo' : 'ぉ',
+ 'wha' : 'うぁ',
+ 'whi' : 'うぃ',
+ 'whe' : 'うぇ',
+ 'who' : 'うぉ',
+ 'wya' : 'うゃ', ##2
+ 'wyu' : 'うゅ', ##2
+ 'wyo' : 'うょ', ##2
+ 'va' : 'ヴぁ',
+ 'vi' : 'ヴぃ',
+ 'vu' : 'ヴ',
+ 've' : 'ヴぇ',
+ 'vo' : 'ヴぉ',
+ 'vya' : 'ヴゃ', ##2
+ 'vyu' : 'ヴゅ', ##2
+ 'vye' : 'ヴぃぇ', ##2
+ 'vyo' : 'ヴょ', ##2
+ 'ka' : 'か',
+ 'ki' : 'き',
+ 'ku' : 'く',
+ 'ke' : 'け',
+ 'ko' : 'こ',
+ 'lka' : 'ヵ',
+ 'lke' : 'ヶ',
+# 'xka' : 'ゕ',
+ 'xka' : 'ヵ',
+# 'xke' : 'ゖ',
+ 'xke' : 'ヶ',
+ 'ga' : 'が',
+ 'gi' : 'ぎ',
+ 'gu' : 'ぐ',
+ 'ge' : 'げ',
+ 'go' : 'ご',
+ 'kya' : 'きゃ',
+ 'kyi' : 'きぃ',
+ 'kyu' : 'きゅ',
+ 'kye' : 'きぇ',
+ 'kyo' : 'きょ',
+ 'kwa' : 'くぁ',
+ 'kwi' : 'くぃ', ##2
+ 'kwu' : 'くぅ', ##2
+ 'kwe' : 'くぇ', ##2
+ 'kwo' : 'くぉ', ##2
+ 'gya' : 'ぎゃ',
+ 'gyi' : 'ぎぃ',
+ 'gyu' : 'ぎゅ',
+ 'gye' : 'ぎぇ',
+ 'gyo' : 'ぎょ',
+ 'gwa' : 'ぐぁ',
+ 'gwi' : 'ぐぃ', ##2
+ 'gwu' : 'ぐぅ', ##2
+ 'gwe' : 'ぐぇ', ##2
+ 'gwo' : 'ぐぉ', ##2
+ 'sa' : 'さ',
+ 'si' : 'し',
+ 'su' : 'す',
+ 'se' : 'せ',
+ 'so' : 'そ',
+ 'za' : 'ざ',
+ 'zi' : 'じ',
+ 'zu' : 'ず',
+ 'ze' : 'ぜ',
+ 'zo' : 'ぞ',
+ 'sya' : 'しゃ',
+ 'syi' : 'しぃ',
+ 'syu' : 'しゅ',
+ 'sye' : 'しぇ',
+ 'syo' : 'しょ',
+ 'sha' : 'しゃ',
+ 'shi' : 'し',
+ 'shu' : 'しゅ',
+ 'she' : 'しぇ',
+ 'sho' : 'しょ',
+ 'zya' : 'じゃ',
+ 'zyi' : 'じぃ',
+ 'zyu' : 'じゅ',
+ 'zye' : 'じぇ',
+ 'zyo' : 'じょ',
+ 'ja' : 'じゃ',
+ 'jya' : 'じゃ',
+ 'ji' : 'じ',
+ 'jyi' : 'じぃ',
+ 'ju' : 'じゅ',
+ 'jyu' : 'じゅ',
+ 'je' : 'じぇ',
+ 'jye' : 'じぇ',
+ 'jo' : 'じょ',
+ 'jyo' : 'じょ',
+ 'swi' : 'すぅぃ', ##2
+ 'swe' : 'すぇ', ##2
+ 'zwe' : 'ずぇ', ##2
+ 'ta' : 'た',
+ 'ti' : 'ち',
+ 'tu' : 'つ',
+ 'tsu' : 'つ',
+ 'te' : 'て',
+ 'to' : 'と',
+ 'da' : 'だ',
+ 'di' : 'ぢ',
+ 'du' : 'づ',
+ 'de' : 'で',
+ 'do' : 'ど',
+ 'xtu' : 'っ',
+ 'xtsu' : 'っ',
+ 'ltu' : 'っ',
+ 'ltsu' : 'っ',
+ 'tya' : 'ちゃ',
+ 'tyi' : 'ちぃ',
+ 'tyu' : 'ちゅ',
+ 'tye' : 'ちぇ',
+ 'tyo' : 'ちょ',
+ 'cya' : 'ちゃ',
+ 'cyi' : 'ちぃ',
+ 'cyu' : 'ちゅ',
+ 'cye' : 'ちぇ',
+ 'cyo' : 'ちょ',
+ 'cha' : 'ちゃ',
+ 'chi' : 'ち',
+ 'chu' : 'ちゅ',
+ 'che' : 'ちぇ',
+ 'cho' : 'ちょ',
+ 'dya' : 'ぢゃ',
+ 'dyi' : 'ぢぃ',
+ 'dyu' : 'ぢゅ',
+ 'dye' : 'ぢぇ',
+ 'dyo' : 'ぢょ',
+ 'tsa' : 'つぁ',
+ 'tsi' : 'つぃ',
+ 'tse' : 'つぇ',
+ 'tso' : 'つぉ',
+ 'tsya' : 'つゃ', ##3
+ 'tsyu' : 'つゅ', ##3
+ 'tsye' : 'つぃぇ', ##3
+ 'tsyo' : 'つょ', ##3
+ 'dza' : 'づぁ', ##3
+ 'dzi' : 'づぃ', ##3
+ 'dze' : 'づぇ', ##3
+ 'dzo' : 'づぉ', ##3
+ 'dzya' : 'づゃ', ##3
+ 'dzyu' : 'づゅ', ##3
+ 'dzye' : 'づぃぇ', ##3
+ 'dzyo' : 'づょ', ##3
+ 'tha' : 'てゃ',
+ 'thi' : 'てぃ',
+ 'thu' : 'てゅ',
+ 'the' : 'てぇ',
+ 'tho' : 'てょ',
+ 'twu' : 'とぅ',
+ 'dha' : 'でゃ',
+ 'dhi' : 'でぃ',
+ 'dhu' : 'でゅ',
+ 'dhe' : 'でぇ',
+ 'dho' : 'でょ',
+ 'dwu' : 'どぅ',
+ 'na' : 'な',
+ 'ni' : 'に',
+ 'nu' : 'ぬ',
+ 'ne' : 'ね',
+ 'no' : 'の',
+ 'nya' : 'にゃ',
+ 'nyi' : 'にぃ',
+ 'nyu' : 'にゅ',
+ 'nye' : 'にぇ',
+ 'nyo' : 'にょ',
+ 'ha' : 'は',
+ 'hi' : 'ひ',
+ 'hu' : 'ふ',
+ 'he' : 'へ',
+ 'ho' : 'ほ',
+ 'ba' : 'ば',
+ 'bi' : 'び',
+ 'bu' : 'ぶ',
+ 'be' : 'べ',
+ 'bo' : 'ぼ',
+ 'pa' : 'ぱ',
+ 'pi' : 'ぴ',
+ 'pu' : 'ぷ',
+ 'pe' : 'ぺ',
+ 'po' : 'ぽ',
+ 'hya' : 'ひゃ',
+ 'hyi' : 'ひぃ',
+ 'hyu' : 'ひゅ',
+ 'hye' : 'ひぇ',
+ 'hyo' : 'ひょ',
+ 'bya' : 'びゃ',
+ 'byi' : 'びぃ',
+ 'byu' : 'びゅ',
+ 'bye' : 'びぇ',
+ 'byo' : 'びょ',
+ 'pya' : 'ぴゃ',
+ 'pyi' : 'ぴぃ',
+ 'pyu' : 'ぴゅ',
+ 'pye' : 'ぴぇ',
+ 'pyo' : 'ぴょ',
+ 'fa' : 'ふぁ',
+ 'fi' : 'ふぃ',
+ 'fu' : 'ふ',
+ 'fe' : 'ふぇ',
+ 'fo' : 'ふぉ',
+ 'fya' : 'ふゃ',
+ 'fyi' : 'ふぃ',
+ 'fyu' : 'ふゅ',
+ 'fye' : 'ふぇ',
+ 'fyo' : 'ふょ',
+ 'bwa' : 'ぶぁ', ##2
+ 'bwe' : 'ぶぇ', ##2
+ 'bwo' : 'ぶぉ', ##2
+ 'pwa' : 'ぷぁ', ##2
+ 'pwe' : 'ぷぇ', ##2
+ 'pwo' : 'ぷぉ', ##2
+ 'ma' : 'ま',
+ 'mi' : 'み',
+ 'mu' : 'む',
+ 'me' : 'め',
+ 'mo' : 'も',
+ 'mya' : 'みゃ',
+ 'myi' : 'みぃ',
+ 'myu' : 'みゅ',
+ 'mye' : 'みぇ',
+ 'myo' : 'みょ',
+ 'ya' : 'や',
+ 'yi' : 'い',
+ 'yu' : 'ゆ',
+ 'ye' : 'いぇ',
+ 'yo' : 'よ',
+ 'lya' : 'ゃ',
+ 'lyi' : 'ぃ',
+ 'lyu' : 'ゅ',
+ 'lye' : 'ぇ',
+ 'lyo' : 'ょ',
+ 'xya' : 'ゃ',
+ 'xyi' : 'ぃ',
+ 'xyu' : 'ゅ',
+ 'xye' : 'ぇ',
+ 'xyo' : 'ょ',
+ 'ra' : 'ら',
+ 'ri' : 'り',
+ 'ru' : 'る',
+ 're' : 'れ',
+ 'ro' : 'ろ',
+ 'rya' : 'りゃ',
+ 'ryi' : 'りぃ',
+ 'ryu' : 'りゅ',
+ 'rye' : 'りぇ',
+ 'ryo' : 'りょ',
+ 'wa' : 'わ',
+ 'wi' : 'うぃ',
+ 'wu' : 'う',
+ 'we' : 'うぇ',
+ 'wo' : 'を',
+ 'lwa' : 'ゎ',
+ 'xwa' : 'ゎ',
+ 'n\'' : 'ん',
+ 'nn' : 'ん',
+ 'wyi' : 'ゐ',
+ 'wye' : 'ゑ',
},
'kana_typing_rule': {
@@ -547,114 +540,114 @@ _config = {
'kana_typing_rule/default': {
# no modifiers keys
- "1" : "ぬ",
- "2" : "ふ",
- "3" : "あ",
- "4" : "う",
- "5" : "え",
- "6" : "お",
- "7" : "や",
- "8" : "ゆ",
- "9" : "よ",
- "0" : "わ",
- "-" : "ほ",
- "^" : "へ",
-
- "q" : "た",
- "w" : "て",
- "e" : "い",
- "r" : "す",
- "t" : "か",
- "y" : "ん",
- "u" : "な",
- "i" : "に",
- "o" : "ら",
- "p" : "せ",
- "@" : "゛",
- "[" : "゜",
-
- "a" : "ち",
- "s" : "と",
- "d" : "し",
- "f" : "は",
- "g" : "き",
- "h" : "く",
- "j" : "ま",
- "k" : "の",
- "l" : "り",
- ";" : "れ",
- ":" : "け",
- "]" : "む",
-
- "z" : "つ",
- "x" : "さ",
- "c" : "そ",
- "v" : "ひ",
- "b" : "こ",
- "n" : "み",
- "m" : "も",
- "," : "ね",
- "." : "る",
- "/" : "め",
- # "\\" : "ー",
- "\\" : "ろ",
+ '1' : 'ぬ',
+ '2' : 'ふ',
+ '3' : 'あ',
+ '4' : 'う',
+ '5' : 'え',
+ '6' : 'お',
+ '7' : 'や',
+ '8' : 'ゆ',
+ '9' : 'よ',
+ '0' : 'わ',
+ '-' : 'ほ',
+ '^' : 'へ',
+
+ 'q' : 'た',
+ 'w' : 'て',
+ 'e' : 'い',
+ 'r' : 'す',
+ 't' : 'か',
+ 'y' : 'ん',
+ 'u' : 'な',
+ 'i' : 'に',
+ 'o' : 'ら',
+ 'p' : 'せ',
+ '@' : '゛',
+ '[' : '゜',
+
+ 'a' : 'ち',
+ 's' : 'と',
+ 'd' : 'し',
+ 'f' : 'は',
+ 'g' : 'き',
+ 'h' : 'く',
+ 'j' : 'ま',
+ 'k' : 'の',
+ 'l' : 'り',
+ ';' : 'れ',
+ ':' : 'け',
+ ']' : 'む',
+
+ 'z' : 'つ',
+ 'x' : 'さ',
+ 'c' : 'そ',
+ 'v' : 'ひ',
+ 'b' : 'こ',
+ 'n' : 'み',
+ 'm' : 'も',
+ ',' : 'ね',
+ '.' : 'る',
+ '/' : 'め',
+ # '\\' : 'ー',
+ '\\' : 'ろ',
# shift modifiered keys
- "!" : "ぬ",
- "\"" : "ふ",
- "#" : "ぁ",
- "$" : "ぅ",
- "%" : "ぇ",
- "&" : "ぉ",
- "'" : "ゃ",
- "(" : "ゅ",
- ")" : "ょ",
- "~" : "を",
- "=" : "ほ",
- "|" : "ー",
-
- "Q" : "た",
- "W" : "て",
- "E" : "ぃ",
- "R" : "す",
- "T" : "ヵ",
- "Y" : "ん",
- "U" : "な",
- "I" : "に",
- "O" : "ら",
- "P" : "せ",
- "`" : "゛",
-
- "{" : "「",
-
- "A" : "ち",
- "S" : "と",
- "D" : "し",
- "F" : "ゎ",
- "G" : "き",
- "H" : "く",
- "J" : "ま",
- "K" : "の",
- "L" : "り",
- "+" : "れ",
- "*" : "ヶ",
-
- "}" : "」",
-
- "Z" : "っ",
- "X" : "さ",
- "C" : "そ",
- "V" : "ゐ",
- "B" : "こ",
- "M" : "も",
- "N" : "み",
- "<" : "、",
- ">" : "。",
-
- "?" : "・",
- "_" : "ろ",
-
- "¥" : "ー",
+ '!' : 'ぬ',
+ '"' : 'ふ',
+ '#' : 'ぁ',
+ '$' : 'ぅ',
+ '%' : 'ぇ',
+ '&' : 'ぉ',
+ '\'' : 'ゃ',
+ '(' : 'ゅ',
+ ')' : 'ょ',
+ '~' : 'を',
+ '=' : 'ほ',
+ '|' : 'ー',
+
+ 'Q' : 'た',
+ 'W' : 'て',
+ 'E' : 'ぃ',
+ 'R' : 'す',
+ 'T' : 'ヵ',
+ 'Y' : 'ん',
+ 'U' : 'な',
+ 'I' : 'に',
+ 'O' : 'ら',
+ 'P' : 'せ',
+ '`' : '゛',
+
+ '{' : '「',
+
+ 'A' : 'ち',
+ 'S' : 'と',
+ 'D' : 'し',
+ 'F' : 'ゎ',
+ 'G' : 'き',
+ 'H' : 'く',
+ 'J' : 'ま',
+ 'K' : 'の',
+ 'L' : 'り',
+ '+' : 'れ',
+ '*' : 'ヶ',
+
+ '}' : '」',
+
+ 'Z' : 'っ',
+ 'X' : 'さ',
+ 'C' : 'そ',
+ 'V' : 'ゐ',
+ 'B' : 'こ',
+ 'M' : 'も',
+ 'N' : 'み',
+ '<' : '、',
+ '>' : '。',
+
+ '?' : '・',
+ '_' : 'ろ',
+
+ '¥' : 'ー',
},
'thumb': {
diff --git a/setup/main.py b/setup/main.py
index 965bb49..32dac34 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -20,12 +20,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-from os import environ, getenv, getuid, path
-import os
-import gtk
-import pango
-from gtk import glade
-from ibus import keysyms, modifier, Bus
+from os import environ, getuid, path
+import os, sys
from gettext import dgettext, bindtextdomain
try:
@@ -33,13 +29,18 @@ try:
except:
pass
-from anthyprefs import AnthyPrefs
+from gi.repository import Gtk
+from gi.repository import Gdk
+from gi.repository import Pango
+from gi.repository import IBus
+import _config as config
+from anthyprefs import AnthyPrefs
_ = lambda a : dgettext('ibus-anthy', a)
def l_to_s(l):
- return str(sorted([str(s) for s in l])).replace("'", '')
+ return str(sorted([str(s) for s in l])).replace('\'', '')
def s_to_l(s):
return [] if s == '[]' else s[1:-1].replace(' ', '').split(',')
@@ -47,28 +48,34 @@ def s_to_l(s):
class AnthySetup(object):
def __init__(self):
- self.__config = Bus().get_config()
+ bindtextdomain('ibus-anthy', config.LOCALEDIR)
+ builder_file = path.join(path.dirname(__file__), 'setup.ui')
+ self.__builder = builder = Gtk.Builder()
+ builder.set_translation_domain('ibus-anthy')
+ builder.add_from_file(builder_file)
+
+ if IBus.get_address() == None:
+ builder.connect_signals(self)
+ # self.__run_message_dialog needs self.__builder.
+ self.__run_message_dialog(_("ibus is not running."),
+ Gtk.MessageType.ERROR)
+ return
+
+ self.__config = IBus.Bus().get_config()
self.__thumb_kb_layout_mode = None
self.__thumb_kb_layout = None
self.__japanese_ordered_dict = {}
self.prefs = prefs = AnthyPrefs(None, self.__config)
- localedir = getenv("IBUS_LOCALEDIR")
- bindtextdomain("ibus-anthy", localedir)
- glade.bindtextdomain("ibus-anthy", localedir)
- glade.textdomain("ibus-anthy")
- 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
+ # 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")
+ 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)
+ builder.get_object('main').set_icon_from_file(icon_path)
for name in ['input_mode', 'typing_method', 'conversion_segment_mode',
'period_style', 'symbol_style', 'ten_key_mode',
@@ -77,80 +84,80 @@ class AnthySetup(object):
'thumb:keyboard_layout_mode', 'thumb:keyboard_layout',
'thumb:fmv_extension', 'thumb:handakuten']:
section, key = self.__get_section_key(name)
- xml.get_widget(name).set_active(prefs.get_value(section, key))
+ builder.get_object(name).set_active(prefs.get_value(section, key))
l = ['default', 'atok', 'wnn']
s_type = prefs.get_value('common', 'shortcut_type')
s_type = s_type if s_type in l else 'default'
- xml.get_widget('shortcut_type').set_active(l.index(s_type))
+ builder.get_object('shortcut_type').set_active(l.index(s_type))
- xml.get_widget('page_size').set_value(prefs.get_value('common',
- 'page_size'))
+ builder.get_object('page_size').set_value(prefs.get_value('common',
+ 'page_size'))
- tv = xml.get_widget('shortcut')
- tv.append_column(gtk.TreeViewColumn(_("Command"),
- gtk.CellRendererText(), text=0))
- renderer = gtk.CellRendererText()
- renderer.set_property("ellipsize", pango.ELLIPSIZE_END)
- tv.append_column(gtk.TreeViewColumn(_("Shortcut"),
+ tv = builder.get_object('shortcut')
+ tv.append_column(Gtk.TreeViewColumn(_("Command"),
+ Gtk.CellRendererText(), text=0))
+ renderer = Gtk.CellRendererText()
+ renderer.set_property('ellipsize', Pango.EllipsizeMode.END)
+ tv.append_column(Gtk.TreeViewColumn(_("Shortcut"),
renderer, text=1))
tv.get_selection().connect_after('changed',
self.on_selection_changed, 0)
- ls = gtk.ListStore(str, str)
+ ls = Gtk.ListStore(str, str)
sec = 'shortcut/' + s_type
for k in self.prefs.keys(sec):
ls.append([k, l_to_s(self.prefs.get_value(sec, k))])
tv.set_model(ls)
- self.__thumb_kb_layout_mode = xml.get_widget('thumb:keyboard_layout_mode')
- self.__thumb_kb_layout = xml.get_widget('thumb:keyboard_layout')
+ self.__thumb_kb_layout_mode = builder.get_object('thumb:keyboard_layout_mode')
+ self.__thumb_kb_layout = builder.get_object('thumb:keyboard_layout')
self.__set_thumb_kb_label()
for name in ['thumb:ls', 'thumb:rs']:
section, key = self.__get_section_key(name)
- xml.get_widget(name).set_text(prefs.get_value(section, key))
+ builder.get_object(name).set_text(prefs.get_value(section, key))
- tv = xml.get_widget('treeview2')
- tv.append_column(gtk.TreeViewColumn('', gtk.CellRendererText(), text=0))
+ tv = builder.get_object('treeview2')
+ tv.append_column(Gtk.TreeViewColumn('', Gtk.CellRendererText(), text=0))
tv.get_selection().connect_after('changed',
self.on_selection_changed, 1)
- tv.set_model(gtk.ListStore(str))
+ tv.set_model(Gtk.ListStore(str))
key = 'dict_admin_command'
cli = self.__get_dict_cli_from_list(prefs.get_value('common', key))
name = 'dict:entry_edit_dict_command'
- xml.get_widget(name).set_text(cli)
+ builder.get_object(name).set_text(cli)
key = 'add_word_command'
cli = self.__get_dict_cli_from_list(prefs.get_value('common', key))
name = 'dict:entry_add_word_command'
- xml.get_widget(name).set_text(cli)
+ builder.get_object(name).set_text(cli)
- tv = xml.get_widget('dict:view')
+ tv = builder.get_object('dict:view')
- column = gtk.TreeViewColumn((" "))
- renderer = gtk.CellRendererText()
+ column = Gtk.TreeViewColumn((' '))
+ renderer = Gtk.CellRendererText()
column.pack_start(renderer, False)
column.set_cell_data_func(renderer, self.__text_cell_data_cb, 1)
tv.append_column(column)
- column = gtk.TreeViewColumn(_("Description"))
- renderer = gtk.CellRendererText()
+ column = Gtk.TreeViewColumn(_("Description"))
+ renderer = Gtk.CellRendererText()
column.pack_start(renderer, False)
column.set_cell_data_func(renderer, self.__text_cell_data_cb, 2)
- column.set_max_width(300)
+ column.set_expand(True)
tv.append_column(column)
# Translators: "Embd" means a short word of 'embedded'.
- column = gtk.TreeViewColumn(_("Embd"))
- renderer = gtk.CellRendererToggle()
+ column = Gtk.TreeViewColumn(_("Embd"))
+ renderer = Gtk.CellRendererToggle()
renderer.set_radio(False)
column.pack_start(renderer, False)
column.set_cell_data_func(renderer, self.__toggle_cell_data_cb, 3)
tv.append_column(column)
# Translators: "Sgl" means a short word of 'single'.
- column = gtk.TreeViewColumn(_("Sgl"))
- renderer = gtk.CellRendererToggle()
+ column = Gtk.TreeViewColumn(_("Sgl"))
+ renderer = Gtk.CellRendererToggle()
renderer.set_radio(False)
column.pack_start(renderer, False)
column.set_cell_data_func(renderer, self.__toggle_cell_data_cb, 4)
@@ -159,22 +166,22 @@ class AnthySetup(object):
'''
Unfortunatelly reverse conversion is too slow.
# Translators: "Rev" means a short word of 'reverse'.
- column = gtk.TreeViewColumn(_("Rev"))
- renderer = gtk.CellRendererToggle()
+ column = Gtk.TreeViewColumn(_("Rev"))
+ renderer = Gtk.CellRendererToggle()
renderer.set_radio(False)
column.pack_start(renderer, False)
column.set_cell_data_func(renderer, self.__toggle_cell_data_cb, 5)
tv.append_column(column)
'''
- ls = gtk.ListStore(str, str, str, bool, bool, bool)
+ ls = Gtk.ListStore(str, str, str, bool, bool, bool)
tv.set_model(ls)
self.__append_dicts_in_model()
self.__init_japanese_sort()
self.__init_about_vbox(icon_path)
- xml.signal_autoconnect(self)
+ builder.connect_signals(self)
def __init_japanese_sort(self):
japanese_ordered_dict = {}
@@ -184,12 +191,12 @@ class AnthySetup(object):
self.__japanese_ordered_dict = japanese_ordered_dict;
def __init_about_vbox(self, icon_path):
- about_dialog = self.xml.get_widget("about_dialog")
- about_vbox = self.xml.get_widget("about_vbox")
+ about_dialog = self.__builder.get_object('about_dialog')
+ about_vbox = self.__builder.get_object('about_vbox')
about_dialog.set_version(self.prefs.get_version())
try:
- if getpreferredencoding().lower() == "utf-8":
+ if getpreferredencoding().lower() == 'utf-8':
copyright = about_dialog.get_copyright()
copyright = copyright.replace('(c)', '\xc2\xa9')
copyright = copyright.replace('-', '\xe2\x80\x93')
@@ -197,16 +204,15 @@ class AnthySetup(object):
except:
pass
if icon_path != None:
- image = gtk.image_new_from_file(icon_path)
+ image = Gtk.Image.new_from_file(icon_path)
about_dialog.set_logo(image.get_pixbuf())
content_area = about_dialog.get_content_area()
list = content_area.get_children()
vbox = list[0]
for w in vbox.get_children():
- old_parent = w.parent
+ old_parent = w.props.parent
w.unparent()
- w.set_parent_window(None)
- w.emit("parent-set", old_parent)
+ w.emit('parent-set', old_parent)
about_vbox.pack_start(w, False, False, 0)
def __get_userhome(self):
@@ -228,12 +234,11 @@ class AnthySetup(object):
key = name
return (section, key)
- def __run_message_dialog(self, message, type=gtk.MESSAGE_INFO):
- label = gtk.Label(message)
- dlg = gtk.MessageDialog(parent=self.xml.get_widget('main'),
- flags='modal',
- type=type,
- buttons=gtk.BUTTONS_OK,
+ def __run_message_dialog(self, message, type=Gtk.MessageType.INFO):
+ dlg = Gtk.MessageDialog(parent=self.__builder.get_object('main'),
+ flags=Gtk.DialogFlags.MODAL,
+ message_type=type,
+ buttons=Gtk.ButtonsType.OK,
message_format=message)
dlg.run()
dlg.destroy()
@@ -260,70 +265,70 @@ class AnthySetup(object):
def __get_romaji_treeview_custom_key_table(self, method):
prefs = self.prefs
rule = {}
- ls = gtk.ListStore(str, str, str)
- tv = self.xml.get_widget('treeview_custom_key_table')
+ ls = Gtk.ListStore(str, str, str)
+ tv = self.__builder.get_object('treeview_custom_key_table')
section_base = 'romaji_typing_rule'
- section = section_base + '/' + str(method)
+ section = section_base + '/' + prefs.str(method)
for key in prefs.keys(section):
- key = str(key)
+ key = prefs.str(key)
value = prefs.get_value(section, key)
# config.set_value(key, None) is not supported.
if value != None and value != '':
- rule[key] = str(value)
+ rule[key] = prefs.str(value)
for key in prefs.get_value(section_base, 'newkeys'):
- key = str(key)
+ key = prefs.str(key)
value = self.prefs.get_value_direct(section, key)
# config.set_value(key, None) is not supported.
if value != None and value != '':
- rule[key] = str(value)
+ rule[key] = prefs.str(value)
for key, value in sorted(rule.items(), \
cmp = self.__japanese_tuple_sort):
ls.append(['romaji', key, value])
- tv.append_column(gtk.TreeViewColumn(_(_("Input Chars")),
- gtk.CellRendererText(), text=1))
- tv.append_column(gtk.TreeViewColumn(_(_("Output Chars")),
- gtk.CellRendererText(), text=2))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Input Chars")),
+ Gtk.CellRendererText(), text=1))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Output Chars")),
+ Gtk.CellRendererText(), text=2))
tv.set_model(ls)
return tv
def __get_kana_treeview_custom_key_table(self, method):
prefs = self.prefs
rule = {}
- ls = gtk.ListStore(str, str, str)
- tv = self.xml.get_widget('treeview_custom_key_table')
+ ls = Gtk.ListStore(str, str, str)
+ tv = self.__builder.get_object('treeview_custom_key_table')
section_base = 'kana_typing_rule'
- section = section_base + '/' + str(method)
+ section = section_base + '/' + prefs.str(method)
for key in prefs.keys(section):
- key = str(key)
+ key = prefs.str(key)
value = prefs.get_value(section, key)
# config.set_value(key, None) is not supported.
if value != None and value != '':
- rule[key] = str(value)
+ rule[key] = prefs.str(value)
for key in prefs.get_value(section_base, 'newkeys'):
- key = str(key)
+ key = prefs.str(key)
value = self.prefs.get_value_direct(section, key)
# config.set_value(key, None) is not supported.
if value != None and value != '':
- rule[key] = str(value)
+ rule[key] = prefs.str(value)
for key, value in sorted(rule.items(), \
cmp = self.__japanese_tuple_sort):
ls.append(['kana', key, value])
- tv.append_column(gtk.TreeViewColumn(_(_("Input Chars")),
- gtk.CellRendererText(), text=1))
- tv.append_column(gtk.TreeViewColumn(_(_("Output Chars")),
- gtk.CellRendererText(), text=2))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Input Chars")),
+ Gtk.CellRendererText(), text=1))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Output Chars")),
+ Gtk.CellRendererText(), text=2))
tv.set_model(ls)
return tv
def __get_thumb_treeview_custom_key_table(self, method):
prefs = self.prefs
rule = {}
- ls = gtk.ListStore(str, str, str, str, str)
- tv = self.xml.get_widget('treeview_custom_key_table')
+ ls = Gtk.ListStore(str, str, str, str, str)
+ tv = self.__builder.get_object('treeview_custom_key_table')
section_base = 'thumb_typing_rule'
- section = section_base + '/' + str(method)
+ section = section_base + '/' + prefs.str(method)
for key in prefs.keys(section):
- key = str(key)
+ key = prefs.str(key)
value = prefs.get_value(section, key)
# config.set_value(key, None) is not supported.
if value != None and len(value) == 3 and \
@@ -331,11 +336,11 @@ class AnthySetup(object):
(value[1] != None and value[1] != '') or \
(value[2] != None and value[2] != '')):
rule[key] = {}
- rule[key][0] = str(value[0])
- rule[key][1] = str(value[1])
- rule[key][2] = str(value[2])
+ rule[key][0] = prefs.str(value[0])
+ rule[key][1] = prefs.str(value[1])
+ rule[key][2] = prefs.str(value[2])
for key in prefs.get_value(section_base, 'newkeys'):
- key = str(key)
+ key = prefs.str(key)
value = self.prefs.get_value_direct(section, key)
# config.set_value(key, None) is not supported.
if value != None and len(value) == 3 and \
@@ -343,30 +348,30 @@ class AnthySetup(object):
(value[1] != None and value[1] != '') or \
(value[2] != None and value[2] != '')):
rule[key] = {}
- rule[key][0] = str(value[0])
- rule[key][1] = str(value[1])
- rule[key][2] = str(value[2])
+ rule[key][0] = prefs.str(value[0])
+ rule[key][1] = prefs.str(value[1])
+ rule[key][2] = prefs.str(value[2])
for key, value in sorted(rule.items(), \
cmp = self.__japanese_thumb_sort):
ls.append(['thumb', key, value[0], value[2], value[1]])
- tv.append_column(gtk.TreeViewColumn(_(_("Input")),
- gtk.CellRendererText(), text=1))
- tv.append_column(gtk.TreeViewColumn(_(_("Single")),
- gtk.CellRendererText(), text=2))
- tv.append_column(gtk.TreeViewColumn(_(_("Left")),
- gtk.CellRendererText(), text=3))
- tv.append_column(gtk.TreeViewColumn(_(_("Right")),
- gtk.CellRendererText(), text=4))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Input")),
+ Gtk.CellRendererText(), text=1))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Single")),
+ Gtk.CellRendererText(), text=2))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Left")),
+ Gtk.CellRendererText(), text=3))
+ tv.append_column(Gtk.TreeViewColumn(_(_("Right")),
+ Gtk.CellRendererText(), text=4))
tv.set_model(ls)
return tv
def __show_dialog_custom_key_table_extention(self, mode):
- hbox_combo = self.xml.get_widget('hbox_for_combobox_custom_key_table')
- label_left = self.xml.get_widget('label_left_thumb_shift_custom_key')
- entry_left = self.xml.get_widget('entry_left_thumb_shift_custom_key')
- label_right = self.xml.get_widget('label_right_thumb_shift_custom_key')
- entry_right = self.xml.get_widget('entry_right_thumb_shift_custom_key')
- if mode == "thumb":
+ hbox_combo = self.__builder.get_object('hbox_for_combobox_custom_key_table')
+ label_left = self.__builder.get_object('label_left_thumb_shift_custom_key')
+ entry_left = self.__builder.get_object('entry_left_thumb_shift_custom_key')
+ label_right = self.__builder.get_object('label_right_thumb_shift_custom_key')
+ entry_right = self.__builder.get_object('entry_right_thumb_shift_custom_key')
+ if mode == 'thumb':
hbox_combo.show()
label_left.show()
entry_left.show()
@@ -380,104 +385,104 @@ class AnthySetup(object):
entry_right.hide()
def __connect_dialog_custom_key_table_buttons(self, mode):
- tv = self.xml.get_widget('treeview_custom_key_table')
+ tv = self.__builder.get_object('treeview_custom_key_table')
tv.get_selection().connect_after('changed',
self.on_selection_custom_key_table_changed, 0)
- entry = self.xml.get_widget('entry_input_custom_key')
+ entry = self.__builder.get_object('entry_input_custom_key')
entry.connect('changed', self.on_entry_custom_key_changed, mode)
- entry = self.xml.get_widget('entry_output_custom_key')
+ entry = self.__builder.get_object('entry_output_custom_key')
entry.connect('changed', self.on_entry_custom_key_changed, mode)
- entry = self.xml.get_widget('entry_left_thumb_shift_custom_key')
+ entry = self.__builder.get_object('entry_left_thumb_shift_custom_key')
entry.connect('changed', self.on_entry_custom_key_changed, mode)
- entry = self.xml.get_widget('entry_right_thumb_shift_custom_key')
+ entry = self.__builder.get_object('entry_right_thumb_shift_custom_key')
entry.connect('changed', self.on_entry_custom_key_changed, mode)
- button = self.xml.get_widget('button_add_custom_key')
+ button = self.__builder.get_object('button_add_custom_key')
button.set_sensitive(False)
button.connect('clicked', self.on_btn_add_custom_key, mode)
- button = self.xml.get_widget('button_remove_custom_key')
+ button = self.__builder.get_object('button_remove_custom_key')
button.set_sensitive(False)
button.connect('clicked', self.on_btn_remove_custom_key, tv)
def __disconnect_dialog_custom_key_table_buttons(self):
- tv = self.xml.get_widget('treeview_custom_key_table')
- combobox = self.xml.get_widget('combobox_custom_key_table')
+ tv = self.__builder.get_object('treeview_custom_key_table')
+ combobox = self.__builder.get_object('combobox_custom_key_table')
if tv != None:
for column in tv.get_columns():
tv.remove_column(column)
for child in tv.get_children():
tv.remove(child)
- entry = self.xml.get_widget('entry_input_custom_key')
+ entry = self.__builder.get_object('entry_input_custom_key')
entry.disconnect_by_func(self.on_entry_custom_key_changed)
entry.set_text('')
- entry = self.xml.get_widget('entry_output_custom_key')
+ entry = self.__builder.get_object('entry_output_custom_key')
entry.disconnect_by_func(self.on_entry_custom_key_changed)
entry.set_text('')
- entry = self.xml.get_widget('entry_left_thumb_shift_custom_key')
+ entry = self.__builder.get_object('entry_left_thumb_shift_custom_key')
entry.disconnect_by_func(self.on_entry_custom_key_changed)
- entry = self.xml.get_widget('entry_right_thumb_shift_custom_key')
+ entry = self.__builder.get_object('entry_right_thumb_shift_custom_key')
entry.disconnect_by_func(self.on_entry_custom_key_changed)
- button = self.xml.get_widget('button_add_custom_key')
+ button = self.__builder.get_object('button_add_custom_key')
button.disconnect_by_func(self.on_btn_add_custom_key)
- button = self.xml.get_widget('button_remove_custom_key')
+ button = self.__builder.get_object('button_remove_custom_key')
button.disconnect_by_func(self.on_btn_remove_custom_key)
combobox.clear()
combobox.disconnect_by_func(self.on_cb_custom_key_table_changed)
def __run_dialog_custom_key_table(self, mode):
prefs = self.prefs
- dlg = self.xml.get_widget('dialog_custom_key_table')
- label = self.xml.get_widget('label_custom_key_table')
- label_output = self.xml.get_widget('label_output_custom_key')
+ dlg = self.__builder.get_object('dialog_custom_key_table')
+ label = self.__builder.get_object('label_custom_key_table')
+ label_output = self.__builder.get_object('label_output_custom_key')
list_labels = []
- if mode == "romaji":
+ if mode == 'romaji':
dlg.set_title(_("Customize Romaji Key Table"))
label.set_label(_("_Romaji Key Table:"))
label_output.set_label(_("_Output Chars"))
- list_labels = [["default", _("Default")]]
+ list_labels = [['default', _("Default")]]
self.__show_dialog_custom_key_table_extention(mode)
- elif mode == "kana":
+ elif mode == 'kana':
dlg.set_title(_("Customize Kana Key Table"))
label.set_label(_("_Kana Key Table:"))
label_output.set_label(_("_Output Chars"))
- list_labels = [["default", _("Default")]]
+ list_labels = [['default', _("Default")]]
self.__show_dialog_custom_key_table_extention(mode)
- elif mode == "thumb":
+ elif mode == 'thumb':
dlg.set_title(_("Customize Thumb Shift Key Table"))
label.set_label(_("_Thumb Shift Key Table:"))
label_output.set_label(_("Single _Output Chars"))
- list_labels = [["base", _("Base")],
- ["nicola_j_table", _("NICOLA-J key extension")],
- ["nicola_a_table", _("NICOLA-A key extension")],
- ["nicola_f_table", _("NICOLA-F key extension")],
- ["kb231_j_fmv_table", _("FMV KB231-J key extension")],
- ["kb231_a_fmv_table", _("FMV KB231-A key extension")],
- ["kb231_f_fmv_table", _("FMV KB231-F key extension")],
- ["kb611_j_fmv_table", _("FMV KB611-J key extension")],
- ["kb611_a_fmv_table", _("FMV KB611-A key extension")],
- ["kb611_f_fmv_table", _("FMV KB611-F key extension")],
+ list_labels = [['base', _("Base")],
+ ['nicola_j_table', _("NICOLA-J key extension")],
+ ['nicola_a_table', _("NICOLA-A key extension")],
+ ['nicola_f_table', _("NICOLA-F key extension")],
+ ['kb231_j_fmv_table', _("FMV KB231-J key extension")],
+ ['kb231_a_fmv_table', _("FMV KB231-A key extension")],
+ ['kb231_f_fmv_table', _("FMV KB231-F key extension")],
+ ['kb611_j_fmv_table', _("FMV KB611-J key extension")],
+ ['kb611_a_fmv_table', _("FMV KB611-A key extension")],
+ ['kb611_f_fmv_table', _("FMV KB611-F key extension")],
]
self.__show_dialog_custom_key_table_extention(mode)
- ls = gtk.ListStore(str, str)
+ ls = Gtk.ListStore(str, str)
for s in list_labels:
ls.append([s[1], s[0]])
- renderer = gtk.CellRendererText()
- combobox = self.xml.get_widget('combobox_custom_key_table')
+ renderer = Gtk.CellRendererText()
+ combobox = self.__builder.get_object('combobox_custom_key_table')
combobox.pack_start(renderer, True)
- combobox.add_attribute(renderer, "text", 0)
+ combobox.add_attribute(renderer, 'text', 0)
combobox.set_model(ls)
tv = None
- if mode == "romaji":
+ if mode == 'romaji':
method = prefs.get_value('romaji_typing_rule', 'method')
if method == None:
method = 'default'
tv = self.__get_romaji_treeview_custom_key_table(method)
- if mode == "kana":
+ if mode == 'kana':
method = prefs.get_value('kana_typing_rule', 'method')
if method == None:
method = 'default'
tv = self.__get_kana_treeview_custom_key_table(method)
- if mode == "thumb":
+ if mode == 'thumb':
method = prefs.get_value('thumb_typing_rule', 'method')
if method == None:
method = 'base'
@@ -485,7 +490,7 @@ class AnthySetup(object):
self.__connect_dialog_custom_key_table_buttons(mode)
combobox.set_active(0)
- combobox.connect("changed", self.on_cb_custom_key_table_changed, mode)
+ combobox.connect('changed', self.on_cb_custom_key_table_changed, mode)
id = dlg.run()
dlg.hide()
@@ -496,17 +501,23 @@ class AnthySetup(object):
if self.__thumb_kb_layout_mode == None or \
self.__thumb_kb_layout == None:
return
- section, key = self.__get_section_key(self.__thumb_kb_layout_mode.name)
+ section, key = self.__get_section_key(
+ Gtk.Buildable.get_name(self.__thumb_kb_layout_mode))
layout_mode = self.prefs.get_value(section, key)
if layout_mode:
self.__thumb_kb_layout.set_sensitive(False)
else:
self.__thumb_kb_layout.set_sensitive(True)
+ try:
+ use_system_keyboard = self.__config.get_value('general',
+ 'use_system_keyboard_layout').get_boolean()
+ except:
+ use_system_keyboard = True
if layout_mode and \
- not self.__config.get_value('general', 'use_system_keyboard_layout', True):
- self.xml.get_widget('thumb:warning_hbox').show()
+ not use_system_keyboard:
+ self.__builder.get_object('thumb:warning_hbox').show()
else:
- self.xml.get_widget('thumb:warning_hbox').hide()
+ self.__builder.get_object('thumb:warning_hbox').hide()
def __get_dict_cli_from_list(self, cli_list):
cli_str = cli_list[0]
@@ -566,9 +577,9 @@ class AnthySetup(object):
section = 'dict/file/' + id
# user value is dbus.String
prefs.set_value(section, 'short_label',
- str(prefs.get_value(section, 'short_label')))
+ prefs.str(prefs.get_value(section, 'short_label')))
prefs.set_value(section, 'long_label',
- str(prefs.get_value(section, 'long_label')))
+ prefs.str(prefs.get_value(section, 'long_label')))
short_label = prefs.get_value(section, 'short_label')
long_label = prefs.get_value(section, 'long_label')
embed = prefs.get_value(section, 'embed')
@@ -576,7 +587,7 @@ class AnthySetup(object):
reverse = prefs.get_value(section, 'reverse')
if is_gettext:
long_label = _(long_label)
- l = self.xml.get_widget('dict:view').get_model()
+ l = self.__builder.get_object('dict:view').get_model()
l.append([id, short_label, long_label, embed, single, reverse])
def __append_dicts_in_model(self):
@@ -604,61 +615,61 @@ class AnthySetup(object):
if new:
if file in files:
self.__run_message_dialog(_("Your choosed file has already been added: ") + file,
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
if not path.exists(file):
self.__run_message_dialog(_("Your choosed file does not exist: ") + file,
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
if path.isdir(file):
self.__run_message_dialog(_("Your choosed file is a directory: " + file),
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
- if file.startswith(self.__get_userhome() + "/.anthy"):
+ if file.startswith(self.__get_userhome() + '/.anthy'):
self.__run_message_dialog(_("You cannot add dictionaries in the anthy private directory: " + file),
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
if new:
id = self.__get_quoted_id(file)
- if id == None or id == "":
+ if id == None or id == '':
self.__run_message_dialog(_("Your file path is not good: ") + file,
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
- single = self.xml.get_widget('dict:single').get_active()
- embed = self.xml.get_widget('dict:embed').get_active()
- reverse = self.xml.get_widget('dict:reverse').get_active()
- short_label = self.xml.get_widget('dict:short_entry').get_text()
- if len(unicode(short_label, "utf-8")) > 1:
- short_label = unicode(short_label, "utf-8")[0].encode("utf-8")
- long_label = self.xml.get_widget('dict:long_entry').get_text()
+ single = self.__builder.get_object('dict:single').get_active()
+ embed = self.__builder.get_object('dict:embed').get_active()
+ reverse = self.__builder.get_object('dict:reverse').get_active()
+ short_label = self.__builder.get_object('dict:short_entry').get_text()
+ if len(unicode(short_label, 'utf-8')) > 1:
+ short_label = unicode(short_label, 'utf-8')[0].encode('utf-8')
+ long_label = self.__builder.get_object('dict:long_entry').get_text()
if new:
files.append(file)
self.prefs.set_value('dict', 'files', files)
- if short_label == None or short_label == "":
+ if short_label == None or short_label == '':
short_label = id[0]
- if long_label == None or long_label == "":
+ if long_label == None or long_label == '':
long_label = id
self.__update_dict_values(new, id, short_label, long_label, embed, single, reverse)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
files = []
def __init_dict_chooser_dialog(self):
- self.xml.get_widget('dict:single').set_active(True)
- self.xml.get_widget('dict:embed').set_active(False)
- self.xml.get_widget('dict:reverse').set_active(False)
- short_entry = self.xml.get_widget('dict:short_entry')
+ self.__builder.get_object('dict:single').set_active(True)
+ self.__builder.get_object('dict:embed').set_active(False)
+ self.__builder.get_object('dict:reverse').set_active(False)
+ short_entry = self.__builder.get_object('dict:short_entry')
short_entry.set_text('')
short_entry.set_editable(True)
- long_entry = self.xml.get_widget('dict:long_entry')
+ long_entry = self.__builder.get_object('dict:long_entry')
long_entry.set_text('')
long_entry.set_editable(True)
def __get_selected_dict_id(self):
- l, it = self.xml.get_widget('dict:view').get_selection().get_selected()
+ l, it = self.__builder.get_object('dict:view').get_selection().get_selected()
if not it:
return None
@@ -679,14 +690,14 @@ class AnthySetup(object):
single = prefs.get_value(section, 'single')
reverse = prefs.get_value(section, 'reverse')
- if len(unicode(short_label, "utf-8")) > 1:
- short_label = unicode(short_label, "utf-8")[0].encode("utf-8")
- self.xml.get_widget('dict:single').set_active(single)
- self.xml.get_widget('dict:embed').set_active(embed)
- self.xml.get_widget('dict:reverse').set_active(reverse)
- short_entry = self.xml.get_widget('dict:short_entry')
+ if len(prefs.unicode(short_label)) > 1:
+ short_label = prefs.unicode(short_label)[0].encode('utf-8')
+ self.__builder.get_object('dict:single').set_active(single)
+ self.__builder.get_object('dict:embed').set_active(embed)
+ self.__builder.get_object('dict:reverse').set_active(reverse)
+ short_entry = self.__builder.get_object('dict:short_entry')
short_entry.set_text(short_label)
- long_entry = self.xml.get_widget('dict:long_entry')
+ long_entry = self.__builder.get_object('dict:long_entry')
if is_system_dict:
short_entry.set_editable(False)
long_entry.set_text(_(long_label))
@@ -705,11 +716,11 @@ class AnthySetup(object):
prefs.fetch_item(section, 'short_label')
# user value is dbus.String
prefs.set_value(section, 'short_label',
- str(prefs.get_value(section, 'short_label')))
+ prefs.str(prefs.get_value(section, 'short_label')))
prefs.set_new_key(section, 'long_label')
prefs.fetch_item(section, 'long_label')
prefs.set_value(section, 'long_label',
- str(prefs.get_value(section, 'long_label')))
+ prefs.str(prefs.get_value(section, 'long_label')))
prefs.set_new_key(section, 'embed')
prefs.fetch_item(section, 'embed')
prefs.set_new_key(section, 'single')
@@ -731,10 +742,10 @@ class AnthySetup(object):
long_label = prefs.get_value(section, 'long_label')
if new:
- l = self.xml.get_widget('dict:view').get_model()
+ l = self.__builder.get_object('dict:view').get_model()
l.append([id, short_label, long_label, embed, single, reverse])
else:
- l, i = self.xml.get_widget('dict:view').get_selection().get_selected()
+ l, i = self.__builder.get_object('dict:view').get_selection().get_selected()
if i :
l[i] = [id, short_label, long_label, embed, single, reverse]
@@ -749,24 +760,24 @@ class AnthySetup(object):
key = 'reverse'
prefs.set_value(section, key, reverse)
- def __text_cell_data_cb(self, layout, renderer, model, iter, id):
- l = self.xml.get_widget('dict:view').get_model()
+ def __text_cell_data_cb(self, column, renderer, model, iter, id):
+ l = self.__builder.get_object('dict:view').get_model()
text = l.get_value(iter, id)
renderer.set_property('text', text)
- def __toggle_cell_data_cb(self, layout, renderer, model, iter, id):
- l = self.xml.get_widget('dict:view').get_model()
+ def __toggle_cell_data_cb(self, column, renderer, model, iter, id):
+ l = self.__builder.get_object('dict:view').get_model()
active = l.get_value(iter, id)
renderer.set_property('active', active)
def on_selection_changed(self, widget, id):
- set_sensitive = lambda a, b: self.xml.get_widget(a).set_sensitive(b)
+ set_sensitive = lambda a, b: self.__builder.get_object(a).set_sensitive(b)
flg = True if widget.get_selected()[1] else False
for name in [['btn_default', 'btn_edit'], ['button5', 'button6']][id]:
set_sensitive(name, flg)
def on_selection_custom_key_table_changed(self, widget, id):
- button = self.xml.get_widget('button_remove_custom_key')
+ button = self.__builder.get_object('button_remove_custom_key')
button.set_sensitive(True)
def on_main_delete(self, widget, event):
@@ -774,30 +785,32 @@ class AnthySetup(object):
return True
def on_btn_ok_clicked(self, widget):
- if self.xml.get_widget('btn_apply').state == gtk.STATE_INSENSITIVE:
- gtk.main_quit()
+ if self.__builder.get_object('btn_apply').get_state() == \
+ Gtk.StateType.INSENSITIVE:
+ Gtk.main_quit()
return True
- dlg = self.xml.get_widget('quit_check')
+ 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?'))
id = dlg.run()
dlg.hide()
- if id == gtk.RESPONSE_OK:
+ if id == Gtk.ResponseType.OK:
self.prefs.commit_all()
- gtk.main_quit()
+ Gtk.main_quit()
return True
def on_btn_cancel_clicked(self, widget):
- if self.xml.get_widget('btn_apply').state == gtk.STATE_INSENSITIVE:
- gtk.main_quit()
+ if self.__builder.get_object('btn_apply').get_state() == \
+ Gtk.StateType.INSENSITIVE:
+ Gtk.main_quit()
return True
- dlg = self.xml.get_widget('quit_check_without_save')
+ 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?'))
id = dlg.run()
dlg.hide()
- if id == gtk.RESPONSE_OK:
- gtk.main_quit()
+ if id == Gtk.ResponseType.OK:
+ Gtk.main_quit()
return True
def on_btn_apply_clicked(self, widget):
@@ -805,12 +818,12 @@ class AnthySetup(object):
widget.set_sensitive(False)
def on_cb_changed(self, widget):
- section, key = self.__get_section_key(widget.name)
+ section, key = self.__get_section_key(Gtk.Buildable.get_name(widget))
self.prefs.set_value(section, key, widget.get_active())
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_cb_custom_key_table_changed(self, widget, user_data):
- tv = self.xml.get_widget('treeview_custom_key_table')
+ tv = self.__builder.get_object('treeview_custom_key_table')
mode = user_data
id = widget.get_active()
model = widget.get_model()
@@ -828,64 +841,65 @@ class AnthySetup(object):
tv = self.__get_thumb_treeview_custom_key_table(method)
def on_sb_changed(self, widget):
- section, key = self.__get_section_key(widget.name)
+ section, key = self.__get_section_key(Gtk.Buildable.get_name(widget))
self.prefs.set_value(section, key, widget.get_value_as_int())
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_ck_toggled(self, widget):
- section, key = self.__get_section_key(widget.name)
+ section, key = self.__get_section_key(Gtk.Buildable.get_name(widget))
self.prefs.set_value(section, key, widget.get_active())
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
if self.__thumb_kb_layout_mode and \
- widget.name == self.__thumb_kb_layout_mode.name:
+ Gtk.Buildable.get_name(widget) == \
+ Gtk.Buildable.get_name(self.__thumb_kb_layout_mode):
self.__set_thumb_kb_label()
def on_btn_edit_clicked(self, widget):
- ls, it = self.xml.get_widget('shortcut').get_selection().get_selected()
- m = self.xml.get_widget('treeview2').get_model()
+ ls, it = self.__builder.get_object('shortcut').get_selection().get_selected()
+ m = self.__builder.get_object('treeview2').get_model()
m.clear()
for s in s_to_l(ls.get(it, 1)[0]):
m.append([s])
- self.xml.get_widget('entry2').set_text('')
+ self.__builder.get_object('entry2').set_text('')
for w in ['checkbutton6', 'checkbutton7', 'checkbutton8']:
- self.xml.get_widget(w).set_active(False)
- dlg = self.xml.get_widget('edit_shortcut')
+ self.__builder.get_object(w).set_active(False)
+ dlg = self.__builder.get_object('edit_shortcut')
id = dlg.run()
dlg.hide()
- if id == gtk.RESPONSE_OK:
+ if id == Gtk.ResponseType.OK:
new = l_to_s([m[i][0] for i in range(len(m))])
if new != ls.get(it, 1)[0]:
sec = self._get_shortcut_sec()
self.prefs.set_value(sec, ls.get(it, 0)[0], s_to_l(new))
ls.set(it, 1, new)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_btn_default_clicked(self, widget):
- ls, it = self.xml.get_widget('shortcut').get_selection().get_selected()
+ ls, it = self.__builder.get_object('shortcut').get_selection().get_selected()
sec = self._get_shortcut_sec()
new = l_to_s(self.prefs.default[sec][ls.get(it, 0)[0]])
if new != ls.get(it, 1)[0]:
self.prefs.set_value(sec, ls.get(it, 0)[0], s_to_l(new))
ls.set(it, 1, new)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_btn_romaji_custom_table_clicked(self, widget):
- self.__run_dialog_custom_key_table("romaji")
+ self.__run_dialog_custom_key_table('romaji')
def on_btn_kana_custom_table_clicked(self, widget):
- self.__run_dialog_custom_key_table("kana")
+ self.__run_dialog_custom_key_table('kana')
def on_btn_thumb_custom_table_clicked(self, widget):
- self.__run_dialog_custom_key_table("thumb")
+ self.__run_dialog_custom_key_table('thumb')
def on_btn_add_custom_key(self, widget, user_data):
prefs = self.prefs
- input = self.xml.get_widget('entry_input_custom_key')
- output = self.xml.get_widget('entry_output_custom_key')
- left = self.xml.get_widget('entry_left_thumb_shift_custom_key')
- right = self.xml.get_widget('entry_right_thumb_shift_custom_key')
- model = self.xml.get_widget('treeview_custom_key_table').get_model()
- combobox = self.xml.get_widget('combobox_custom_key_table')
+ input = self.__builder.get_object('entry_input_custom_key')
+ output = self.__builder.get_object('entry_output_custom_key')
+ left = self.__builder.get_object('entry_left_thumb_shift_custom_key')
+ right = self.__builder.get_object('entry_right_thumb_shift_custom_key')
+ model = self.__builder.get_object('treeview_custom_key_table').get_model()
+ combobox = self.__builder.get_object('combobox_custom_key_table')
id = combobox.get_active()
model_combobox = combobox.get_model()
method = model_combobox[id][1]
@@ -939,11 +953,11 @@ class AnthySetup(object):
right.set_text('')
input.set_text('')
output.set_text('')
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_btn_remove_custom_key(self, widget, user_data):
prefs = self.prefs
- combobox = self.xml.get_widget('combobox_custom_key_table')
+ combobox = self.__builder.get_object('combobox_custom_key_table')
id = combobox.get_active()
model_combobox = combobox.get_model()
method = model_combobox[id][1]
@@ -973,54 +987,54 @@ class AnthySetup(object):
prefs.set_value(section, key, ['', '', ''])
l.remove(i)
widget.set_sensitive(False)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_btn_thumb_key_clicked(self, widget):
- if widget.name == 'thumb:button_ls':
+ if Gtk.Buildable.get_name(widget) == 'thumb:button_ls':
entry = 'thumb:ls'
- elif widget.name == 'thumb:button_rs':
+ elif Gtk.Buildable.get_name(widget) == 'thumb:button_rs':
entry = 'thumb:rs'
else:
return
- text = self.xml.get_widget(entry).get_text()
- m = self.xml.get_widget('treeview2').get_model()
+ text = self.__builder.get_object(entry).get_text()
+ m = self.__builder.get_object('treeview2').get_model()
m.clear()
if text != None:
m.append([text])
i = m.get_iter_first()
- self.xml.get_widget('treeview2').get_selection().select_iter(i)
- self.xml.get_widget('entry2').set_text('')
- self.xml.get_widget('button4').hide()
- self.xml.get_widget('button5').show()
- self.xml.get_widget('button6').hide()
+ self.__builder.get_object('treeview2').get_selection().select_iter(i)
+ self.__builder.get_object('entry2').set_text('')
+ self.__builder.get_object('button4').hide()
+ self.__builder.get_object('button5').show()
+ self.__builder.get_object('button6').hide()
for w in ['checkbutton6', 'checkbutton7', 'checkbutton8']:
- self.xml.get_widget(w).set_active(False)
- dlg = self.xml.get_widget('edit_shortcut')
+ self.__builder.get_object(w).set_active(False)
+ dlg = self.__builder.get_object('edit_shortcut')
id = dlg.run()
dlg.hide()
- self.xml.get_widget('button4').show()
- self.xml.get_widget('button5').hide()
- self.xml.get_widget('button6').show()
- if id == gtk.RESPONSE_OK:
- l, i = self.xml.get_widget('treeview2').get_selection().get_selected()
+ self.__builder.get_object('button4').show()
+ self.__builder.get_object('button5').hide()
+ self.__builder.get_object('button6').show()
+ if id == Gtk.ResponseType.OK:
+ l, i = self.__builder.get_object('treeview2').get_selection().get_selected()
new = l[i][0]
if new != text:
section, key = self.__get_section_key(entry)
self.prefs.set_value(section, key, new)
- self.xml.get_widget(entry).set_text(new)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object(entry).set_text(new)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_btn_dict_command_clicked(self, widget):
- if widget.name == 'dict:btn_edit_dict_command':
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_edit_dict_command':
key = 'dict_admin_command'
- elif widget.name == 'dict:btn_add_word_command':
+ elif Gtk.Buildable.get_name(widget) == 'dict:btn_add_word_command':
key = 'add_word_command'
else:
return
command = self.prefs.get_value('common', key)
if not path.exists(command[0]):
self.__run_message_dialog(_("Your file does not exist: ") + command[0],
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
os.spawnl(os.P_NOWAIT, *command)
@@ -1028,48 +1042,48 @@ class AnthySetup(object):
file = None
id = None
- if widget.name == "dict:btn_add":
- dlg = gtk.FileChooserDialog(title=_("Open Dictionary File"),
- parent=self.xml.get_widget('main'),
- action=gtk.FILE_CHOOSER_ACTION_OPEN,
- buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
- gtk.STOCK_OPEN, gtk.RESPONSE_OK))
- if widget.name == "dict:btn_edit":
- dlg = gtk.Dialog(title=_("Edit Dictionary File"),
- parent=self.xml.get_widget('main'),
- flags='modal',
- buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
- gtk.STOCK_OK, gtk.RESPONSE_OK))
-
- vbox = self.xml.get_widget('dict:add_extra_vbox')
- if widget.name == "dict:btn_add":
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_add':
+ dlg = Gtk.FileChooserDialog(title=_("Open Dictionary File"),
+ parent=self.__builder.get_object('main'),
+ action=Gtk.FileChooserAction.OPEN,
+ buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
+ Gtk.STOCK_OPEN, Gtk.ResponseType.OK))
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_edit':
+ dlg = Gtk.Dialog(title=_("Edit Dictionary File"),
+ parent=self.__builder.get_object('main'),
+ flags=Gtk.DialogFlags.MODAL,
+ buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
+ Gtk.STOCK_OK, Gtk.ResponseType.OK))
+
+ vbox = self.__builder.get_object('dict:add_extra_vbox')
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_add':
# Need to init for the second time
self.__init_dict_chooser_dialog()
dlg.set_extra_widget(vbox)
- if widget.name == "dict:btn_edit":
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_edit':
id = self.__set_selected_dict_to_dialog()
if id == None:
self.__run_message_dialog(_("Your choosed file is not correct."),
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
parent_vbox = dlg.vbox
parent_vbox.add(vbox)
vbox.show_all()
- if dlg.run() == gtk.RESPONSE_OK:
- if widget.name == "dict:btn_add":
+ if dlg.run() == Gtk.ResponseType.OK:
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_add':
file = dlg.get_filename()
if file[0] != '/':
dir = dlg.get_current_folder()
- file = dir + "/" + file
+ file = dir + '/' + file
self.__append_user_dict_from_dialog(file, None, True)
- elif widget.name == "dict:btn_edit":
+ elif Gtk.Buildable.get_name(widget) == 'dict:btn_edit':
self.__append_user_dict_from_dialog(None, id, False)
dlg.hide()
vbox.unparent()
def on_btn_dict_delete_clicked(self, widget):
- l, i = self.xml.get_widget('dict:view').get_selection().get_selected()
+ l, i = self.__builder.get_object('dict:view').get_selection().get_selected()
if not i:
return
@@ -1079,7 +1093,7 @@ class AnthySetup(object):
return
if self.__is_system_dict_file_from_id(selected_id):
self.__run_message_dialog(_("You cannot delete the system dictionary."),
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
file = self.__get_dict_file_from_id(selected_id)
@@ -1087,7 +1101,7 @@ class AnthySetup(object):
files = self.prefs.get_value('dict', 'files')
files.remove(file)
self.prefs.set_value('dict', 'files', files)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
l.remove(i)
return
@@ -1102,11 +1116,11 @@ class AnthySetup(object):
dict_file = self.__get_dict_file_from_id(selected_id)
if dict_file == None:
self.__run_message_dialog(_("Your file is not good."),
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
if not path.exists(dict_file):
self.__run_message_dialog(_("Your file does not exist: ") + dict_file,
- gtk.MESSAGE_ERROR)
+ Gtk.MessageType.ERROR)
return
if dict_file == None:
@@ -1122,7 +1136,7 @@ class AnthySetup(object):
section = 'dict/file/default'
encoding = self.prefs.get_value(section, 'encoding')
- lines = "";
+ lines = '';
for i, line in enumerate(file(dict_file)):
if nline >= 0 and i >= nline:
break;
@@ -1130,16 +1144,17 @@ class AnthySetup(object):
if encoding != None and encoding != 'utf-8':
lines = unicode(lines, encoding).encode('utf-8')
- dlg = gtk.Dialog(title=_("View Dictionary File"),
- parent=self.xml.get_widget('main'),
- flags='modal',
- buttons=(gtk.STOCK_OK, gtk.RESPONSE_OK))
- buffer = gtk.TextBuffer()
+ dlg = Gtk.Dialog(title=_("View Dictionary File"),
+ parent=self.__builder.get_object('main'),
+ flags=Gtk.DialogFlags.MODAL,
+ buttons=(Gtk.STOCK_OK, Gtk.ResponseType.OK))
+ buffer = Gtk.TextBuffer()
buffer.set_text (lines)
- text_view = gtk.TextView(buffer)
+ text_view = Gtk.TextView.new_with_buffer(buffer)
text_view.set_editable(False)
- sw = gtk.ScrolledWindow()
+ sw = Gtk.ScrolledWindow()
sw.add(text_view)
+ sw.set_min_content_height(400)
parent_vbox = dlg.vbox
parent_vbox.add(sw)
sw.show_all()
@@ -1149,21 +1164,22 @@ class AnthySetup(object):
def on_btn_dict_order_clicked(self, widget):
dict_file = None
- l, it = self.xml.get_widget('dict:view').get_selection().get_selected()
+ l, it = self.__builder.get_object('dict:view').get_selection().get_selected()
if not it:
return
selected_path = l.get_path(it)
selected_id = l.get_value(it, 0)
+ index = selected_path.get_indices()[0]
- if widget.name == "dict:btn_up":
- if selected_path[0] <= 0:
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_up':
+ if index <= 0:
return
- next_path = (selected_path[0] - 1, )
- elif widget.name == "dict:btn_down":
- if selected_path[0] + 1 >= len(l):
+ next_path = (index - 1, )
+ elif Gtk.Buildable.get_name(widget) == 'dict:btn_down':
+ if index + 1 >= len(l):
return
- next_path = (selected_path[0] + 1, )
+ next_path = (index + 1, )
next_it = l.get_iter(next_path)
if next_it:
l.swap(it, next_it)
@@ -1175,11 +1191,11 @@ class AnthySetup(object):
return
i = files.index(dict_file)
- if widget.name == "dict:btn_up":
+ if Gtk.Buildable.get_name(widget) == 'dict:btn_up':
if i <= 0:
return
next_i = i - 1
- elif widget.name == "dict:btn_down":
+ elif Gtk.Buildable.get_name(widget) == 'dict:btn_down':
if i + 1 >= len(dict_file):
return
next_i = i + 1
@@ -1187,15 +1203,17 @@ class AnthySetup(object):
files[i] = files[next_i]
files[next_i] = f
self.prefs.set_value('dict', 'files', files)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def _get_shortcut_sec(self):
l = ['default', 'atok', 'wnn']
- s_type = self.xml.get_widget('shortcut_type').get_active_text().lower()
+ iter = self.__builder.get_object('shortcut_type').get_active_iter()
+ model = self.__builder.get_object('shortcut_type').get_model()
+ s_type = model[iter][0].lower()
return 'shortcut/' + (s_type if s_type in l else 'default')
def on_shortcut_type_changed(self, widget):
- ls = self.xml.get_widget('shortcut').get_model()
+ ls = self.__builder.get_object('shortcut').get_model()
ls.clear()
for a in widget.get_model():
@@ -1205,45 +1223,45 @@ class AnthySetup(object):
for k in self.prefs.keys(sec):
ls.append([k, l_to_s(self.prefs.get_value(sec, k))])
- section, key = self.__get_section_key(widget.name)
+ section, key = self.__get_section_key(Gtk.Buildable.get_name(widget))
self.prefs.set_value(section, key, sec[len('shortcut/'):])
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_shortcut_key_release_event(self, widget, event):
if event.hardware_keycode in [36, 65]:
self.on_btn_edit_clicked(None)
def on_shortcut_click_event(self, widget, event):
- if event.type == gtk.gdk._2BUTTON_PRESS:
+ if event.type == Gdk.EventType._2BUTTON_PRESS:
widget.dc = True
- elif event.type == gtk.gdk.BUTTON_RELEASE:
+ elif event.type == Gdk.EventType.BUTTON_RELEASE:
if hasattr(widget, 'dc') and widget.dc:
self.on_btn_edit_clicked(None)
widget.dc = False
def on_key_input_dialog_key_press_event(self, widget, event):
- widget.e = (event.keyval, event.state)
+ widget.e = (event.keyval, event.get_state())
return True
def on_key_input_dialog_key_release_event(self, widget, event):
- widget.response(gtk.RESPONSE_OK)
+ widget.response(Gtk.ResponseType.OK)
return True
def on_entry_custom_key_changed(self, widget, user_data):
mode = user_data
- input = self.xml.get_widget('entry_input_custom_key')
- output = self.xml.get_widget('entry_output_custom_key')
- left = self.xml.get_widget('entry_left_thumb_shift_custom_key')
- right = self.xml.get_widget('entry_right_thumb_shift_custom_key')
- button = self.xml.get_widget('button_add_custom_key')
- if mode != "thumb":
- if input.get_text() != "" and output.get_text() != "":
+ input = self.__builder.get_object('entry_input_custom_key')
+ output = self.__builder.get_object('entry_output_custom_key')
+ left = self.__builder.get_object('entry_left_thumb_shift_custom_key')
+ right = self.__builder.get_object('entry_right_thumb_shift_custom_key')
+ button = self.__builder.get_object('button_add_custom_key')
+ if mode != 'thumb':
+ if input.get_text() != '' and output.get_text() != '':
button.set_sensitive(True)
else:
button.set_sensitive(False)
else:
- if input.get_text() != "" and output.get_text() != "" and \
- left.get_text() != "" and right.get_text() != "":
+ if input.get_text() != '' and output.get_text() != '' and \
+ left.get_text() != '' and right.get_text() != '':
button.set_sensitive(True)
else:
button.set_sensitive(False)
@@ -1263,63 +1281,63 @@ class AnthySetup(object):
else:
list.insert(0, '/usr/bin/' + list[0])
list[1] = list[1][list[1].rfind('/') + 1:]
- if widget.name == 'dict:entry_edit_dict_command':
+ if Gtk.Buildable.get_name(widget) == 'dict:entry_edit_dict_command':
key = 'dict_admin_command'
- elif widget.name == 'dict:entry_add_word_command':
+ elif Gtk.Buildable.get_name(widget) == 'dict:entry_add_word_command':
key = 'add_word_command'
else:
return
self.prefs.set_value('common', key, list)
- self.xml.get_widget('btn_apply').set_sensitive(True)
+ self.__builder.get_object('btn_apply').set_sensitive(True)
def on_entry2_changed(self, widget):
if not widget.get_text():
- self.xml.get_widget('button4').set_sensitive(False)
+ self.__builder.get_object('button4').set_sensitive(False)
else:
- self.xml.get_widget('button4').set_sensitive(True)
+ self.__builder.get_object('button4').set_sensitive(True)
def on_button7_clicked(self, widget):
- dlg = self.xml.get_widget('key_input_dialog')
+ 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'))
id = dlg.run()
dlg.hide()
- if id == gtk.RESPONSE_OK:
+ if id == Gtk.ResponseType.OK:
key, state = dlg.e
- if (state & (modifier.CONTROL_MASK | modifier.ALT_MASK) and
+ if (state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK) and
ord('a') <= key <= ord('z')):
key = ord(chr(key).upper())
- self.xml.get_widget('entry2').set_text(keysyms.keycode_to_name(key))
+ self.__builder.get_object('entry2').set_text(IBus.keyval_name(key))
- for w, i in [('checkbutton6', modifier.CONTROL_MASK),
- ('checkbutton7', modifier.ALT_MASK),
- ('checkbutton8', modifier.SHIFT_MASK)]:
- self.xml.get_widget(w).set_active(True if state & i else False)
+ for w, i in [('checkbutton6', IBus.ModifierType.CONTROL_MASK),
+ ('checkbutton7', IBus.ModifierType.MOD1_MASK),
+ ('checkbutton8', IBus.ModifierType.SHIFT_MASK)]:
+ self.__builder.get_object(w).set_active(True if state & i else False)
def on_button4_clicked(self, widget):
- s = self.xml.get_widget('entry2').get_text()
- if not s or not keysyms.name_to_keycode(s):
- dlg = self.xml.get_widget('invalid_keysym')
- dlg.set_markup('<big><b>%s</b></big>' % _('Invalid keysym'))
- dlg.format_secondary_text(_('This keysym is not valid'))
+ 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.run()
dlg.hide()
return True
for w, m in [('checkbutton6', 'Ctrl+'),
('checkbutton7', 'Alt+'),
('checkbutton8', 'Shift+')]:
- if self.xml.get_widget(w).get_active():
+ if self.__builder.get_object(w).get_active():
s = m + s
- l = self.xml.get_widget('treeview2').get_model()
+ l = self.__builder.get_object('treeview2').get_model()
for i in range(len(l)):
if l[i][0] == s:
return True
l.append([s])
def on_button5_clicked(self, widget):
- s = self.xml.get_widget('entry2').get_text()
- if not s or not keysyms.name_to_keycode(s):
- dlg = self.xml.get_widget('invalid_keysym')
+ 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.run()
@@ -1328,21 +1346,20 @@ class AnthySetup(object):
for w, m in [('checkbutton6', 'Ctrl+'),
('checkbutton7', 'Alt+'),
('checkbutton8', 'Shift+')]:
- if self.xml.get_widget(w).get_active():
+ if self.__builder.get_object(w).get_active():
s = m + s
- l, i = self.xml.get_widget('treeview2').get_selection().get_selected()
+ l, i = self.__builder.get_object('treeview2').get_selection().get_selected()
l[i][0] = s
return True
def on_button6_clicked(self, widget):
- l, i = self.xml.get_widget('treeview2').get_selection().get_selected()
+ l, i = self.__builder.get_object('treeview2').get_selection().get_selected()
if i:
l.remove(i)
def run(self):
- gtk.main()
-
+ Gtk.main()
-if __name__ == "__main__":
+if __name__ == '__main__':
AnthySetup().run()
diff --git a/setup/prefs.py b/setup/prefs.py
index 75ff1d6..5e66820 100644
--- a/setup/prefs.py
+++ b/setup/prefs.py
@@ -20,8 +20,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-from ibus import Bus
+import sys
+from gi.repository import GLib
+from gi.repository import IBus
class Prefs(object):
_prefix = 'engine/dummy'
@@ -30,10 +32,39 @@ class Prefs(object):
self.default = {}
self.modified = {}
self.new = {}
+ self.__no_key_warning = False
self._config = config if config else \
bus.get_config() if bus else \
- Bus().get_config()
+ IBus.Bus().get_config()
+
+ def __log_handler(self, domain, level, message, data):
+ if not data:
+ return
+ GLib.log_default_handler(domain, level, message, '')
+
+ def variant_to_value(self, variant):
+ if type(variant) != GLib.Variant:
+ return variant
+ if variant.get_type_string() == 's':
+ return variant.get_string()
+ elif variant.get_type_string() == 'i':
+ return variant.get_int32()
+ elif variant.get_type_string() == 'b':
+ return variant.get_boolean()
+ elif variant.get_type_string() == 'as':
+ return variant.dup_strv()[0]
+ else:
+ print >> sys.stderr, 'Unknown variant type:', \
+ variant.get_type_string()
+ sys.abrt()
+ return variant
+
+ def set_no_key_warning(self, no_key_warning):
+ if no_key_warning and hasattr(IBus, 'unset_log_handler'):
+ self.__no_key_warning = True
+ else:
+ self.__no_key_warning = False
def keys(self, section):
return self.default[section].keys()
@@ -60,7 +91,15 @@ class Prefs(object):
s = section
section = '/'.join(
[s for s in '/'.join([self._prefix, section]).split('/') if s])
- return self._config.get_value(section, key, default)
+ try:
+ if self.__no_key_warning:
+ IBus.set_log_handler(False)
+ variant = self._config.get_value(section, key)
+ if self.__no_key_warning:
+ IBus.unset_log_handler()
+ return self.variant_to_value(variant)
+ except:
+ return default
def set_value(self, section, key, value):
if section not in self.sections():
@@ -81,7 +120,20 @@ class Prefs(object):
def fetch_item(self, section, key, readonly=False):
s = '/'.join(
[s for s in '/'.join([self._prefix, section]).split('/') if s])
- v = self._config.get_value(s, key, None)
+ try:
+ v = None
+ # gobject-introspection has a bug.
+ # https://bugzilla.gnome.org/show_bug.cgi?id=670509
+ # GLib.log_set_handler("IBUS", GLib.LogLevelFlags.LEVEL_MASK,
+ # self.__log_handler, False)
+ if self.__no_key_warning:
+ IBus.set_log_handler(False)
+ variant = self._config.get_value(s, key)
+ if self.__no_key_warning:
+ IBus.unset_log_handler()
+ v = self.variant_to_value(variant)
+ except:
+ v = None
if readonly:
return v != None
if v != None:
@@ -104,7 +156,19 @@ class Prefs(object):
v = self.new[section][key]
if v == []:
v = ['']
- self._config.set_value(s, key, v)
+ variant = None
+ if type(v) == str:
+ variant = GLib.Variant.new_string(v)
+ elif type(v) == int:
+ variant = GLib.Variant.new_int32(v)
+ elif type(v) == bool:
+ variant = GLib.Variant.new_boolean(v)
+ elif type(v) == list:
+ variant = GLib.Variant.new_strv(v)
+ if variant == None:
+ print >> sys.stderr, 'Unknown value type:', type(v)
+ sys.abrt()
+ self._config.set_value(s, key, variant)
self.modified.setdefault(section, {})[key] = v
del(self.new[section][key])
@@ -138,3 +202,26 @@ class Prefs(object):
except:
pass
+ # Convert DBus.String to str
+ # sys.getdefaultencoding() == 'utf-8' with pygtk2 but
+ # sys.getdefaultencoding() == 'ascii' with gi gtk3
+ # so the simple str(unicode_string) causes an error and need to use
+ # unicode_string.encode('utf-8') instead.
+ def str(self, uni):
+ if uni == None:
+ return None
+ if type(uni) == str:
+ return uni
+ if type(uni) == unicode:
+ return uni.encode('utf-8')
+ return str(uni)
+
+ # The simple unicode(string) causes an error and need to use
+ # unicode(string, 'utf-8') instead.
+ def unicode(self, string):
+ if string == None:
+ return None
+ if type(string) == unicode:
+ return string
+ return unicode(string, 'utf-8')
+
diff --git a/setup/setup.glade b/setup/setup.ui
index abd4aef..3997ade 100644
--- a/setup/setup.glade
+++ b/setup/setup.ui
@@ -1,149 +1,342 @@
<?xml version="1.0"?>
-<glade-interface>
+<interface>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">10</property>
+ <property name="lower">0</property>
+ <property name="page_increment">0</property>
+ <property name="step_increment">1</property>
+ <property name="page_size">0</property>
+ <property name="value">10</property>
+ </object>
+ <object class="GtkListStore" id="model1">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Hiragana</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Katakana</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Half Width Katakana</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Latin</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Wide Latin</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model10">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">NICOLA-J</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">NICOLA-A</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">NICOLA-F</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model11">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">None</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">FMV KB231 key extension</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">FMV KB611 key extension</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model2">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Romaji</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Kana</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Thumb shift</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model3">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Multiple segment</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Single segment</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Immediate conversion (Multiple segment)</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Immediate conversion (Single segment)</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model4">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Keep Numpad Codes</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Convert Characters</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model5">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">&#x300C;&#x300D;&#xFF0F;</col>
+ </row>
+ <row>
+ <col id="0">&#x300C;&#x300D;&#x30FB;</col>
+ </row>
+ <row>
+ <col id="0">&#xFF3B;&#xFF3D;&#xFF0F;</col>
+ </row>
+ <row>
+ <col id="0">&#xFF3B;&#xFF3D;&#x30FB;</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model6">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">&#x3001;&#x3002;</col>
+ </row>
+ <row>
+ <col id="0">&#xFF0C;&#xFF0E;</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model7">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Do Nothing</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Auto Convert</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model8">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Clear</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Commit</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Hold</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model9">
+ <columns>
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Default</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">ATOK</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Wnn</col>
+ </row>
+ </data>
+ </object>
<!-- interface-requires gtk+ 2.16 -->
<!-- interface-naming-policy toplevel-contextual -->
- <widget class="GtkDialog" id="main">
+ <object class="GtkDialog" id="main">
<property name="visible">True</property>
<property name="title" translatable="yes">Setup - IBus-Anthy</property>
<property name="type_hint">dialog</property>
- <signal name="delete_event" handler="on_main_delete"/>
+ <signal handler="on_main_delete" name="delete_event"/>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<child>
- <widget class="GtkNotebook" id="notebook1">
+ <object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="border_width">8</property>
<child>
- <widget class="GtkFrame" id="frame1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="top_padding">8</property>
<property name="bottom_padding">8</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkTable" id="table1">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label101">
+ <object class="GtkLabel" id="label101">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Input Mode:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">input_mode</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="input_mode">
+ <object class="GtkComboBox" id="input_mode">
<property name="visible">True</property>
- <property name="items" translatable="yes">Hiragana
-Katakana
-Half Width Katakana
-Latin
-Wide Latin</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model1</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label102">
+ <object class="GtkLabel" id="label102">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Typing Method:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">typing_method</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="typing_method">
+ <object class="GtkComboBox" id="typing_method">
<property name="visible">True</property>
- <property name="items" translatable="yes">Romaji
-Kana
-Thumb shift</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model2</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label103">
+ <object class="GtkLabel" id="label103">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Conversion _Mode:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">conversion_segment_mode</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="conversion_segment_mode">
+ <object class="GtkComboBox" id="conversion_segment_mode">
<property name="visible">True</property>
- <property name="items" translatable="yes">Multiple segment
-Single segment
-Immediate conversion (Multiple segment)
-Immediate conversion (Single segment)</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model3</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label151">
+ <child type="label">
+ <object class="GtkLabel" id="label151">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Initial Setting&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -151,191 +344,206 @@ Immediate conversion (Single segment)</property>
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frame2">
+ <object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment2">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="top_padding">8</property>
<property name="bottom_padding">8</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkTable" id="table2">
+ <object class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label104">
+ <object class="GtkLabel" id="label104">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Period Style:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">period_style</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label105">
+ <object class="GtkLabel" id="label105">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Symbo_l Style:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">symbol_style</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label106">
+ <object class="GtkLabel" id="label106">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Numpad _Key Type:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">ten_key_mode</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="ten_key_mode">
+ <object class="GtkComboBox" id="ten_key_mode">
<property name="visible">True</property>
- <property name="items" translatable="yes">Keep Numpad Codes
-Convert Characters
-</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model4</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="symbol_style">
+ <object class="GtkComboBox" id="symbol_style">
<property name="visible">True</property>
- <property name="items">&#x300C;&#x300D;&#xFF0F;
-&#x300C;&#x300D;&#x30FB;
-&#xFF3B;&#xFF3D;&#xFF0F;
-&#xFF3B;&#xFF3D;&#x30FB;
-</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model5</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer5"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="period_style">
+ <object class="GtkComboBox" id="period_style">
<property name="visible">True</property>
- <property name="items">&#x3001;&#x3002;
-&#xFF0C;&#xFF0E;
-</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model6</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer6"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label107">
+ <object class="GtkLabel" id="label107">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Behavior on Period:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">behavior_on_period</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label108">
+ <object class="GtkLabel" id="label108">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Behavior on _Focus Out:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">behavior_on_focus_out</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="behavior_on_period">
+ <object class="GtkComboBox" id="behavior_on_period">
<property name="visible">True</property>
- <property name="items" translatable="yes">Do Nothing
-Auto Convert</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model7</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer7"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="behavior_on_focus_out">
+ <object class="GtkComboBox" id="behavior_on_focus_out">
<property name="visible">True</property>
- <property name="items" translatable="yes">Clear
-Commit
-Hold
-</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model8</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer8"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label152">
+ <child type="label">
+ <object class="GtkLabel" id="label152">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Behavior&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -343,51 +551,51 @@ Hold
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frame3">
+ <object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment3">
+ <object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="top_padding">8</property>
<property name="bottom_padding">8</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkTable" id="table3">
+ <object class="GtkTable" id="table3">
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkCheckButton" id="half_width_number">
+ <object class="GtkCheckButton" id="half_width_number">
<property name="label" translatable="yes">Convert _numbers with the one column width</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_ck_toggled"/>
- <accelerator key="N" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ <signal handler="on_ck_toggled" name="toggled"/>
+ <accelerator key="N" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+ </object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox4">
+ <object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel" id="label109">
+ <object class="GtkLabel" id="label109">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Candidate _Window Page Size:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">page_size</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -395,110 +603,106 @@ Hold
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="page_size">
+ <object class="GtkSpinButton" id="page_size">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment">10 0 10 1 0 0</property>
+ <property name="adjustment">adjustment1</property>
<property name="climb_rate">0.97999999999999998</property>
- <signal name="value_changed" handler="on_sb_changed"/>
- </widget>
+ <signal handler="on_sb_changed" name="value_changed"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="half_width_symbol">
+ <object class="GtkCheckButton" id="half_width_symbol">
<property name="label" translatable="yes">Convert _symbols with the one column width</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_ck_toggled"/>
- <accelerator key="S" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ <signal handler="on_ck_toggled" name="toggled"/>
+ <accelerator key="S" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+ </object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="half_width_space">
+ <object class="GtkCheckButton" id="half_width_space">
<property name="label" translatable="yes">Con_vert spaces with the one column width</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_ck_toggled"/>
- <accelerator key="v" signal="activate" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ <signal handler="on_ck_toggled" name="toggled"/>
+ <accelerator key="v" modifiers="GDK_MOD1_MASK" signal="activate"/>
+ </object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label153">
+ <child type="label">
+ <object class="GtkLabel" id="label153">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Other&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label1">
+ <child type="tab">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes">_General</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">vbox1</property>
- </widget>
+ </object>
<packing>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox2">
+ <object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="border_width">4</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel" id="label21">
+ <object class="GtkLabel" id="label21">
<property name="visible">True</property>
<property name="label" translatable="yes">_Shortcut Type:</property>
<property name="use_underline">True</property>
<property name="wrap_mode">word-char</property>
<property name="mnemonic_widget">shortcut_type</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -507,21 +711,24 @@ Hold
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="shortcut_type">
+ <object class="GtkComboBox" id="shortcut_type">
<property name="visible">True</property>
- <property name="items" translatable="yes">Default
-ATOK
-Wnn
-</property>
- <signal name="changed" handler="on_shortcut_type_changed"/>
- </widget>
+ <signal handler="on_shortcut_type_changed" name="changed"/>
+ <property name="model">model9</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer9"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -529,52 +736,52 @@ Wnn
</packing>
</child>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="shortcut">
+ <object class="GtkTreeView" id="shortcut">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <signal name="button_press_event" handler="on_shortcut_click_event"/>
- <signal name="button_release_event" handler="on_shortcut_click_event"/>
- <signal name="key_release_event" handler="on_shortcut_key_release_event"/>
- </widget>
+ <signal handler="on_shortcut_click_event" name="button_press_event"/>
+ <signal handler="on_shortcut_click_event" name="button_release_event"/>
+ <signal handler="on_shortcut_key_release_event" name="key_release_event"/>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <object class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="spacing">4</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="btn_default">
+ <object class="GtkButton" id="btn_default">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
- <signal name="clicked" handler="on_btn_default_clicked"/>
+ <signal handler="on_btn_default_clicked" name="clicked"/>
<child>
- <widget class="GtkAlignment" id="alignment4">
+ <object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
- <widget class="GtkHBox" id="hbox5">
+ <object class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkImage" id="image1">
+ <object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-undo</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -582,22 +789,22 @@ Wnn
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label27">
+ <object class="GtkLabel" id="label27">
<property name="visible">True</property>
<property name="label" translatable="yes">De_fault</property>
<property name="use_underline">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -605,310 +812,325 @@ Wnn
</packing>
</child>
<child>
- <widget class="GtkButton" id="btn_edit">
+ <object class="GtkButton" id="btn_edit">
<property name="label">gtk-edit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_edit_clicked"/>
- </widget>
+ <signal handler="on_btn_edit_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label2">
+ <child type="tab">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="label" translatable="yes">Key bin_ding</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">vbox2</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox3">
+ <object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="border_width">8</property>
<property name="spacing">4</property>
+ <property name="orientation">vertical</property>
<child>
- <widget class="GtkFrame" id="frame31">
+ <object class="GtkFrame" id="frame31">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment31">
+ <object class="GtkAlignment" id="alignment31">
<property name="visible">True</property>
<property name="top_padding">0</property>
<property name="bottom_padding">8</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkVBox" id="vbox31">
+ <object class="GtkBox" id="vbox31">
<property name="visible">True</property>
<property name="border_width">4</property>
<property name="spacing">4</property>
+ <property name="orientation">vertical</property>
<child>
- <widget class="GtkTable" id="table31">
+ <object class="GtkTable" id="table31">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label302">
+ <object class="GtkLabel" id="label302">
<property name="visible">True</property>
<property name="label" translatable="yes">_Romaji Key Table:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">romaji:button_custom_table</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="romaji:button_custom_table">
+ <object class="GtkButton" id="romaji:button_custom_table">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_btn_romaji_custom_table_clicked"/>
- </widget>
+ <signal handler="on_btn_romaji_custom_table_clicked" name="clicked"/>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label301">
+ <child type="label">
+ <object class="GtkLabel" id="label301">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Romaji&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frame32">
+ <object class="GtkFrame" id="frame32">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment32">
+ <object class="GtkAlignment" id="alignment32">
<property name="visible">True</property>
<property name="top_padding">0</property>
<property name="bottom_padding">8</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkVBox" id="vbox32">
+ <object class="GtkBox" id="vbox32">
<property name="visible">True</property>
<property name="border_width">4</property>
<property name="spacing">4</property>
+ <property name="orientation">vertical</property>
<child>
- <widget class="GtkTable" id="table32">
+ <object class="GtkTable" id="table32">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label312">
+ <object class="GtkLabel" id="label312">
<property name="visible">True</property>
<property name="label" translatable="yes">_Kana Key Table:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">kana:button_custom_table</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="kana:button_custom_table">
+ <object class="GtkButton" id="kana:button_custom_table">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_btn_kana_custom_table_clicked"/>
- </widget>
+ <signal handler="on_btn_kana_custom_table_clicked" name="clicked"/>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label311">
+ <child type="label">
+ <object class="GtkLabel" id="label311">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Kana&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label3">
+ <child type="tab">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="label" translatable="yes">_Typing Method</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">vbox3</property>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox4">
+ <object class="GtkBox" id="vbox4">
<property name="visible">True</property>
<property name="border_width">8</property>
<property name="spacing">4</property>
+ <property name="orientation">vertical</property>
<child>
- <widget class="GtkFrame" id="frame4">
+ <object class="GtkFrame" id="frame4">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment5">
+ <object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="top_padding">8</property>
<property name="bottom_padding">8</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkTable" id="table4">
+ <object class="GtkBox" id="vbox41">
<property name="visible">True</property>
- <property name="n_rows">9</property>
- <property name="column_spacing">8</property>
- <property name="row_spacing">4</property>
+ <property name="border_width">4</property>
+ <property name="spacing">4</property>
+ <property name="orientation">vertical</property>
<child>
- <widget class="GtkTable" id="table5">
+
+ <object class="GtkTable" id="table5">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label28">
+ <object class="GtkLabel" id="label28">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes">_Left Thumb Shift Key:</property>
<property name="mnemonic_widget">thumb:ls</property>
- </widget>
+ </object>
<packing>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="thumb:ls">
+ <object class="GtkEntry" id="thumb:ls">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
- </widget>
+ </object>
<packing>
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="thumb:button_ls">
+ <object class="GtkButton" id="thumb:button_ls">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <signal name="clicked" handler="on_btn_thumb_key_clicked"/>
- </widget>
+ <signal handler="on_btn_thumb_key_clicked" name="clicked"/>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label29">
+ <object class="GtkLabel" id="label29">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes">Right _Thumb Shift Key:</property>
<property name="mnemonic_widget">thumb:rs</property>
- </widget>
+ </object>
<packing>
+ <property name="y_options">GTK_FILL</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="thumb:rs">
+ <object class="GtkEntry" id="thumb:rs">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
- </widget>
+ </object>
<packing>
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
@@ -916,28 +1138,34 @@ Wnn
</packing>
</child>
<child>
- <widget class="GtkButton" id="thumb:button_rs">
+ <object class="GtkButton" id="thumb:button_rs">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <signal name="clicked" handler="on_btn_thumb_key_clicked"/>
- </widget>
+ <signal handler="on_btn_thumb_key_clicked" name="clicked"/>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="thumb:keyboard_layout_mode">
+ <object class="GtkCheckButton" id="thumb:keyboard_layout_mode">
<property name="label" translatable="yes">Adjust _input method layout to system keyboard layout</property>
<property name="tooltip_text" translatable="yes">Adjust IM layout to XKB layout</property>
<property name="visible">True</property>
@@ -945,27 +1173,27 @@ Wnn
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_ck_toggled"/>
- <accelerator key="I" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ <signal handler="on_ck_toggled" name="toggled"/>
+ <accelerator key="I" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+ </object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox9">
+ <object class="GtkHBox" id="hbox9">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel" id="label30">
+ <object class="GtkLabel" id="label30">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes">Input _Method Layout:</property>
<property name="mnemonic_widget">thumb:keyboard_layout</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -973,33 +1201,37 @@ Wnn
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="thumb:keyboard_layout">
+ <object class="GtkComboBox" id="thumb:keyboard_layout">
<property name="visible">True</property>
- <property name="items" translatable="yes">NICOLA-J
-NICOLA-A
-NICOLA-F</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model10</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer10"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox10">
+ <object class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkImage" id="image2">
+ <object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1007,35 +1239,35 @@ NICOLA-F</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label31">
+ <object class="GtkLabel" id="label31">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="wrap">True</property>
<property name="label" translatable="yes">Restart ibus when you change the keyboard layout.</property>
<property name="tooltip_text" translatable="yes">Restart ibus when you change XKB</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="thumb:warning_hbox">
+ <object class="GtkHBox" id="thumb:warning_hbox">
<property name="visible">False</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkImage" id="image3">
+ <object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-dialog-warning</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1043,37 +1275,37 @@ NICOLA-F</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label32">
+ <object class="GtkLabel" id="label32">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="wrap">True</property>
<property name="label" translatable="yes">Strongly recommend to enable "Use system keyboard layout" check button in "Advanced" tab using 'ibus-setup' command</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox11">
+ <object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel" id="label33">
+ <object class="GtkLabel" id="label33">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes">_Additional Key Arrangement:</property>
<property name="mnemonic_widget">thumb:fmv_extension</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1081,34 +1313,38 @@ NICOLA-F</property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="thumb:fmv_extension">
+ <object class="GtkComboBox" id="thumb:fmv_extension">
<property name="visible">True</property>
- <property name="items" translatable="yes">None
-FMV KB231 key extension
-FMV KB611 key extension</property>
- <property name="tooltip_text" translatable="yes">'~', 『', '¢', '£' and so on can be output with Thumb Shift key</property>
- <signal name="changed" handler="on_cb_changed"/>
- </widget>
+ <property name="tooltip_text" translatable="yes">'&#xFF5E;', '&#x300E;', '&#xA2;', '&#xA3;' and so on can be output with Thumb Shift key</property>
+ <signal handler="on_cb_changed" name="changed"/>
+ <property name="model">model11</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer11"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox12">
+ <object class="GtkHBox" id="hbox12">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkImage" id="image4">
+ <object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1116,28 +1352,28 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label34">
+ <object class="GtkLabel" id="label34">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="wrap">True</property>
<property name="label" translatable="yes">You do not have to reconfigure the system keyboard layout for "Additional Key Arrangement" since this option changes input method layout only in case input method is turned on.</property>
<property name="tooltip_text" translatable="yes">You do not have to reconfigure XKB since this option changes IM layout only with IM on.</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="thumb:handakuten">
+ <object class="GtkCheckButton" id="thumb:handakuten">
<property name="label" translatable="yes">_Enable semi-voiced sound mark with Shift key</property>
<property name="tooltip_text" translatable="yes">Seion + Shift can output Handakuon</property>
<property name="visible">True</property>
@@ -1145,185 +1381,203 @@ FMV KB611 key extension</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_ck_toggled"/>
- <accelerator key="E" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ <signal handler="on_ck_toggled" name="toggled"/>
+ <accelerator key="E" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
+ </object>
<packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">7</property>
</packing>
+
</child>
<child>
- <widget class="GtkTable" id="table6">
+ <object class="GtkTable" id="table6">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label35">
+ <object class="GtkLabel" id="label35">
<property name="visible">True</property>
<property name="label" translatable="yes">Thumb _Shift Key Table:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">thumb:button_custom_table</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="thumb:button_custom_table">
+ <object class="GtkButton" id="thumb:button_custom_table">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_btn_thumb_custom_table_clicked"/>
- </widget>
+ <signal handler="on_btn_thumb_custom_table_clicked" name="clicked"/>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="fill">True</property>
+ <property name="position">8</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label36">
+ <child type="label">
+ <object class="GtkLabel" id="label36">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Thumb Shift Layout&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="position">3</property>
- </packing>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label4">
+ <child type="tab">
+ <object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="label" translatable="yes">Thumb S_hift</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">vbox4</property>
- </widget>
+ </object>
<packing>
<property name="position">3</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox5">
+ <object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
- <property name="border_width">4</property>
+ <property name="border_width">8</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkFrame" id="frame5">
+ <object class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment6">
+ <object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="top_padding">4</property>
<property name="left_padding">0</property>
<child>
- <widget class="GtkVBox" id="vbox51">
+ <object class="GtkVBox" id="vbox51">
<property name="visible">True</property>
<property name="border_width">4</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkTable" id="table7">
+ <object class="GtkTable" id="table7">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label36">
+ <object class="GtkLabel" id="label501">
<property name="visible">True</property>
<property name="label" translatable="yes">_Edit Dictionary Command:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">dict:entry_edit_dict_command</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="dict:entry_edit_dict_command">
+ <object class="GtkEntry" id="dict:entry_edit_dict_command">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
- <signal name="changed" handler="on_entry_dict_command_changed"/>
- </widget>
+ <signal handler="on_entry_dict_command_changed" name="changed"/>
+ </object>
<packing>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="dict:btn_edit_dict_command">
+ <object class="GtkButton" id="dict:btn_edit_dict_command">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_btn_dict_command_clicked"/>
- </widget>
+ <signal handler="on_btn_dict_command_clicked" name="clicked"/>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label37">
+ <object class="GtkLabel" id="label502">
<property name="visible">True</property>
<property name="label" translatable="yes">_Add Word Command:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">dict:entry_add_word_command</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="dict:entry_add_word_command">
+ <object class="GtkEntry" id="dict:entry_add_word_command">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
- <signal name="changed" handler="on_entry_dict_command_changed"/>
- </widget>
+ <signal handler="on_entry_dict_command_changed" name="changed"/>
+ </object>
<packing>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
@@ -1331,67 +1585,71 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="dict:btn_add_word_command">
+ <object class="GtkButton" id="dict:btn_add_word_command">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_btn_dict_command_clicked"/>
- </widget>
+ <signal handler="on_btn_dict_command_clicked" name="clicked"/>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="y_options">GTK_FILL</property>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <!-- The fill need to be True so that
+ GtkTable do not have extra space
+ in y axis. -->
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label38">
+ <child type="label">
+ <object class="GtkLabel" id="label50">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Default Dictionary Configuration&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frame6">
+ <object class="GtkFrame" id="frame6">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkAlignment" id="alignment7">
+ <object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
<property name="top_padding">4</property>
<property name="left_padding">0</property>
<child>
- <widget class="GtkVBox" id="vbox52">
+ <object class="GtkVBox" id="vbox52">
<property name="visible">True</property>
<property name="border_width">4</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="height_request">220</property>
@@ -1399,34 +1657,34 @@ FMV KB611 key extension</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="dict:view">
+ <object class="GtkTreeView" id="dict:view">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <signal name="button_press_event" handler="on_shortcut_click_event"/>
- <signal name="button_release_event" handler="on_shortcut_click_event"/>
- <signal name="key_release_event" handler="on_shortcut_key_release_event"/>
- </widget>
+ <signal handler="on_shortcut_click_event" name="button_press_event"/>
+ <signal handler="on_shortcut_click_event" name="button_release_event"/>
+ <signal handler="on_shortcut_key_release_event" name="key_release_event"/>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox2">
+ <object class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
<property name="spacing">4</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="dict:btn_view">
+ <object class="GtkButton" id="dict:btn_view">
<property name="label" translatable="yes">_View</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_btn_dict_view_clicked"/>
- </widget>
+ <signal handler="on_btn_dict_view_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1434,15 +1692,15 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="dict:btn_add">
+ <object class="GtkButton" id="dict:btn_add">
<property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_dict_add_clicked"/>
- </widget>
+ <signal handler="on_btn_dict_add_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1450,38 +1708,38 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="dict:btn_edit">
+ <object class="GtkButton" id="dict:btn_edit">
<property name="label">gtk-edit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_dict_add_clicked"/>
- </widget>
+ <signal handler="on_btn_dict_add_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="dict:btn_delete">
- <property name="label">gtk-delete</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_dict_delete_clicked"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
</packing>
</child>
- </widget>
+ <child>
+ <object class="GtkButton" id="dict:btn_delete">
+ <property name="label">gtk-delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ <signal handler="on_btn_dict_delete_clicked" name="clicked"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1489,12 +1747,12 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox2">
+ <object class="GtkHButtonBox" id="hbuttonbox3">
<property name="visible">True</property>
<property name="spacing">4</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="dict:btn_up">
+ <object class="GtkButton" id="dict:btn_up">
<property name="label">gtk-go-up</property>
<property name="tooltip_text" translatable="yes">You can change the order on language bar</property>
<property name="visible">True</property>
@@ -1502,8 +1760,8 @@ FMV KB611 key extension</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_dict_order_clicked"/>
- </widget>
+ <signal handler="on_btn_dict_order_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1511,7 +1769,7 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="dict:btn_down">
+ <object class="GtkButton" id="dict:btn_down">
<property name="label">gtk-go-down</property>
<property name="tooltip_text" translatable="yes">You can change the order on language bar</property>
<property name="visible">True</property>
@@ -1519,106 +1777,94 @@ FMV KB611 key extension</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_dict_order_clicked"/>
- </widget>
+ <signal handler="on_btn_dict_order_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label39">
+ <child type="label">
+ <object class="GtkLabel" id="label51">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Extended Dictionaries&lt;/b&gt;</property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="position">4</property>
- </packing>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label5">
+ <child type="tab">
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="label" translatable="yes">Dictionar_y</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">vbox5</property>
- </widget>
+ </object>
<packing>
<property name="position">4</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="about_vbox">
+ <object class="GtkVBox" id="about_vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="border_width">10</property>
<property name="spacing">6</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- </widget>
- <packing>
- <property name="position">5</property>
- </packing>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label6">
+ <child type="tab">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="label" translatable="yes">Abo_ut</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">about</property>
- </widget>
+ <property name="mnemonic_widget">about_vbox</property>
+ </object>
<packing>
<property name="position">5</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="btn_apply">
+ <object class="GtkButton" id="btn_apply">
<property name="label">gtk-apply</property>
- <property name="response_id">-10</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_apply_clicked"/>
- </widget>
+ <signal handler="on_btn_apply_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1626,16 +1872,15 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="btn_cancel">
+ <object class="GtkButton" id="btn_cancel">
<property name="label">gtk-cancel</property>
- <property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_cancel_clicked"/>
- </widget>
+ <signal handler="on_btn_cancel_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1643,48 +1888,52 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="btn_ok">
+ <object class="GtkButton" id="btn_ok">
<property name="label">gtk-ok</property>
- <property name="response_id">-5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_btn_ok_clicked"/>
- </widget>
+ <signal handler="on_btn_ok_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkDialog" id="edit_shortcut">
+ <action-widgets>
+ <action-widget response="-10">btn_apply</action-widget>
+ <action-widget response="-6">btn_cancel</action-widget>
+ <action-widget response="-5">btn_ok</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="edit_shortcut">
<property name="width_request">340</property>
<property name="height_request">300</property>
<property name="title" translatable="yes">Edit Shortcut</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
+ <object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<child>
- <widget class="GtkVBox" id="vbox20">
+ <object class="GtkVBox" id="vbox20">
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow3">
+ <object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">1</property>
@@ -1692,26 +1941,26 @@ FMV KB611 key extension</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="treeview2">
+ <object class="GtkTreeView" id="treeview2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox6">
+ <object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel" id="label50">
+ <object class="GtkLabel" id="label70">
<property name="visible">True</property>
<property name="label" translatable="yes">Key Code:</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1719,31 +1968,31 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry2">
+ <object class="GtkEntry" id="entry2">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <signal name="changed" handler="on_entry2_changed"/>
- </widget>
+ <signal handler="on_entry2_changed" name="changed"/>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button7">
+ <object class="GtkButton" id="button7">
<property name="label">...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_button7_clicked"/>
- </widget>
+ <signal handler="on_button7_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1751,14 +2000,14 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox7">
+ <object class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel" id="label51">
+ <object class="GtkLabel" id="label71">
<property name="visible">True</property>
<property name="label" translatable="yes">Modifier:</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1766,53 +2015,53 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox8">
+ <object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<child>
- <widget class="GtkCheckButton" id="checkbutton7">
+ <object class="GtkCheckButton" id="checkbutton7">
<property name="label" translatable="yes">A_lternate</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="checkbutton6">
+ <object class="GtkCheckButton" id="checkbutton6">
<property name="label" translatable="yes">Co_ntrol</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="checkbutton8">
+ <object class="GtkCheckButton" id="checkbutton8">
<property name="label" translatable="yes">_Shift</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1820,12 +2069,12 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox3">
+ <object class="GtkHButtonBox" id="hbuttonbox4">
<property name="visible">True</property>
<property name="spacing">6</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="button4">
+ <object class="GtkButton" id="button4">
<property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
@@ -1833,8 +2082,8 @@ FMV KB611 key extension</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_button4_clicked"/>
- </widget>
+ <signal handler="on_button4_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1842,15 +2091,15 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button5">
+ <object class="GtkButton" id="button5">
<property name="label">gtk-refresh</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_button5_clicked"/>
- </widget>
+ <signal handler="on_button5_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1858,7 +2107,7 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button6">
+ <object class="GtkButton" id="button6">
<property name="label">gtk-delete</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
@@ -1866,40 +2115,39 @@ FMV KB611 key extension</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="on_button6_clicked"/>
- </widget>
+ <signal handler="on_button6_clicked" name="clicked"/>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="cancelbutton2">
+ <object class="GtkButton" id="cancelbutton2">
<property name="label">gtk-cancel</property>
- <property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1907,55 +2155,58 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="okbutton2">
+ <object class="GtkButton" id="okbutton2">
<property name="label">gtk-ok</property>
- <property name="response_id">-5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkDialog" id="dialog_custom_key_table">
+ <action-widgets>
+ <action-widget response="-6">cancelbutton2</action-widget>
+ <action-widget response="-5">okbutton2</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="dialog_custom_key_table">
<property name="width_request">400</property>
<property name="height_request">470</property>
- <property name="title"></property>
+ <property name="title"/>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox3">
+ <object class="GtkVBox" id="dialog-vbox3">
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox_for_combobox_custom_key_table">
+ <object class="GtkHBox" id="hbox_for_combobox_custom_key_table">
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label_custom_key_table">
+ <object class="GtkLabel" id="label_custom_key_table">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label"></property>
+ <property name="label"/>
<property name="use_underline">True</property>
<property name="mnemonic_widget">combobox_custom_key_table</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1963,16 +2214,16 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="combobox_custom_key_table">
+ <object class="GtkComboBox" id="combobox_custom_key_table">
<property name="visible">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -1980,12 +2231,12 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox301">
+ <object class="GtkHBox" id="hbox301">
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow301">
+ <object class="GtkScrolledWindow" id="scrolledwindow301">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">1</property>
@@ -1993,103 +2244,103 @@ FMV KB611 key extension</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="treeview_custom_key_table">
+ <object class="GtkTreeView" id="treeview_custom_key_table">
<property name="visible">True</property>
<property name="can_focus">True</property>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkVButtonBox" id="vbutton301">
+ <object class="GtkVButtonBox" id="vbutton301">
<property name="visible">True</property>
<property name="layout_style">start</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label3001">
+ <object class="GtkLabel" id="label3001">
<property name="visible">True</property>
<property name="label" translatable="yes">_Input Chars</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_input_custom_key</property>
- </widget>
+ </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_input_custom_key">
+ <object class="GtkEntry" id="entry_input_custom_key">
<property name="visible">True</property>
<property name="width-chars">3</property>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_output_custom_key">
+ <object class="GtkLabel" id="label_output_custom_key">
<property name="visible">True</property>
<property name="label" translatable="yes">_Output Chars</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_output_custom_key</property>
- </widget>
+ </object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_output_custom_key">
+ <object class="GtkEntry" id="entry_output_custom_key">
<property name="visible">True</property>
<property name="width-chars">3</property>
- </widget>
+ </object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_left_thumb_shift_custom_key">
+ <object class="GtkLabel" id="label_left_thumb_shift_custom_key">
<property name="visible">False</property>
<property name="label" translatable="yes">_Left Thumb Shift</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_left_thumb_shift_custom_key</property>
- </widget>
+ </object>
<packing>
<property name="position">4</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_left_thumb_shift_custom_key">
+ <object class="GtkEntry" id="entry_left_thumb_shift_custom_key">
<property name="visible">False</property>
<property name="width-chars">3</property>
- </widget>
+ </object>
<packing>
<property name="position">5</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_right_thumb_shift_custom_key">
+ <object class="GtkLabel" id="label_right_thumb_shift_custom_key">
<property name="visible">False</property>
<property name="label" translatable="yes">_Right Thumb Shift</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry_right_thumb_shift_custom_key</property>
- </widget>
+ </object>
<packing>
<property name="position">6</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_right_thumb_shift_custom_key">
+ <object class="GtkEntry" id="entry_right_thumb_shift_custom_key">
<property name="visible">False</property>
<property name="width-chars">3</property>
- </widget>
+ </object>
<packing>
<property name="position">7</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_add_custom_key">
+ <object class="GtkButton" id="button_add_custom_key">
<property name="visible">True</property>
<property name="label">gtk-add</property>
<property name="visible">True</property>
@@ -2097,13 +2348,13 @@ FMV KB611 key extension</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="position">8</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_remove_custom_key">
+ <object class="GtkButton" id="button_remove_custom_key">
<property name="visible">True</property>
<property name="label">gtk-remove</property>
<property name="visible">True</property>
@@ -2111,54 +2362,56 @@ FMV KB611 key extension</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
- </widget>
+ </object>
<packing>
<property name="position">9</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area3">
+ <object class="GtkHButtonBox" id="dialog-action_area3">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="closebutton301">
+ <object class="GtkButton" id="closebutton301">
<property name="visible">True</property>
<property name="label">gtk-close</property>
- <property name="response_id">0</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="use_stock">True</property>
<property name="receives_default">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkMessageDialog" id="quit_check">
+ <action-widgets>
+ <action-widget response="0">closebutton301</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkMessageDialog" id="quit_check">
<property name="border_width">5</property>
<property name="resizable">False</property>
<property name="modal">True</property>
@@ -2170,11 +2423,11 @@ FMV KB611 key extension</property>
<property name="text">Confirm</property>
<property name="secondary_text">Are you sure to close Setup?</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox6">
+ <object class="GtkVBox" id="dialog-vbox6">
<property name="visible">True</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area6">
+ <object class="GtkHButtonBox" id="dialog-action_area6">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
@@ -2183,17 +2436,17 @@ FMV KB611 key extension</property>
<child>
<placeholder/>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkMessageDialog" id="quit_check_without_save">
+ </object>
+ <object class="GtkMessageDialog" id="quit_check_without_save">
<property name="border_width">5</property>
<property name="resizable">False</property>
<property name="modal">True</property>
@@ -2205,11 +2458,11 @@ FMV KB611 key extension</property>
<property name="text">Notice!</property>
<property name="secondary_text">Are you sure to close Setup without save configure?</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox7">
+ <object class="GtkVBox" id="dialog-vbox7">
<property name="visible">True</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area7">
+ <object class="GtkHButtonBox" id="dialog-action_area7">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
@@ -2218,17 +2471,17 @@ FMV KB611 key extension</property>
<child>
<placeholder/>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkMessageDialog" id="key_input_dialog">
+ </object>
+ <object class="GtkMessageDialog" id="key_input_dialog">
<property name="border_width">5</property>
<property name="resizable">False</property>
<property name="modal">True</property>
@@ -2238,14 +2491,14 @@ FMV KB611 key extension</property>
<property name="buttons">cancel</property>
<property name="text">Please press a key (or a key combination)</property>
<property name="secondary_text">The dialog will be closed when the key is released</property>
- <signal name="key_press_event" handler="on_key_input_dialog_key_press_event"/>
- <signal name="key_release_event" handler="on_key_input_dialog_key_release_event"/>
+ <signal handler="on_key_input_dialog_key_press_event" name="key_press_event"/>
+ <signal handler="on_key_input_dialog_key_release_event" name="key_release_event"/>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox8">
+ <object class="GtkVBox" id="dialog-vbox8">
<property name="visible">True</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area8">
+ <object class="GtkHButtonBox" id="dialog-action_area8">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
@@ -2254,17 +2507,17 @@ FMV KB611 key extension</property>
<child>
<placeholder/>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkMessageDialog" id="invalid_keysym">
+ </object>
+ <object class="GtkMessageDialog" id="invalid_keysym">
<property name="border_width">5</property>
<property name="resizable">False</property>
<property name="modal">True</property>
@@ -2276,11 +2529,11 @@ FMV KB611 key extension</property>
<property name="text">Invalid keysym</property>
<property name="secondary_text">This keysym is not valid</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox9">
+ <object class="GtkVBox" id="dialog-vbox9">
<property name="visible">True</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area9">
+ <object class="GtkHButtonBox" id="dialog-action_area9">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
@@ -2289,71 +2542,71 @@ FMV KB611 key extension</property>
<child>
<placeholder/>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
- <widget class="GtkVBox" id="dict:add_extra_vbox">
+ </object>
+ <object class="GtkVBox" id="dict:add_extra_vbox">
<property name="visible">True</property>
<property name="no_show_all">True</property>
<property name="spacing">10</property>
<child>
- <widget class="GtkTable" id="table10">
+ <object class="GtkTable" id="table10">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
- <widget class="GtkLabel" id="label60">
+ <object class="GtkLabel" id="label80">
<property name="visible">True</property>
<property name="label" translatable="yes">_Short Label:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">dict:short_entry</property>
- </widget>
+ </object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="dict:short_entry">
+ <object class="GtkEntry" id="dict:short_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="max-length">1</property>
- </widget>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label61">
+ <object class="GtkLabel" id="label81">
<property name="visible">True</property>
<property name="label" translatable="yes">_Description:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">dict:long_entry</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="dict:long_entry">
+ <object class="GtkEntry" id="dict:long_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
- </widget>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
@@ -2361,14 +2614,14 @@ FMV KB611 key extension</property>
<property name="bottom_attach">2</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="dict:single">
+ <object class="GtkCheckButton" id="dict:single">
<property name="label" translatable="yes">_Use your dictionary alone with switching dictionaries</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2376,8 +2629,7 @@ FMV KB611 key extension</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="active">True</property>
- <accelerator key="U" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -2385,15 +2637,14 @@ FMV KB611 key extension</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="dict:embed">
+ <object class="GtkCheckButton" id="dict:embed">
<property name="label" translatable="yes">_Embed your dictionary in the system dictionary</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <accelerator key="E" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -2402,23 +2653,22 @@ FMV KB611 key extension</property>
</child>
<child>
<!-- Unfortunatelly reverse conversion is too slow. -->
- <widget class="GtkCheckButton" id="dict:reverse">
+ <object class="GtkCheckButton" id="dict:reverse">
<property name="label" translatable="yes">Enable the _reverse conversion</property>
<property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
- <accelerator key="R" signal="grab_focus" modifiers="GDK_MOD1_MASK"/>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
- </widget>
- <widget class="GtkAboutDialog" id="about_dialog">
+ </object>
+ <object class="GtkAboutDialog" id="about_dialog">
<property name="program-name">IBus-Anthy</property>
<property name="copyright">Copyright (c) 2007-2008 Peng Huang
Copyright (c) 2009 Hideaki ABE
@@ -2429,7 +2679,7 @@ Copyright (c) 2007-2010 Red Hat, Inc.</property>
<property name="website">http://code.google.com/p/ibus/</property>
<property name="authors">Takao Fujiwara &lt;takao.fujiwara1@gmail.com&gt;</property>
<property name="translator-credits" translatable="yes">translator_credits</property>
- <property name="logo-icon-name"></property>
+ <property name="logo-icon-name"/>
<property name="wrap-license">True</property>
- </widget>
-</glade-interface>
+ </object>
+</interface>