diff options
-rw-r--r-- | src/PYPBopomofoEditor.cc | 8 | ||||
-rw-r--r-- | src/PYPConfig.cc | 2 | ||||
-rw-r--r-- | src/PYPDoublePinyinEditor.cc | 5 | ||||
-rw-r--r-- | src/PYPFullPinyinEditor.cc | 5 | ||||
-rw-r--r-- | src/PYPPinyinEditor.cc | 3 |
5 files changed, 19 insertions, 4 deletions
diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc index 55eb130..9e27dfa 100644 --- a/src/PYPBopomofoEditor.cc +++ b/src/PYPBopomofoEditor.cc @@ -342,6 +342,9 @@ BopomofoEditor::commit (const gchar *str) void BopomofoEditor::updatePreeditText () { + if (DISPLAY_STYLE_COMPACT == m_config.displayStyle ()) + return; + guint num = 0; pinyin_get_n_candidate (m_instance, &num); @@ -413,6 +416,9 @@ BopomofoEditor::updateAuxiliaryText (void) m_buffer << p; StaticText text (m_buffer); - Editor::updateAuxiliaryText (text, TRUE); + if (DISPLAY_STYLE_TRADITIONAL == m_config.displayStyle ()) + Editor::updateAuxiliaryText (text, TRUE); + if (DISPLAY_STYLE_COMPACT == m_config.displayStyle ()) + Editor::updatePreeditText (text, 0, TRUE); } diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc index 336b7b3..809f2ce 100644 --- a/src/PYPConfig.cc +++ b/src/PYPConfig.cc @@ -211,7 +211,7 @@ LibPinyinConfig::readDefaultValues (void) g_warn_if_reached (); } - gint index = read (CONFIG_SORT_OPTION, 0); + gint index = read (CONFIG_DISPLAY_STYLE, 0); m_display_style = DISPLAY_STYLE_TRADITIONAL; for (guint i = 0; i < G_N_ELEMENTS (display_style_options); i++) { diff --git a/src/PYPDoublePinyinEditor.cc b/src/PYPDoublePinyinEditor.cc index db55b65..f0cfd07 100644 --- a/src/PYPDoublePinyinEditor.cc +++ b/src/PYPDoublePinyinEditor.cc @@ -137,5 +137,8 @@ DoublePinyinEditor::updateAuxiliaryText (void) m_buffer << p; StaticText text (m_buffer); - Editor::updateAuxiliaryText (text, TRUE); + if (DISPLAY_STYLE_TRADITIONAL == m_config.displayStyle ()) + Editor::updateAuxiliaryText (text, TRUE); + if (DISPLAY_STYLE_COMPACT == m_config.displayStyle ()) + Editor::updatePreeditText (text, 0, TRUE); } diff --git a/src/PYPFullPinyinEditor.cc b/src/PYPFullPinyinEditor.cc index 27d5f26..c8d930e 100644 --- a/src/PYPFullPinyinEditor.cc +++ b/src/PYPFullPinyinEditor.cc @@ -103,7 +103,10 @@ FullPinyinEditor::updateAuxiliaryText (void) m_buffer << p; StaticText text (m_buffer); - Editor::updateAuxiliaryText (text, TRUE); + if (DISPLAY_STYLE_TRADITIONAL == m_config.displayStyle ()) + Editor::updateAuxiliaryText (text, TRUE); + if (DISPLAY_STYLE_COMPACT == m_config.displayStyle ()) + Editor::updatePreeditText (text, 0, TRUE); } guint diff --git a/src/PYPPinyinEditor.cc b/src/PYPPinyinEditor.cc index 55bbb63..fc271e8 100644 --- a/src/PYPPinyinEditor.cc +++ b/src/PYPPinyinEditor.cc @@ -228,6 +228,9 @@ PinyinEditor::commit (const gchar *str) void PinyinEditor::updatePreeditText () { + if (DISPLAY_STYLE_COMPACT == m_config.displayStyle ()) + return; + guint num = 0; pinyin_get_n_candidate (m_instance, &num); |