summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2019-01-04 14:16:46 +0800
committerPeng Wu <alexepico@gmail.com>2019-01-04 14:16:46 +0800
commitb8324e0ada13cb3f0243c64b442607f71d3f7882 (patch)
tree706aa84854ee4bd60db798b30286f85ffdb32314
parent71f39d2b339124025aebf9f68c670fd2d452f0d3 (diff)
downloadibus-libzhuyin-b8324e0ada13cb3f0243c64b442607f71d3f7882.zip
ibus-libzhuyin-b8324e0ada13cb3f0243c64b442607f71d3f7882.tar.gz
ibus-libzhuyin-b8324e0ada13cb3f0243c64b442607f71d3f7882.tar.xz
add need_tone button
-rw-r--r--setup/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/setup/main.py b/setup/main.py
index 3a95abe..91e8446 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -138,17 +138,20 @@ class PreferencesWindow:
# init state
self.__keyboard_layout = self.__builder.get_object("keyboard_layout")
+ self.__need_tone = self.__builder.get_object("need_tone")
self.__candidate_keys = self.__builder.get_object("candidate_keys")
self.__candidate_keys_entry = self.__candidate_keys.get_child()
self.__candidate_num = self.__builder.get_object("candidate_num")
# read value
self.__keyboard_layout.set_active(self.__get_value("keyboard-layout"))
+ self.__need_tone.set_active(self.__get_value("need-tone"))
self.__candidate_keys_entry.set_text(self.__get_value("candidate-keys"))
self.__candidate_num.set_value(self.__get_value("candidate-num"))
# connect signals
self.__keyboard_layout.connect("changed", self.__keyboard_layout_cb, "keyboard-layout")
+ self.__need_tone.connect("toggled", self.__toggled_cb, "need-tone")
self.__candidate_keys_entry.connect("changed", self.__candidate_keys_entry_cb, "candidate-keys")
self.__candidate_num.connect("value-changed", self.__candidate_num_cb, "candidate-num")