summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-10-14 16:49:26 +0800
committerPeng Wu <alexepico@gmail.com>2015-10-14 16:49:26 +0800
commit987b82c533f31d6730c4057b67d6cb59b30d8c74 (patch)
tree927bee2af64908b49a5b0bd4be9a9943af801cbc
parent918cd6a4d934f56bfe07a384c5b2eeb6bf6486c4 (diff)
downloadlibpinyin-987b82c533f31d6730c4057b67d6cb59b30d8c74.tar.gz
libpinyin-987b82c533f31d6730c4057b67d6cb59b30d8c74.tar.xz
libpinyin-987b82c533f31d6730c4057b67d6cb59b30d8c74.zip
update chewing_key.h
-rw-r--r--src/storage/chewing_key.cpp3
-rw-r--r--src/storage/chewing_key.h6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/storage/chewing_key.cpp b/src/storage/chewing_key.cpp
index 26a3642..735a2f0 100644
--- a/src/storage/chewing_key.cpp
+++ b/src/storage/chewing_key.cpp
@@ -96,6 +96,9 @@ gchar * _ChewingKey::get_chewing_string() {
if (CHEWING_ZERO_TONE == m_tone) {
return g_strdup(item.m_zhuyin_str);
+ } else if (CHEWING_1 == m_tone) {
+ /* for first tone, usually not display it. */
+ return g_strdup(item.m_zhuyin_str);
} else {
return g_strdup_printf("%s%s", item.m_zhuyin_str,
chewing_tone_table[m_tone]);
diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h
index 8c6ef8d..d6bcc19 100644
--- a/src/storage/chewing_key.h
+++ b/src/storage/chewing_key.h
@@ -66,11 +66,11 @@ public:
/* Note: the return value should be freed by g_free. */
gchar * get_pinyin_string();
- gchar * get_luoma_pinyin_string();
- gchar * get_secondary_zhuyin_string();
gchar * get_shengmu_string();
gchar * get_yunmu_string();
- gchar * get_chewing_string();
+ gchar * get_zhuyin_string();
+ gchar * get_luoma_pinyin_string();
+ gchar * get_secondary_zhuyin_string();
};
typedef struct _ChewingKey ChewingKey;