[devhelp] Settings: do not expose the GSettings objects



commit 435a77d3b3f77763686790ec6ad6ed1959705cc7
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Apr 4 13:15:20 2018 +0200

    Settings: do not expose the GSettings objects

 devhelp/dh-settings.c               |   28 ++++++++++------------------
 devhelp/dh-settings.h               |    2 --
 docs/reference/devhelp-sections.txt |    1 -
 3 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/devhelp/dh-settings.c b/devhelp/dh-settings.c
index a09edaa..efe9edd 100644
--- a/devhelp/dh-settings.c
+++ b/devhelp/dh-settings.c
@@ -25,11 +25,17 @@
 /**
  * SECTION:dh-settings
  * @Title: DhSettings
- * @Short_description: Access to the libdevhelp #GSettings objects
+ * @Short_description: libdevhelp settings
  *
- * #DhSettings permits to have access to the #GSettings objects that are part of
- * the libdevhelp. To have the documentation about the available keys and their
- * types, read the `*.gschema.xml` file.
+ * #DhSettings represents the libdevhelp settings. The libdevhelp provides a
+ * #GSettings schema, but for some settings the use of #GSettings is optional:
+ * it is instead possible to set the #DhSettings property and do not bind it to
+ * the #GSettings key, to force a certain value and to not provide a user
+ * configuration for it in the application.
+ *
+ * To have the documentation about the available #GSettings keys, their types,
+ * etc, read the `*.gschema.xml` file. Note that #DhSettings do not expose the
+ * #GSettings objects, you should use the #DhSettings wrapper API instead.
  */
 
 /* API design:
@@ -310,20 +316,6 @@ _dh_settings_unref_default (void)
 }
 
 /**
- * dh_settings_peek_contents_settings:
- * @settings: a #DhSettings.
- *
- * Returns: (transfer none): the #GSettings for the "contents" schema.
- * Since: 3.30
- */
-GSettings *
-dh_settings_peek_contents_settings (DhSettings *settings)
-{
-        g_return_val_if_fail (DH_IS_SETTINGS (settings), NULL);
-        return settings->priv->gsettings_contents;
-}
-
-/**
  * dh_settings_bind_all:
  * @settings: a #DhSettings.
  *
diff --git a/devhelp/dh-settings.h b/devhelp/dh-settings.h
index 77f3061..0e2e41f 100644
--- a/devhelp/dh-settings.h
+++ b/devhelp/dh-settings.h
@@ -60,8 +60,6 @@ DhSettings *    dh_settings_get_default                         (void);
 G_GNUC_INTERNAL
 void            _dh_settings_unref_default                      (void);
 
-GSettings *     dh_settings_peek_contents_settings              (DhSettings *settings);
-
 void            dh_settings_bind_all                            (DhSettings *settings);
 
 gboolean        dh_settings_get_group_books_by_language         (DhSettings *settings);
diff --git a/docs/reference/devhelp-sections.txt b/docs/reference/devhelp-sections.txt
index 6266b17..2c9ed72 100644
--- a/docs/reference/devhelp-sections.txt
+++ b/docs/reference/devhelp-sections.txt
@@ -153,7 +153,6 @@ dh_link_type_get_type
 <FILE>dh-settings</FILE>
 DhSettings
 dh_settings_get_default
-dh_settings_peek_contents_settings
 dh_settings_bind_all
 dh_settings_get_group_books_by_language
 dh_settings_set_group_books_by_language


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]