├── ChangeLog ├── po ├── LINGUAS ├── POTFILES.skip ├── POTFILES.in ├── .gitignore ├── Makevars └── ja.po ├── src ├── ibus-1.0.deps ├── ibus-skk.deps ├── ibus-setup-skk.desktop.in.in ├── config.vapi ├── skk.xml.in.in ├── Makefile.am ├── plist.vala ├── preferences.vala ├── setup.vala ├── engine.vala └── ibus-skk-preferences.ui.in ├── .dir-locals.el ├── AUTHORS ├── THANKS ├── autogen.sh ├── NEWS ├── icons ├── Makefile.am └── ibus-skk.svg ├── m4 └── Makefile.am ├── README.md ├── README ├── Makefile.am ├── configure.ac ├── ibus-skk.spec.in ├── git.mk └── COPYING /ChangeLog: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | ja 2 | 3 | -------------------------------------------------------------------------------- /src/ibus-1.0.deps: -------------------------------------------------------------------------------- 1 | gio-2.0 2 | -------------------------------------------------------------------------------- /src/ibus-skk.deps: -------------------------------------------------------------------------------- 1 | gee-0.8 2 | skk-1.0 3 | ibus-1.0 4 | -------------------------------------------------------------------------------- /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ((c-mode . ((indent-tabs-mode . nil))) 2 | (vala-mode . ((indent-tabs-mode . nil)))) 3 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | src/ibus-setup-skk.desktop.in 2 | src/ibus-skk-preferences.ui 3 | src/engine.c 4 | src/setup.c 5 | src/skk.xml.in 6 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/engine.vala 2 | src/setup.vala 3 | [type: gettext/glade]src/ibus-skk-preferences.ui.in 4 | src/ibus-setup-skk.desktop.in.in 5 | src/skk.xml.in.in 6 | -------------------------------------------------------------------------------- /src/ibus-setup-skk.desktop.in.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | _Name=IBus SKK Setup 3 | _Comment=Set up IBus SKK engine 4 | Exec=@libexecdir@/ibus-setup-skk 5 | Icon=@pkgdatadir@/icons/ibus-skk.svg 6 | NoDisplay=true 7 | Type=Application 8 | StartupNotify=true 9 | -------------------------------------------------------------------------------- /po/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | Makefile.in.in 4 | Makevars.template 5 | POTFILES 6 | Rules-quot 7 | boldquot.sed 8 | en@boldquot.header 9 | en@quot.header 10 | insert-header.sin 11 | quot.sed 12 | remove-potcdate.sed 13 | remove-potcdate.sin 14 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | The implementation is based on ibus-tmpl, ibus-anthy, and ibus-pinyin. 2 | Translation tables are from SKK. 3 | 4 | Huang Peng ibus-tmpl, ibus-anthy, ibus-pinyin 5 | Hideaki ABE ibus-anthy 6 | Takao Fujiwara ibus-anthy 7 | Daiki Ueno 8 | TAGOMORI Satoshi 9 | OHASHI Hideya 10 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | Here is a list of people, who helped in IBus-SKK development. 2 | 3 | Hiroto Kagotani 4 | HiroyukiKubota 5 | IRIE Shinsuke irieshinsuke at yahoo.co.jp 6 | iws iws1011 at gmail.com 7 | Jens Petersen petersen at redhat.com 8 | Kazuhiro NISHIYAMA 9 | OBATA Akio 10 | OHASHI Hideya ohachige at gmail.com 11 | TAGOMORI Satoshi sigh at shirts.st 12 | TAKAHASHI Tamotsu 13 | Takao Fujiwara tfujiwar at redhat.com 14 | YAMASHITA Junji ysiijj at gmail.com 15 | -------------------------------------------------------------------------------- /src/config.vapi: -------------------------------------------------------------------------------- 1 | [CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")] 2 | namespace Config 3 | { 4 | public const string GETTEXT_PACKAGE; 5 | public const string PACKAGE_DATADIR; 6 | public const string PACKAGE_NAME; 7 | public const string PACKAGE_VERSION; 8 | public const string LOCALEDIR; 9 | public const string LIBEXECDIR; 10 | public const string SETUPDIR; 11 | public const string DATADIR; 12 | public const string VERSION; 13 | } 14 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | 4 | srcdir=`dirname $0` 5 | test -z "$srcdir" && srcdir=. 6 | 7 | PKG_NAME="ibus-skk" 8 | 9 | (test -f $srcdir/configure.ac \ 10 | && test -f $srcdir/README ) || { 11 | echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" 12 | echo " top-level $PKG_NAME directory" 13 | exit 1 14 | } 15 | 16 | which gnome-autogen.sh || { 17 | echo "You need to install gnome-common from the GNOME CVS" 18 | exit 1 19 | } 20 | 21 | ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" 22 | REQUIRED_AUTOMAKE_VERSION=1.10 23 | REQUIRED_AUTOCONF_VERSION=2.60 24 | 25 | . gnome-autogen.sh 26 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Noteworthy changes in version 1.4.3 (2017-11-12) 2 | ------------------------------------------------ 3 | 4 | * Build and translation fixes [#58, #59] 5 | 6 | Noteworthy changes in version 1.4.2 (2014-09-09) 7 | ------------------------------------------------ 8 | 9 | * Migrate to libgee 0.8 from 0.6 (libskk Issue#29). 10 | * Optimize property registration upon focus change. 11 | * PageUp/PageDown/Up/Down keys on candidate window now work. 12 | * Install ibus-setup-skk.desktop. 13 | 14 | Noteworthy changes in version 1.4.1 (2012-03-29) 15 | ------------------------------------------------ 16 | 17 | * Use libskk's X keysym handling. 18 | 19 | Noteworthy changes in version 1.4.0 (2012-01-25) 20 | ------------------------------------------------ 21 | 22 | * Initial release using libskk. 23 | -------------------------------------------------------------------------------- /src/skk.xml.in.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.freedesktop.IBus.SKK 5 | SKK Component 6 | @libexecdir@/ibus-engine-skk --ibus 7 | @VERSION@ 8 | Daiki Ueno <ueno@unixuser.org> 9 | GPL 10 | http://code.google.com/p/ibus 11 | ibus-skk 12 | 13 | 14 | 15 | 16 | skk 17 | ja 18 | GPL 19 | Daiki Ueno <ueno@unixuser.org> 20 | @pkgdatadir@/icons/ibus-skk.svg 21 | jp 22 | <_longname>SKK 23 | <_description>SKK Input Method 24 | 70 25 | 26 | InputMode 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /icons/Makefile.am: -------------------------------------------------------------------------------- 1 | # vim:set noet ts=4: 2 | # 3 | # ibus-skk - The SKK engine for IBus 4 | # 5 | # Copyright (c) 2007-2008 Huang Peng 6 | # Copyright (C) 2009-2010 Daiki Ueno 7 | # 8 | # This library is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU Lesser General Public 10 | # License as published by the Free Software Foundation; either 11 | # version 2 of the License, or (at your option) any later version. 12 | # 13 | # This library is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU Lesser General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU Lesser General Public 19 | # License along with this library; if not, write to the Free Software 20 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 | # 02110-1301 USA 22 | 23 | dist_icons_DATA = ibus-skk.svg 24 | iconsdir = $(pkgdatadir)/icons 25 | 26 | -include $(top_srcdir)/git.mk 27 | -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | # vim:set noet ts=4: 2 | # 3 | # ibus-tmpl - The Input Bus template project 4 | # 5 | # Copyright (c) 2007-2008 Huang Peng 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2, or (at your option) 10 | # any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 | # 02110-1301, USA. 21 | 22 | GITIGNOREFILES = \ 23 | intltool.m4 \ 24 | libtool.m4 \ 25 | ltoptions.m4 \ 26 | ltsugar.m4 \ 27 | ltversion.m4 \ 28 | lt~obsolete.m4 \ 29 | $(NULL) 30 | 31 | -include $(top_srcdir)/git.mk 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ibus-skk -- a Japanese SKK input engine for IBus 2 | ====== 3 | 4 | What's this? 5 | ------ 6 | 7 | ibus-skk is an implementation of the SKK (Simple Kana-Kanji) input 8 | method on the IBus input method framework. Note that SKK works quite 9 | differently from other Japanese input methods. To learn about SKK, 10 | see: 11 | 12 | * [SKK](https://ja.wikipedia.org/wiki/SKK) 13 | 14 | How to install 15 | ------ 16 | If you build from the source, you will need to separately install 17 | [libskk](http://github.com/ueno/libskk/downloads/). 18 | 19 | After installing it, do: 20 | ``` 21 | $ ./configure 22 | $ make 23 | $ sudo make install 24 | ``` 25 | 26 | How to report bugs 27 | ------ 28 | 29 | Use [issue tracker at GitHub](http://github.com/ueno/ibus-skk/issues). 30 | 31 | License 32 | ------ 33 | ``` 34 | GPLv2+ 35 | 36 | Copyright (C) 2011-2017 Daiki Ueno 37 | Copyright (C) 2011-2017 Red Hat, Inc. 38 | 39 | This file is free software; as a special exception the author gives 40 | unlimited permission to copy and/or distribute it, with or without 41 | modifications, as long as this notice is preserved. 42 | 43 | This file is distributed in the hope that it will be useful, but 44 | WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 45 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 46 | ``` 47 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | ibus-skk -- a Japanese SKK input engine for IBus 2 | 3 | * What's this? 4 | 5 | ibus-skk is an implementation of the SKK (Simple Kana-Kanji) input 6 | method on the IBus input method framework. Note that SKK works quite 7 | differently from other Japanese input methods. To learn about SKK, 8 | see: 9 | 10 | https://ja.wikipedia.org/wiki/SKK 11 | 12 | * How to install 13 | 14 | If you build from the source, you will need to separately install 15 | libskk, a library which implements SKK algorithm: 16 | http://github.com/ueno/libskk/downloads/ 17 | 18 | After installing it, do: 19 | 20 | $ ./configure 21 | $ make 22 | $ sudo make install 23 | 24 | * How to report bugs 25 | 26 | Use the issue trackers on GitHub: 27 | 28 | http://github.com/ueno/ibus-skk/issues 29 | 30 | Please write in plain English so that we can forward some bugs to 31 | other components. 32 | 33 | * License 34 | 35 | GPLv2+ 36 | 37 | Copyright (C) 2011-2017 Daiki Ueno 38 | Copyright (C) 2011-2017 Red Hat, Inc. 39 | 40 | This file is free software; as a special exception the author gives 41 | unlimited permission to copy and/or distribute it, with or without 42 | modifications, as long as this notice is preserved. 43 | 44 | This file is distributed in the hope that it will be useful, but 45 | WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 46 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 47 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | # vim:set noet ts=4: 2 | # 3 | # ibus-skk - The SKK engine for IBus 4 | # 5 | # Copyright (c) 2007-2008 Huang Peng 6 | # Copyright (C) 2009-2017 Daiki Ueno 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 | # 02110-1301, USA. 22 | 23 | SUBDIRS = \ 24 | src \ 25 | icons \ 26 | m4 \ 27 | po \ 28 | $(NULL) 29 | 30 | ACLOCAL_AMFLAGS = -I m4 31 | 32 | EXTRA_DIST = \ 33 | autogen.sh \ 34 | ibus-skk.spec.in \ 35 | $(NULL) 36 | 37 | GITIGNOREFILES = \ 38 | INSTALL \ 39 | aclocal.m4 \ 40 | compile \ 41 | config.guess \ 42 | config.h.in \ 43 | config.sub \ 44 | depcomp \ 45 | install-sh \ 46 | ltmain.sh \ 47 | missing \ 48 | mkinstalldirs \ 49 | $(NULL) 50 | 51 | DISTCLEANFILES = \ 52 | po/stamp-it \ 53 | $(NULL) 54 | 55 | dist-hook: 56 | if test -d .git ; then \ 57 | git log --name-status --date=iso > $(distdir)/ChangeLog ; \ 58 | fi 59 | 60 | -include $(top_srcdir)/git.mk 61 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = Daiki Ueno 22 | 23 | # This is the email address or URL to which the translators shall report 24 | # bugs in the untranslated strings: 25 | # - Strings which are not entire sentences, see the maintainer guidelines 26 | # in the GNU gettext documentation, section 'Preparing Strings'. 27 | # - Strings which use unclear terms or require additional context to be 28 | # understood. 29 | # - Strings which make invalid assumptions about notation of date, time or 30 | # money. 31 | # - Pluralisation problems. 32 | # - Incorrect English spelling. 33 | # - Incorrect formatting. 34 | # It can be your email address, or a mailing list address where translators 35 | # can write to without being subscribed, or the URL of a web page through 36 | # which the translators can contact you. 37 | MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT) 38 | 39 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 40 | # message catalogs shall be used. It is usually empty. 41 | EXTRA_LOCALE_CATEGORIES = 42 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | # vim:set et ts=4: 2 | # 3 | # ibus-skk - The SKK engine for IBus 4 | # 5 | # Copyright (c) 2007-2008 Huang Peng 6 | # Copyright (C) 2009-2017 Daiki Ueno 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 | # 02110-1301, USA. 22 | 23 | # if not 1, append datestamp to the version number. 24 | m4_define([package_name], [ibus-skk]) 25 | m4_define([ibus_released], [1]) 26 | m4_define([ibus_major_version], [1]) 27 | m4_define([ibus_minor_version], [4]) 28 | m4_define([ibus_micro_version], [3]) 29 | m4_define([ibus_maybe_datestamp], 30 | m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi])) 31 | 32 | m4_define([ibus_version], 33 | ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp) 34 | 35 | AC_INIT(package_name, ibus_version, [http://github.com/ueno/ibus-skk/issues], package_name) 36 | AM_INIT_AUTOMAKE([dist-xz no-dist-gzip silent-rules]) 37 | 38 | AC_CONFIG_HEADERS([config.h]) 39 | AC_CONFIG_MACRO_DIRS([m4]) 40 | 41 | # define PACKAGE_VERSION_* variables 42 | AM_SANITY_CHECK 43 | AM_MAINTAINER_MODE 44 | AM_DISABLE_STATIC 45 | AC_PROG_CC 46 | AM_PROG_CC_C_O 47 | AC_ISC_POSIX 48 | AC_HEADER_STDC 49 | IT_PROG_INTLTOOL([0.35.0]) 50 | AM_PROG_LIBTOOL 51 | 52 | # For dislpay Date 53 | m4_define(ibus_maybe_datedisplay, 54 | m4_esyscmd([if test x]ibus_released[ != x1; then date '+%a %b %d %Y' | tr -d '\n\r'; fi])) 55 | m4_define([ibus_datedisplay], ibus_maybe_datedisplay) 56 | DATE_DISPLAY="ibus_datedisplay" 57 | AC_SUBST(DATE_DISPLAY) 58 | 59 | # check ibus 60 | PKG_CHECK_MODULES(IBUS, [ibus-1.0 >= 1.5.11], , 61 | AC_MSG_ERROR([can't find ibus])) 62 | 63 | # check libskk 64 | PKG_CHECK_MODULES(LIBSKK, [libskk >= 1.0.2], , 65 | AC_MSG_ERROR([can't find libskk])) 66 | 67 | # check gtk+ 68 | PKG_CHECK_MODULES(GTK, [gtk+-3.0], , 69 | AC_MSG_ERROR([can't find gtk+-3.0])) 70 | 71 | # check vala 72 | AM_PROG_VALAC([0.10.0]) 73 | 74 | AC_PATH_PROG(VALAC, valac, valac) 75 | AC_SUBST(VALAC) 76 | AC_SUBST(VALAFLAGS) 77 | 78 | # define GETTEXT_* variables 79 | GETTEXT_PACKAGE=ibus-skk 80 | AC_SUBST(GETTEXT_PACKAGE) 81 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the read-only architecture-independent data directory.]) 82 | 83 | # OUTPUT files 84 | AC_CONFIG_FILES([ po/Makefile.in 85 | Makefile 86 | ibus-skk.spec 87 | src/Makefile 88 | src/ibus-skk-preferences.ui 89 | icons/Makefile 90 | m4/Makefile 91 | ]) 92 | 93 | AC_OUTPUT 94 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | libexec_PROGRAMS = ibus-engine-skk ibus-setup-skk 2 | noinst_LTLIBRARIES = libutil.la 3 | 4 | libutil_la_VALAFLAGS = \ 5 | -H libutil.h --vapi ibus-skk.vapi \ 6 | --vapidir=. \ 7 | --pkg config \ 8 | --pkg gee-0.8 \ 9 | --pkg skk-1.0 \ 10 | --pkg ibus-1.0 \ 11 | --library ibus-skk \ 12 | $(VALAFLAGS) 13 | libutil_la_SOURCES = \ 14 | preferences.vala \ 15 | plist.vala 16 | libutil_la_CFLAGS = \ 17 | $(COMMON_CFLAGS) 18 | 19 | BUILT_SOURCES = ibus-skk.vapi 20 | 21 | # force include config.h before gi18n.h. 22 | AM_CPPFLAGS = -include $(CONFIG_HEADER) 23 | 24 | COMMON_CFLAGS = \ 25 | $(IBUS_CFLAGS) \ 26 | $(LIBSKK_CFLAGS) \ 27 | -DPACKAGE_DATADIR=\"$(pkgdatadir)\" \ 28 | -DLOCALEDIR=\"$(datadir)/locale\" \ 29 | -DSETUPDIR=\"$(setupdir)\" \ 30 | -DLIBEXECDIR=\"$(libexecdir)\" \ 31 | -DDATADIR=\"$(datadir)\" 32 | 33 | COMMON_LIBS = \ 34 | $(IBUS_LIBS) \ 35 | $(LIBSKK_LIBS) 36 | 37 | ibus_engine_skk_VALAFLAGS = \ 38 | --vapidir=. \ 39 | --pkg config --pkg ibus-skk \ 40 | $(VALAFLAGS) 41 | 42 | ibus_engine_skk_CFLAGS = \ 43 | $(COMMON_CFLAGS) 44 | 45 | ibus_engine_skk_LDADD = \ 46 | $(COMMON_LIBS) \ 47 | libutil.la 48 | 49 | ibus_engine_skk_SOURCES = \ 50 | engine.vala 51 | 52 | ibus_setup_skk_VALAFLAGS = \ 53 | --vapidir=. \ 54 | --pkg config \ 55 | --pkg ibus-skk \ 56 | --pkg gtk+-3.0 \ 57 | $(VALAFLAGS) 58 | 59 | ibus_setup_skk_CFLAGS = \ 60 | $(COMMON_CFLAGS) \ 61 | $(GTK_CFLAGS) 62 | 63 | ibus_setup_skk_LDADD = \ 64 | $(COMMON_LIBS) \ 65 | $(GTK_LIBS) \ 66 | libutil.la 67 | 68 | ibus_setup_skk_SOURCES = \ 69 | setup.vala 70 | 71 | setupdir = $(pkgdatadir)/setup 72 | setup_DATA = ibus-skk-preferences.ui 73 | 74 | edit = sed \ 75 | -e 's|@VERSION[@]|$(VERSION)|g' \ 76 | -e 's|@libexecdir[@]|$(libexecdir)|g' \ 77 | -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' 78 | 79 | desktop_in_in_files = ibus-setup-skk.desktop.in.in 80 | desktop_in_files = $(desktop_in_in_files:.in.in=.in) 81 | 82 | $(desktop_in_files): %.desktop.in: %.desktop.in.in Makefile 83 | $(AM_V_GEN) $(edit) $< > $@.tmp && mv $@.tmp $@ 84 | 85 | desktopdir=$(datadir)/applications 86 | desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) 87 | 88 | @INTLTOOL_DESKTOP_RULE@ 89 | 90 | component_DATA = skk.xml 91 | componentdir = $(datadir)/ibus/component 92 | 93 | skk.xml.in: skk.xml.in.in 94 | $(AM_V_GEN) $(edit) $< > $@.tmp && mv $@.tmp $@ 95 | 96 | @INTLTOOL_XML_NOMERGE_RULE@ 97 | 98 | GITIGNOREFILES = \ 99 | $(libutil_la_SOURCES:.vala=.c) \ 100 | $(ibus_engine_skk_SOURCES:.vala=.c) \ 101 | $(ibus_setup_skk_SOURCES:.vala=.c) \ 102 | libutil_la_vala.stamp \ 103 | ibus_engine_skk_vala.stamp \ 104 | ibus_setup_skk_vala.stamp \ 105 | libutil.h \ 106 | $(NULL) 107 | 108 | CLEANFILES = \ 109 | ibus-skk.vapi \ 110 | $(desktop_DATA) \ 111 | $(desktop_in_files) \ 112 | skk.xml.in \ 113 | skk.xml \ 114 | $(NULL) 115 | 116 | EXTRA_DIST = \ 117 | config.vapi \ 118 | ibus-skk.deps \ 119 | ibus-1.0.vapi \ 120 | ibus-1.0.deps \ 121 | ibus-skk-preferences.ui.in \ 122 | $(desktop_in_in_files) \ 123 | skk.xml.in.in \ 124 | $(NULL) 125 | 126 | DISTCLEANFILES = \ 127 | ibus-skk-preferences.ui \ 128 | $(NULL) 129 | 130 | -include $(top_srcdir)/git.mk 131 | -------------------------------------------------------------------------------- /ibus-skk.spec.in: -------------------------------------------------------------------------------- 1 | Name: @PACKAGE_NAME@ 2 | Version: @PACKAGE_VERSION@ 3 | Release: 1%{?dist} 4 | Summary: Japanese SKK input method for ibus 5 | 6 | Group: System Environment/Libraries 7 | License: GPLv2+ 8 | URL: http://github.com/ueno/ibus-skk 9 | Source0: http://cloud.github.com/downloads/ueno/ibus-skk/%{name}-%{version}.tar.gz 10 | 11 | BuildRequires: intltool 12 | BuildRequires: libskk-devel 13 | BuildRequires: ibus-devel 14 | BuildRequires: gtk3-devel 15 | Requires: ibus, skkdic 16 | 17 | %description 18 | A Japanese Simple Kana Kanji Input Method Engine for ibus. 19 | 20 | 21 | %prep 22 | %setup -q 23 | 24 | 25 | %build 26 | %configure 27 | make %{?_smp_mflags} 28 | 29 | 30 | %install 31 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" 32 | 33 | %find_lang %{name} 34 | 35 | 36 | %files -f %{name}.lang 37 | %doc AUTHORS COPYING README 38 | %{_datadir}/ibus-skk 39 | %{_libexecdir}/ibus-*-skk 40 | %{_datadir}/ibus/component/skk.xml 41 | 42 | 43 | %changelog 44 | * @DATE_DISPLAY@ Daiki Ueno - @PACKAGE_VERSION@-1 45 | - experimental release using libskk 46 | 47 | * Fri Sep 2 2011 Daiki Ueno - 1.3.9-1 48 | - new upstream release (fixes a typo of the symbol XML entity ref) 49 | 50 | * Mon Aug 29 2011 Daiki Ueno - 1.3.8-1 51 | - new upstream release 52 | 53 | * Thu Aug 4 2011 Daiki Ueno - 1.3.7-2 54 | - add ibus-skk-xx-icon-symbol.patch (closes #727020) 55 | 56 | * Wed Jun 15 2011 Daiki Ueno - 1.3.7-1 57 | - new upstream release 58 | 59 | * Thu May 12 2011 Daiki Ueno - 1.3.6-1 60 | - new upstream release 61 | - disable ibus-skk-vkbd.patch, since it is experimental 62 | - drop preparing/cleaning buildroot 63 | 64 | * Tue Mar 8 2011 Daiki Ueno - 1.3.5-4 65 | - regenerate configure script 66 | 67 | * Tue Mar 8 2011 Daiki Ueno - 1.3.5-3 68 | - add ibus-skk-vkbd.patch 69 | 70 | * Wed Feb 09 2011 Fedora Release Engineering - 1.3.5-2 71 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 72 | 73 | * Mon Dec 20 2010 Daiki Ueno - 1.3.5-1 74 | - new upstream release 75 | 76 | * Tue Nov 9 2010 Daiki Ueno - 1.3.3-1 77 | - new upstream release 78 | 79 | * Wed Oct 13 2010 Daiki Ueno - 1.3.2-1 80 | - new upstream release 81 | 82 | * Tue Sep 14 2010 Daiki Ueno - 1.3.0-1 83 | - new upstream release 84 | 85 | * Mon Aug 30 2010 Daiki Ueno - 1.0.0-1 86 | - new upstream release 87 | 88 | * Tue Aug 3 2010 Daiki Ueno - 0.0.10-1 89 | - new upstream release 90 | 91 | * Wed Jun 30 2010 Daiki Ueno - 0.0.9-1 92 | - new upstream release 93 | 94 | * Tue May 25 2010 Daiki Ueno - 0.0.8-1 95 | - new upstream release 96 | 97 | * Mon Apr 26 2010 Daiki Ueno - 0.0.5-1 98 | - new upstream release 99 | - add BuildRoot tag and clean buildroot in the install target 100 | 101 | * Sun Jan 17 2010 Daiki Ueno - 0.0.4-2 102 | - set BuildArch to noarch 103 | - add pkgconfig to BR 104 | - reformat changelog 105 | 106 | * Mon Jan 11 2010 Daiki Ueno - 0.0.4-1 107 | - current version 108 | 109 | * Thu Dec 24 2009 Daiki Ueno - 0.0.2-1 110 | - new upstream release 111 | 112 | * Fri Dec 11 2009 Jens Petersen - 0.0.1-1 113 | - initial packaging for fedora 114 | -------------------------------------------------------------------------------- /src/plist.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011-2017 Daiki Ueno 3 | * Copyright (C) 2011-2017 Red Hat, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | * 02110-1301, USA. 19 | */ 20 | using Gee; 21 | 22 | public errordomain PListParseError { 23 | FAILED 24 | } 25 | 26 | public class PList : Object { 27 | Map map = new HashMap (); 28 | 29 | public new string? @get (string key) { 30 | return map.get (key); 31 | } 32 | 33 | public PList (string str) throws PListParseError { 34 | StringBuilder builder = new StringBuilder (); 35 | string? key = null, value = null; 36 | int index; 37 | for (index = 0; index < str.length; index++) { 38 | switch (str[index]) { 39 | case '\\': 40 | index++; 41 | if (index == str.length) { 42 | throw new PListParseError.FAILED (""); 43 | } 44 | builder.append_c (str[index]); 45 | break; 46 | case ',': 47 | if (key == null) { 48 | throw new PListParseError.FAILED (""); 49 | } 50 | value = builder.str; 51 | builder.erase (); 52 | map.set (key, value); 53 | key = null; 54 | break; 55 | case '=': 56 | key = builder.str; 57 | builder.erase (); 58 | value = null; 59 | break; 60 | default: 61 | builder.append_c (str[index]); 62 | break; 63 | } 64 | } 65 | if (index == str.length) { 66 | if (key == null) { 67 | throw new PListParseError.FAILED (""); 68 | } 69 | value = builder.str; 70 | map.set (key, value); 71 | } 72 | } 73 | 74 | public static string escape (string str) { 75 | var builder = new StringBuilder (); 76 | int index = 0; 77 | unichar uc; 78 | while (str.get_next_char (ref index, out uc)) { 79 | if (uc == ',' || uc == '\\' || uc == '=') { 80 | builder.append ("\\"); 81 | } 82 | builder.append_unichar (uc); 83 | } 84 | return builder.str; 85 | } 86 | 87 | public string to_string () { 88 | var props = new ArrayList (); 89 | var keys = new ArrayList (); 90 | keys.add_all (map.keys); 91 | keys.sort (); 92 | foreach (var key in keys) { 93 | var value = map.get (key); 94 | props.add ("%s=%s".printf (PList.escape (key), 95 | PList.escape (value))); 96 | } 97 | return string.joinv (",", props.to_array ()); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/preferences.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011-2017 Daiki Ueno 3 | * Copyright (C) 2011-2017 Red Hat, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | * 02110-1301, USA. 19 | */ 20 | using Gee; 21 | 22 | public class Preferences : Object { 23 | IBus.Config config; 24 | 25 | Map _default = new HashMap (); 26 | Map current = new HashMap (); 27 | 28 | public void load () { 29 | Variant? values = config.get_values ("engine/skk"); 30 | if (values != null) { 31 | var iter = values.iterator (); 32 | Variant? entry = null; 33 | while ((entry = iter.next_value ()) != null) { 34 | string name; 35 | Variant value; 36 | entry.get ("{sv}", out name, out value); 37 | current.set (name, value); 38 | } 39 | } 40 | } 41 | 42 | public void save () { 43 | var iter = current.map_iterator (); 44 | while (iter.next ()) { 45 | config.set_value ("engine/skk", 46 | iter.get_key (), 47 | iter.get_value ()); 48 | } 49 | } 50 | 51 | public new Variant? @get (string name) { 52 | Variant? value = current.get (name); 53 | if (value != null) { 54 | return value; 55 | } 56 | return _default.get (name); 57 | } 58 | 59 | public new void @set (string name, Variant value) { 60 | current.set (name, value); 61 | } 62 | 63 | static const string[] AUTO_START_HENKAN_KEYWORDS = { 64 | "を", "、", "。", ".", ",", "?", "」", 65 | "!", ";", ":", ")", ";", ":", ")", 66 | "”", "】", "』", "》", "〉", "}", "]", 67 | "〕", "}", "]", "?", ".", ",", "!" 68 | }; 69 | 70 | public Preferences (IBus.Config config) { 71 | ArrayList dictionaries = new ArrayList (); 72 | dictionaries.add ( 73 | "type=file,file=%s/ibus-skk/user.dict,mode=readwrite".printf ( 74 | Environment.get_user_config_dir ())); 75 | dictionaries.add ( 76 | "type=file,file=/usr/share/skk/SKK-JISYO.L,mode=readonly"); 77 | dictionaries.add ( 78 | "type=server,host=localhost,port=1178"); 79 | _default.set ("dictionaries", 80 | new Variant.strv (dictionaries.to_array ())); 81 | _default.set ("auto_start_henkan_keywords", 82 | new Variant.strv (AUTO_START_HENKAN_KEYWORDS)); 83 | _default.set ("period_style", 84 | new Variant.int32 ((int32) Skk.PeriodStyle.JA_JA)); 85 | _default.set ("page_size", 86 | new Variant.int32 (7)); 87 | _default.set ("pagination_start", 88 | new Variant.int32 (4)); 89 | _default.set ("show_annotation", 90 | new Variant.boolean (true)); 91 | _default.set ("initial_input_mode", 92 | new Variant.int32 (Skk.InputMode.HIRAGANA)); 93 | _default.set ("egg_like_newline", 94 | new Variant.boolean (false)); 95 | _default.set ("typing_rule", 96 | new Variant.string ("default")); 97 | 98 | this.config = config; 99 | load (); 100 | config.value_changed.connect (value_changed_cb); 101 | } 102 | 103 | public signal void value_changed (string name, Variant value); 104 | 105 | void value_changed_cb (IBus.Config config, 106 | string section, 107 | string name, 108 | Variant value) 109 | { 110 | if (section == "engine/skk") { 111 | current.set (name, value); 112 | value_changed (name, value); 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /po/ja.po: -------------------------------------------------------------------------------- 1 | # Japanese translations for ibus-skk package 2 | # ibus-skk パッケージに対する英訳. 3 | # Copyright (C) 2009-2010 Daiki Ueno 4 | # This file is distributed under the same license as the ibus-skk package. 5 | # Daiki Ueno , 2009. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: ibus-skk 1.2.0.20091108\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2014-09-09 12:00+0900\n" 12 | "PO-Revision-Date: 2014-09-09 12:01+0900\n" 13 | "Last-Translator: Daiki Ueno \n" 14 | "Language-Team: Japanese\n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=1; plural=0;\n" 20 | 21 | #: ../src/engine.vala:65 ../src/ibus-skk-preferences.ui.in.h:2 22 | msgid "Hiragana" 23 | msgstr "ひらがな" 24 | 25 | #: ../src/engine.vala:71 26 | msgid "Katakana" 27 | msgstr "カタカナ" 28 | 29 | #: ../src/engine.vala:77 30 | msgid "Halfwidth Katakana" 31 | msgstr "半角カタカナ" 32 | 33 | #: ../src/engine.vala:83 ../src/ibus-skk-preferences.ui.in.h:3 34 | msgid "Latin" 35 | msgstr "英数" 36 | 37 | #: ../src/engine.vala:89 38 | msgid "Wide Latin" 39 | msgstr "全角英数" 40 | 41 | #: ../src/engine.vala:98 42 | msgid "Switch input mode" 43 | msgstr "入力モードを変更" 44 | 45 | #: ../src/engine.vala:109 46 | msgid "Setup" 47 | msgstr "設定" 48 | 49 | #: ../src/engine.vala:111 50 | msgid "Configure SKK" 51 | msgstr "SKK を設定" 52 | 53 | #: ../src/engine.vala:251 54 | #, c-format 55 | msgid "Input Mode (%s)" 56 | msgstr "入力モード (%s)" 57 | 58 | #: ../src/engine.vala:532 59 | msgid "Component is executed by IBus" 60 | msgstr "IBus からコンポーネントを起動" 61 | 62 | #: ../src/engine.vala:579 ../src/skk.xml.in.in.h:1 63 | msgid "SKK" 64 | msgstr "SKK" 65 | 66 | #: ../src/setup.vala:518 67 | msgid "system" 68 | msgstr "システム" 69 | 70 | #: ../src/setup.vala:520 71 | msgid "user" 72 | msgstr "ユーザー" 73 | 74 | #: ../src/setup.vala:522 75 | msgid "server" 76 | msgstr "サーバ" 77 | 78 | #: ../src/ibus-skk-preferences.ui.in.h:1 79 | msgid "Type:" 80 | msgstr "形式:" 81 | 82 | #: ../src/ibus-skk-preferences.ui.in.h:4 83 | msgid "System" 84 | msgstr "システム" 85 | 86 | #: ../src/ibus-skk-preferences.ui.in.h:5 87 | msgid "User" 88 | msgstr "ユーザー" 89 | 90 | #: ../src/ibus-skk-preferences.ui.in.h:6 91 | msgid "SKK Server" 92 | msgstr "SKK サーバ" 93 | 94 | #: ../src/ibus-skk-preferences.ui.in.h:7 95 | msgid "IBus SKK Preferences" 96 | msgstr "IBus SKK の設定" 97 | 98 | #: ../src/ibus-skk-preferences.ui.in.h:8 99 | msgid "Add.." 100 | msgstr "追加" 101 | 102 | #: ../src/ibus-skk-preferences.ui.in.h:9 103 | msgid "Remove" 104 | msgstr "削除" 105 | 106 | #: ../src/ibus-skk-preferences.ui.in.h:10 107 | msgid "Up" 108 | msgstr "上へ" 109 | 110 | #: ../src/ibus-skk-preferences.ui.in.h:11 111 | msgid "Down" 112 | msgstr "下へ" 113 | 114 | #: ../src/ibus-skk-preferences.ui.in.h:12 115 | msgid "Dictionaries" 116 | msgstr "辞書" 117 | 118 | #: ../src/ibus-skk-preferences.ui.in.h:13 119 | msgid "Return-key doesn't insert new line on commit" 120 | msgstr "確定時にリターンキーを押しても改行を挿入しない" 121 | 122 | #: ../src/ibus-skk-preferences.ui.in.h:14 123 | msgid "_Auto-start conversion characters:" 124 | msgstr "自動変換を開始する文字(_A):" 125 | 126 | #: ../src/ibus-skk-preferences.ui.in.h:15 127 | msgid "Typing _rule:" 128 | msgstr "タイピング方式(_R):" 129 | 130 | #: ../src/ibus-skk-preferences.ui.in.h:16 131 | msgid "_Initial input mode:" 132 | msgstr "初期入力モード(_I):" 133 | 134 | #: ../src/ibus-skk-preferences.ui.in.h:17 135 | msgid "_Period style:" 136 | msgstr "句読点の形式(_P):" 137 | 138 | #: ../src/ibus-skk-preferences.ui.in.h:18 139 | msgid "Typing" 140 | msgstr "タイピング" 141 | 142 | #: ../src/ibus-skk-preferences.ui.in.h:19 143 | msgid "Candidate _window page size:" 144 | msgstr "候補ウィンドウの項目数(_W):" 145 | 146 | #: ../src/ibus-skk-preferences.ui.in.h:20 147 | msgid "Candidate window pa_gination start:" 148 | msgstr "候補ウィンドウの表示開始位置(_G):" 149 | 150 | #: ../src/ibus-skk-preferences.ui.in.h:21 151 | msgid "Show annotation" 152 | msgstr "候補の注釈を表示する" 153 | 154 | #: ../src/ibus-skk-preferences.ui.in.h:22 155 | msgid "Candidate window" 156 | msgstr "候補ウィンドウ" 157 | 158 | #: ../src/ibus-skk-preferences.ui.in.h:23 159 | msgid "Behavior" 160 | msgstr "動作" 161 | 162 | #: ../src/ibus-skk-preferences.ui.in.h:24 163 | msgid "SKK input method for IBus" 164 | msgstr "IBus 入力プラットフォーム用 SKK エンジン" 165 | 166 | #: ../src/ibus-skk-preferences.ui.in.h:25 167 | msgid "About" 168 | msgstr "情報" 169 | 170 | #: ../src/ibus-setup-skk.desktop.in.in.h:1 171 | msgid "IBus SKK Setup" 172 | msgstr "IBus SKK エンジンの設定" 173 | 174 | #: ../src/ibus-setup-skk.desktop.in.in.h:2 175 | msgid "Set up IBus SKK engine" 176 | msgstr "IBus SKK エンジンの設定" 177 | 178 | #: ../src/skk.xml.in.in.h:2 179 | msgid "SKK Input Method" 180 | msgstr "SKK 入力方式" 181 | -------------------------------------------------------------------------------- /git.mk: -------------------------------------------------------------------------------- 1 | # git.mk 2 | # 3 | # Copyright 2009, Red Hat, Inc. 4 | # Copyright 2010,2011 Behdad Esfahbod 5 | # Written by Behdad Esfahbod 6 | # 7 | # Copying and distribution of this file, with or without modification, 8 | # are permitted in any medium without royalty provided the copyright 9 | # notice and this notice are preserved. 10 | # 11 | # The canonical source for this file is https://github.com/behdad/git.mk. 12 | # 13 | # To use in your project, import this file in your git repo's toplevel, 14 | # then do "make -f git.mk". This modifies all Makefile.am files in 15 | # your project to -include git.mk. Remember to add that line to new 16 | # Makefile.am files you create in your project, or just rerun the 17 | # "make -f git.mk". 18 | # 19 | # This enables automatic .gitignore generation. If you need to ignore 20 | # more files, add them to the GITIGNOREFILES variable in your Makefile.am. 21 | # But think twice before doing that. If a file has to be in .gitignore, 22 | # chances are very high that it's a generated file and should be in one 23 | # of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. 24 | # 25 | # The only case that you need to manually add a file to GITIGNOREFILES is 26 | # when remove files in one of mostlyclean-local, clean-local, distclean-local, 27 | # or maintainer-clean-local make targets. 28 | # 29 | # Note that for files like editor backup, etc, there are better places to 30 | # ignore them. See "man gitignore". 31 | # 32 | # If "make maintainer-clean" removes the files but they are not recognized 33 | # by this script (that is, if "git status" shows untracked files still), send 34 | # me the output of "git status" as well as your Makefile.am and Makefile for 35 | # the directories involved and I'll diagnose. 36 | # 37 | # For a list of toplevel files that should be in MAINTAINERCLEANFILES, see 38 | # Makefile.am.sample in the git.mk git repo. 39 | # 40 | # Don't EXTRA_DIST this file. It is supposed to only live in git clones, 41 | # not tarballs. It serves no useful purpose in tarballs and clutters the 42 | # build dir. 43 | # 44 | # This file knows how to handle autoconf, automake, libtool, gtk-doc, 45 | # gnome-doc-utils, yelp.m4, mallard, intltool, gsettings. 46 | # 47 | # 48 | # KNOWN ISSUES: 49 | # 50 | # - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the 51 | # submodule doesn't find us. If you have configure.{in,ac} files in 52 | # subdirs, add a proxy git.mk file in those dirs that simply does: 53 | # "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. 54 | # And add those files to git. See vte/gnome-pty-helper/git.mk for 55 | # example. 56 | # 57 | 58 | git-all: git-mk-install 59 | 60 | git-mk-install: 61 | @echo Installing git makefile 62 | @any_failed=; \ 63 | find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ 64 | if grep 'include .*/git.mk' $$x >/dev/null; then \ 65 | echo $$x already includes git.mk; \ 66 | else \ 67 | failed=; \ 68 | echo "Updating $$x"; \ 69 | { cat $$x; \ 70 | echo ''; \ 71 | echo '-include $$(top_srcdir)/git.mk'; \ 72 | } > $$x.tmp || failed=1; \ 73 | if test x$$failed = x; then \ 74 | mv $$x.tmp $$x || failed=1; \ 75 | fi; \ 76 | if test x$$failed = x; then : else \ 77 | echo Failed updating $$x; >&2 \ 78 | any_failed=1; \ 79 | fi; \ 80 | fi; done; test -z "$$any_failed" 81 | 82 | .PHONY: git-all git-mk-install 83 | 84 | 85 | ### .gitignore generation 86 | 87 | $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk 88 | $(AM_V_GEN) \ 89 | { \ 90 | if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ 91 | for x in \ 92 | $(DOC_MODULE)-decl-list.txt \ 93 | $(DOC_MODULE)-decl.txt \ 94 | tmpl/$(DOC_MODULE)-unused.sgml \ 95 | "tmpl/*.bak" \ 96 | xml html \ 97 | ; do echo /$$x; done; \ 98 | fi; \ 99 | if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ 100 | for x in \ 101 | $(_DOC_C_DOCS) \ 102 | $(_DOC_LC_DOCS) \ 103 | $(_DOC_OMF_ALL) \ 104 | $(_DOC_DSK_ALL) \ 105 | $(_DOC_HTML_ALL) \ 106 | $(_DOC_MOFILES) \ 107 | $(_DOC_POFILES) \ 108 | $(DOC_H_FILE) \ 109 | "*/.xml2po.mo" \ 110 | "*/*.omf.out" \ 111 | ; do echo /$$x; done; \ 112 | fi; \ 113 | if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ 114 | for x in \ 115 | $(_HELP_LC_FILES) \ 116 | $(_HELP_LC_STAMPS) \ 117 | $(_HELP_MOFILES) \ 118 | ; do echo /$$x; done; \ 119 | fi; \ 120 | if test "x$(gsettings_SCHEMAS)" = x; then :; else \ 121 | for x in \ 122 | $(gsettings_SCHEMAS:.xml=.valid) \ 123 | $(gsettings__enum_file) \ 124 | ; do echo /$$x; done; \ 125 | fi; \ 126 | if test -f $(srcdir)/po/Makefile.in.in; then \ 127 | for x in \ 128 | po/Makefile.in.in \ 129 | po/Makefile.in \ 130 | po/Makefile \ 131 | po/POTFILES \ 132 | po/stamp-it \ 133 | po/.intltool-merge-cache \ 134 | "po/*.gmo" \ 135 | "po/*.mo" \ 136 | po/$(GETTEXT_PACKAGE).pot \ 137 | intltool-extract.in \ 138 | intltool-merge.in \ 139 | intltool-update.in \ 140 | ; do echo /$$x; done; \ 141 | fi; \ 142 | if test -f $(srcdir)/configure; then \ 143 | for x in \ 144 | autom4te.cache \ 145 | configure \ 146 | config.h \ 147 | stamp-h1 \ 148 | libtool \ 149 | config.lt \ 150 | ; do echo /$$x; done; \ 151 | fi; \ 152 | for x in \ 153 | .gitignore \ 154 | $(GITIGNOREFILES) \ 155 | $(CLEANFILES) \ 156 | $(PROGRAMS) \ 157 | $(check_PROGRAMS) \ 158 | $(EXTRA_PROGRAMS) \ 159 | $(LTLIBRARIES) \ 160 | so_locations \ 161 | .libs _libs \ 162 | $(MOSTLYCLEANFILES) \ 163 | "*.$(OBJEXT)" \ 164 | "*.lo" \ 165 | $(DISTCLEANFILES) \ 166 | $(am__CONFIG_DISTCLEAN_FILES) \ 167 | $(CONFIG_CLEAN_FILES) \ 168 | TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ 169 | "*.tab.c" \ 170 | $(MAINTAINERCLEANFILES) \ 171 | $(BUILT_SOURCES) \ 172 | $(DEPDIR) \ 173 | Makefile \ 174 | Makefile.in \ 175 | "*.orig" \ 176 | "*.rej" \ 177 | "*.bak" \ 178 | "*~" \ 179 | ".*.sw[nop]" \ 180 | ".dirstamp" \ 181 | ; do echo /$$x; done; \ 182 | } | \ 183 | sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ 184 | sed 's@/[.]/@/@g' | \ 185 | LC_ALL=C sort | uniq > $@.tmp && \ 186 | mv $@.tmp $@; 187 | 188 | all: $(srcdir)/.gitignore gitignore-recurse-maybe 189 | gitignore-recurse-maybe: 190 | @if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \ 191 | $(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \ 192 | fi; 193 | gitignore-recurse: 194 | @for subdir in $(DIST_SUBDIRS); do \ 195 | case " $(SUBDIRS) " in \ 196 | *" $$subdir "*) :;; \ 197 | *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \ 198 | esac; \ 199 | done 200 | gitignore: $(srcdir)/.gitignore gitignore-recurse 201 | 202 | maintainer-clean: gitignore-clean 203 | gitignore-clean: 204 | -rm -f $(srcdir)/.gitignore 205 | 206 | .PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe 207 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /src/setup.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011-2017 Daiki Ueno 3 | * Copyright (C) 2011-2017 Red Hat, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | * 02110-1301, USA. 19 | */ 20 | using Gee; 21 | 22 | class Setup : Object { 23 | // main dialog 24 | Gtk.Dialog dialog; 25 | Gtk.TreeView dictionaries_treeview; 26 | Gtk.Entry auto_start_henkan_keywords_entry; 27 | Gtk.ComboBox period_style_combobox; 28 | Gtk.SpinButton page_size_spinbutton; 29 | Gtk.SpinButton pagination_start_spinbutton; 30 | Gtk.CheckButton show_annotation_checkbutton; 31 | Gtk.ComboBox initial_input_mode_combobox; 32 | Gtk.CheckButton egg_like_newline_checkbutton; 33 | Gtk.ComboBox typing_rule_combobox; 34 | 35 | // dict dialog 36 | Gtk.Dialog dict_dialog; 37 | Gtk.ComboBox dict_type_combobox; 38 | Gtk.HBox dict_data_hbox; 39 | Gtk.Widget dict_data_widget; 40 | Gtk.FileChooserButton dict_filechooserbutton; 41 | Gtk.Entry dict_entry; 42 | Gtk.SpinButton dict_spinbutton; 43 | 44 | Preferences preferences; 45 | 46 | public Setup (Preferences preferences) { 47 | this.preferences = preferences; 48 | 49 | var builder = new Gtk.Builder (); 50 | builder.set_translation_domain ("ibus-skk"); 51 | var ui_filename = Path.build_filename (Config.SETUPDIR, 52 | "ibus-skk-preferences.ui"); 53 | try { 54 | builder.add_from_file (ui_filename); 55 | } catch (GLib.Error e) { 56 | error ("can't load %s: %s", ui_filename, e.message); 57 | } 58 | 59 | // map widgets defined in ibus-skk-preferences.ui 60 | Object? object; 61 | 62 | object = builder.get_object ("dialog"); 63 | assert (object != null); 64 | dialog = (Gtk.Dialog) object; 65 | 66 | object = builder.get_object ("dictionaries_treeview"); 67 | assert (object != null); 68 | dictionaries_treeview = (Gtk.TreeView) object; 69 | 70 | object = builder.get_object ("auto_start_henkan_keywords_entry"); 71 | assert (object != null); 72 | auto_start_henkan_keywords_entry = (Gtk.Entry) object; 73 | 74 | object = builder.get_object ("egg_like_newline_checkbutton"); 75 | assert (object != null); 76 | egg_like_newline_checkbutton = (Gtk.CheckButton) object; 77 | 78 | object = builder.get_object ("period_style_combobox"); 79 | assert (object != null); 80 | period_style_combobox = (Gtk.ComboBox) object; 81 | 82 | object = builder.get_object ("page_size_spinbutton"); 83 | assert (object != null); 84 | page_size_spinbutton = (Gtk.SpinButton) object; 85 | 86 | object = builder.get_object ("pagination_start_spinbutton"); 87 | assert (object != null); 88 | pagination_start_spinbutton = (Gtk.SpinButton) object; 89 | 90 | object = builder.get_object ("show_annotation_checkbutton"); 91 | assert (object != null); 92 | show_annotation_checkbutton = (Gtk.CheckButton) object; 93 | 94 | object = builder.get_object ("initial_input_mode_combobox"); 95 | assert (object != null); 96 | initial_input_mode_combobox = (Gtk.ComboBox) object; 97 | 98 | object = builder.get_object ("egg_like_newline_checkbutton"); 99 | assert (object != null); 100 | egg_like_newline_checkbutton = (Gtk.CheckButton) object; 101 | 102 | object = builder.get_object ("typing_rule_combobox"); 103 | assert (object != null); 104 | typing_rule_combobox = (Gtk.ComboBox) object; 105 | 106 | object = builder.get_object ("add_dict_button"); 107 | assert (object != null); 108 | Gtk.Button add_dict_button = (Gtk.Button) object; 109 | 110 | object = builder.get_object ("remove_dict_button"); 111 | assert (object != null); 112 | Gtk.Button remove_dict_button = (Gtk.Button) object; 113 | 114 | object = builder.get_object ("up_dict_button"); 115 | assert (object != null); 116 | Gtk.Button up_dict_button = (Gtk.Button) object; 117 | 118 | object = builder.get_object ("down_dict_button"); 119 | assert (object != null); 120 | Gtk.Button down_dict_button = (Gtk.Button) object; 121 | 122 | object = builder.get_object ("dict_dialog"); 123 | assert (object != null); 124 | dict_dialog = (Gtk.Dialog) object; 125 | 126 | object = builder.get_object ("dict_type_combobox"); 127 | assert (object != null); 128 | dict_type_combobox = (Gtk.ComboBox) object; 129 | 130 | object = builder.get_object ("dict_data_hbox"); 131 | assert (object != null); 132 | dict_data_hbox = (Gtk.HBox) object; 133 | 134 | dict_filechooserbutton = new Gtk.FileChooserButton ( 135 | "dictionary file", 136 | Gtk.FileChooserAction.OPEN); 137 | dict_entry = new Gtk.Entry (); 138 | dict_spinbutton = new Gtk.SpinButton.with_range (0, 65535, 1); 139 | 140 | Gtk.ListStore model; 141 | Gtk.CellRenderer renderer; 142 | Gtk.TreeViewColumn column; 143 | 144 | model = new Gtk.ListStore (1, typeof (PList)); 145 | dictionaries_treeview.set_model (model); 146 | 147 | renderer = new TypeCellRenderer (); 148 | column = new Gtk.TreeViewColumn.with_attributes ("type", renderer, 149 | "plist", 0); 150 | dictionaries_treeview.append_column (column); 151 | 152 | renderer = new DescCellRenderer (); 153 | column = new Gtk.TreeViewColumn.with_attributes ("desc", renderer, 154 | "plist", 0); 155 | dictionaries_treeview.append_column (column); 156 | 157 | renderer = new Gtk.CellRendererText (); 158 | period_style_combobox.pack_start (renderer, false); 159 | period_style_combobox.set_attributes (renderer, "text", 0); 160 | 161 | renderer = new Gtk.CellRendererText (); 162 | initial_input_mode_combobox.pack_start (renderer, false); 163 | initial_input_mode_combobox.set_attributes (renderer, "text", 0); 164 | 165 | renderer = new Gtk.CellRendererText (); 166 | dict_type_combobox.pack_start (renderer, false); 167 | dict_type_combobox.set_attributes (renderer, "text", 0); 168 | 169 | model = new Gtk.ListStore (2, typeof (string), typeof (string)); 170 | model.set_sort_column_id (1, Gtk.SortType.ASCENDING); 171 | typing_rule_combobox.set_model (model); 172 | var rules = Skk.Rule.list (); 173 | foreach (var rule in rules) { 174 | Gtk.TreeIter iter; 175 | model.append (out iter); 176 | model.set (iter, 0, rule.name); 177 | model.set (iter, 1, rule.label); 178 | } 179 | 180 | renderer = new Gtk.CellRendererText (); 181 | typing_rule_combobox.pack_start (renderer, false); 182 | typing_rule_combobox.set_attributes (renderer, "text", 1); 183 | 184 | load (); 185 | 186 | add_dict_button.clicked.connect (add_dict); 187 | remove_dict_button.clicked.connect (remove_dict); 188 | up_dict_button.clicked.connect (up_dict); 189 | down_dict_button.clicked.connect (down_dict); 190 | 191 | var selection = dictionaries_treeview.get_selection (); 192 | selection.changed.connect (() => { 193 | int count = selection.count_selected_rows (); 194 | if (count > 0) { 195 | remove_dict_button.sensitive = true; 196 | up_dict_button.sensitive = true; 197 | down_dict_button.sensitive = true; 198 | } else if (count == 0) { 199 | remove_dict_button.sensitive = false; 200 | up_dict_button.sensitive = false; 201 | down_dict_button.sensitive = false; 202 | } 203 | }); 204 | 205 | dict_type_combobox.changed.connect (() => { 206 | if (dict_data_widget != null) { 207 | dict_data_hbox.remove (dict_data_widget); 208 | } 209 | string text = get_active_dict_type (); 210 | if (text == "System") { 211 | dict_filechooserbutton.set_current_folder ( 212 | Path.build_filename (Config.DATADIR, "skk")); 213 | dict_data_widget = dict_filechooserbutton; 214 | } else if (text == "User") { 215 | dict_filechooserbutton.set_current_folder ( 216 | Environment.get_home_dir ()); 217 | dict_data_widget = dict_filechooserbutton; 218 | } else if (text == "SKK Server") { 219 | var hbox = new Gtk.HBox (false, 2); 220 | hbox.pack_start (new Gtk.Label ("Host:"), false, false, 0); 221 | hbox.pack_start (dict_entry, false, false, 0); 222 | dict_entry.text = "localhost"; 223 | hbox.pack_start (new Gtk.Label ("Port:"), false, false, 0); 224 | hbox.pack_start (dict_spinbutton, false, false, 0); 225 | dict_spinbutton.value = 1178; 226 | dict_data_widget = hbox; 227 | } else { 228 | assert_not_reached (); 229 | } 230 | dict_data_hbox.add (dict_data_widget); 231 | dict_data_hbox.show_all (); 232 | dict_data_hbox.sensitive = true; 233 | }); 234 | dict_type_combobox.active = 0; 235 | } 236 | 237 | void populate_dictionaries_treeview () { 238 | Variant? variant = preferences.get ("dictionaries"); 239 | assert (variant != null); 240 | string[] strv = variant.dup_strv (); 241 | var model = (Gtk.ListStore) dictionaries_treeview.get_model (); 242 | foreach (var str in strv) { 243 | PList plist; 244 | try { 245 | plist = new PList (str); 246 | } catch (PListParseError e) { 247 | warning ("can't parse plist %s: %s", str, e.message); 248 | continue; 249 | } 250 | Gtk.TreeIter iter; 251 | model.append (out iter); 252 | model.set (iter, 0, plist); 253 | } 254 | } 255 | 256 | string get_active_dict_type () { 257 | string text; 258 | Gtk.TreeIter iter; 259 | if (dict_type_combobox.get_active_iter (out iter)) { 260 | var model = (Gtk.ListStore) dict_type_combobox.get_model (); 261 | model.get (iter, 1, out text, -1); 262 | } else { 263 | assert_not_reached (); 264 | } 265 | return text; 266 | } 267 | 268 | void add_dict () { 269 | if (dict_dialog.run () == Gtk.ResponseType.OK) { 270 | PList? plist = null; 271 | string text = get_active_dict_type (); 272 | if (text == "System") { 273 | string? file = dict_filechooserbutton.get_filename (); 274 | if (file != null) { 275 | try { 276 | plist = new PList ( 277 | "type=file,file=%s,mode=readonly".printf ( 278 | PList.escape (file))); 279 | } catch (PListParseError e) { 280 | assert_not_reached (); 281 | } 282 | } 283 | } 284 | else if (text == "User") { 285 | string? file = dict_filechooserbutton.get_filename (); 286 | if (file != null) { 287 | try { 288 | plist = new PList ( 289 | "type=file,file=%s,mode=readwrite".printf ( 290 | PList.escape (file))); 291 | } catch (PListParseError e) { 292 | assert_not_reached (); 293 | } 294 | } 295 | } 296 | else if (text == "SKK Server") { 297 | string host = dict_entry.text; 298 | uint16 port = (uint16) dict_spinbutton.value; 299 | if (host.length > 0 && port > 0) { 300 | try { 301 | plist = new PList ( 302 | "type=server,host=%s,port=%d".printf ( 303 | PList.escape (host), 304 | port)); 305 | } catch (PListParseError e) { 306 | assert_not_reached (); 307 | } 308 | } 309 | } 310 | else { 311 | assert_not_reached (); 312 | } 313 | 314 | if (plist != null) { 315 | var model = (Gtk.ListStore) dictionaries_treeview.get_model (); 316 | Gtk.TreeIter iter; 317 | bool found = false; 318 | if (model.get_iter_first (out iter)) { 319 | do { 320 | PList _plist; 321 | model.get (iter, 0, out _plist, -1); 322 | if (_plist.to_string () == plist.to_string ()) { 323 | found = true; 324 | } 325 | } while (!found && model.iter_next (ref iter)); 326 | } 327 | if (!found) 328 | model.insert_with_values (out iter, int.MAX, 0, plist, -1); 329 | } 330 | } 331 | dict_dialog.hide (); 332 | } 333 | 334 | void remove_dict () { 335 | var selection = dictionaries_treeview.get_selection (); 336 | Gtk.TreeModel model; 337 | var rows = selection.get_selected_rows (out model); 338 | foreach (var row in rows) { 339 | Gtk.TreeIter iter; 340 | if (model.get_iter (out iter, row)) { 341 | ((Gtk.ListStore)model).remove (ref iter); 342 | } 343 | } 344 | } 345 | 346 | void up_dict () { 347 | var selection = dictionaries_treeview.get_selection (); 348 | Gtk.TreeModel model; 349 | Gtk.TreeIter iter; 350 | if (selection.get_selected (out model, out iter)) { 351 | Gtk.TreeIter prev = iter; 352 | if (model.iter_previous (ref prev)) { 353 | ((Gtk.ListStore)model).swap (iter, prev); 354 | } 355 | } 356 | } 357 | 358 | void down_dict () { 359 | var selection = dictionaries_treeview.get_selection (); 360 | Gtk.TreeModel model; 361 | Gtk.TreeIter iter; 362 | if (selection.get_selected (out model, out iter)) { 363 | Gtk.TreeIter next = iter; 364 | if (model.iter_next (ref next)) { 365 | ((Gtk.ListStore)model).swap (iter, next); 366 | } 367 | } 368 | } 369 | 370 | void load_combobox (string name, 371 | Gtk.ComboBox combo, 372 | int column) { 373 | Variant? variant = preferences.get (name); 374 | assert (variant != null); 375 | Gtk.TreeIter iter; 376 | var model = combo.get_model (); 377 | if (model.get_iter_first (out iter)) { 378 | var index = variant.get_int32 (); 379 | int _index; 380 | do { 381 | model.get (iter, column, out _index, -1); 382 | if (index == _index) { 383 | combo.set_active_iter (iter); 384 | break; 385 | } 386 | } while (model.iter_next (ref iter)); 387 | } 388 | } 389 | 390 | void load () { 391 | populate_dictionaries_treeview (); 392 | 393 | Variant? variant; 394 | 395 | variant = preferences.get ("auto_start_henkan_keywords"); 396 | assert (variant != null); 397 | auto_start_henkan_keywords_entry.text = string.joinv ("", variant.dup_strv ()); 398 | 399 | variant = preferences.get ("egg_like_newline"); 400 | assert (variant != null); 401 | egg_like_newline_checkbutton.active = variant.get_boolean (); 402 | 403 | variant = preferences.get ("page_size"); 404 | assert (variant != null); 405 | page_size_spinbutton.set_range (7.0, 16.0); 406 | page_size_spinbutton.set_increments (1.0, 1.0); 407 | page_size_spinbutton.value = (double) variant.get_int32 (); 408 | 409 | variant = preferences.get ("pagination_start"); 410 | assert (variant != null); 411 | pagination_start_spinbutton.set_range (0.0, 7.0); 412 | pagination_start_spinbutton.set_increments (1.0, 1.0); 413 | pagination_start_spinbutton.value = (double) variant.get_int32 (); 414 | 415 | variant = preferences.get ("show_annotation"); 416 | assert (variant != null); 417 | show_annotation_checkbutton.active = variant.get_boolean (); 418 | 419 | load_combobox ("period_style", period_style_combobox, 1); 420 | load_combobox ("initial_input_mode", initial_input_mode_combobox, 1); 421 | 422 | variant = preferences.get ("typing_rule"); 423 | assert (variant != null); 424 | var model = (Gtk.ListStore) typing_rule_combobox.get_model (); 425 | Gtk.TreeIter iter; 426 | if (model.get_iter_first (out iter)) { 427 | string rule = variant.get_string (); 428 | do { 429 | string _rule; 430 | model.get (iter, 0, out _rule, -1); 431 | if (rule == _rule) { 432 | typing_rule_combobox.set_active_iter (iter); 433 | break; 434 | } 435 | } while (model.iter_next (ref iter)); 436 | } 437 | } 438 | 439 | void save_dictionaries (string name) { 440 | var model = dictionaries_treeview.get_model (); 441 | Gtk.TreeIter iter; 442 | if (model.get_iter_first (out iter)) { 443 | ArrayList dictionaries = new ArrayList (); 444 | do { 445 | PList plist; 446 | model.get (iter, 0, out plist, -1); 447 | dictionaries.add (plist.to_string ()); 448 | } while (model.iter_next (ref iter)); 449 | preferences.set (name, dictionaries.to_array ()); 450 | } 451 | } 452 | 453 | void save_combobox (string name, 454 | Gtk.ComboBox combo, 455 | int column) 456 | { 457 | Gtk.TreeIter iter; 458 | if (combo.get_active_iter (out iter)) { 459 | int index; 460 | var model = combo.get_model (); 461 | model.get (iter, column, out index, -1); 462 | preferences.set (name, index); 463 | } 464 | } 465 | 466 | void save () { 467 | save_dictionaries ("dictionaries"); 468 | 469 | ArrayList keywords = new ArrayList (); 470 | int index = 0; 471 | unichar uc; 472 | while (auto_start_henkan_keywords_entry.text.get_next_char (ref index, 473 | out uc)) { 474 | keywords.add (uc.to_string ()); 475 | } 476 | preferences.set ("auto_start_henkan_keywords", 477 | keywords.to_array ()); 478 | preferences.set ("egg_like_newline", 479 | egg_like_newline_checkbutton.active); 480 | preferences.set ("page_size", 481 | (int) page_size_spinbutton.value); 482 | preferences.set ("pagination_start", 483 | (int) pagination_start_spinbutton.value); 484 | preferences.set ("show_annotation", 485 | show_annotation_checkbutton.active); 486 | save_combobox ("period_style", 487 | period_style_combobox, 1); 488 | save_combobox ("initial_input_mode", 489 | initial_input_mode_combobox, 1); 490 | 491 | Gtk.TreeIter iter; 492 | if (typing_rule_combobox.get_active_iter (out iter)) { 493 | var model = (Gtk.ListStore) typing_rule_combobox.get_model (); 494 | string rule; 495 | model.get (iter, 0, out rule, -1); 496 | preferences.set ("typing_rule", rule); 497 | } 498 | preferences.save (); 499 | } 500 | 501 | public void run () { 502 | dialog.run (); 503 | save (); 504 | } 505 | 506 | class TypeCellRenderer : Gtk.CellRendererText { 507 | private PList _plist; 508 | public PList plist { 509 | get { 510 | return _plist; 511 | } 512 | set { 513 | _plist = value; 514 | var type = _plist.get ("type"); 515 | if (type == "file") { 516 | var mode = _plist.get ("mode") ?? "readonly"; 517 | if (mode == "readonly") 518 | text = _("system"); 519 | else 520 | text = _("user"); 521 | } else { 522 | text = _("server"); 523 | } 524 | } 525 | } 526 | } 527 | 528 | class DescCellRenderer : Gtk.CellRendererText { 529 | private PList _plist; 530 | public PList plist { 531 | get { 532 | return _plist; 533 | } 534 | set { 535 | _plist = value; 536 | var type = _plist.get ("type"); 537 | if (type == "file") { 538 | text = _plist.get ("file"); 539 | } else { 540 | var host = _plist.get ("host") ?? "localhost"; 541 | var port = _plist.get ("port") ?? "1178"; 542 | text = "%s:%s".printf (host, port); 543 | } 544 | } 545 | } 546 | } 547 | 548 | public static int main (string[] args) { 549 | Gtk.init (ref args); 550 | IBus.init (); 551 | Skk.init (); 552 | 553 | var bus = new IBus.Bus (); 554 | var config = bus.get_config (); 555 | var setup = new Setup (new Preferences (config)); 556 | 557 | setup.run (); 558 | return 0; 559 | } 560 | } 561 | -------------------------------------------------------------------------------- /src/engine.vala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011-2017 Daiki Ueno 3 | * Copyright (C) 2011-2017 Red Hat, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | * 02110-1301, USA. 19 | */ 20 | using Gee; 21 | 22 | class SkkEngine : IBus.Engine { 23 | // Preferences are shared among SkkEngine instances. 24 | static Preferences preferences; 25 | 26 | // Dictionaries are shared among SkkEngine instances and 27 | // maintained in the per-class signal handler in main(). 28 | static ArrayList dictionaries; 29 | 30 | Skk.Context context; 31 | IBus.LookupTable lookup_table; 32 | uint page_start; 33 | bool lookup_table_visible; 34 | 35 | bool show_annotation; 36 | 37 | IBus.Property input_mode_prop; 38 | IBus.PropList prop_list; 39 | bool properties_registered = false; 40 | 41 | Map input_mode_props = 42 | new HashMap (); 43 | Map input_mode_symbols = 44 | new HashMap (); 45 | Map name_input_modes = 46 | new HashMap (); 47 | 48 | construct { 49 | // Prepare lookup table 50 | lookup_table = new IBus.LookupTable (LOOKUP_TABLE_LABELS.length, 51 | 0, true, false); 52 | for (var i = 0; i < LOOKUP_TABLE_LABELS.length; i++) { 53 | var text = new IBus.Text.from_string (LOOKUP_TABLE_LABELS[i]); 54 | lookup_table.set_label (i, text); 55 | } 56 | lookup_table.set_orientation (IBus.Orientation.HORIZONTAL); 57 | 58 | // Prepare the properties on the lang bar 59 | prop_list = new IBus.PropList (); 60 | var props = new IBus.PropList (); 61 | IBus.Property prop; 62 | 63 | prop = register_input_mode_property (Skk.InputMode.HIRAGANA, 64 | "InputMode.Hiragana", 65 | _("Hiragana"), 66 | "あ"); 67 | props.append (prop); 68 | 69 | prop = register_input_mode_property (Skk.InputMode.KATAKANA, 70 | "InputMode.Katakana", 71 | _("Katakana"), 72 | "ア"); 73 | props.append (prop); 74 | 75 | prop = register_input_mode_property (Skk.InputMode.HANKAKU_KATAKANA, 76 | "InputMode.HankakuKatakana", 77 | _("Halfwidth Katakana"), 78 | "_ア"); 79 | props.append (prop); 80 | 81 | prop = register_input_mode_property (Skk.InputMode.LATIN, 82 | "InputMode.Latin", 83 | _("Latin"), 84 | "_A"); 85 | props.append (prop); 86 | 87 | prop = register_input_mode_property (Skk.InputMode.WIDE_LATIN, 88 | "InputMode.WideLatin", 89 | _("Wide Latin"), 90 | "A"); 91 | props.append (prop); 92 | 93 | prop = new IBus.Property ( 94 | "InputMode", 95 | IBus.PropType.MENU, 96 | new IBus.Text.from_string ("あ"), 97 | null, 98 | new IBus.Text.from_string (_("Switch input mode")), 99 | true, 100 | true, 101 | IBus.PropState.UNCHECKED, 102 | props); 103 | prop_list.append (prop); 104 | input_mode_prop = prop; 105 | 106 | prop = new IBus.Property ( 107 | "setup", 108 | IBus.PropType.NORMAL, 109 | new IBus.Text.from_string (_("Setup")), 110 | "gtk-preferences", 111 | new IBus.Text.from_string (_("Configure SKK")), 112 | true, 113 | true, 114 | IBus.PropState.UNCHECKED, 115 | null); 116 | prop_list.append (prop); 117 | 118 | // Initialize libskk 119 | context = new Skk.Context (dictionaries.to_array ()); 120 | 121 | apply_preferences (); 122 | preferences.value_changed.connect ((name, value) => { 123 | apply_preferences (); 124 | if (name == "dictionaries") { 125 | // SkkEngine.dictionaries should be updated separately 126 | context.dictionaries = SkkEngine.dictionaries.to_array (); 127 | } 128 | }); 129 | 130 | context.notify["preedit"].connect (() => { 131 | update_preedit (); 132 | }); 133 | context.notify["input-mode"].connect ((s, p) => { 134 | update_input_mode (); 135 | }); 136 | context.candidates.populated.connect (() => { 137 | populate_lookup_table (); 138 | }); 139 | context.candidates.notify["cursor-pos"].connect (() => { 140 | set_lookup_table_cursor_pos (); 141 | }); 142 | context.candidates.selected.connect (() => { 143 | if (lookup_table_visible) { 144 | hide_lookup_table (); 145 | hide_auxiliary_text (); 146 | lookup_table_visible = false; 147 | } 148 | }); 149 | 150 | update_candidates (); 151 | update_input_mode (); 152 | context.retrieve_surrounding_text.connect (_retrieve_surrounding_text); 153 | context.delete_surrounding_text.connect (_delete_surrounding_text); 154 | } 155 | 156 | bool _retrieve_surrounding_text (out string text, out uint cursor_pos) { 157 | weak IBus.Text _text; 158 | uint _cursor_pos, anchor_pos; 159 | get_surrounding_text (out _text, out _cursor_pos, out anchor_pos); 160 | text = _text.text.dup (); 161 | cursor_pos = _cursor_pos; 162 | return true; 163 | } 164 | 165 | bool _delete_surrounding_text (int offset, uint nchars) { 166 | delete_surrounding_text (offset, nchars); 167 | return true; 168 | } 169 | 170 | void populate_lookup_table () { 171 | lookup_table.clear (); 172 | for (int i = (int) page_start; 173 | i < context.candidates.size; 174 | i++) { 175 | var text = new IBus.Text.from_string ( 176 | context.candidates[i].output); 177 | lookup_table.append_candidate (text); 178 | } 179 | } 180 | 181 | void set_lookup_table_cursor_pos () { 182 | var empty_text = new IBus.Text.from_static_string (""); 183 | var cursor_pos = context.candidates.cursor_pos; 184 | if (context.candidates.page_visible) { 185 | lookup_table.set_cursor_pos (cursor_pos - 186 | context.candidates.page_start); 187 | update_lookup_table_fast (lookup_table, true); 188 | var candidate = context.candidates.get (); 189 | if (show_annotation && candidate.annotation != null) { 190 | var text = new IBus.Text.from_string ( 191 | candidate.annotation); 192 | update_auxiliary_text (text, true); 193 | } else { 194 | update_auxiliary_text (empty_text, false); 195 | } 196 | lookup_table_visible = true; 197 | } else if (lookup_table_visible) { 198 | hide_lookup_table (); 199 | hide_auxiliary_text (); 200 | lookup_table_visible = false; 201 | } 202 | } 203 | 204 | void update_preedit () { 205 | var text = new IBus.Text.from_string (context.preedit); 206 | uint underline_offset, underline_nchars; 207 | context.get_preedit_underline (out underline_offset, 208 | out underline_nchars); 209 | if (0 < underline_nchars) { 210 | text.append_attribute (IBus.AttrType.UNDERLINE, 211 | IBus.AttrUnderline.SINGLE, 212 | (int) underline_offset, 213 | (int) (underline_offset + underline_nchars)); 214 | } 215 | update_preedit_text (text, 216 | text.get_length (), 217 | text.get_length () > 0); 218 | } 219 | 220 | void update_candidates () { 221 | context.candidates.page_start = page_start; 222 | context.candidates.page_size = lookup_table.get_page_size (); 223 | populate_lookup_table (); 224 | set_lookup_table_cursor_pos (); 225 | } 226 | 227 | void update_input_mode () { 228 | // Update the menu item 229 | var iter = input_mode_props.map_iterator (); 230 | while (iter.next ()) { 231 | var input_mode = iter.get_key (); 232 | var prop = iter.get_value (); 233 | if (input_mode == context.input_mode) 234 | prop.set_state (IBus.PropState.CHECKED); 235 | else 236 | prop.set_state (IBus.PropState.UNCHECKED); 237 | if (properties_registered) 238 | update_property (prop); 239 | } 240 | 241 | // Update the menu 242 | var symbol = new IBus.Text.from_string ( 243 | input_mode_symbols.get (context.input_mode)); 244 | var label = new IBus.Text.from_string ( 245 | _("Input Mode (%s)").printf (symbol.text)); 246 | input_mode_prop.set_label (label); 247 | input_mode_prop.set_symbol (symbol); 248 | if (properties_registered) 249 | update_property (input_mode_prop); 250 | } 251 | 252 | static Skk.Dict? parse_dict_from_plist (PList plist) throws GLib.Error { 253 | var encoding = plist.get ("encoding") ?? "EUC-JP"; 254 | var type = plist.get ("type"); 255 | if (type == "file") { 256 | string? file = plist.get ("file"); 257 | if (file == null) { 258 | return null; 259 | } 260 | string mode = plist.get ("mode") ?? "readonly"; 261 | if (mode == "readonly") { 262 | if (file.has_suffix (".cdb")) 263 | return new Skk.CdbDict (file, encoding); 264 | else 265 | return new Skk.FileDict (file, encoding); 266 | } else if (mode == "readwrite") 267 | return new Skk.UserDict (file, encoding); 268 | } else if (type == "server") { 269 | var host = plist.get ("host") ?? "localhost"; 270 | var port = plist.get ("port") ?? "1178"; 271 | return new Skk.SkkServ (host, (uint16) int.parse (port), encoding); 272 | } 273 | return null; 274 | } 275 | 276 | static void reload_dictionaries () { 277 | SkkEngine.dictionaries.clear (); 278 | Variant? variant = preferences.get ("dictionaries"); 279 | assert (variant != null); 280 | string[] strv = variant.dup_strv (); 281 | foreach (var str in strv) { 282 | try { 283 | var plist = new PList (str); 284 | Skk.Dict? dict = parse_dict_from_plist (plist); 285 | if (dict != null) 286 | dictionaries.add (dict); 287 | } catch (PListParseError e) { 288 | warning ("can't parse plist \"%s\": %s", 289 | str, e.message); 290 | } catch (GLib.Error e) { 291 | warning ("can't open dictionary \"%s\": %s", 292 | str, e.message); 293 | } 294 | } 295 | } 296 | 297 | void apply_preferences () { 298 | Variant? variant; 299 | 300 | variant = preferences.get ("auto_start_henkan_keywords"); 301 | assert (variant != null); 302 | context.auto_start_henkan_keywords = variant.get_strv (); 303 | 304 | variant = preferences.get ("period_style"); 305 | assert (variant != null); 306 | context.period_style = (Skk.PeriodStyle) variant.get_int32 (); 307 | 308 | variant = preferences.get ("page_size"); 309 | assert (variant != null); 310 | lookup_table.set_page_size (variant.get_int32 ()); 311 | 312 | variant = preferences.get ("pagination_start"); 313 | assert (variant != null); 314 | page_start = (uint) variant.get_int32 (); 315 | 316 | variant = preferences.get ("initial_input_mode"); 317 | assert (variant != null); 318 | context.input_mode = (Skk.InputMode) variant.get_int32 (); 319 | 320 | variant = preferences.get ("show_annotation"); 321 | assert (variant != null); 322 | show_annotation = variant.get_boolean (); 323 | 324 | variant = preferences.get ("egg_like_newline"); 325 | assert (variant != null); 326 | context.egg_like_newline = variant.get_boolean (); 327 | 328 | variant = preferences.get ("typing_rule"); 329 | assert (variant != null); 330 | try { 331 | context.typing_rule = new Skk.Rule (variant.get_string ()); 332 | } catch (Skk.RuleParseError e) { 333 | warning ("can't load typing rule %s: %s", 334 | variant.get_string (), e.message); 335 | } 336 | } 337 | 338 | IBus.Property register_input_mode_property (Skk.InputMode mode, 339 | string name, 340 | string label, 341 | string symbol) 342 | { 343 | var prop = new IBus.Property (name, 344 | IBus.PropType.RADIO, 345 | new IBus.Text.from_string (label), 346 | null, 347 | null, 348 | true, 349 | true, 350 | IBus.PropState.UNCHECKED, 351 | null); 352 | input_mode_props.set (mode, prop); 353 | input_mode_symbols.set (mode, symbol); 354 | name_input_modes.set (name, mode); 355 | return prop; 356 | } 357 | 358 | string[] LOOKUP_TABLE_LABELS = {"a", "s", "d", "f", "j", "k", "l", 359 | "q", "w", "e", "r", "u", "i", "o"}; 360 | 361 | bool process_lookup_table_key_event (uint keyval, 362 | uint keycode, 363 | uint state) 364 | { 365 | var page_size = lookup_table.get_page_size (); 366 | if (state == 0 && 367 | ((unichar) keyval).to_string () in LOOKUP_TABLE_LABELS) { 368 | string label = ((unichar) keyval).tolower ().to_string (); 369 | for (var index = 0; 370 | index < int.min ((int)page_size, LOOKUP_TABLE_LABELS.length); 371 | index++) { 372 | if (LOOKUP_TABLE_LABELS[index] == label) { 373 | return context.candidates.select_at (index); 374 | } 375 | } 376 | return false; 377 | } 378 | 379 | if (state == 0) { 380 | bool retval = false; 381 | switch (keyval) { 382 | case IBus.Page_Up: 383 | case IBus.KP_Page_Up: 384 | retval = context.candidates.page_up (); 385 | break; 386 | case IBus.Page_Down: 387 | case IBus.KP_Page_Down: 388 | retval = context.candidates.page_down (); 389 | break; 390 | case IBus.Up: 391 | case IBus.Left: 392 | retval = context.candidates.cursor_up (); 393 | break; 394 | case IBus.Down: 395 | case IBus.Right: 396 | retval = context.candidates.cursor_down (); 397 | break; 398 | default: 399 | break; 400 | } 401 | 402 | if (retval) { 403 | set_lookup_table_cursor_pos (); 404 | update_preedit (); 405 | return true; 406 | } 407 | } 408 | 409 | return false; 410 | } 411 | 412 | public override bool process_key_event (uint keyval, 413 | uint keycode, 414 | uint state) 415 | { 416 | // Filter out unnecessary modifier bits 417 | // FIXME: should resolve virtual modifiers 418 | uint _state = state & (IBus.ModifierType.CONTROL_MASK | 419 | IBus.ModifierType.MOD1_MASK | 420 | IBus.ModifierType.MOD5_MASK | 421 | IBus.ModifierType.RELEASE_MASK); 422 | if (context.candidates.page_visible && 423 | process_lookup_table_key_event (keyval, keycode, _state)) { 424 | return true; 425 | } 426 | 427 | Skk.ModifierType modifiers = (Skk.ModifierType) _state; 428 | Skk.KeyEvent key; 429 | try { 430 | key = new Skk.KeyEvent.from_x_keysym (keyval, modifiers); 431 | } catch (Skk.KeyEventFormatError e) { 432 | return false; 433 | } 434 | 435 | var retval = context.process_key_event (key); 436 | var output = context.poll_output (); 437 | if (output.length > 0) { 438 | var text = new IBus.Text.from_string (output); 439 | commit_text (text); 440 | } 441 | return retval; 442 | } 443 | 444 | public override void enable () { 445 | context.reset (); 446 | 447 | // Request to use surrounding text feature 448 | get_surrounding_text (null, null, null); 449 | base.enable (); 450 | } 451 | 452 | public override void disable () { 453 | focus_out (); 454 | base.disable (); 455 | } 456 | 457 | public override void reset () { 458 | context.reset (); 459 | var empty_text = new IBus.Text.from_static_string (""); 460 | update_preedit_text (empty_text, 461 | 0, 462 | false); 463 | base.reset (); 464 | } 465 | 466 | public override void focus_in () { 467 | update_input_mode (); 468 | register_properties (prop_list); 469 | properties_registered = true; 470 | base.focus_in (); 471 | } 472 | 473 | public override void focus_out () { 474 | context.reset (); 475 | hide_preedit_text (); 476 | hide_lookup_table (); 477 | properties_registered = false; 478 | base.focus_out (); 479 | } 480 | 481 | public override void property_activate (string prop_name, 482 | uint prop_state) 483 | { 484 | if (prop_name == "setup") { 485 | var filename = Path.build_filename (Config.LIBEXECDIR, 486 | "ibus-setup-skk"); 487 | try { 488 | Process.spawn_command_line_async (filename); 489 | } catch (GLib.SpawnError e) { 490 | warning ("can't spawn %s: %s", filename, e.message); 491 | } 492 | } 493 | else if (prop_name.has_prefix ("InputMode.") && 494 | prop_state == IBus.PropState.CHECKED) { 495 | context.input_mode = name_input_modes.get (prop_name); 496 | } 497 | } 498 | 499 | public override void candidate_clicked (uint index, uint button, uint state) { 500 | if (context.candidates.select_at (index)) { 501 | var output = context.poll_output (); 502 | if (output.length > 0) { 503 | var text = new IBus.Text.from_string (output); 504 | commit_text (text); 505 | } 506 | } 507 | } 508 | 509 | public override void cursor_up () { 510 | context.candidates.cursor_up (); 511 | } 512 | 513 | public override void cursor_down () { 514 | context.candidates.cursor_down (); 515 | } 516 | 517 | public override void page_up () { 518 | context.candidates.page_up (); 519 | } 520 | 521 | public override void page_down () { 522 | context.candidates.page_down (); 523 | } 524 | 525 | static bool ibus; 526 | 527 | const OptionEntry[] options = { 528 | {"ibus", 'i', 0, OptionArg.NONE, ref ibus, 529 | N_("Component is executed by IBus"), null }, 530 | { null } 531 | }; 532 | 533 | public static int main (string[] args) { 534 | IBus.init (); 535 | Skk.init (); 536 | 537 | Intl.setlocale (LocaleCategory.ALL, ""); 538 | Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR); 539 | Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); 540 | 541 | var context = new OptionContext ("- ibus skk"); 542 | context.add_main_entries (options, "ibus-skk"); 543 | try { 544 | context.parse (ref args); 545 | } catch (OptionError e) { 546 | stderr.printf ("%s\n", e.message); 547 | return 1; 548 | } 549 | 550 | var bus = new IBus.Bus (); 551 | 552 | if (!bus.is_connected ()) { 553 | stderr.printf ("Can not connect to ibus-daemon!\n"); 554 | return 1; 555 | } 556 | 557 | bus.disconnected.connect (() => { IBus.quit (); }); 558 | 559 | var config = bus.get_config (); 560 | SkkEngine.preferences = new Preferences (config); 561 | SkkEngine.dictionaries = new ArrayList (); 562 | SkkEngine.reload_dictionaries (); 563 | SkkEngine.preferences.value_changed.connect ((name, value) => { 564 | if (name == "dictionaries") { 565 | SkkEngine.reload_dictionaries (); 566 | } 567 | }); 568 | 569 | var factory = new IBus.Factory (bus.get_connection()); 570 | factory.add_engine ("skk", typeof(SkkEngine)); 571 | if (ibus) { 572 | bus.request_name ("org.freedesktop.IBus.SKK", 0); 573 | } else { 574 | var component = new IBus.Component ( 575 | "org.freedesktop.IBus.SKK", 576 | N_("SKK"), Config.PACKAGE_VERSION, "GPL", 577 | "Daiki Ueno ", 578 | "http://code.google.com/p/ibus/", 579 | "", 580 | "ibus-skk"); 581 | var engine = new IBus.EngineDesc ( 582 | "skk", 583 | "SKK", 584 | "SKK Input Method", 585 | "ja", 586 | "GPL", 587 | "Daiki Ueno ", 588 | "%s/icons/ibus-skk.svg".printf (Config.PACKAGE_DATADIR), 589 | "us"); 590 | component.add_engine (engine); 591 | bus.register_component (component); 592 | } 593 | IBus.main (); 594 | return 0; 595 | } 596 | } 597 | -------------------------------------------------------------------------------- /src/ibus-skk-preferences.ui.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 5 8 | True 9 | dialog 10 | dialog 11 | 12 | 13 | False 14 | vertical 15 | 2 16 | 17 | 18 | False 19 | end 20 | 21 | 22 | gtk-cancel 23 | False 24 | True 25 | True 26 | True 27 | False 28 | True 29 | 30 | 31 | False 32 | True 33 | 0 34 | 35 | 36 | 37 | 38 | gtk-add 39 | False 40 | True 41 | True 42 | True 43 | False 44 | True 45 | 46 | 47 | False 48 | False 49 | 1 50 | 51 | 52 | 53 | 54 | False 55 | True 56 | end 57 | 0 58 | 59 | 60 | 61 | 62 | True 63 | False 64 | 2 65 | 2 66 | 6 67 | 6 68 | 69 | 70 | True 71 | False 72 | 1 73 | 0.5 74 | 75 | 76 | True 77 | False 78 | dict_type_liststore 79 | 80 | 81 | 82 | 83 | 1 84 | 2 85 | 86 | 87 | 88 | 89 | True 90 | False 91 | vertical 92 | 93 | 94 | False 95 | False 96 | 97 | 98 | 99 | 100 | 101 | False 102 | True 103 | 0 104 | 105 | 106 | 107 | 108 | 2 109 | 1 110 | 2 111 | 112 | 113 | 114 | 115 | True 116 | False 117 | 118 | 119 | True 120 | False 121 | Type: 122 | 123 | 124 | 125 | 126 | 127 | 128 | False 129 | False 130 | 1 131 | 132 | 133 | 134 | 135 | 136 | button1 137 | ok_button1 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | Hiragana 156 | 0 157 | 158 | 159 | Latin 160 | 3 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | System 174 | System 175 | 176 | 177 | User 178 | User 179 | 180 | 181 | SKK Server 182 | SKK Server 183 | 184 | 185 | 186 | 187 | False 188 | 5 189 | IBus SKK Preferences 190 | normal 191 | 192 | 193 | True 194 | False 195 | 2 196 | 197 | 198 | True 199 | False 200 | end 201 | 202 | 203 | gtk-ok 204 | False 205 | True 206 | True 207 | True 208 | False 209 | True 210 | 211 | 212 | False 213 | False 214 | 1 215 | 216 | 217 | 218 | 219 | False 220 | True 221 | end 222 | 0 223 | 224 | 225 | 226 | 227 | True 228 | True 229 | 230 | 231 | True 232 | False 233 | 12 234 | 12 235 | 12 236 | 12 237 | 238 | 239 | True 240 | False 241 | 6 242 | 243 | 244 | True 245 | False 246 | 247 | 248 | True 249 | True 250 | False 251 | False 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | True 260 | True 261 | 1 262 | 263 | 264 | 265 | 266 | True 267 | False 268 | 1 269 | 0.5 270 | 271 | 272 | True 273 | False 274 | 6 275 | True 276 | 277 | 278 | Add.. 279 | False 280 | True 281 | True 282 | True 283 | False 284 | 285 | 286 | True 287 | True 288 | 0 289 | 290 | 291 | 292 | 293 | Remove 294 | False 295 | True 296 | False 297 | True 298 | True 299 | False 300 | 301 | 302 | True 303 | True 304 | 1 305 | 306 | 307 | 308 | 309 | Up 310 | False 311 | True 312 | False 313 | True 314 | True 315 | False 316 | 317 | 318 | True 319 | True 320 | 2 321 | 322 | 323 | 324 | 325 | Down 326 | False 327 | True 328 | False 329 | True 330 | True 331 | False 332 | 333 | 334 | True 335 | True 336 | 3 337 | 338 | 339 | 340 | 341 | 342 | 343 | False 344 | True 345 | 2 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | True 355 | False 356 | Dictionaries 357 | 358 | 359 | False 360 | 361 | 362 | 363 | 364 | True 365 | False 366 | 12 367 | 12 368 | 12 369 | 12 370 | 371 | 372 | True 373 | False 374 | vertical 375 | 376 | 377 | True 378 | False 379 | 0 380 | none 381 | 382 | 383 | True 384 | False 385 | 12 386 | 387 | 388 | True 389 | False 390 | 5 391 | 2 392 | 6 393 | 6 394 | 395 | 396 | True 397 | False 398 | 399 | 400 | Return-key doesn't insert new line on commit 401 | False 402 | True 403 | True 404 | False 405 | start 406 | False 407 | 0 408 | True 409 | 410 | 411 | 412 | 413 | 2 414 | 4 415 | 5 416 | 417 | 418 | 419 | 420 | True 421 | False 422 | 0 423 | _Auto-start conversion characters: 424 | True 425 | auto_start_henkan_keywords_entry 426 | 427 | 428 | 3 429 | 4 430 | 431 | 432 | 433 | 434 | True 435 | False 436 | 1 437 | 0.5 438 | 439 | 440 | True 441 | True 442 | 443 | True 444 | 445 | 446 | 447 | 448 | 1 449 | 2 450 | 3 451 | 4 452 | 453 | 454 | 455 | 456 | True 457 | False 458 | 459 | 460 | True 461 | False 462 | 0 463 | Typing _rule: 464 | True 465 | typing_rule_combobox 466 | 467 | 468 | 469 | 470 | 471 | 472 | True 473 | False 474 | 1 475 | 0.5 476 | 477 | 478 | True 479 | False 480 | typing_rule_liststore 481 | 482 | 483 | 484 | 485 | 1 486 | 2 487 | 488 | 489 | 490 | 491 | True 492 | False 493 | 494 | 495 | True 496 | False 497 | 0 498 | _Initial input mode: 499 | True 500 | initial_input_mode_combobox 501 | 502 | 503 | 504 | 505 | 1 506 | 2 507 | 508 | 509 | 510 | 511 | True 512 | False 513 | 1 514 | 0.5 515 | 516 | 517 | True 518 | False 519 | initial_input_mode_liststore 520 | 521 | 522 | 523 | 524 | 1 525 | 2 526 | 1 527 | 2 528 | 529 | 530 | 531 | 532 | True 533 | False 534 | 0 535 | _Period style: 536 | True 537 | period_style_combobox 538 | 539 | 540 | 2 541 | 3 542 | 543 | 544 | 545 | 546 | True 547 | False 548 | 1 549 | 0.5 550 | 551 | 552 | True 553 | False 554 | period_style_liststore 555 | 556 | 557 | 558 | 559 | 1 560 | 2 561 | 2 562 | 3 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | True 572 | False 573 | <b>Typing</b> 574 | True 575 | 576 | 577 | 578 | 579 | False 580 | True 581 | 0 582 | 583 | 584 | 585 | 586 | True 587 | False 588 | 0 589 | none 590 | 591 | 592 | True 593 | False 594 | 12 595 | 596 | 597 | True 598 | False 599 | 3 600 | 2 601 | 6 602 | 6 603 | 604 | 605 | True 606 | False 607 | 0 608 | Candidate _window page size: 609 | True 610 | page_size_spinbutton 611 | 612 | 613 | 614 | 615 | True 616 | False 617 | 1 618 | 0.5 619 | 620 | 621 | True 622 | True 623 | 624 | 4 625 | True 626 | True 627 | 628 | 629 | 630 | 631 | 1 632 | 2 633 | 634 | 635 | 636 | 637 | True 638 | False 639 | 0 640 | Candidate window pa_gination start: 641 | True 642 | pagination_start_spinbutton 643 | 644 | 645 | 1 646 | 2 647 | 648 | 649 | 650 | 651 | True 652 | False 653 | 1 654 | 0.5 655 | 656 | 657 | True 658 | True 659 | 660 | 4 661 | True 662 | True 663 | 664 | 665 | 666 | 667 | 1 668 | 2 669 | 1 670 | 2 671 | 672 | 673 | 674 | 675 | Show annotation 676 | False 677 | True 678 | True 679 | False 680 | start 681 | False 682 | 0 683 | True 684 | 685 | 686 | 2 687 | 2 688 | 3 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | True 698 | False 699 | <b>Candidate window</b> 700 | True 701 | 702 | 703 | 704 | 705 | False 706 | True 707 | 1 708 | 709 | 710 | 711 | 712 | 713 | 714 | 1 715 | 716 | 717 | 718 | 719 | True 720 | False 721 | Behavior 722 | 723 | 724 | 1 725 | False 726 | 727 | 728 | 729 | 730 | True 731 | False 732 | 0.30000001192092896 733 | 12 734 | 12 735 | 12 736 | 12 737 | 738 | 739 | True 740 | False 741 | 742 | 743 | True 744 | False 745 | 6 746 | 747 | 748 | True 749 | True 750 | gtk-about 751 | 48 752 | 753 | 754 | True 755 | True 756 | 0 757 | 758 | 759 | 760 | 761 | True 762 | False 763 | <big><b>IBus SKK @VERSION@</b></big> 764 | True 765 | 766 | 767 | True 768 | True 769 | 1 770 | 771 | 772 | 773 | 774 | True 775 | False 776 | SKK input method for IBus 777 | 778 | 779 | True 780 | True 781 | 2 782 | 783 | 784 | 785 | 786 | http://github.com/ueno/ibus-skk 787 | False 788 | True 789 | True 790 | True 791 | True 792 | False 793 | none 794 | http://github.com/ueno/ibus-skk 795 | 796 | 797 | True 798 | True 799 | 3 800 | 801 | 802 | 803 | 804 | True 805 | True 806 | 0 807 | 808 | 809 | 810 | 811 | 812 | 813 | 2 814 | 815 | 816 | 817 | 818 | True 819 | False 820 | About 821 | 822 | 823 | 2 824 | False 825 | 826 | 827 | 828 | 829 | False 830 | True 831 | 1 832 | 833 | 834 | 835 | 836 | 837 | ok_button 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 。、 850 | 0 851 | 852 | 853 | ., 854 | 1 855 | 856 | 857 | 。, 858 | 2 859 | 860 | 861 | .、 862 | 3 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | -------------------------------------------------------------------------------- /icons/ibus-skk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 25 | 29 | 33 | 34 | 41 | 50 | 59 | 68 | 77 | 86 | 95 | 104 | 114 | 123 | 133 | 140 | 149 | 158 | 167 | 174 | 176 | 180 | 184 | 185 | 194 | 196 | 200 | 204 | 205 | 214 | 216 | 220 | 224 | 225 | 234 | 236 | 240 | 244 | 245 | 254 | 256 | 260 | 264 | 265 | 274 | 276 | 280 | 284 | 285 | 294 | 296 | 300 | 304 | 305 | 314 | 321 | 330 | 332 | 336 | 340 | 341 | 350 | 352 | 356 | 360 | 361 | 370 | 372 | 376 | 380 | 381 | 390 | 392 | 396 | 400 | 401 | 410 | 412 | 416 | 420 | 421 | 430 | 432 | 436 | 440 | 441 | 450 | 452 | 456 | 460 | 461 | 470 | 479 | 488 | 495 | 502 | 512 | 519 | 529 | 536 | 543 | 550 | 560 | 562 | 566 | 570 | 571 | 581 | 583 | 587 | 591 | 592 | 602 | 612 | 619 | 626 | 635 | 638 | 642 | 646 | 647 | 656 | 665 | 672 | 681 | 688 | 695 | 704 | 707 | 711 | 715 | 716 | 725 | 735 | 742 | 752 | 762 | 772 | 779 | 789 | 799 | 809 | 818 | 825 | 834 | 843 | 852 | 861 | 870 | 879 | 886 | 896 | 897 | 916 | 918 | 919 | 921 | image/svg+xml 922 | 924 | 925 | 926 | 927 | 928 | 932 | 936 | 940 | 941 | 942 | 946 | 949 | 953 | 957 | 961 | 965 | 969 | 970 | 971 | 975 | 978 | 982 | 986 | 990 | 994 | 998 | 999 | 1000 | 1001 | --------------------------------------------------------------------------------