summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-08-31 11:14:57 +0800
committerPeng Wu <alexepico@gmail.com>2016-08-31 11:14:57 +0800
commit1d27fce3d4e5cb553a9dea324349e9e94e660cd5 (patch)
tree6a2c9e0e680b3bf9b81d61f9c11e47a27e00b497
parent71474edf9a20a4dd7f427620b408406f57c427b0 (diff)
downloadibus-libzhuyin-1d27fce3d4e5cb553a9dea324349e9e94e660cd5.tar.gz
ibus-libzhuyin-1d27fce3d4e5cb553a9dea324349e9e94e660cd5.tar.xz
ibus-libzhuyin-1d27fce3d4e5cb553a9dea324349e9e94e660cd5.zip
combine two full/width modes into one mode
-rw-r--r--src/ZYFallbackEditor.cc9
-rw-r--r--src/ZYZPhoneticEditor.cc6
-rw-r--r--src/ZYZZhuyinEngine.cc2
3 files changed, 6 insertions, 11 deletions
diff --git a/src/ZYFallbackEditor.cc b/src/ZYFallbackEditor.cc
index 56d4e96..9190922 100644
--- a/src/ZYFallbackEditor.cc
+++ b/src/ZYFallbackEditor.cc
@@ -31,11 +31,6 @@ FallbackEditor::processPunct (guint keyval, guint keycode, guint modifiers)
{
guint cmshm_modifiers = cmshm_filter (modifiers);
- if (G_UNLIKELY (keyval == IBUS_period && cmshm_modifiers == IBUS_CONTROL_MASK)) {
- m_props.toggleModeFullPunct ();
- return TRUE;
- }
-
/* check ctrl, alt, hyper, supper masks */
if (cmshm_modifiers != 0)
return FALSE;
@@ -45,7 +40,7 @@ FallbackEditor::processPunct (guint keyval, guint keycode, guint modifiers)
/* Punctuation character */
if (is_half_punct (keyval)) {
- if(G_UNLIKELY (m_props.modeFullPunct ())) {
+ if(G_UNLIKELY (m_props.modeFullWidth ())) {
String punct;
half_punct_to_full_punct (keyval, punct);
commit (punct);
@@ -76,7 +71,7 @@ FallbackEditor::processEnglish (guint keyval, guint keycode, guint modifiers) {
/* English character */
if (is_half_english (keyval)) {
- if (G_UNLIKELY (m_props.modeFullEnglish ())) {
+ if (G_UNLIKELY (m_props.modeFullWidth ())) {
String english;
half_english_to_full_english (keyval, english);
commit (english);
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc
index 9073233..b05815a 100644
--- a/src/ZYZPhoneticEditor.cc
+++ b/src/ZYZPhoneticEditor.cc
@@ -150,7 +150,7 @@ PhoneticEditor::processSpace (guint keyval, guint keycode,
if (m_text.empty ()) {
assert (is_half_english (' '));
- if (m_props.modeFullEnglish ()) {
+ if (m_props.modeFullWidth ()) {
String english;
half_english_to_full_english (keyval, english);
commit (english);
@@ -960,7 +960,7 @@ PhoneticEditor::insertPunct (guint ch)
{
/* for punctuations. */
if (is_half_punct (ch)) {
- if (m_props.modeFullPunct ()) {
+ if (m_props.modeFullWidth ()) {
String choice;
assert (half_punct_to_full_punct (ch, choice));
@@ -988,7 +988,7 @@ PhoneticEditor::insertEnglish (guint ch)
{
/* for English. */
if (is_half_english (ch)) {
- if (m_props.modeFullEnglish ()) {
+ if (m_props.modeFullWidth ()) {
String choice;
assert (half_english_to_full_english (ch, choice));
diff --git a/src/ZYZZhuyinEngine.cc b/src/ZYZZhuyinEngine.cc
index 82c2643..3b9fc06 100644
--- a/src/ZYZZhuyinEngine.cc
+++ b/src/ZYZZhuyinEngine.cc
@@ -147,7 +147,7 @@ ZhuyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers)
m_prev_pressed_key = retval ? IBUS_VoidSymbol : keyval;
if (modifiers == IBUS_SHIFT_MASK && keyval == IBUS_space) {
- m_props.toggleModeFullEnglish ();
+ m_props.toggleModeFullWidth ();
m_prev_pressed_key = keyval;
return TRUE;
}