summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhangyuan Nie <yuan@znie.org>2022-08-04 23:36:50 -0400
committerPeng Wu <alexepico@gmail.com>2022-08-10 14:12:52 +0800
commit698498b8da71d9ba0f770de418b9c361779857fc (patch)
tree325a0009ad70257d8861fb4a25a42f8f889703f3
parentc1ff04dea4889988a44cd19b08b49594b3601302 (diff)
downloadibus-libpinyin-698498b8da71d9ba0f770de418b9c361779857fc.tar.gz
update python version to 3.7
-rw-r--r--configure.ac8
-rw-r--r--setup/main2.py8
2 files changed, 4 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 0f8da2f..627b848 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,12 +89,7 @@ AC_PATH_PROG(ENV, env)
AC_SUBST(ENV)
# check python
-AC_ARG_WITH(python,
- AS_HELP_STRING([--with-python[=PATH]],
- [Select python2 or python3]),
- [PYTHON=$with_python], []
-)
-AM_PATH_PYTHON([3.2])
+AM_PATH_PYTHON([3.7])
# check icon_prop_key in IBus.EngineDesc
AC_MSG_CHECKING([if IBus.EngineDesc has get_icon_prop_key])
@@ -254,4 +249,3 @@ Build options:
Build table input mode $enable_table_input_mode
Build english input mode $enable_english_input_mode
])
-
diff --git a/setup/main2.py b/setup/main2.py
index 7ddec74..118bd3b 100644
--- a/setup/main2.py
+++ b/setup/main2.py
@@ -21,8 +21,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from __future__ import print_function
-
import gettext
import locale
@@ -75,7 +73,7 @@ class PreferencesDialog:
self.__builder.add_from_file("ibus-libpinyin-preferences.ui")
self.__dialog = self.__builder.get_object("dialog")
self.__init_pages()
-
+
if engine == "libpinyin":
self.__config_namespace = "com.github.libpinyin.ibus-libpinyin.libpinyin"
self.__config = Gio.Settings.new(self.__config_namespace)
@@ -191,7 +189,7 @@ class PreferencesDialog:
def __init_pinyin(self):
# page
self.__page_pinyin_mode.show()
-
+
# pinyin
self.__full_pinyin = self.__builder.get_object("FullPinyin")
self.__incomplete_pinyin = self.__builder.get_object("IncompletePinyin")
@@ -242,7 +240,7 @@ class PreferencesDialog:
# bopomofo mode
self.__incomplete_bopomofo = self.__builder.get_object("IncompleteBopomofo")
self.__bopomofo_keyboard_mapping = self.__builder.get_object("BopomofoKeyboardMapping")
-
+
# selection mode
self.__select_keys = self.__builder.get_object("SelectKeys")
self.__guide_key = self.__builder.get_object("GuideKey")