diff options
author | Peng Wu <alexepico@gmail.com> | 2015-02-27 10:57:26 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-02-27 10:57:26 +0800 |
commit | b4b9180050dea96c2f522f11d7a20d05fde1e698 (patch) | |
tree | 77fb018d809fd5115b4c8948f16b04b0ac536bbc /setup/main2.py | |
parent | a7c391bbd323d4fa6c7b87bca0c59fa2885aa143 (diff) | |
parent | 5b2ca650b21d60a481e861ce998d2a0bbd2fb64d (diff) | |
download | ibus-libpinyin-b4b9180050dea96c2f522f11d7a20d05fde1e698.tar.gz ibus-libpinyin-b4b9180050dea96c2f522f11d7a20d05fde1e698.tar.xz ibus-libpinyin-b4b9180050dea96c2f522f11d7a20d05fde1e698.zip |
Merge branch 'py3' of git://github.com/encukou/ibus-libpinyin into encukou-py3
Diffstat (limited to 'setup/main2.py')
-rw-r--r-- | setup/main2.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/setup/main2.py b/setup/main2.py index 2d19769..20a2dac 100644 --- a/setup/main2.py +++ b/setup/main2.py @@ -21,6 +21,8 @@ # 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 @@ -268,8 +270,8 @@ class PreferencesDialog: def __correct_pinyin_toggled_cb(widget): val = widget.get_active() - map(lambda w: self.__builder.get_object(w[0]).set_sensitive(val), - self.__correct_pinyin_widgets) + for w in self.__correct_pinyin_widgets: + self.__builder.get_object(w[0]).set_sensitive(val) self.__correct_pinyin.connect("toggled", __correct_pinyin_toggled_cb) # init value @@ -304,8 +306,8 @@ class PreferencesDialog: def __fuzzy_pinyin_toggled_cb(widget): val = widget.get_active() - map(lambda w: self.__builder.get_object(w[0]).set_sensitive(val), - self.__fuzzy_pinyin_widgets) + for w in self.__fuzzy_pinyin_widgets: + self.__builder.get_object(w[0]).set_sensitive(val) self.__fuzzy_pinyin.connect("toggled", __fuzzy_pinyin_toggled_cb) # init value @@ -474,7 +476,7 @@ class PreferencesDialog: elif isinstance(val, str): var = GLib.Variant.new_string(val) else: - print >> sys.stderr, "val(%s) is not in support type." % repr(val) + print("val(%s) is not in support type." % repr(val), file=sys.stderr) return self.__values[name] = val |