Fixes crash
This commit is contained in:
parent
792ea148d1
commit
bf82c56046
@ -0,0 +1,61 @@
|
|||||||
|
From 9f197c3f4c675129e308de24e9be9e6f48756ba8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peng Wu <alexepico@gmail.com>
|
||||||
|
Date: Mon, 14 Dec 2015 15:43:03 +0800
|
||||||
|
Subject: [PATCH] fixes m_bopomofo_keyboard_mapping option
|
||||||
|
|
||||||
|
---
|
||||||
|
src/PYPConfig.cc | 10 ++++++----
|
||||||
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc
|
||||||
|
index 8ee11c6..bbcee79 100644
|
||||||
|
--- a/src/PYPConfig.cc
|
||||||
|
+++ b/src/PYPConfig.cc
|
||||||
|
@@ -109,6 +109,8 @@ LibPinyinConfig::initDefaultValues (void)
|
||||||
|
m_init_simp_chinese = TRUE;
|
||||||
|
m_special_phrases = TRUE;
|
||||||
|
|
||||||
|
+ m_bopomofo_keyboard_mapping = ZHUYIN_DEFAULT;
|
||||||
|
+
|
||||||
|
m_dictionaries = "";
|
||||||
|
|
||||||
|
m_main_switch = "<Shift>";
|
||||||
|
@@ -337,7 +339,7 @@ PinyinConfig::readDefaultValues (void)
|
||||||
|
/* double pinyin */
|
||||||
|
m_double_pinyin = read (CONFIG_DOUBLE_PINYIN, false);
|
||||||
|
|
||||||
|
- const gint map = read (CONFIG_DOUBLE_PINYIN_SCHEMA, 0);
|
||||||
|
+ const gint map = read (CONFIG_DOUBLE_PINYIN_SCHEMA, DOUBLE_PINYIN_DEFAULT);
|
||||||
|
m_double_pinyin_schema = DOUBLE_PINYIN_DEFAULT;
|
||||||
|
|
||||||
|
for (guint i = 0; i < G_N_ELEMENTS (double_pinyin_schemes); i++) {
|
||||||
|
@@ -395,7 +397,7 @@ PinyinConfig::valueChanged (const std::string §ion,
|
||||||
|
if (CONFIG_DOUBLE_PINYIN == name)
|
||||||
|
m_double_pinyin = normalizeGVariant (value, false);
|
||||||
|
else if (CONFIG_DOUBLE_PINYIN_SCHEMA == name) {
|
||||||
|
- const gint map = normalizeGVariant (value, 0);
|
||||||
|
+ const gint map = normalizeGVariant (value, DOUBLE_PINYIN_DEFAULT);
|
||||||
|
m_double_pinyin_schema = DOUBLE_PINYIN_DEFAULT;
|
||||||
|
|
||||||
|
for (guint i = 0; i < G_N_ELEMENTS (double_pinyin_schemes); i++) {
|
||||||
|
@@ -499,7 +501,7 @@ BopomofoConfig::readDefaultValues (void)
|
||||||
|
|
||||||
|
m_special_phrases = read (CONFIG_SPECIAL_PHRASES, false);
|
||||||
|
|
||||||
|
- const gint map = read (CONFIG_BOPOMOFO_KEYBOARD_MAPPING, 0);
|
||||||
|
+ const gint map = read (CONFIG_BOPOMOFO_KEYBOARD_MAPPING, ZHUYIN_DEFAULT);
|
||||||
|
m_bopomofo_keyboard_mapping = ZHUYIN_DEFAULT;
|
||||||
|
|
||||||
|
for (guint i = 0; i < G_N_ELEMENTS (chewing_schemes); i++) {
|
||||||
|
@@ -541,7 +543,7 @@ BopomofoConfig::valueChanged (const std::string §ion,
|
||||||
|
else if (CONFIG_SPECIAL_PHRASES == name)
|
||||||
|
m_special_phrases = normalizeGVariant (value, false);
|
||||||
|
else if (CONFIG_BOPOMOFO_KEYBOARD_MAPPING == name) {
|
||||||
|
- const gint map = normalizeGVariant (value, 0);
|
||||||
|
+ const gint map = normalizeGVariant (value, ZHUYIN_DEFAULT);
|
||||||
|
m_bopomofo_keyboard_mapping = ZHUYIN_DEFAULT;
|
||||||
|
|
||||||
|
for (guint i = 0; i < G_N_ELEMENTS (chewing_schemes); i++) {
|
||||||
|
--
|
||||||
|
2.5.0
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
%global snapshot 0
|
%global snapshot 1
|
||||||
|
|
||||||
Name: ibus-libpinyin
|
Name: ibus-libpinyin
|
||||||
Version: 1.7.3
|
Version: 1.7.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Intelligent Pinyin engine based on libpinyin for IBus
|
Summary: Intelligent Pinyin engine based on libpinyin for IBus
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -89,6 +89,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|||||||
%{_datadir}/ibus/component/*
|
%{_datadir}/ibus/component/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 14 2015 Peng Wu <pwu@redhat.com> - 1.7.3-2
|
||||||
|
- Fixes crash when use "Bopomofo" engine for first time
|
||||||
|
|
||||||
* Tue Nov 17 2015 Peng Wu <pwu@redhat.com> - 1.7.3-1
|
* Tue Nov 17 2015 Peng Wu <pwu@redhat.com> - 1.7.3-1
|
||||||
- Update to 1.7.3
|
- Update to 1.7.3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user