summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-03-26 13:58:35 +0800
committerPeng Wu <alexepico@gmail.com>2012-03-26 13:58:35 +0800
commitfbe55876db048bc375c99d0b7fa7dc023061d0b9 (patch)
tree54cf8714abc5966be7c55bbaf918a5b47f37983b /setup
parentd093c2d0837266fe21ff01016819dd4e2bfdd83c (diff)
update setup dialog
Diffstat (limited to 'setup')
-rw-r--r--setup/Makefile.am21
-rw-r--r--setup/ibus-setup-libpinyin.in30
-rw-r--r--setup/main2.py2
3 files changed, 51 insertions, 2 deletions
diff --git a/setup/Makefile.am b/setup/Makefile.am
index 565e5d4..b73f375 100644
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -20,12 +20,18 @@
setup_pinyin_PYTHON = \
main.py \
+ main2.py \
version.py \
ibus-pinyin-preferences.ui \
+ ibus-libpinyin-preferences.ui \
$(NULL)
+
setup_pinyindir = $(datadir)/ibus-pinyin/setup
-libexec_SCRIPTS = ibus-setup-pinyin
+libexec_SCRIPTS = \
+ ibus-setup-pinyin \
+ ibus-setup-libpinyin \
+ $(NULL)
CLEANFILES = \
*.pyc \
@@ -34,6 +40,7 @@ CLEANFILES = \
EXTRA_DIST = \
version.py.in \
ibus-setup-pinyin.in \
+ ibus-setup-libpinyin.in \
$(NULL)
test-pinyin:
@@ -47,3 +54,15 @@ test-bopomofo:
IBUS_LOCALEDIR=@localedir@ \
PYTHONPATH=$(abs_top_srcdir):$(pyexecdir) \
$(PYTHON) $(srcdir)/main.py bopomofo
+
+test-libpinyin:
+ $(ENV) DBUS_DEBUG=true \
+ IBUS_LOCALEDIR=@localedir@ \
+ PYTHONPATH=$(abs_top_srcdir):$(pyexecdir) \
+ $(PYTHON) $(srcdir)/main2.py pinyin
+
+test-libbopomofo:
+ $(ENV) DBUS_DEBUG=true \
+ IBUS_LOCALEDIR=@localedir@ \
+ PYTHONPATH=$(abs_top_srcdir):$(pyexecdir) \
+ $(PYTHON) $(srcdir)/main2.py bopomofo
diff --git a/setup/ibus-setup-libpinyin.in b/setup/ibus-setup-libpinyin.in
new file mode 100644
index 0000000..036ab3e
--- /dev/null
+++ b/setup/ibus-setup-libpinyin.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+# vim:set noet ts=4:
+#
+# ibus-tmpl - The Input Bus template project
+#
+# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+datarootdir=@datarootdir@
+export IBUS_PREFIX=@prefix@
+export IBUS_DATAROOTDIR=@datarootdir@
+export IBUS_LOCALEDIR=@localedir@
+cd @prefix@/share/ibus-pinyin/setup/
+exec python main2.py $@
+
diff --git a/setup/main2.py b/setup/main2.py
index a21acad..1280c2b 100644
--- a/setup/main2.py
+++ b/setup/main2.py
@@ -41,7 +41,7 @@ class PreferencesDialog:
self.__config = self.__bus.get_config()
self.__builder = gtk.Builder()
self.__builder.set_translation_domain("ibus-pinyin")
- self.__builder.add_from_file("ibus-pinyin-preferences.ui")
+ self.__builder.add_from_file("ibus-libpinyin-preferences.ui")
self.__dialog = self.__builder.get_object("dialog")
self.__init_pages()