diff options
author | Peng Wu <alexepico@gmail.com> | 2018-03-13 14:49:19 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2018-03-13 14:57:32 +0800 |
commit | c1a836c812e4627db5ba4de50cc8bddbeba1d100 (patch) | |
tree | b1ea397c222f0226ad96197ae1c67676bce470e7 /src/PYPConfig.h | |
parent | 490ad011a162e4867a6ba044f07e7cace7207ae1 (diff) | |
download | ibus-libpinyin-c1a836c812e4627db5ba4de50cc8bddbeba1d100.tar.gz ibus-libpinyin-c1a836c812e4627db5ba4de50cc8bddbeba1d100.tar.xz ibus-libpinyin-c1a836c812e4627db5ba4de50cc8bddbeba1d100.zip |
use GSettings in class Config
Diffstat (limited to 'src/PYPConfig.h')
-rw-r--r-- | src/PYPConfig.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/PYPConfig.h b/src/PYPConfig.h index 23aa365..a86e356 100644 --- a/src/PYPConfig.h +++ b/src/PYPConfig.h @@ -34,11 +34,9 @@ namespace PY { -class Bus; - class LibPinyinConfig : public Config { protected: - LibPinyinConfig (Bus & bus, const std::string & name); + LibPinyinConfig (const std::string & name); virtual ~LibPinyinConfig (void); public: @@ -47,14 +45,12 @@ protected: void initDefaultValues (void); virtual void readDefaultValues (void); - virtual gboolean valueChanged (const std::string §ion, + virtual gboolean valueChanged (const std::string &schema_id, const std::string &name, GVariant *value); private: - static void valueChangedCallback (IBusConfig *config, - const gchar *section, + static void valueChangedCallback (GSettings *settings, const gchar *name, - GVariant *value, LibPinyinConfig *self); protected: @@ -63,14 +59,14 @@ protected: /* PinyinConfig */ class PinyinConfig : public LibPinyinConfig { public: - static void init (Bus & bus); + static void init (); static PinyinConfig & instance (void) { return *m_instance; } protected: - PinyinConfig (Bus & bus); + PinyinConfig (); virtual void readDefaultValues (void); - virtual gboolean valueChanged (const std::string §ion, + virtual gboolean valueChanged (const std::string &schema_id, const std::string &name, GVariant *value); @@ -81,14 +77,14 @@ private: /* Bopomof Config */ class BopomofoConfig : public LibPinyinConfig { public: - static void init (Bus & bus); + static void init (); static BopomofoConfig & instance (void) { return *m_instance; } protected: - BopomofoConfig (Bus & bus); + BopomofoConfig (); virtual void readDefaultValues (void); - virtual gboolean valueChanged (const std::string §ion, + virtual gboolean valueChanged (const std::string &schema_id, const std::string &name, GVariant *value); |