summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-08-06 10:23:09 +0800
committerPeng Wu <alexepico@gmail.com>2012-08-06 10:23:09 +0800
commitba61017002ab815aa398adb5d24b0626e22ff64e (patch)
tree76976af311b8dc93a389b396d78cc53da930393e
parent3300a9085afbb30ea8ee00642b0e6c6c6fa8a164 (diff)
downloadibus-libpinyin-ba61017002ab815aa398adb5d24b0626e22ff64e.tar.gz
fixes PYPConfig.cc
-rw-r--r--src/PYConfig.cc21
-rw-r--r--src/PYPConfig.cc12
2 files changed, 8 insertions, 25 deletions
diff --git a/src/PYConfig.cc b/src/PYConfig.cc
index ca38678..c0ecb83 100644
--- a/src/PYConfig.cc
+++ b/src/PYConfig.cc
@@ -204,26 +204,7 @@ Config::valueChanged (const std::string &section,
const std::string &name,
GVariant *value)
{
- if (m_section != section)
- return FALSE;
-
- /* lookup table page size */
- if (CONFIG_ORIENTATION == name) {
- m_orientation = normalizeGVariant (value, IBUS_ORIENTATION_HORIZONTAL);
- if (m_orientation != IBUS_ORIENTATION_VERTICAL &&
- m_orientation != IBUS_ORIENTATION_HORIZONTAL) {
- m_orientation = IBUS_ORIENTATION_HORIZONTAL;
- g_warn_if_reached ();
- }
- }
- else if (CONFIG_PAGE_SIZE == name) {
- m_page_size = normalizeGVariant (value, 5);
- if (m_page_size > 10) {
- m_page_size = 5;
- g_warn_if_reached ();
- }
- }
- return TRUE;
+ return FALSE;
}
void
diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc
index 20b93a7..9758ece 100644
--- a/src/PYPConfig.cc
+++ b/src/PYPConfig.cc
@@ -246,13 +246,15 @@ LibPinyinConfig::valueChangedCallback (IBusConfig *config,
GVariant *value,
LibPinyinConfig *self)
{
- self->valueChanged (section, name, value);
if (self->m_section != section)
return;
+
+ self->valueChanged (section, name, value);
+
#ifdef IBUS_BUILD_LIBPINYIN
- if (self->m_section == "engine/Pinyin")
+ if (self->m_section == "engine/pinyin")
LibPinyinBackEnd::instance ().setPinyinOptions (self);
- if (self->m_section == "engine/Bopomofo")
+ if (self->m_section == "engine/bopomofo")
LibPinyinBackEnd::instance ().setChewingOptions (self);
#endif
}
@@ -275,7 +277,7 @@ static const struct {
};
LibPinyinPinyinConfig::LibPinyinPinyinConfig (Bus & bus)
- : LibPinyinConfig (bus, "Pinyin")
+ : LibPinyinConfig (bus, "pinyin")
{
}
@@ -402,7 +404,7 @@ LibPinyinPinyinConfig::valueChanged (const std::string &section,
}
LibPinyinBopomofoConfig::LibPinyinBopomofoConfig (Bus & bus)
- : LibPinyinConfig (bus, "Bopomofo")
+ : LibPinyinConfig (bus, "bopomofo")
{
}