diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-11-16 20:06:00 +0000 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2019-11-24 14:45:08 +0000 |
commit | e3f164006e785b9327cae3be3d5ea9f6266a1a1c (patch) | |
tree | ef51115eb61f7b06b73546249f919d77aaac7426 | |
parent | fc70c08a326931d712cb7b53b04814c6bc9b2e90 (diff) | |
download | glibmm-e3f164006e785b9327cae3be3d5ea9f6266a1a1c.tar.gz |
SettingsSchemaSource: Wrap new_from_directory()
https://bugzilla.gnome.org/show_bug.cgi?id=783216
Fix https://gitlab.gnome.org/GNOME/glibmm/issues/19
Close https://gitlab.gnome.org/GNOME/glibmm/merge_requests/20
-rw-r--r-- | gio/src/settingsschemasource.hg | 11 | ||||
-rw-r--r-- | tools/m4/convert_gio.m4 | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/gio/src/settingsschemasource.hg b/gio/src/settingsschemasource.hg index 69170794..878bc6c0 100644 --- a/gio/src/settingsschemasource.hg +++ b/gio/src/settingsschemasource.hg @@ -47,13 +47,10 @@ protected: public: _WRAP_METHOD(static Glib::RefPtr<SettingsSchemaSource> get_default(), g_settings_schema_source_get_default, refreturn) -/* TODO: -GLIB_AVAILABLE_IN_2_32 -GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory, - GSettingsSchemaSource *parent, - gboolean trusted, - GError **error); -*/ + _WRAP_METHOD(static Glib::RefPtr<SettingsSchemaSource> create( + const std::string& directory, bool trusted{.}, + const Glib::RefPtr<SettingsSchemaSource>& parent{.} = get_default()), + g_settings_schema_source_new_from_directory, errthrow) //Note this doesn't need refreturn because the C function returns a reference. //- it is documented as transfer:full diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4 index 7589cc58..cfddc891 100644 --- a/tools/m4/convert_gio.m4 +++ b/tools/m4/convert_gio.m4 @@ -307,7 +307,7 @@ _CONVERSION(`GSettingsSchema*',`Glib::RefPtr<SettingsSchema>',`Glib::wrap($3)') _CONVERSION(`GSettingsSchema*',`Glib::RefPtr<const SettingsSchema>',`Glib::wrap($3)') _CONVERSION(`GSettingsSchemaSource*',`Glib::RefPtr<SettingsSchemaSource>',`Glib::wrap($3)') - +_CONVERSION(`const Glib::RefPtr<SettingsSchemaSource>&',`GSettingsSchemaSource*',__CONVERT_REFPTR_TO_P) #Socket _CONVERSION(`const Glib::RefPtr<Socket>&',`GSocket*',__CONVERT_CONST_REFPTR_TO_P) |