[gnumeric] Conf: don't have /apps/gnumeric/ twice.



commit d14feb94eb1568dcc1ca4f6103465840a36d33ec
Author: Morten Welinder <terra gnome org>
Date:   Sun Jun 28 21:25:54 2009 -0400

    Conf: don't have /apps/gnumeric/ twice.

 src/gnumeric-gconf.c      |  394 ++++++++++++++++++++++++---------------------
 src/gnumeric-gconf.h      |   12 +-
 tools/handle-conf-options |   28 ++--
 3 files changed, 232 insertions(+), 202 deletions(-)
---
diff --git a/src/gnumeric-gconf.c b/src/gnumeric-gconf.c
index 0b14933..92a8f9c 100644
--- a/src/gnumeric-gconf.c
+++ b/src/gnumeric-gconf.c
@@ -180,22 +180,25 @@ gnm_conf_get_printer_decoration_font (void)
 }
 
 #define TOOLBAR_TANGO(Object,Format,Standard)		\
-	if (strcmp (name, "Object") == 0)		\
+	if (strcmp (name, "ObjectToolbar") == 0)	\
 		Object					\
-	else if (strcmp (name, "Format") == 0)		\
+	else if (strcmp (name, "FormatToolbar") == 0)	\
 		Format					\
-	else if (strcmp (name, "Standard") == 0)	\
+	else if (strcmp (name, "StandardToolbar") == 0)	\
 		Standard
 
 
 gboolean
 gnm_conf_get_toolbar_visible (const char *name)
 {
+	gboolean viz = FALSE;
+
 	TOOLBAR_TANGO
 		(return gnm_conf_get_core_gui_toolbars_ObjectToolbar ();,
 		 return gnm_conf_get_core_gui_toolbars_FormatToolbar ();,
 		 return gnm_conf_get_core_gui_toolbars_StandardToolbar (););
 
+	g_warning ("Unknown toolbar: %s", name);
 	return FALSE;
 }
 
@@ -206,6 +209,8 @@ gnm_conf_set_toolbar_visible (const char *name, gboolean x)
 		(gnm_conf_set_core_gui_toolbars_ObjectToolbar (x);,
 		 gnm_conf_set_core_gui_toolbars_FormatToolbar (x);,
 		 gnm_conf_set_core_gui_toolbars_StandardToolbar (x););
+
+	g_warning ("Unknown toolbar: %s", name);
 }
 
 GtkPositionType
@@ -216,6 +221,7 @@ gnm_conf_get_toolbar_position (const char *name)
 		 return gnm_conf_get_core_gui_toolbars_FormatToolbar_position ();,
 		 return gnm_conf_get_core_gui_toolbars_StandardToolbar_position (););
 
+	g_warning ("Unknown toolbar: %s", name);
 	return GTK_POS_TOP;
 }
 
@@ -226,6 +232,8 @@ gnm_conf_set_toolbar_position (const char *name, GtkPositionType x)
 		(gnm_conf_set_core_gui_toolbars_ObjectToolbar_position (x);,
 		 gnm_conf_set_core_gui_toolbars_FormatToolbar_position (x);,
 		 gnm_conf_set_core_gui_toolbars_StandardToolbar_position (x););
+
+	g_warning ("Unknown toolbar: %s", name);
 }
 
 #undef TOOLBAR_TANGO
@@ -273,45 +281,57 @@ gnm_conf_get_detachable_toolbars (void)
 	return FALSE;
 #else
 	return go_conf_get_bool
-		(root,
+		(NULL,
 		 "/desktop/gnome/interface/toolbar_detachable");
 #endif
 }
 
 /* ------------------------------------------------------------------------- */
+/*
+ * The following code (and the corresponding headers) were generated by
+ * running
+ *
+ *     cd src
+ *     perl ../tools/handle-conf-options ../schemas/*.schemas.in  >~/xxx
+ *
+ * which creates ~/xxx containing both headers and code.
+ */
+
+
+/* ----------- AUTOMATICALLY GENERATED CODE BELOW -- DO NOT EDIT ----------- */
 
 GtkToolbarStyle
 gnm_conf_get_toolbar_style (void)
 {
 	const char *key = "/apps/gnome-settings/gnumeric/toolbar_style";
-	return go_conf_load_enum (root, key, GTK_TYPE_TOOLBAR_STYLE, GTK_TOOLBAR_ICONS);
+	return go_conf_load_enum (NULL, key, GTK_TYPE_TOOLBAR_STYLE, GTK_TOOLBAR_ICONS);
 }
 
 void
 gnm_conf_set_toolbar_style (GtkToolbarStyle x)
 {
 	const char *key = "/apps/gnome-settings/gnumeric/toolbar_style";
-	go_conf_set_enum (root, key, GTK_TYPE_TOOLBAR_STYLE, x);
+	go_conf_set_enum (NULL, key, GTK_TYPE_TOOLBAR_STYLE, x);
 }
 
 gboolean
 gnm_conf_get_autocorrect_first_letter (void)
 {
-	const char *key = "/apps/gnumeric/autocorrect/first-letter";
+	const char *key = "autocorrect/first-letter";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_autocorrect_first_letter (gboolean x)
 {
-	const char *key = "/apps/gnumeric/autocorrect/first-letter";
+	const char *key = "autocorrect/first-letter";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 GSList *
 gnm_conf_get_autocorrect_first_letter_list (void)
 {
-	const char *key = "/apps/gnumeric/autocorrect/first-letter-list";
+	const char *key = "autocorrect/first-letter-list";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -320,7 +340,7 @@ gnm_conf_get_autocorrect_first_letter_list (void)
 void
 gnm_conf_set_autocorrect_first_letter_list (GSList *x)
 {
-	const char *key = "/apps/gnumeric/autocorrect/first-letter-list";
+	const char *key = "autocorrect/first-letter-list";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -328,21 +348,21 @@ gnm_conf_set_autocorrect_first_letter_list (GSList *x)
 gboolean
 gnm_conf_get_autocorrect_init_caps (void)
 {
-	const char *key = "/apps/gnumeric/autocorrect/init-caps";
+	const char *key = "autocorrect/init-caps";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_autocorrect_init_caps (gboolean x)
 {
-	const char *key = "/apps/gnumeric/autocorrect/init-caps";
+	const char *key = "autocorrect/init-caps";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 GSList *
 gnm_conf_get_autocorrect_init_caps_list (void)
 {
-	const char *key = "/apps/gnumeric/autocorrect/init-caps-list";
+	const char *key = "autocorrect/init-caps-list";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -351,7 +371,7 @@ gnm_conf_get_autocorrect_init_caps_list (void)
 void
 gnm_conf_set_autocorrect_init_caps_list (GSList *x)
 {
-	const char *key = "/apps/gnumeric/autocorrect/init-caps-list";
+	const char *key = "autocorrect/init-caps-list";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -359,35 +379,35 @@ gnm_conf_set_autocorrect_init_caps_list (GSList *x)
 gboolean
 gnm_conf_get_autocorrect_names_of_days (void)
 {
-	const char *key = "/apps/gnumeric/autocorrect/names-of-days";
+	const char *key = "autocorrect/names-of-days";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_autocorrect_names_of_days (gboolean x)
 {
-	const char *key = "/apps/gnumeric/autocorrect/names-of-days";
+	const char *key = "autocorrect/names-of-days";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_autocorrect_replace (void)
 {
-	const char *key = "/apps/gnumeric/autocorrect/replace";
+	const char *key = "autocorrect/replace";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_autocorrect_replace (gboolean x)
 {
-	const char *key = "/apps/gnumeric/autocorrect/replace";
+	const char *key = "autocorrect/replace";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 GSList *
 gnm_conf_get_autoformat_extra_dirs (void)
 {
-	const char *key = "/apps/gnumeric/autoformat/extra-dirs";
+	const char *key = "autoformat/extra-dirs";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -396,7 +416,7 @@ gnm_conf_get_autoformat_extra_dirs (void)
 void
 gnm_conf_set_autoformat_extra_dirs (GSList *x)
 {
-	const char *key = "/apps/gnumeric/autoformat/extra-dirs";
+	const char *key = "autoformat/extra-dirs";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -404,7 +424,7 @@ gnm_conf_set_autoformat_extra_dirs (GSList *x)
 const char *
 gnm_conf_get_autoformat_sys_dir (void)
 {
-	const char *key = "/apps/gnumeric/autoformat/sys-dir";
+	const char *key = "autoformat/sys-dir";
 	char *res = go_conf_load_string (root, key);
 	if (!res) res = g_strdup ("autoformat-templates");
 	g_hash_table_replace (string_pool, (gpointer)key, res);
@@ -414,7 +434,7 @@ gnm_conf_get_autoformat_sys_dir (void)
 void
 gnm_conf_set_autoformat_sys_dir (const char *x)
 {
-	const char *key = "/apps/gnumeric/autoformat/sys-dir";
+	const char *key = "autoformat/sys-dir";
 	go_conf_set_string (root, key, x);
 	g_hash_table_remove (string_pool, key);
 }
@@ -422,7 +442,7 @@ gnm_conf_set_autoformat_sys_dir (const char *x)
 const char *
 gnm_conf_get_autoformat_usr_dir (void)
 {
-	const char *key = "/apps/gnumeric/autoformat/usr-dir";
+	const char *key = "autoformat/usr-dir";
 	char *res = go_conf_load_string (root, key);
 	if (!res) res = g_strdup ("autoformat-templates");
 	g_hash_table_replace (string_pool, (gpointer)key, res);
@@ -432,7 +452,7 @@ gnm_conf_get_autoformat_usr_dir (void)
 void
 gnm_conf_set_autoformat_usr_dir (const char *x)
 {
-	const char *key = "/apps/gnumeric/autoformat/usr-dir";
+	const char *key = "autoformat/usr-dir";
 	go_conf_set_string (root, key, x);
 	g_hash_table_remove (string_pool, key);
 }
@@ -440,35 +460,35 @@ gnm_conf_set_autoformat_usr_dir (const char *x)
 gboolean
 gnm_conf_get_core_defaultfont_bold (void)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/bold";
+	const char *key = "core/defaultfont/bold";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_core_defaultfont_bold (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/bold";
+	const char *key = "core/defaultfont/bold";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_core_defaultfont_italic (void)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/italic";
+	const char *key = "core/defaultfont/italic";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_core_defaultfont_italic (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/italic";
+	const char *key = "core/defaultfont/italic";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 const char *
 gnm_conf_get_core_defaultfont_name (void)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/name";
+	const char *key = "core/defaultfont/name";
 	char *res = go_conf_load_string (root, key);
 	if (!res) res = g_strdup ("Sans");
 	g_hash_table_replace (string_pool, (gpointer)key, res);
@@ -478,7 +498,7 @@ gnm_conf_get_core_defaultfont_name (void)
 void
 gnm_conf_set_core_defaultfont_name (const char *x)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/name";
+	const char *key = "core/defaultfont/name";
 	go_conf_set_string (root, key, x);
 	g_hash_table_remove (string_pool, key);
 }
@@ -486,441 +506,441 @@ gnm_conf_set_core_defaultfont_name (const char *x)
 double
 gnm_conf_get_core_defaultfont_size (void)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/size";
+	const char *key = "core/defaultfont/size";
 	return go_conf_load_double (root, key, 1, 100, 10);
 }
 
 void
 gnm_conf_set_core_defaultfont_size (double x)
 {
-	const char *key = "/apps/gnumeric/core/defaultfont/size";
+	const char *key = "core/defaultfont/size";
 	go_conf_set_double (root, key, CLAMP (x, 1, 100));
 }
 
 gboolean
 gnm_conf_get_core_file_save_def_overwrite (void)
 {
-	const char *key = "/apps/gnumeric/core/file/save/def-overwrite";
+	const char *key = "core/file/save/def-overwrite";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_core_file_save_def_overwrite (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/file/save/def-overwrite";
+	const char *key = "core/file/save/def-overwrite";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_core_file_save_single_sheet (void)
 {
-	const char *key = "/apps/gnumeric/core/file/save/single_sheet";
+	const char *key = "core/file/save/single_sheet";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_core_file_save_single_sheet (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/file/save/single_sheet";
+	const char *key = "core/file/save/single_sheet";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_core_gui_editing_autocomplete (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/autocomplete";
+	const char *key = "core/gui/editing/autocomplete";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_core_gui_editing_autocomplete (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/autocomplete";
+	const char *key = "core/gui/editing/autocomplete";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 GODirection
 gnm_conf_get_core_gui_editing_enter_moves_dir (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/enter_moves_dir";
+	const char *key = "core/gui/editing/enter_moves_dir";
 	return go_conf_load_enum (root, key, GO_TYPE_DIRECTION, GO_DIRECTION_DOWN);
 }
 
 void
 gnm_conf_set_core_gui_editing_enter_moves_dir (GODirection x)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/enter_moves_dir";
+	const char *key = "core/gui/editing/enter_moves_dir";
 	go_conf_set_enum (root, key, GO_TYPE_DIRECTION, x);
 }
 
 gboolean
 gnm_conf_get_core_gui_editing_livescrolling (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/livescrolling";
+	const char *key = "core/gui/editing/livescrolling";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_core_gui_editing_livescrolling (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/livescrolling";
+	const char *key = "core/gui/editing/livescrolling";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 int
 gnm_conf_get_core_gui_editing_recalclag (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/recalclag";
+	const char *key = "core/gui/editing/recalclag";
 	return go_conf_load_int (root, key, -5000, 5000, 200);
 }
 
 void
 gnm_conf_set_core_gui_editing_recalclag (int x)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/recalclag";
+	const char *key = "core/gui/editing/recalclag";
 	go_conf_set_int (root, key, CLAMP (x, -5000, 5000));
 }
 
 gboolean
 gnm_conf_get_core_gui_editing_transitionkeys (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/transitionkeys";
+	const char *key = "core/gui/editing/transitionkeys";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_core_gui_editing_transitionkeys (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/gui/editing/transitionkeys";
+	const char *key = "core/gui/editing/transitionkeys";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 double
 gnm_conf_get_core_gui_screen_horizontaldpi (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/screen/horizontaldpi";
+	const char *key = "core/gui/screen/horizontaldpi";
 	return go_conf_load_double (root, key, 10, 1000, 96);
 }
 
 void
 gnm_conf_set_core_gui_screen_horizontaldpi (double x)
 {
-	const char *key = "/apps/gnumeric/core/gui/screen/horizontaldpi";
+	const char *key = "core/gui/screen/horizontaldpi";
 	go_conf_set_double (root, key, CLAMP (x, 10, 1000));
 }
 
 double
 gnm_conf_get_core_gui_screen_verticaldpi (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/screen/verticaldpi";
+	const char *key = "core/gui/screen/verticaldpi";
 	return go_conf_load_double (root, key, 10, 1000, 96);
 }
 
 void
 gnm_conf_set_core_gui_screen_verticaldpi (double x)
 {
-	const char *key = "/apps/gnumeric/core/gui/screen/verticaldpi";
+	const char *key = "core/gui/screen/verticaldpi";
 	go_conf_set_double (root, key, CLAMP (x, 10, 1000));
 }
 
 gboolean
 gnm_conf_get_core_gui_toolbars_FormatToolbar (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/FormatToolbar";
+	const char *key = "core/gui/toolbars/FormatToolbar";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_core_gui_toolbars_FormatToolbar (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/FormatToolbar";
+	const char *key = "core/gui/toolbars/FormatToolbar";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
-int
+GtkPositionType
 gnm_conf_get_core_gui_toolbars_FormatToolbar_position (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/FormatToolbar-position";
+	const char *key = "core/gui/toolbars/FormatToolbar-position";
 	return go_conf_load_int (root, key, 0, 3, 2);
 }
 
 void
-gnm_conf_set_core_gui_toolbars_FormatToolbar_position (int x)
+gnm_conf_set_core_gui_toolbars_FormatToolbar_position (GtkPositionType x)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/FormatToolbar-position";
+	const char *key = "core/gui/toolbars/FormatToolbar-position";
 	go_conf_set_int (root, key, CLAMP (x, 0, 3));
 }
 
 gboolean
 gnm_conf_get_core_gui_toolbars_ObjectToolbar (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/ObjectToolbar";
+	const char *key = "core/gui/toolbars/ObjectToolbar";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_core_gui_toolbars_ObjectToolbar (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/ObjectToolbar";
+	const char *key = "core/gui/toolbars/ObjectToolbar";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
-int
+GtkPositionType
 gnm_conf_get_core_gui_toolbars_ObjectToolbar_position (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/ObjectToolbar-position";
+	const char *key = "core/gui/toolbars/ObjectToolbar-position";
 	return go_conf_load_int (root, key, 0, 3, 2);
 }
 
 void
-gnm_conf_set_core_gui_toolbars_ObjectToolbar_position (int x)
+gnm_conf_set_core_gui_toolbars_ObjectToolbar_position (GtkPositionType x)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/ObjectToolbar-position";
+	const char *key = "core/gui/toolbars/ObjectToolbar-position";
 	go_conf_set_int (root, key, CLAMP (x, 0, 3));
 }
 
 gboolean
 gnm_conf_get_core_gui_toolbars_StandardToolbar (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/StandardToolbar";
+	const char *key = "core/gui/toolbars/StandardToolbar";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_core_gui_toolbars_StandardToolbar (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/StandardToolbar";
+	const char *key = "core/gui/toolbars/StandardToolbar";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
-int
+GtkPositionType
 gnm_conf_get_core_gui_toolbars_StandardToolbar_position (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/StandardToolbar-position";
+	const char *key = "core/gui/toolbars/StandardToolbar-position";
 	return go_conf_load_int (root, key, 0, 3, 2);
 }
 
 void
-gnm_conf_set_core_gui_toolbars_StandardToolbar_position (int x)
+gnm_conf_set_core_gui_toolbars_StandardToolbar_position (GtkPositionType x)
 {
-	const char *key = "/apps/gnumeric/core/gui/toolbars/StandardToolbar-position";
+	const char *key = "core/gui/toolbars/StandardToolbar-position";
 	go_conf_set_int (root, key, CLAMP (x, 0, 3));
 }
 
 double
 gnm_conf_get_core_gui_window_x (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/window/x";
+	const char *key = "core/gui/window/x";
 	return go_conf_load_double (root, key, 0.1, 1, 0.75);
 }
 
 void
 gnm_conf_set_core_gui_window_x (double x)
 {
-	const char *key = "/apps/gnumeric/core/gui/window/x";
+	const char *key = "core/gui/window/x";
 	go_conf_set_double (root, key, CLAMP (x, 0.1, 1));
 }
 
 double
 gnm_conf_get_core_gui_window_y (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/window/y";
+	const char *key = "core/gui/window/y";
 	return go_conf_load_double (root, key, 0.1, 1, 0.75);
 }
 
 void
 gnm_conf_set_core_gui_window_y (double x)
 {
-	const char *key = "/apps/gnumeric/core/gui/window/y";
+	const char *key = "core/gui/window/y";
 	go_conf_set_double (root, key, CLAMP (x, 0.1, 1));
 }
 
 double
 gnm_conf_get_core_gui_window_zoom (void)
 {
-	const char *key = "/apps/gnumeric/core/gui/window/zoom";
+	const char *key = "core/gui/window/zoom";
 	return go_conf_load_double (root, key, 0.1, 5, 1);
 }
 
 void
 gnm_conf_set_core_gui_window_zoom (double x)
 {
-	const char *key = "/apps/gnumeric/core/gui/window/zoom";
+	const char *key = "core/gui/window/zoom";
 	go_conf_set_double (root, key, CLAMP (x, 0.1, 5));
 }
 
 gboolean
 gnm_conf_get_core_sort_default_ascending (void)
 {
-	const char *key = "/apps/gnumeric/core/sort/default/ascending";
+	const char *key = "core/sort/default/ascending";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_core_sort_default_ascending (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/sort/default/ascending";
+	const char *key = "core/sort/default/ascending";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_core_sort_default_by_case (void)
 {
-	const char *key = "/apps/gnumeric/core/sort/default/by-case";
+	const char *key = "core/sort/default/by-case";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_core_sort_default_by_case (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/sort/default/by-case";
+	const char *key = "core/sort/default/by-case";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_core_sort_default_retain_formats (void)
 {
-	const char *key = "/apps/gnumeric/core/sort/default/retain-formats";
+	const char *key = "core/sort/default/retain-formats";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_core_sort_default_retain_formats (gboolean x)
 {
-	const char *key = "/apps/gnumeric/core/sort/default/retain-formats";
+	const char *key = "core/sort/default/retain-formats";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 int
 gnm_conf_get_core_sort_dialog_max_initial_clauses (void)
 {
-	const char *key = "/apps/gnumeric/core/sort/dialog/max-initial-clauses";
+	const char *key = "core/sort/dialog/max-initial-clauses";
 	return go_conf_load_int (root, key, 0, 256, 10);
 }
 
 void
 gnm_conf_set_core_sort_dialog_max_initial_clauses (int x)
 {
-	const char *key = "/apps/gnumeric/core/sort/dialog/max-initial-clauses";
+	const char *key = "core/sort/dialog/max-initial-clauses";
 	go_conf_set_int (root, key, CLAMP (x, 0, 256));
 }
 
 int
 gnm_conf_get_core_workbook_autosave_time (void)
 {
-	const char *key = "/apps/gnumeric/core/workbook/autosave_time";
+	const char *key = "core/workbook/autosave_time";
 	return go_conf_load_int (root, key, 0, 365 * 24 * 60 * 60, 0);
 }
 
 void
 gnm_conf_set_core_workbook_autosave_time (int x)
 {
-	const char *key = "/apps/gnumeric/core/workbook/autosave_time";
+	const char *key = "core/workbook/autosave_time";
 	go_conf_set_int (root, key, CLAMP (x, 0, 365 * 24 * 60 * 60));
 }
 
 int
 gnm_conf_get_core_workbook_n_cols (void)
 {
-	const char *key = "/apps/gnumeric/core/workbook/n-cols";
+	const char *key = "core/workbook/n-cols";
 	return go_conf_load_int (root, key, GNM_MIN_COLS, GNM_MAX_COLS, 256);
 }
 
 void
 gnm_conf_set_core_workbook_n_cols (int x)
 {
-	const char *key = "/apps/gnumeric/core/workbook/n-cols";
+	const char *key = "core/workbook/n-cols";
 	go_conf_set_int (root, key, CLAMP (x, GNM_MIN_COLS, GNM_MAX_COLS));
 }
 
 int
 gnm_conf_get_core_workbook_n_rows (void)
 {
-	const char *key = "/apps/gnumeric/core/workbook/n-rows";
+	const char *key = "core/workbook/n-rows";
 	return go_conf_load_int (root, key, GNM_MIN_ROWS, GNM_MAX_ROWS, 65536);
 }
 
 void
 gnm_conf_set_core_workbook_n_rows (int x)
 {
-	const char *key = "/apps/gnumeric/core/workbook/n-rows";
+	const char *key = "core/workbook/n-rows";
 	go_conf_set_int (root, key, CLAMP (x, GNM_MIN_ROWS, GNM_MAX_ROWS));
 }
 
 int
 gnm_conf_get_core_workbook_n_sheet (void)
 {
-	const char *key = "/apps/gnumeric/core/workbook/n-sheet";
+	const char *key = "core/workbook/n-sheet";
 	return go_conf_load_int (root, key, 1, 64, 3);
 }
 
 void
 gnm_conf_set_core_workbook_n_sheet (int x)
 {
-	const char *key = "/apps/gnumeric/core/workbook/n-sheet";
+	const char *key = "core/workbook/n-sheet";
 	go_conf_set_int (root, key, CLAMP (x, 1, 64));
 }
 
 int
 gnm_conf_get_core_xml_compression_level (void)
 {
-	const char *key = "/apps/gnumeric/core/xml/compression-level";
+	const char *key = "core/xml/compression-level";
 	return go_conf_load_int (root, key, 0, 9, 9);
 }
 
 void
 gnm_conf_set_core_xml_compression_level (int x)
 {
-	const char *key = "/apps/gnumeric/core/xml/compression-level";
+	const char *key = "core/xml/compression-level";
 	go_conf_set_int (root, key, CLAMP (x, 0, 9));
 }
 
 gboolean
 gnm_conf_get_cut_and_paste_prefer_clipboard (void)
 {
-	const char *key = "/apps/gnumeric/cut-and-paste/prefer-clipboard";
+	const char *key = "cut-and-paste/prefer-clipboard";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_cut_and_paste_prefer_clipboard (gboolean x)
 {
-	const char *key = "/apps/gnumeric/cut-and-paste/prefer-clipboard";
+	const char *key = "cut-and-paste/prefer-clipboard";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_dialogs_rs_unfocused (void)
 {
-	const char *key = "/apps/gnumeric/dialogs/rs/unfocused";
+	const char *key = "dialogs/rs/unfocused";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_dialogs_rs_unfocused (gboolean x)
 {
-	const char *key = "/apps/gnumeric/dialogs/rs/unfocused";
+	const char *key = "dialogs/rs/unfocused";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 int
 gnm_conf_get_functionselector_num_of_recent (void)
 {
-	const char *key = "/apps/gnumeric/functionselector/num-of-recent";
+	const char *key = "functionselector/num-of-recent";
 	return go_conf_load_int (root, key, 0, 40, 12);
 }
 
 void
 gnm_conf_set_functionselector_num_of_recent (int x)
 {
-	const char *key = "/apps/gnumeric/functionselector/num-of-recent";
+	const char *key = "functionselector/num-of-recent";
 	go_conf_set_int (root, key, CLAMP (x, 0, 40));
 }
 
 GSList *
 gnm_conf_get_functionselector_recentfunctions (void)
 {
-	const char *key = "/apps/gnumeric/functionselector/recentfunctions";
+	const char *key = "functionselector/recentfunctions";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -929,7 +949,7 @@ gnm_conf_get_functionselector_recentfunctions (void)
 void
 gnm_conf_set_functionselector_recentfunctions (GSList *x)
 {
-	const char *key = "/apps/gnumeric/functionselector/recentfunctions";
+	const char *key = "functionselector/recentfunctions";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -937,35 +957,35 @@ gnm_conf_set_functionselector_recentfunctions (GSList *x)
 gboolean
 gnm_conf_get_plugin_latex_use_utf8 (void)
 {
-	const char *key = "/apps/gnumeric/plugin/latex/use-utf8";
+	const char *key = "plugin/latex/use-utf8";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_plugin_latex_use_utf8 (gboolean x)
 {
-	const char *key = "/apps/gnumeric/plugin/latex/use-utf8";
+	const char *key = "plugin/latex/use-utf8";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_plugins_activate_new (void)
 {
-	const char *key = "/apps/gnumeric/plugins/activate-new";
+	const char *key = "plugins/activate-new";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_plugins_activate_new (gboolean x)
 {
-	const char *key = "/apps/gnumeric/plugins/activate-new";
+	const char *key = "plugins/activate-new";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 GSList *
 gnm_conf_get_plugins_active (void)
 {
-	const char *key = "/apps/gnumeric/plugins/active";
+	const char *key = "plugins/active";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -974,7 +994,7 @@ gnm_conf_get_plugins_active (void)
 void
 gnm_conf_set_plugins_active (GSList *x)
 {
-	const char *key = "/apps/gnumeric/plugins/active";
+	const char *key = "plugins/active";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -982,7 +1002,7 @@ gnm_conf_set_plugins_active (GSList *x)
 GSList *
 gnm_conf_get_plugins_extra_dirs (void)
 {
-	const char *key = "/apps/gnumeric/plugins/extra-dirs";
+	const char *key = "plugins/extra-dirs";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -991,7 +1011,7 @@ gnm_conf_get_plugins_extra_dirs (void)
 void
 gnm_conf_set_plugins_extra_dirs (GSList *x)
 {
-	const char *key = "/apps/gnumeric/plugins/extra-dirs";
+	const char *key = "plugins/extra-dirs";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -999,7 +1019,7 @@ gnm_conf_set_plugins_extra_dirs (GSList *x)
 GSList *
 gnm_conf_get_plugins_file_states (void)
 {
-	const char *key = "/apps/gnumeric/plugins/file-states";
+	const char *key = "plugins/file-states";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1008,7 +1028,7 @@ gnm_conf_get_plugins_file_states (void)
 void
 gnm_conf_set_plugins_file_states (GSList *x)
 {
-	const char *key = "/apps/gnumeric/plugins/file-states";
+	const char *key = "plugins/file-states";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1016,7 +1036,7 @@ gnm_conf_set_plugins_file_states (GSList *x)
 GSList *
 gnm_conf_get_plugins_known (void)
 {
-	const char *key = "/apps/gnumeric/plugins/known";
+	const char *key = "plugins/known";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1025,7 +1045,7 @@ gnm_conf_get_plugins_known (void)
 void
 gnm_conf_set_plugins_known (GSList *x)
 {
-	const char *key = "/apps/gnumeric/plugins/known";
+	const char *key = "plugins/known";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1033,63 +1053,63 @@ gnm_conf_set_plugins_known (GSList *x)
 gboolean
 gnm_conf_get_printsetup_across_then_down (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/across-then-down";
+	const char *key = "printsetup/across-then-down";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_across_then_down (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/across-then-down";
+	const char *key = "printsetup/across-then-down";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_printsetup_all_sheets (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/all-sheets";
+	const char *key = "printsetup/all-sheets";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_all_sheets (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/all-sheets";
+	const char *key = "printsetup/all-sheets";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_printsetup_center_horizontally (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/center-horizontally";
+	const char *key = "printsetup/center-horizontally";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_center_horizontally (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/center-horizontally";
+	const char *key = "printsetup/center-horizontally";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_printsetup_center_vertically (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/center-vertically";
+	const char *key = "printsetup/center-vertically";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_center_vertically (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/center-vertically";
+	const char *key = "printsetup/center-vertically";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 GSList *
 gnm_conf_get_printsetup_footer (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/footer";
+	const char *key = "printsetup/footer";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1098,7 +1118,7 @@ gnm_conf_get_printsetup_footer (void)
 void
 gnm_conf_set_printsetup_footer (GSList *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/footer";
+	const char *key = "printsetup/footer";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1106,7 +1126,7 @@ gnm_conf_set_printsetup_footer (GSList *x)
 GSList *
 gnm_conf_get_printsetup_gtk_setting (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/gtk-setting";
+	const char *key = "printsetup/gtk-setting";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1115,7 +1135,7 @@ gnm_conf_get_printsetup_gtk_setting (void)
 void
 gnm_conf_set_printsetup_gtk_setting (GSList *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/gtk-setting";
+	const char *key = "printsetup/gtk-setting";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1123,7 +1143,7 @@ gnm_conf_set_printsetup_gtk_setting (GSList *x)
 GSList *
 gnm_conf_get_printsetup_header (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/header";
+	const char *key = "printsetup/header";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1132,7 +1152,7 @@ gnm_conf_get_printsetup_header (void)
 void
 gnm_conf_set_printsetup_header (GSList *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/header";
+	const char *key = "printsetup/header";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1140,35 +1160,35 @@ gnm_conf_set_printsetup_header (GSList *x)
 gboolean
 gnm_conf_get_printsetup_hf_font_bold (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-bold";
+	const char *key = "printsetup/hf-font-bold";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_hf_font_bold (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-bold";
+	const char *key = "printsetup/hf-font-bold";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_printsetup_hf_font_italic (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-italic";
+	const char *key = "printsetup/hf-font-italic";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_hf_font_italic (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-italic";
+	const char *key = "printsetup/hf-font-italic";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 const char *
 gnm_conf_get_printsetup_hf_font_name (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-name";
+	const char *key = "printsetup/hf-font-name";
 	char *res = go_conf_load_string (root, key);
 	if (!res) res = g_strdup ("Sans");
 	g_hash_table_replace (string_pool, (gpointer)key, res);
@@ -1178,7 +1198,7 @@ gnm_conf_get_printsetup_hf_font_name (void)
 void
 gnm_conf_set_printsetup_hf_font_name (const char *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-name";
+	const char *key = "printsetup/hf-font-name";
 	go_conf_set_string (root, key, x);
 	g_hash_table_remove (string_pool, key);
 }
@@ -1186,21 +1206,21 @@ gnm_conf_set_printsetup_hf_font_name (const char *x)
 double
 gnm_conf_get_printsetup_hf_font_size (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-size";
+	const char *key = "printsetup/hf-font-size";
 	return go_conf_load_double (root, key, 1, 100, 10);
 }
 
 void
 gnm_conf_set_printsetup_hf_font_size (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-font-size";
+	const char *key = "printsetup/hf-font-size";
 	go_conf_set_double (root, key, CLAMP (x, 1, 100));
 }
 
 GSList *
 gnm_conf_get_printsetup_hf_left (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-left";
+	const char *key = "printsetup/hf-left";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1209,7 +1229,7 @@ gnm_conf_get_printsetup_hf_left (void)
 void
 gnm_conf_set_printsetup_hf_left (GSList *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-left";
+	const char *key = "printsetup/hf-left";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1217,7 +1237,7 @@ gnm_conf_set_printsetup_hf_left (GSList *x)
 GSList *
 gnm_conf_get_printsetup_hf_middle (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-middle";
+	const char *key = "printsetup/hf-middle";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1226,7 +1246,7 @@ gnm_conf_get_printsetup_hf_middle (void)
 void
 gnm_conf_set_printsetup_hf_middle (GSList *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-middle";
+	const char *key = "printsetup/hf-middle";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1234,7 +1254,7 @@ gnm_conf_set_printsetup_hf_middle (GSList *x)
 GSList *
 gnm_conf_get_printsetup_hf_right (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-right";
+	const char *key = "printsetup/hf-right";
 	GSList *res = go_conf_load_str_list (root, key);
 	g_hash_table_replace (string_list_pool, (gpointer)key, res);
 	return res;
@@ -1243,7 +1263,7 @@ gnm_conf_get_printsetup_hf_right (void)
 void
 gnm_conf_set_printsetup_hf_right (GSList *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/hf-right";
+	const char *key = "printsetup/hf-right";
 	go_conf_set_str_list (root, key, x);
 	g_hash_table_remove (string_list_pool, key);
 }
@@ -1251,91 +1271,91 @@ gnm_conf_set_printsetup_hf_right (GSList *x)
 double
 gnm_conf_get_printsetup_margin_bottom (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-bottom";
+	const char *key = "printsetup/margin-bottom";
 	return go_conf_load_double (root, key, 0, 10000, 120);
 }
 
 void
 gnm_conf_set_printsetup_margin_bottom (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-bottom";
+	const char *key = "printsetup/margin-bottom";
 	go_conf_set_double (root, key, CLAMP (x, 0, 10000));
 }
 
 double
 gnm_conf_get_printsetup_margin_gtk_bottom (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-bottom";
+	const char *key = "printsetup/margin-gtk-bottom";
 	return go_conf_load_double (root, key, 0, 720, 72);
 }
 
 void
 gnm_conf_set_printsetup_margin_gtk_bottom (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-bottom";
+	const char *key = "printsetup/margin-gtk-bottom";
 	go_conf_set_double (root, key, CLAMP (x, 0, 720));
 }
 
 double
 gnm_conf_get_printsetup_margin_gtk_left (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-left";
+	const char *key = "printsetup/margin-gtk-left";
 	return go_conf_load_double (root, key, 0, 720, 72);
 }
 
 void
 gnm_conf_set_printsetup_margin_gtk_left (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-left";
+	const char *key = "printsetup/margin-gtk-left";
 	go_conf_set_double (root, key, CLAMP (x, 0, 720));
 }
 
 double
 gnm_conf_get_printsetup_margin_gtk_right (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-right";
+	const char *key = "printsetup/margin-gtk-right";
 	return go_conf_load_double (root, key, 0, 720, 72);
 }
 
 void
 gnm_conf_set_printsetup_margin_gtk_right (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-right";
+	const char *key = "printsetup/margin-gtk-right";
 	go_conf_set_double (root, key, CLAMP (x, 0, 720));
 }
 
 double
 gnm_conf_get_printsetup_margin_gtk_top (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-top";
+	const char *key = "printsetup/margin-gtk-top";
 	return go_conf_load_double (root, key, 0, 720, 72);
 }
 
 void
 gnm_conf_set_printsetup_margin_gtk_top (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-gtk-top";
+	const char *key = "printsetup/margin-gtk-top";
 	go_conf_set_double (root, key, CLAMP (x, 0, 720));
 }
 
 double
 gnm_conf_get_printsetup_margin_top (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-top";
+	const char *key = "printsetup/margin-top";
 	return go_conf_load_double (root, key, 0, 10000, 120);
 }
 
 void
 gnm_conf_set_printsetup_margin_top (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/margin-top";
+	const char *key = "printsetup/margin-top";
 	go_conf_set_double (root, key, CLAMP (x, 0, 10000));
 }
 
 const char *
 gnm_conf_get_printsetup_paper (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/paper";
+	const char *key = "printsetup/paper";
 	char *res = go_conf_load_string (root, key);
 	if (!res) res = g_strdup ("");
 	g_hash_table_replace (string_pool, (gpointer)key, res);
@@ -1345,7 +1365,7 @@ gnm_conf_get_printsetup_paper (void)
 void
 gnm_conf_set_printsetup_paper (const char *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/paper";
+	const char *key = "printsetup/paper";
 	go_conf_set_string (root, key, x);
 	g_hash_table_remove (string_pool, key);
 }
@@ -1353,91 +1373,91 @@ gnm_conf_set_printsetup_paper (const char *x)
 int
 gnm_conf_get_printsetup_paper_orientation (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/paper-orientation";
+	const char *key = "printsetup/paper-orientation";
 	return go_conf_load_int (root, key, GTK_PAGE_ORIENTATION_PORTRAIT, GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE, 0);
 }
 
 void
 gnm_conf_set_printsetup_paper_orientation (int x)
 {
-	const char *key = "/apps/gnumeric/printsetup/paper-orientation";
+	const char *key = "printsetup/paper-orientation";
 	go_conf_set_int (root, key, CLAMP (x, GTK_PAGE_ORIENTATION_PORTRAIT, GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE));
 }
 
 GtkUnit
 gnm_conf_get_printsetup_preferred_unit (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/preferred-unit";
+	const char *key = "printsetup/preferred-unit";
 	return go_conf_load_enum (root, key, GTK_TYPE_UNIT, GTK_UNIT_MM);
 }
 
 void
 gnm_conf_set_printsetup_preferred_unit (GtkUnit x)
 {
-	const char *key = "/apps/gnumeric/printsetup/preferred-unit";
+	const char *key = "printsetup/preferred-unit";
 	go_conf_set_enum (root, key, GTK_TYPE_UNIT, x);
 }
 
 gboolean
 gnm_conf_get_printsetup_print_black_n_white (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-black-n-white";
+	const char *key = "printsetup/print-black-n-white";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_print_black_n_white (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-black-n-white";
+	const char *key = "printsetup/print-black-n-white";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_printsetup_print_even_if_only_styles (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-even-if-only-styles";
+	const char *key = "printsetup/print-even-if-only-styles";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_print_even_if_only_styles (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-even-if-only-styles";
+	const char *key = "printsetup/print-even-if-only-styles";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_printsetup_print_grid_lines (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-grid-lines";
+	const char *key = "printsetup/print-grid-lines";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_print_grid_lines (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-grid-lines";
+	const char *key = "printsetup/print-grid-lines";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 gboolean
 gnm_conf_get_printsetup_print_titles (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-titles";
+	const char *key = "printsetup/print-titles";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_printsetup_print_titles (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/print-titles";
+	const char *key = "printsetup/print-titles";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 const char *
 gnm_conf_get_printsetup_repeat_left (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/repeat-left";
+	const char *key = "printsetup/repeat-left";
 	char *res = go_conf_load_string (root, key);
 	if (!res) res = g_strdup ("");
 	g_hash_table_replace (string_pool, (gpointer)key, res);
@@ -1447,7 +1467,7 @@ gnm_conf_get_printsetup_repeat_left (void)
 void
 gnm_conf_set_printsetup_repeat_left (const char *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/repeat-left";
+	const char *key = "printsetup/repeat-left";
 	go_conf_set_string (root, key, x);
 	g_hash_table_remove (string_pool, key);
 }
@@ -1455,7 +1475,7 @@ gnm_conf_set_printsetup_repeat_left (const char *x)
 const char *
 gnm_conf_get_printsetup_repeat_top (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/repeat-top";
+	const char *key = "printsetup/repeat-top";
 	char *res = go_conf_load_string (root, key);
 	if (!res) res = g_strdup ("");
 	g_hash_table_replace (string_pool, (gpointer)key, res);
@@ -1465,7 +1485,7 @@ gnm_conf_get_printsetup_repeat_top (void)
 void
 gnm_conf_set_printsetup_repeat_top (const char *x)
 {
-	const char *key = "/apps/gnumeric/printsetup/repeat-top";
+	const char *key = "printsetup/repeat-top";
 	go_conf_set_string (root, key, x);
 	g_hash_table_remove (string_pool, key);
 }
@@ -1473,111 +1493,113 @@ gnm_conf_set_printsetup_repeat_top (const char *x)
 int
 gnm_conf_get_printsetup_scale_height (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-height";
+	const char *key = "printsetup/scale-height";
 	return go_conf_load_int (root, key, 0, 100, 0);
 }
 
 void
 gnm_conf_set_printsetup_scale_height (int x)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-height";
+	const char *key = "printsetup/scale-height";
 	go_conf_set_int (root, key, CLAMP (x, 0, 100));
 }
 
 gboolean
 gnm_conf_get_printsetup_scale_percentage (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-percentage";
+	const char *key = "printsetup/scale-percentage";
 	return go_conf_load_bool (root, key, TRUE);
 }
 
 void
 gnm_conf_set_printsetup_scale_percentage (gboolean x)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-percentage";
+	const char *key = "printsetup/scale-percentage";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 double
 gnm_conf_get_printsetup_scale_percentage_value (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-percentage-value";
+	const char *key = "printsetup/scale-percentage-value";
 	return go_conf_load_double (root, key, 1, 500, 100);
 }
 
 void
 gnm_conf_set_printsetup_scale_percentage_value (double x)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-percentage-value";
+	const char *key = "printsetup/scale-percentage-value";
 	go_conf_set_double (root, key, CLAMP (x, 1, 500));
 }
 
 int
 gnm_conf_get_printsetup_scale_width (void)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-width";
+	const char *key = "printsetup/scale-width";
 	return go_conf_load_int (root, key, 0, 100, 0);
 }
 
 void
 gnm_conf_set_printsetup_scale_width (int x)
 {
-	const char *key = "/apps/gnumeric/printsetup/scale-width";
+	const char *key = "printsetup/scale-width";
 	go_conf_set_int (root, key, CLAMP (x, 0, 100));
 }
 
 int
 gnm_conf_get_undo_max_descriptor_width (void)
 {
-	const char *key = "/apps/gnumeric/undo/max_descriptor_width";
+	const char *key = "undo/max_descriptor_width";
 	return go_conf_load_int (root, key, 5, 256, 40);
 }
 
 void
 gnm_conf_set_undo_max_descriptor_width (int x)
 {
-	const char *key = "/apps/gnumeric/undo/max_descriptor_width";
+	const char *key = "undo/max_descriptor_width";
 	go_conf_set_int (root, key, CLAMP (x, 5, 256));
 }
 
 int
 gnm_conf_get_undo_maxnum (void)
 {
-	const char *key = "/apps/gnumeric/undo/maxnum";
+	const char *key = "undo/maxnum";
 	return go_conf_load_int (root, key, 0, 10000, 20);
 }
 
 void
 gnm_conf_set_undo_maxnum (int x)
 {
-	const char *key = "/apps/gnumeric/undo/maxnum";
+	const char *key = "undo/maxnum";
 	go_conf_set_int (root, key, CLAMP (x, 0, 10000));
 }
 
 gboolean
 gnm_conf_get_undo_show_sheet_name (void)
 {
-	const char *key = "/apps/gnumeric/undo/show_sheet_name";
+	const char *key = "undo/show_sheet_name";
 	return go_conf_load_bool (root, key, FALSE);
 }
 
 void
 gnm_conf_set_undo_show_sheet_name (gboolean x)
 {
-	const char *key = "/apps/gnumeric/undo/show_sheet_name";
+	const char *key = "undo/show_sheet_name";
 	go_conf_set_bool (root, key, x != FALSE);
 }
 
 int
 gnm_conf_get_undo_size (void)
 {
-	const char *key = "/apps/gnumeric/undo/size";
+	const char *key = "undo/size";
 	return go_conf_load_int (root, key, 1, 1000000, 100);
 }
 
 void
 gnm_conf_set_undo_size (int x)
 {
-	const char *key = "/apps/gnumeric/undo/size";
+	const char *key = "undo/size";
 	go_conf_set_int (root, key, CLAMP (x, 1, 1000000));
 }
+
+/* ----------- AUTOMATICALLY GENERATED CODE ABOVE -- DO NOT EDIT ----------- */
diff --git a/src/gnumeric-gconf.h b/src/gnumeric-gconf.h
index fa07967..3954d04 100644
--- a/src/gnumeric-gconf.h
+++ b/src/gnumeric-gconf.h
@@ -102,20 +102,20 @@ void gnm_conf_set_core_gui_screen_verticaldpi (double);
 gboolean gnm_conf_get_core_gui_toolbars_FormatToolbar (void);
 void gnm_conf_set_core_gui_toolbars_FormatToolbar (gboolean);
 
-int gnm_conf_get_core_gui_toolbars_FormatToolbar_position (void);
-void gnm_conf_set_core_gui_toolbars_FormatToolbar_position (int);
+GtkPositionType gnm_conf_get_core_gui_toolbars_FormatToolbar_position (void);
+void gnm_conf_set_core_gui_toolbars_FormatToolbar_position (GtkPositionType);
 
 gboolean gnm_conf_get_core_gui_toolbars_ObjectToolbar (void);
 void gnm_conf_set_core_gui_toolbars_ObjectToolbar (gboolean);
 
-int gnm_conf_get_core_gui_toolbars_ObjectToolbar_position (void);
-void gnm_conf_set_core_gui_toolbars_ObjectToolbar_position (int);
+GtkPositionType gnm_conf_get_core_gui_toolbars_ObjectToolbar_position (void);
+void gnm_conf_set_core_gui_toolbars_ObjectToolbar_position (GtkPositionType);
 
 gboolean gnm_conf_get_core_gui_toolbars_StandardToolbar (void);
 void gnm_conf_set_core_gui_toolbars_StandardToolbar (gboolean);
 
-int gnm_conf_get_core_gui_toolbars_StandardToolbar_position (void);
-void gnm_conf_set_core_gui_toolbars_StandardToolbar_position (int);
+GtkPositionType gnm_conf_get_core_gui_toolbars_StandardToolbar_position (void);
+void gnm_conf_set_core_gui_toolbars_StandardToolbar_position (GtkPositionType);
 
 double gnm_conf_get_core_gui_window_x (void);
 void gnm_conf_set_core_gui_window_x (double);
diff --git a/tools/handle-conf-options b/tools/handle-conf-options
index 1f6f8da..cfdc297 100644
--- a/tools/handle-conf-options
+++ b/tools/handle-conf-options
@@ -244,6 +244,13 @@ foreach my $schema (@schemas) {
     my $ctype = $type_to_ctype{$gtype || $type};
     my $ctypes = "$ctype "; $ctypes =~ s/\*\s/\*/;
 
+    my $root;
+    if ($key =~ s{/apps/gnumeric/}{}) {
+	$root = 'root';
+    } else {
+	$root = 'NULL';
+    }
+
     $hfile .= "${ctypes}gnm_conf_get_$var (void);\n";
     $hfile .= "void gnm_conf_set_$var ($ctype);\n\n";
 
@@ -257,35 +264,36 @@ foreach my $schema (@schemas) {
 	$cfile .= "$get_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\treturn go_conf_load_bool (root, key, $default);\n";
+	$cfile .= "\treturn go_conf_load_bool ($root, key, $default);\n";
 	$cfile .= "}\n\n";
 
 	$cfile .= "$set_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\tgo_conf_set_bool (root, key, x != FALSE);\n";
+	$cfile .= "\tgo_conf_set_bool ($root, key, x != FALSE);\n";
 	$cfile .= "}\n\n";
     } elsif ($type eq 'int' || $type eq 'float') {
+	my $ltype = $type_to_ctype{$type};
 	die "$0: No min for $key\n" unless defined $min;
 	die "$0: No max for $key\n" unless defined $max;
 
 	$cfile .= "$get_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\treturn go_conf_load_$ctype (root, key, $min, $max, $default);\n";
+	$cfile .= "\treturn go_conf_load_$ltype ($root, key, $min, $max, $default);\n";
 	$cfile .= "}\n\n";
 
 	$cfile .= "void\n";
 	$cfile .= "gnm_conf_set_$var ($ctype x)\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\tgo_conf_set_$ctype (root, key, CLAMP (x, $min, $max));\n";
+	$cfile .= "\tgo_conf_set_$ltype ($root, key, CLAMP (x, $min, $max));\n";
 	$cfile .= "}\n\n";
     } elsif ($type eq 'string' && $gtype eq '0') {
 	$cfile .= "$get_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\tchar *res = go_conf_load_string (root, key);\n";
+	$cfile .= "\tchar *res = go_conf_load_string ($root, key);\n";
 	$cfile .= "\tif (!res) res = g_strdup (\"$default\");\n";
 	$cfile .= "\tg_hash_table_replace (string_pool, (gpointer)key, res);\n";
 	$cfile .= "\treturn res;\n";
@@ -294,26 +302,26 @@ foreach my $schema (@schemas) {
 	$cfile .= "$set_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\tgo_conf_set_string (root, key, x);\n";
+	$cfile .= "\tgo_conf_set_string ($root, key, x);\n";
 	$cfile .= "\tg_hash_table_remove (string_pool, key);\n";
 	$cfile .= "}\n\n";
     } elsif ($type eq 'string' && $gtype ne '0') {
 	$cfile .= "$get_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\treturn go_conf_load_enum (root, key, $gtype, $default);\n";
+	$cfile .= "\treturn go_conf_load_enum ($root, key, $gtype, $default);\n";
 	$cfile .= "}\n\n";
 
 	$cfile .= "$set_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\tgo_conf_set_enum (root, key, $gtype, x);\n";
+	$cfile .= "\tgo_conf_set_enum ($root, key, $gtype, x);\n";
 	$cfile .= "}\n\n";
     } elsif ($type eq 'list:string') {
 	$cfile .= "$get_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\tGSList *res = go_conf_load_str_list (root, key);\n";
+	$cfile .= "\tGSList *res = go_conf_load_str_list ($root, key);\n";
 	$cfile .= "\tg_hash_table_replace (string_list_pool, (gpointer)key, res);\n";
 	$cfile .= "\treturn res;\n";
 	$cfile .= "}\n\n";
@@ -321,7 +329,7 @@ foreach my $schema (@schemas) {
 	$cfile .= "$set_head\n";
 	$cfile .= "{\n";
 	$cfile .= "\tconst char *key = \"$key\";\n";
-	$cfile .= "\tgo_conf_set_str_list (root, key, x);\n";
+	$cfile .= "\tgo_conf_set_str_list ($root, key, x);\n";
 	$cfile .= "\tg_hash_table_remove (string_list_pool, key);\n";
 	$cfile .= "}\n\n";
     } else {



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