summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-07-11 14:36:14 +0800
committerPeng Wu <alexepico@gmail.com>2014-07-11 14:36:14 +0800
commit14394369bf5bf4f16c0f8a121e51eeb4316d1e9d (patch)
treeaf9d9044c15f6a3b4d5ef7120c2c3d25ae48f3d2
parent77bf4be9cde8139ecf2946a532eefaa2f9d5eaf3 (diff)
downloadibus-libzhuyin-14394369bf5bf4f16c0f8a121e51eeb4316d1e9d.tar.gz
ibus-libzhuyin-14394369bf5bf4f16c0f8a121e51eeb4316d1e9d.tar.xz
ibus-libzhuyin-14394369bf5bf4f16c0f8a121e51eeb4316d1e9d.zip
support init Traditional Chinese option
-rw-r--r--setup/main.py3
-rw-r--r--src/ZYZConfig.cc4
2 files changed, 5 insertions, 2 deletions
diff --git a/setup/main.py b/setup/main.py
index e2a7293..111b1f9 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -85,18 +85,21 @@ class PreferencesWindow:
self.__chinese_mode = self.__builder.get_object("chinesemode")
self.__full_half_english = self.__builder.get_object("fullhalfenglish")
self.__full_half_punct = self.__builder.get_object("fullhalfpunct")
+ self.__traditional_chinese = self.__builder.get_object("traditionalchinese")
self.__always_input_num = self.__builder.get_object("alwaysinputnum")
# read values
self.__chinese_mode.set_active(self.__get_value("chinesemode", True))
self.__full_half_english.set_active(self.__get_value("fullhalfenglish", False))
self.__full_half_punct.set_active(self.__get_value("fullhalfpunct", True))
+ self.__traditional_chinese.set_active(self.__get_value("traditionalchinese", True))
self.__always_input_num.set_active(self.__get_value("alwaysinputnum", True))
# connect signals
self.__chinese_mode.connect("toggled", self.__toggled_cb, "chinesemode")
self.__full_half_english.connect("toggled", self.__toggled_cb, "fullhalfenglish")
self.__full_half_punct.connect("toggled", self.__toggled_cb, "fullhalfpunct")
+ self.__traditional_chinese.connect("toggled", self.__toggled_cb, "traditionalchinese")
self.__always_input_num.connect("toggled", self.__toggled_cb, "alwaysinputnum")
diff --git a/src/ZYZConfig.cc b/src/ZYZConfig.cc
index d07ed73..2141eb3 100644
--- a/src/ZYZConfig.cc
+++ b/src/ZYZConfig.cc
@@ -33,7 +33,7 @@ const gchar * const CONFIG_KEYBOARD_LAYOUT = "keyboardlayout";
const gchar * const CONFIG_INIT_CHINESE = "chinesemode";
const gchar * const CONFIG_INIT_FULL_ENGLISH = "fullhalfenglish";
const gchar * const CONFIG_INIT_FULL_PUNCT = "fullhalfpunct";
-const gchar * const CONFIG_INIT_TRAD_CHINESE = "TraditionalChinese";
+const gchar * const CONFIG_INIT_TRAD_CHINESE = "traditionalchinese";
const gchar * const CONFIG_CANDIDATE_KEYS = "candidatekeys";
const zhuyin_option_t ZHUYIN_DEFAULT_OPTION =
@@ -212,7 +212,7 @@ ZhuyinConfig::valueChanged (const std::string &section,
else if (CONFIG_INIT_FULL_PUNCT == name)
m_init_full_punct = normalizeGVariant (value, true);
else if (CONFIG_INIT_TRAD_CHINESE == name)
- m_init_trad_chinese = normalizeGVariant (value, false);
+ m_init_trad_chinese = normalizeGVariant (value, true);
else if (CONFIG_KEYBOARD_LAYOUT == name) {
gint layout = normalizeGVariant (value, 0);
m_keyboard_layout = CHEWING_DEFAULT;