diff options
author | Murray Cumming <murrayc@murrayc.com> | 2010-07-22 22:10:07 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2010-07-22 22:10:07 +0200 |
commit | 7d45142dfc6c25b34532c8dffef58b79546d70bc (patch) | |
tree | 22de7450e96918dd320c5c2806278b624bc07923 /gio/src/settings.ccg | |
parent | e72781ad7be77919b019130c80d194c5ae7b0268 (diff) | |
download | glibmm-7d45142dfc6c25b34532c8dffef58b79546d70bc.tar.gz |
Variant: Added some methods.
* glib/src/variant.[hg|ccg]: ValueBase: Wrap some simple functions
with _WRAP_METHOD().
* glib/src/variant_basictypes.h.m4: Syntax changes, and make the castitem
constructor explicit.
* tools/m4/convert_gio.m4: Added necessary conversion.
We need to decide how to use this in get*() methods and add some tests.
Diffstat (limited to 'gio/src/settings.ccg')
-rw-r--r-- | gio/src/settings.ccg | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gio/src/settings.ccg b/gio/src/settings.ccg index 342b70f5..de32cd93 100644 --- a/gio/src/settings.ccg +++ b/gio/src/settings.ccg @@ -3,6 +3,16 @@ namespace Gio { +void Settings::get_value(const Glib::ustring& key, Glib::VariantBase& value) +{ + GVariant* const g_value = g_settings_get_value(gobj(), key.c_str()); + if(!g_value) + return; + + g_value_copy( + value.init(g_value); +} + void Settings::bind(const Glib::ustring& key, const Glib::PropertyProxy_Base& property_proxy, SettingsBindFlags flags) |