[monkey-bubble: 681/753] For program relative path, take an optional argument of GnomeProgram. Also



commit 57c466e04423d59490bb788d229cf71a380e390a
Author: George Lebl <jirka 5z com>
Date:   Tue Aug 28 08:50:13 2001 +0000

    For program relative path, take an optional argument of GnomeProgram. Also
    
    Tue Aug 28 01:49:27 2001  George Lebl <jirka 5z com>
    
    	* gnome-gconf.[ch]: For program relative path, take an optional
    	  argument of GnomeProgram.  Also add documentation for these
    	  two.

 libgnome/ChangeLog     |    6 ++++++
 libgnome/gnome-gconf.c |   35 +++++++++++++++++++++++++++++------
 libgnome/gnome-gconf.h |    3 ++-
 3 files changed, 37 insertions(+), 7 deletions(-)
---
diff --git a/libgnome/ChangeLog b/libgnome/ChangeLog
index 23302ab..4dba1fd 100644
--- a/libgnome/ChangeLog
+++ b/libgnome/ChangeLog
@@ -1,3 +1,9 @@
+Tue Aug 28 01:49:27 2001  George Lebl <jirka 5z com>
+
+	* gnome-gconf.[ch]: For program relative path, take an optional
+	  argument of GnomeProgram.  Also add documentation for these
+	  two.
+
 Mon Aug 27 00:55:56 2001  George Lebl <jirka 5z com>
 
 	* gnome-config.c, parse-path.cP: use an internal version of
diff --git a/libgnome/gnome-gconf.c b/libgnome/gnome-gconf.c
index 2a882e1..f84b503 100644
--- a/libgnome/gnome-gconf.c
+++ b/libgnome/gnome-gconf.c
@@ -37,6 +37,16 @@ extern struct poptOption gconf_options[];
 #include <libgnome/libgnome.h>
 #include "gnome-gconf.h"
 
+/**
+ * gnome_gconf_get_gnome_libs_settings_relative:
+ * @subkey: key part below the gnome desktop settings directory
+ *
+ * Description:  Gets the full key name for a GNOME desktop specific
+ * setting.  That is something that affects the whole desktop.  This
+ * space should only be used by the gnome library and core applications.
+ *
+ * Returns:  A newly allocated string
+ **/
 gchar*
 gnome_gconf_get_gnome_libs_settings_relative (const gchar *subkey)
 {
@@ -58,19 +68,32 @@ gnome_gconf_get_gnome_libs_settings_relative (const gchar *subkey)
         return key;
 }
 
+/**
+ * gnome_gconf_get_app_settings_relative:
+ * @program: #GnomeProgram pointer or %NULL for the default
+ * @subkey: key part below the gnome desktop settings directory
+ *
+ * Description:  Gets the full key name for an application specific
+ * setting.  That is "/apps/<application_id>/<subkey>".
+ *
+ * Returns:  A newly allocated string
+ **/
 gchar*
-gnome_gconf_get_app_settings_relative (const gchar *subkey)
+gnome_gconf_get_app_settings_relative (GnomeProgram *program, const gchar *subkey)
 {
         gchar *dir;
         gchar *key;
 
-        dir = g_strconcat("/apps/",
-                          gnome_program_get_name(gnome_program_get()),
-                          NULL);
+	if (program == NULL)
+		program = gnome_program_get ();
+
+        dir = g_strconcat ("/apps/",
+			   gnome_program_get_name (program),
+			   NULL);
 
         if (subkey && *subkey) {
-                key = gconf_concat_dir_and_key(dir, subkey);
-                g_free(dir);
+                key = gconf_concat_dir_and_key (dir, subkey);
+                g_free (dir);
         } else {
                 /* subkey == "" */
                 key = dir;
diff --git a/libgnome/gnome-gconf.h b/libgnome/gnome-gconf.h
index 35dd3d4..1f771e0 100644
--- a/libgnome/gnome-gconf.h
+++ b/libgnome/gnome-gconf.h
@@ -34,7 +34,8 @@
 /* Get keys relative to the gnome-libs internal per-app directory and the
    application author per-app directory */
 gchar      *gnome_gconf_get_gnome_libs_settings_relative (const gchar *subkey);
-gchar      *gnome_gconf_get_app_settings_relative        (const gchar *subkey);
+gchar      *gnome_gconf_get_app_settings_relative        (GnomeProgram *program,
+							  const gchar *subkey);
 
 /* GNOME GConf module; basically what this does is
    create a global GConfClient for a GNOME application; it's used



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