[glib] g_settings_list_keys() -> _list_items()



commit 137ae2413c9d25edd3f886fd25b6353c8170f7ba
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Jun 30 10:02:45 2010 -0400

    g_settings_list_keys() -> _list_items()
    
    This function returns children as well.

 docs/reference/gio/gio-sections.txt |    2 +-
 gio/gio.symbols                     |    2 +-
 gio/gsettings-tool.c                |    4 ++--
 gio/gsettings.c                     |   12 ++++++++----
 gio/gsettings.h                     |    2 +-
 5 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt
index e6dbac0..b4f3dd2 100644
--- a/docs/reference/gio/gio-sections.txt
+++ b/docs/reference/gio/gio-sections.txt
@@ -2151,7 +2151,7 @@ g_settings_get_child
 
 <SUBSECTION Introspection>
 g_settings_list_schemas
-g_settings_list_keys
+g_settings_list_items
 
 <SUBSECTION Convenience>
 g_settings_get
diff --git a/gio/gio.symbols b/gio/gio.symbols
index 3e03011..ebc3d15 100644
--- a/gio/gio.symbols
+++ b/gio/gio.symbols
@@ -1478,7 +1478,7 @@ g_settings_set_boolean
 g_settings_get_enum
 g_settings_set_enum
 g_settings_sync
-g_settings_list_keys
+g_settings_list_items
 g_settings_get_mapped
 #endif
 #endif
diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c
index 8e38c84..fd3e4b5 100644
--- a/gio/gsettings-tool.c
+++ b/gio/gsettings-tool.c
@@ -162,7 +162,7 @@ key_exists (GSettings   *settings,
 
   ret = FALSE;
 
-  keys = g_settings_list_keys (settings);
+  keys = g_settings_list_items (settings);
   for (i = 0; keys[i]; i++)
     if (!g_str_has_suffix (keys[i], "/") &&
         g_strcmp0 (keys[i], name) == 0)
@@ -182,7 +182,7 @@ list_keys (GSettings   *settings,
   const gchar **keys;
   gint i;
 
-  keys = g_settings_list_keys (settings);
+  keys = g_settings_list_items (settings);
   for (i = 0; keys[i]; i++)
     {
       if (!g_str_has_suffix (keys[i], "/") &&
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 54b66ed..5a5ceed 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -1844,7 +1844,7 @@ g_settings_get_has_unapplied (GSettings *settings)
            G_DELAYED_SETTINGS_BACKEND (settings->priv->backend));
 }
 
-/* Extra API (sync, get_child, is_writable, list_keys) {{{1 */
+/* Extra API (sync, get_child, is_writable, list_items) {{{1 */
 /**
  * g_settings_sync:
  * @context: the context to sync, or %NULL
@@ -1938,11 +1938,15 @@ g_settings_get_child (GSettings   *settings,
 }
 
 /**
- * g_settings_list_keys:
+ * g_settings_list_items:
  * @settings: a #GSettings object
  * Returns: a list of the keys on @settings
  *
- * Introspects the list of keys on @settings.
+ * Introspects the list of keys and children on @settings.
+ *
+ * The list that is returned is a mix of the keys and children.  The
+ * names of the children are suffixed with '/'.  The names of the keys
+ * are not.
  *
  * You should probably not be calling this function from "normal" code
  * (since you should already know what keys are in your schema).  This
@@ -1952,7 +1956,7 @@ g_settings_get_child (GSettings   *settings,
  * it.
  */
 const gchar **
-g_settings_list_keys (GSettings *settings)
+g_settings_list_items (GSettings *settings)
 {
   const GQuark *keys;
   const gchar **strv;
diff --git a/gio/gsettings.h b/gio/gsettings.h
index 40d0cbf..f0da640 100644
--- a/gio/gsettings.h
+++ b/gio/gsettings.h
@@ -79,7 +79,7 @@ GSettings *             g_settings_new_with_backend                     (const g
 GSettings *             g_settings_new_with_backend_and_path            (const gchar        *schema,
                                                                          GSettingsBackend   *backend,
                                                                          const gchar        *path);
-const gchar **          g_settings_list_keys                            (GSettings          *settings);
+const gchar **          g_settings_list_items                           (GSettings          *settings);
 
 gboolean                g_settings_set_value                            (GSettings          *settings,
                                                                          const gchar        *key,



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