summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-preferences.h
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2000-08-31 15:54:01 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2000-08-31 15:54:01 +0000
commit944750f0f5bee22b29b502e113da8067159ad69f (patch)
tree4044651539c9535cd89d805aeadbb787c8742a8f /libnautilus-extensions/nautilus-preferences.h
parent7ffccab5a4510cd20ce2c857f7314d4b2ab77988 (diff)
downloadnautilus-944750f0f5bee22b29b502e113da8067159ad69f.tar.gz
Task 1229. Need support for preferences not coupled to user level.
* libnautilus-extensions/nautilus-global-preferences.c: (global_preferences_register): Add FIXME for the issue of setting default values for non user level specific preferences. * libnautilus-extensions/nautilus-global-preferences.h: Add blurb explaining preferences that are user level specific and those that arent. * libnautilus-extensions/nautilus-preferences.c: (preferences_hash_node_add_by_user_level_callbacks), (preferences_hash_node_add_callback), New functions to deal with callbacks for preferences that are coupled to the user level. (preferences_hash_node_check_changes_func), (preferences_make_make_gconf_key), (preferences_gconf_by_user_level_callback), (preferences_gconf_callback), (nautilus_preferences_add_callback), New functions to deal with callbacks for preferences that are NOT coupled to the user level. (nautilus_preferences_set_boolean), (nautilus_preferences_get_boolean), (nautilus_preferences_set_string_list), (nautilus_preferences_get_string_list), (nautilus_preferences_set_enum), (nautilus_preferences_get_enum), (nautilus_preferences_set), (nautilus_preferences_get): Add support for preferences that are not coupled to the user level. Compute gconf keys by taking the preference name into account. If it begins with a "/" (indicating it is fully qualified) then treat it as a regular gconf key and use it as is. Otherwise, use the user_level_manager to compute a key according to the current user level. * libnautilus-extensions/nautilus-preferences.h: Add documentation explaining the two different ways to specify preference names depending on whether they are user level specific or not. * src/nautilus-first-time-druid.c: (set_http_proxy): Use the non user level specific perferences support instead of poking gconf directly.
Diffstat (limited to 'libnautilus-extensions/nautilus-preferences.h')
-rw-r--r--libnautilus-extensions/nautilus-preferences.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/libnautilus-extensions/nautilus-preferences.h b/libnautilus-extensions/nautilus-preferences.h
index a02f1c0ce..4fe4a82a0 100644
--- a/libnautilus-extensions/nautilus-preferences.h
+++ b/libnautilus-extensions/nautilus-preferences.h
@@ -33,10 +33,37 @@
BEGIN_GNOME_DECLS
/*
+ * Preference names:
+ *
+ * In the api below, all preference names can be specified in two
+ * different ways.
+ *
+ * 1) Independent of user level:
+ *
+ * Example1: "/apps/nautilus/preferences/something"
+ *
+ * The preference in question will be dealt with just as gconf
+ * would without taking into account the Nautilus user level.
+ *
+ * You can also deal with non Nautilus things, such as:
+ *
+ * Example2: "/system/gnome-vfs/http-proxy"
+ *
+ * 2) By user level:
+ *
+ * Example: "preferences/something"
+ *
+ * The preference in question will depend on the current Nautilus
+ * user level.
+ *
+ */
+
+
+/*
* A callback which you can register to to be notified when a particular
* preference changes.
*/
-typedef void (*NautilusPreferencesCallback) (gpointer callback_data);
+typedef void (*NautilusPreferencesCallback) (gpointer callback_data);
gboolean nautilus_preferences_add_callback (const char *name,
NautilusPreferencesCallback callback,