Fixes config in setup dialog

This commit is contained in:
Peng Wu 2017-02-28 12:40:53 +08:00
parent 6b9b698f6a
commit cf8039a753
2 changed files with 412 additions and 2 deletions

View File

@ -0,0 +1,407 @@
diff --git a/setup/main2.py b/setup/main2.py
index 4af9290..b6967c0 100644
--- a/setup/main2.py
+++ b/setup/main2.py
@@ -144,29 +144,29 @@ class PreferencesDialog:
self.__remember_every_input = self.__builder.get_object("RememberEveryInput")
# read values
- self.__init_chinese.set_active(self.__get_value("init-chinese", True))
- self.__init_full.set_active(self.__get_value("init-full", False))
- self.__init_full_punct.set_active(self.__get_value("init-full-punct", True))
- self.__init_simp.set_active(self.__get_value("init-simplified-chinese", True))
+ self.__init_chinese.set_active(self.__get_value("init_chinese", True))
+ self.__init_full.set_active(self.__get_value("init_full", False))
+ self.__init_full_punct.set_active(self.__get_value("init_full_punct", True))
+ self.__init_simp.set_active(self.__get_value("init_simplified_chinese", True))
- self.__lookup_table_orientation.set_active(self.__get_value("lookup-table-orientation", 0))
- self.__lookup_table_page_size.set_value(self.__get_value("lookup-table-page-size", 5))
+ self.__lookup_table_orientation.set_active(self.__get_value("lookup_table_orientation", 0))
+ self.__lookup_table_page_size.set_value(self.__get_value("lookup_table_page_size", 5))
- self.__dynamic_adjust.set_active(self.__get_value("dynamic-adjust", True))
- self.__remember_every_input.set_active(self.__get_value("remember-every-input", False))
+ self.__dynamic_adjust.set_active(self.__get_value("dynamic_adjust", True))
+ self.__remember_every_input.set_active(self.__get_value("remember_every_input", False))
# connect signals
- self.__init_chinese.connect("toggled", self.__toggled_cb, "init-chinese")
- self.__init_full.connect("toggled", self.__toggled_cb, "init-full")
- self.__init_full_punct.connect("toggled", self.__toggled_cb, "init-full-punct")
- self.__init_simp.connect("toggled", self.__toggled_cb, "init-simplified-chinese")
- self.__dynamic_adjust.connect("toggled", self.__toggled_cb, "dynamic-adjust")
- self.__remember_every_input.connect("toggled", self.__toggled_cb, "remember-every-input")
+ self.__init_chinese.connect("toggled", self.__toggled_cb, "init_chinese")
+ self.__init_full.connect("toggled", self.__toggled_cb, "init_full")
+ self.__init_full_punct.connect("toggled", self.__toggled_cb, "init_full_punct")
+ self.__init_simp.connect("toggled", self.__toggled_cb, "init_simplified_chinese")
+ self.__dynamic_adjust.connect("toggled", self.__toggled_cb, "dynamic_adjust")
+ self.__remember_every_input.connect("toggled", self.__toggled_cb, "remember_every_input")
def __lookup_table_page_size_changed_cb(adjustment):
- self.__set_value("lookup-table-page-size", int(adjustment.get_value()))
+ self.__set_value("lookup_table_page_size", int(adjustment.get_value()))
def __lookup_table_orientation_changed_cb(widget):
- self.__set_value("lookup-table-orientation", widget.get_active())
+ self.__set_value("lookup_table_orientation", widget.get_active())
self.__lookup_table_orientation.connect("changed", __lookup_table_orientation_changed_cb)
self.__lookup_table_page_size.connect("value-changed", __lookup_table_page_size_changed_cb)
@@ -185,9 +185,9 @@ class PreferencesDialog:
self.__double_pinyin_show_raw.hide ()
# read value
- self.__incomplete_pinyin.set_active(self.__get_value("incomplete-pinyin", True))
- self.__full_pinyin.set_active(not self.__get_value("double-pinyin", False))
- self.__double_pinyin_schema.set_active(self.__get_value("double-pinyin-schema", 0))
+ self.__incomplete_pinyin.set_active(self.__get_value("incomplete_pinyin", True))
+ self.__full_pinyin.set_active(not self.__get_value("double_pinyin", False))
+ self.__double_pinyin_schema.set_active(self.__get_value("double_pinyin_schema", 0))
if self.__full_pinyin.get_active():
# self.__incomplete_pinyin.set_sensitive(True)
self.__double_pinyin_schema.set_sensitive(False)
@@ -201,19 +201,19 @@ class PreferencesDialog:
def __double_pinyin_toggled_cb(widget):
val = widget.get_active()
- self.__set_value("double-pinyin", val)
+ self.__set_value("double_pinyin", val)
self.__double_pinyin_schema.set_sensitive(val)
# self.__double_pinyin_schema_label.set_sensitive(val)
self.__double_pinyin_show_raw.set_sensitive(val)
def __double_pinyin_schema_changed_cb(widget):
- self.__set_value("double-pinyin-schema", widget.get_active())
+ self.__set_value("double_pinyin_schema", widget.get_active())
# connect signals
self.__double_pinyin.connect("toggled", __double_pinyin_toggled_cb)
- self.__incomplete_pinyin.connect("toggled", self.__toggled_cb, "incomplete-pinyin")
+ self.__incomplete_pinyin.connect("toggled", self.__toggled_cb, "incomplete_pinyin")
self.__double_pinyin_schema.connect("changed", __double_pinyin_schema_changed_cb)
- self.__double_pinyin_show_raw.connect("toggled", self.__toggled_cb, "double-pinyin-show-raw")
+ self.__double_pinyin_show_raw.connect("toggled", self.__toggled_cb, "double_pinyin_show_raw")
self.__init_input_custom()
self.__init_correct_pinyin()
@@ -236,27 +236,27 @@ class PreferencesDialog:
self.__enter_key = self.__builder.get_object("CommitFirstCandidate")
# read value
- self.__bopomofo_keyboard_mapping.set_active(self.__get_value("bopomofo-keyboard-mapping", 0))
- self.__incomplete_bopomofo.set_active(self.__get_value("incomplete-pinyin", False))
- self.__select_keys.set_active(self.__get_value("select-keys", 0))
- self.__guide_key.set_active(self.__get_value("guide-key", 1))
- self.__auxiliary_select_key_f.set_active(self.__get_value("auxiliary-select-key-f", 1))
- self.__auxiliary_select_key_kp.set_active(self.__get_value("auxiliary-select-key-kp", 1))
- self.__enter_key.set_active(self.__get_value("enter-key", True))
+ self.__bopomofo_keyboard_mapping.set_active(self.__get_value("bopomofo_keyboard_mapping", 0))
+ self.__incomplete_bopomofo.set_active(self.__get_value("incomplete_pinyin", False))
+ self.__select_keys.set_active(self.__get_value("select_keys", 0))
+ self.__guide_key.set_active(self.__get_value("guide_key", 1))
+ self.__auxiliary_select_key_f.set_active(self.__get_value("auxiliary_select_key_f", 1))
+ self.__auxiliary_select_key_kp.set_active(self.__get_value("auxiliary_select_key_kp", 1))
+ self.__enter_key.set_active(self.__get_value("enter_key", True))
# connect signals
def __bopomofo_keyboard_mapping_changed_cb(widget):
- self.__set_value("bopomofo-keyboard-mapping", widget.get_active())
+ self.__set_value("bopomofo_keyboard_mapping", widget.get_active())
def __select_keys_changed_cb(widget):
- self.__set_value("select-keys", widget.get_active())
+ self.__set_value("select_keys", widget.get_active())
self.__bopomofo_keyboard_mapping.connect("changed", __bopomofo_keyboard_mapping_changed_cb)
- self.__incomplete_bopomofo.connect("toggled", self.__toggled_cb, "incomplete-pinyin")
+ self.__incomplete_bopomofo.connect("toggled", self.__toggled_cb, "incomplete_pinyin")
self.__select_keys.connect("changed", __select_keys_changed_cb)
- self.__guide_key.connect("toggled", self.__toggled_cb, "guide-key")
- self.__auxiliary_select_key_f.connect("toggled", self.__toggled_cb, "auxiliary-select-key-f")
- self.__auxiliary_select_key_kp.connect("toggled", self.__toggled_cb, "auxiliary-select-key-kp")
- self.__enter_key.connect("toggled", self.__toggled_cb, "enter-key")
+ self.__guide_key.connect("toggled", self.__toggled_cb, "guide_key")
+ self.__auxiliary_select_key_f.connect("toggled", self.__toggled_cb, "auxiliary_select_key_f")
+ self.__auxiliary_select_key_kp.connect("toggled", self.__toggled_cb, "auxiliary_select_key_kp")
+ self.__enter_key.connect("toggled", self.__toggled_cb, "enter_key")
def __init_input_custom(self):
# others
@@ -266,29 +266,29 @@ class PreferencesDialog:
self.__auto_commit = self.__builder.get_object("AutoCommit")
# read values
- self.__shift_select_candidate.set_active(self.__get_value("shift-select-candidate", False))
- self.__minus_equal_page.set_active(self.__get_value("minus-equal-page", True))
- self.__comma_period_page.set_active(self.__get_value("comma-period-page", True))
- self.__auto_commit.set_active(self.__get_value("auto-commit", False))
+ self.__shift_select_candidate.set_active(self.__get_value("shift_select_candidate", False))
+ self.__minus_equal_page.set_active(self.__get_value("minus_equal_page", True))
+ self.__comma_period_page.set_active(self.__get_value("comma_period_page", True))
+ self.__auto_commit.set_active(self.__get_value("auto_commit", False))
# connect signals
- self.__shift_select_candidate.connect("toggled", self.__toggled_cb, "shift-select-candidate")
- self.__minus_equal_page.connect("toggled", self.__toggled_cb, "minus-equal-page")
- self.__comma_period_page.connect("toggled", self.__toggled_cb, "comma-period-page")
- self.__auto_commit.connect("toggled", self.__toggled_cb, "auto-commit")
+ self.__shift_select_candidate.connect("toggled", self.__toggled_cb, "shift_select_candidate")
+ self.__minus_equal_page.connect("toggled", self.__toggled_cb, "minus_equal_page")
+ self.__comma_period_page.connect("toggled", self.__toggled_cb, "comma_period_page")
+ self.__auto_commit.connect("toggled", self.__toggled_cb, "auto_commit")
def __init_correct_pinyin(self):
# auto correct
self.__correct_pinyin = self.__builder.get_object("CorrectPinyin")
self.__correct_pinyin_widgets = [
- ('CorrectPinyin_GN_NG', 'correct-pinyin-gn-ng', True),
- ('CorrectPinyin_MG_NG', 'correct-pinyin-mg-ng', True),
- ('CorrectPinyin_IOU_IU', 'correct-pinyin-iou-iu', True),
- ('CorrectPinyin_UEI_UI', 'correct-pinyin-uei-ui', True),
- ('CorrectPinyin_UEN_UN', 'correct-pinyin-uen-un', True),
- ('CorrectPinyin_UE_VE', 'correct-pinyin-ue-ve', True),
- ('CorrectPinyin_V_U', 'correct-pinyin-v-u', True),
- ('CorrectPinyin_ON_ONG', 'correct-pinyin-on-ong', True),
+ ('CorrectPinyin_GN_NG', 'correct_pinyin_gn_ng', True),
+ ('CorrectPinyin_MG_NG', 'correct_pinyin_mg_ng', True),
+ ('CorrectPinyin_IOU_IU', 'correct_pinyin_iou_iu', True),
+ ('CorrectPinyin_UEI_UI', 'correct_pinyin_uei_ui', True),
+ ('CorrectPinyin_UEN_UN', 'correct_pinyin_uen_un', True),
+ ('CorrectPinyin_UE_VE', 'correct_pinyin_ue_ve', True),
+ ('CorrectPinyin_V_U', 'correct_pinyin_v_u', True),
+ ('CorrectPinyin_ON_ONG', 'correct_pinyin_on_ong', True),
]
def __correct_pinyin_toggled_cb(widget):
@@ -298,12 +298,12 @@ class PreferencesDialog:
self.__correct_pinyin.connect("toggled", __correct_pinyin_toggled_cb)
# init value
- self.__correct_pinyin.set_active(self.__get_value("correct-pinyin", True))
+ self.__correct_pinyin.set_active(self.__get_value("correct_pinyin", True))
for name, keyname, defval in self.__correct_pinyin_widgets:
widget = self.__builder.get_object(name)
widget.set_active(self.__get_value(keyname, defval))
- self.__correct_pinyin.connect("toggled", self.__toggled_cb, "correct-pinyin")
+ self.__correct_pinyin.connect("toggled", self.__toggled_cb, "correct_pinyin")
for name, keyname, defval in self.__correct_pinyin_widgets:
widget = self.__builder.get_object(name)
widget.connect("toggled", self.__toggled_cb, keyname)
@@ -315,16 +315,16 @@ class PreferencesDialog:
# fuzzy pinyin
self.__fuzzy_pinyin = self.__builder.get_object("FuzzyPinyin")
self.__fuzzy_pinyin_widgets = [
- ('FuzzyPinyin_C_CH', 'fuzzy-pinyin-c-ch', True),
- ('FuzzyPinyin_Z_ZH', 'fuzzy-pinyin-z-zh', True),
- ('FuzzyPinyin_S_SH', 'fuzzy-pinyin-s-sh', True),
- ('FuzzyPinyin_L_N', 'fuzzy-pinyin-l-n', True),
- ('FuzzyPinyin_F_H', 'fuzzy-pinyin-f-h', True),
- ('FuzzyPinyin_L_R', 'fuzzy-pinyin-l-r', False),
- ('FuzzyPinyin_G_K', 'fuzzy-pinyin-g-k', False),
- ('FuzzyPinyin_AN_ANG', 'fuzzy-pinyin-an-ang', True),
- ('FuzzyPinyin_EN_ENG', 'fuzzy-pinyin-en-eng', True),
- ('FuzzyPinyin_IN_ING', 'fuzzy-pinyin-in-ing', True),
+ ('FuzzyPinyin_C_CH', 'fuzzy_pinyin_c_ch', True),
+ ('FuzzyPinyin_Z_ZH', 'fuzzy_pinyin_z_zh', True),
+ ('FuzzyPinyin_S_SH', 'fuzzy_pinyin_s_sh', True),
+ ('FuzzyPinyin_L_N', 'fuzzy_pinyin_l_n', True),
+ ('FuzzyPinyin_F_H', 'fuzzy_pinyin_f_h', True),
+ ('FuzzyPinyin_L_R', 'fuzzy_pinyin_l_r', False),
+ ('FuzzyPinyin_G_K', 'fuzzy_pinyin_g_k', False),
+ ('FuzzyPinyin_AN_ANG', 'fuzzy_pinyin_an_ang', True),
+ ('FuzzyPinyin_EN_ENG', 'fuzzy_pinyin_en_eng', True),
+ ('FuzzyPinyin_IN_ING', 'fuzzy_pinyin_in_ing', True),
]
def __fuzzy_pinyin_toggled_cb(widget):
@@ -334,12 +334,12 @@ class PreferencesDialog:
self.__fuzzy_pinyin.connect("toggled", __fuzzy_pinyin_toggled_cb)
# init value
- self.__fuzzy_pinyin.set_active(self.__get_value("fuzzy-pinyin", False))
+ self.__fuzzy_pinyin.set_active(self.__get_value("fuzzy_pinyin", False))
for name, keyname, defval in self.__fuzzy_pinyin_widgets:
widget = self.__builder.get_object(name)
widget.set_active(self.__get_value(keyname, defval))
- self.__fuzzy_pinyin.connect("toggled", self.__toggled_cb, "fuzzy-pinyin")
+ self.__fuzzy_pinyin.connect("toggled", self.__toggled_cb, "fuzzy_pinyin")
for name, keyname, defval in self.__fuzzy_pinyin_widgets:
widget = self.__builder.get_object(name)
widget.connect("toggled", self.__toggled_cb, keyname)
@@ -424,7 +424,7 @@ class PreferencesDialog:
response = dialog.run()
if response == Gtk.ResponseType.OK:
- self.__set_value("import-dictionary", dialog.get_filename())
+ self.__set_value("import_dictionary", dialog.get_filename())
dialog.destroy()
@@ -443,12 +443,12 @@ class PreferencesDialog:
response = dialog.run()
if response == Gtk.ResponseType.OK:
- self.__set_value("export-dictionary", dialog.get_filename())
+ self.__set_value("export_dictionary", dialog.get_filename())
dialog.destroy()
def __clear_user_data_cb(self, widget, name):
- self.__set_value("clear-user-data", name)
+ self.__set_value("clear_user_data", name)
def __init_shortcut(self):
# page Shortcut
diff --git a/setup/shortcuteditor.py b/setup/shortcuteditor.py
index 18c95e9..ab94f38 100644
--- a/setup/shortcuteditor.py
+++ b/setup/shortcuteditor.py
@@ -43,10 +43,10 @@ COLUMN_ACCELERATOR,
# The default shortcut value is stored here.
accelerators = \
(
- (_("Switch Chinese/English"), "main-switch" , "<Shift>"),
- (_("Full/Half Width Letter"), "letter-switch", ""),
- (_("Full/Half Width Punct"), "punct-switch", "<Control>period"),
- (_("Switch Traditional/Simplfied Chinese"), "trad-switch", "<Control><Shift>f")
+ (_("Switch Chinese/English"), "main_switch" , "<Shift>"),
+ (_("Full/Half Width Letter"), "letter_switch", ""),
+ (_("Full/Half Width Punct"), "punct_switch", "<Control>period"),
+ (_("Switch Traditional/Simplfied Chinese"), "trad_switch", "<Control><Shift>f")
)
class ShortcutTreeView(Gtk.TreeView):
diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc
index 5f73a53..36d1e95 100644
--- a/src/PYPConfig.cc
+++ b/src/PYPConfig.cc
@@ -28,38 +28,38 @@
namespace PY {
-const gchar * const CONFIG_CORRECT_PINYIN = "correct-pinyin";
-const gchar * const CONFIG_FUZZY_PINYIN = "fuzzy-pinyin";
-const gchar * const CONFIG_ORIENTATION = "lookup-table-orientation";
-const gchar * const CONFIG_PAGE_SIZE = "lookup-table-page-size";
-const gchar * const CONFIG_REMEMBER_EVERY_INPUT = "remember-every-input";
-const gchar * const CONFIG_SHIFT_SELECT_CANDIDATE = "shift-select-candidate";
-const gchar * const CONFIG_MINUS_EQUAL_PAGE = "minus-equal-page";
-const gchar * const CONFIG_COMMA_PERIOD_PAGE = "comma-period-page";
-const gchar * const CONFIG_AUTO_COMMIT = "auto-commit";
-const gchar * const CONFIG_DOUBLE_PINYIN = "double-pinyin";
-const gchar * const CONFIG_DOUBLE_PINYIN_SCHEMA = "double-pinyin-schema";
-const gchar * const CONFIG_DOUBLE_PINYIN_SHOW_RAW = "double-pinyin-show-raw";
-const gchar * const CONFIG_INIT_CHINESE = "init-chinese";
-const gchar * const CONFIG_INIT_FULL = "init-full";
-const gchar * const CONFIG_INIT_FULL_PUNCT = "init-full-punct";
-const gchar * const CONFIG_INIT_SIMP_CHINESE = "init-simplified-chinese";
-const gchar * const CONFIG_SPECIAL_PHRASES = "special-phrases";
+const gchar * const CONFIG_CORRECT_PINYIN = "correct_pinyin";
+const gchar * const CONFIG_FUZZY_PINYIN = "fuzzy_pinyin";
+const gchar * const CONFIG_ORIENTATION = "lookup_table_orientation";
+const gchar * const CONFIG_PAGE_SIZE = "lookup_table_page_size";
+const gchar * const CONFIG_REMEMBER_EVERY_INPUT = "remember_every_input";
+const gchar * const CONFIG_SHIFT_SELECT_CANDIDATE = "shift_select_candidate";
+const gchar * const CONFIG_MINUS_EQUAL_PAGE = "minus_equal_page";
+const gchar * const CONFIG_COMMA_PERIOD_PAGE = "comma_period_page";
+const gchar * const CONFIG_AUTO_COMMIT = "auto_commit";
+const gchar * const CONFIG_DOUBLE_PINYIN = "double_pinyin";
+const gchar * const CONFIG_DOUBLE_PINYIN_SCHEMA = "double_pinyin_schema";
+const gchar * const CONFIG_DOUBLE_PINYIN_SHOW_RAW = "double_pinyin_show_raw";
+const gchar * const CONFIG_INIT_CHINESE = "init_chinese";
+const gchar * const CONFIG_INIT_FULL = "init_full";
+const gchar * const CONFIG_INIT_FULL_PUNCT = "init_full_punct";
+const gchar * const CONFIG_INIT_SIMP_CHINESE = "init_simplified_chinese";
+const gchar * const CONFIG_SPECIAL_PHRASES = "special_phrases";
const gchar * const CONFIG_DICTIONARIES = "dictionaries";
-const gchar * const CONFIG_BOPOMOFO_KEYBOARD_MAPPING = "bopomofo-keyboard-mapping";
-const gchar * const CONFIG_SELECT_KEYS = "select-keys";
-const gchar * const CONFIG_GUIDE_KEY = "guide-key";
-const gchar * const CONFIG_AUXILIARY_SELECT_KEY_F = "auxiliary-select-key-f";
-const gchar * const CONFIG_AUXILIARY_SELECT_KEY_KP = "auxiliary-select-key-kp";
-const gchar * const CONFIG_ENTER_KEY = "enter-key";
-const gchar * const CONFIG_IMPORT_DICTIONARY = "import-dictionary";
-const gchar * const CONFIG_EXPORT_DICTIONARY = "export-dictionary";
-const gchar * const CONFIG_CLEAR_USER_DATA = "clear-user-data";
-/* const gchar * const CONFIG_CTRL_SWITCH = "ctrl-switch"; */
-const gchar * const CONFIG_MAIN_SWITCH = "main-switch";
-const gchar * const CONFIG_LETTER_SWITCH = "letter-switch";
-const gchar * const CONFIG_PUNCT_SWITCH = "punct-switch";
-const gchar * const CONFIG_TRAD_SWITCH = "trad-switch";
+const gchar * const CONFIG_BOPOMOFO_KEYBOARD_MAPPING = "bopomofo_keyboard_mapping";
+const gchar * const CONFIG_SELECT_KEYS = "select_keys";
+const gchar * const CONFIG_GUIDE_KEY = "guide_key";
+const gchar * const CONFIG_AUXILIARY_SELECT_KEY_F = "auxiliary_select_key_f";
+const gchar * const CONFIG_AUXILIARY_SELECT_KEY_KP = "auxiliary_select_key_kp";
+const gchar * const CONFIG_ENTER_KEY = "enter_key";
+const gchar * const CONFIG_IMPORT_DICTIONARY = "import_dictionary";
+const gchar * const CONFIG_EXPORT_DICTIONARY = "export_dictionary";
+const gchar * const CONFIG_CLEAR_USER_DATA = "clear_user_data";
+/* const gchar * const CONFIG_CTRL_SWITCH = "ctrl_switch"; */
+const gchar * const CONFIG_MAIN_SWITCH = "main_switch";
+const gchar * const CONFIG_LETTER_SWITCH = "letter_switch";
+const gchar * const CONFIG_PUNCT_SWITCH = "punct_switch";
+const gchar * const CONFIG_TRAD_SWITCH = "trad_switch";
const pinyin_option_t PINYIN_DEFAULT_OPTION =
PINYIN_INCOMPLETE |
@@ -123,20 +123,20 @@ static const struct {
const gchar * const name;
guint option;
} options [] = {
- { "incomplete-pinyin", PINYIN_INCOMPLETE|ZHUYIN_INCOMPLETE},
+ { "incomplete_pinyin", PINYIN_INCOMPLETE|ZHUYIN_INCOMPLETE},
/* fuzzy pinyin */
- { "fuzzy-pinyin-c-ch", PINYIN_AMB_C_CH },
- { "fuzzy-pinyin-z-zh", PINYIN_AMB_Z_ZH },
- { "fuzzy-pinyin-s-sh", PINYIN_AMB_S_SH },
- { "fuzzy-pinyin-l-n", PINYIN_AMB_L_N },
- { "fuzzy-pinyin-f-h", PINYIN_AMB_F_H },
- { "fuzzy-pinyin-l-r", PINYIN_AMB_L_R },
- { "fuzzy-pinyin-g-k", PINYIN_AMB_G_K },
- { "fuzzy-pinyin-an-ang", PINYIN_AMB_AN_ANG },
- { "fuzzy-pinyin-en-eng", PINYIN_AMB_EN_ENG },
- { "fuzzy-pinyin-in-ing", PINYIN_AMB_IN_ING },
+ { "fuzzy_pinyin_c_ch", PINYIN_AMB_C_CH },
+ { "fuzzy_pinyin_z_zh", PINYIN_AMB_Z_ZH },
+ { "fuzzy_pinyin_s_sh", PINYIN_AMB_S_SH },
+ { "fuzzy_pinyin_l_n", PINYIN_AMB_L_N },
+ { "fuzzy_pinyin_f_h", PINYIN_AMB_F_H },
+ { "fuzzy_pinyin_l_r", PINYIN_AMB_L_R },
+ { "fuzzy_pinyin_g_k", PINYIN_AMB_G_K },
+ { "fuzzy_pinyin_an_ang", PINYIN_AMB_AN_ANG },
+ { "fuzzy_pinyin_en_eng", PINYIN_AMB_EN_ENG },
+ { "fuzzy_pinyin_in_ing", PINYIN_AMB_IN_ING },
/* dynamic adjust */
- { "dynamic-adjust", DYNAMIC_ADJUST },
+ { "dynamic_adjust", DYNAMIC_ADJUST },
};
void
@@ -292,15 +292,15 @@ static const struct {
guint option;
} pinyin_options [] = {
/* correct */
- { "correct-pinyin-gn-ng", PINYIN_CORRECT_GN_NG },
- { "correct-pinyin-mg-ng", PINYIN_CORRECT_MG_NG },
- { "correct-pinyin-iou-iu", PINYIN_CORRECT_IOU_IU },
- { "correct-pinyin-uei-ui", PINYIN_CORRECT_UEI_UI },
- { "correct-pinyin-uen-un", PINYIN_CORRECT_UEN_UN },
- { "correct-pinyin-ue-ve", PINYIN_CORRECT_UE_VE },
- { "correct-pinyin-v-u", PINYIN_CORRECT_V_U },
- { "correct-pinyin-ve-ue", PINYIN_CORRECT_V_U },
- { "correct-pinyin-on-ong", PINYIN_CORRECT_ON_ONG },
+ { "correct_pinyin_gn_ng", PINYIN_CORRECT_GN_NG },
+ { "correct_pinyin_mg_ng", PINYIN_CORRECT_MG_NG },
+ { "correct_pinyin_iou_iu", PINYIN_CORRECT_IOU_IU },
+ { "correct_pinyin_uei_ui", PINYIN_CORRECT_UEI_UI },
+ { "correct_pinyin_uen_un", PINYIN_CORRECT_UEN_UN },
+ { "correct_pinyin_ue_ve", PINYIN_CORRECT_UE_VE },
+ { "correct_pinyin_v_u", PINYIN_CORRECT_V_U },
+ { "correct_pinyin_ve_ue", PINYIN_CORRECT_V_U },
+ { "correct_pinyin_on_ong", PINYIN_CORRECT_ON_ONG },
};
/* Here are the double pinyin keyboard scheme mapping table. */

View File

@ -1,8 +1,8 @@
%global snapshot 0
%global snapshot 1
Name: ibus-libpinyin
Version: 1.8.91
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Intelligent Pinyin engine based on libpinyin for IBus
License: GPLv2+
Group: System Environment/Libraries
@ -86,6 +86,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
%{_datadir}/ibus/component/*
%changelog
* Tue Feb 28 2017 Peng Wu <pwu@redhat.com> - 1.8.91-2
- Fixes config in setup dialog
* Wed Feb 15 2017 Peng Wu <pwu@redhat.com> - 1.8.91-1
- Update to 1.8.91
- use libpinyin 1.9.91