summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ZYConfig.cc8
-rw-r--r--src/ZYConfig.h2
-rw-r--r--src/ZYZConfig.cc4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/ZYConfig.cc b/src/ZYConfig.cc
index 5467073..a1e40f3 100644
--- a/src/ZYConfig.cc
+++ b/src/ZYConfig.cc
@@ -64,7 +64,7 @@ Config::readDefaultValues (void)
{
}
-inline bool
+bool
Config::read (const gchar * name,
bool defval)
{
@@ -78,7 +78,7 @@ Config::read (const gchar * name,
return defval;
}
-inline gint
+gint
Config::read (const gchar * name,
gint defval)
{
@@ -92,9 +92,9 @@ Config::read (const gchar * name,
return defval;
}
-inline std::string
+std::string
Config::read (const gchar * name,
- const gchar * defval)
+ const std::string &defval)
{
GVariant *value = NULL;
if ((value = g_settings_get_value (m_settings, name)) != NULL) {
diff --git a/src/ZYConfig.h b/src/ZYConfig.h
index 13711f4..6a7218d 100644
--- a/src/ZYConfig.h
+++ b/src/ZYConfig.h
@@ -60,7 +60,7 @@ public:
protected:
bool read (const gchar * name, bool defval);
gint read (const gchar * name, gint defval);
- std::string read (const gchar * name, const gchar * defval);
+ std::string read (const gchar * name, const std::string &defval);
void initDefaultValues (void);
virtual void readDefaultValues (void);
diff --git a/src/ZYZConfig.cc b/src/ZYZConfig.cc
index 1579fec..090eb92 100644
--- a/src/ZYZConfig.cc
+++ b/src/ZYZConfig.cc
@@ -155,7 +155,7 @@ static const struct {
void
ZhuyinConfig::readDefaultValues (void)
{
-#if defined(HAVE_IBUS_CONFIG_GET_VALUES)
+#if USE_G_SETTINGS_LIST_CHILDREN
/* read all values together */
initDefaultValues ();
gchar **keys = g_settings_list_children (m_settings);
@@ -234,7 +234,7 @@ ZhuyinConfig::readDefaultValues (void)
/* read values */
for (guint i = 0; i < G_N_ELEMENTS (fuzzy_zhuyin_options); i++) {
if (read (fuzzy_zhuyin_options[i].name,
- (fuzzy_zhuyin_options[i].option & PINYIN_DEFAULT_OPTION) != 0)) {
+ (fuzzy_zhuyin_options[i].option & ZHUYIN_DEFAULT_OPTION) != 0)) {
m_option |= fuzzy_zhuyin_options[i].option;
}
else {