From cc1fa9216fdb643045aa00d8494367635cceed26 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Mon, 7 Oct 2013 14:22:09 +0000 Subject: [PATCH] Drop option to customize gconf_path via command line or environment variable git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23253 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/app-utils/gnc-gconf-utils.c | 7 ++++--- src/bin/gnucash-bin.c | 19 ------------------- src/core-utils/gnc-prefs.c | 13 ------------- src/core-utils/gnc-prefs.h | 5 ----- 4 files changed, 4 insertions(+), 40 deletions(-) diff --git a/src/app-utils/gnc-gconf-utils.c b/src/app-utils/gnc-gconf-utils.c index 1503b35c8b..2b14319f2a 100644 --- a/src/app-utils/gnc-gconf-utils.c +++ b/src/app-utils/gnc-gconf-utils.c @@ -31,6 +31,7 @@ #define CLIENT_TAG "%s-%s-client" #define NOTIFY_TAG "%s-%s-notify_id" +#define GCONF_PREFIX "/apps/gnucash" static GConfClient *our_client = NULL; @@ -274,7 +275,7 @@ gnc_gconf_section_name (const char *name) if (name == NULL) { /* Need to return a newly allocated string */ - return g_strdup(gnc_gconf_get_path_prefix()); + return g_strdup(GCONF_PREFIX); } if (*name == '/') { @@ -288,7 +289,7 @@ gnc_gconf_section_name (const char *name) * order to keep this file completely "gnome-free" this approach was * used. */ - return g_strjoin("/", gnc_gconf_get_path_prefix(), name, NULL); + return g_strjoin("/", GCONF_PREFIX, name, NULL); } char * @@ -306,7 +307,7 @@ gnc_gconf_schema_section_name (const char *name) * order to keep this file completely "gnome-free" this approach was * used. */ - return g_strconcat("/schemas", gnc_gconf_get_path_prefix(), "/", name, NULL); + return g_strconcat("/schemas", GCONF_PREFIX, "/", name, NULL); } static gchar * diff --git a/src/bin/gnucash-bin.c b/src/bin/gnucash-bin.c index 1e79048aed..910d13cb15 100644 --- a/src/bin/gnucash-bin.c +++ b/src/bin/gnucash-bin.c @@ -48,7 +48,6 @@ #include "gnc-splash.h" #include "gnc-gnome-utils.h" #include "gnc-plugin-file-history.h" -#include "gnc-gconf-utils.h" #include "dialog-new-user.h" #include "gnc-session.h" #include "engine-helpers-guile.h" @@ -81,7 +80,6 @@ static int extra = 0; static gchar **log_flags = NULL; static gchar *log_to_filename = NULL; static int nofile = 0; -static const gchar *gconf_path = NULL; static const gchar *gsettings_prefix = NULL; static const char *add_quotes_file = NULL; static char *namespace_regexp = NULL; @@ -121,13 +119,6 @@ static GOptionEntry options[] = "nofile", '\0', 0, G_OPTION_ARG_NONE, &nofile, N_("Do not load the last file opened"), NULL }, - { - "gconf-path", '\0', 0, G_OPTION_ARG_STRING, &gconf_path, - N_("Set the prefix path for gconf queries"), - /* Translators: Argument description for autohelp; see - http://developer.gnome.org/doc/API/2.0/glib/glib-Commandline-option-parser.html */ - N_("GCONFPATH") - }, { "gsettings-prefix", '\0', 0, G_OPTION_ARG_STRING, &gsettings_prefix, N_("Set the prefix for gsettings schemas for gsettings queries. This can be useful to have a different settings tree while debugging."), @@ -574,16 +565,6 @@ gnc_parse_command_line(int *argc, char ***argv) gnc_prefs_set_debugging(debugging); gnc_prefs_set_extra(extra); - if (!gconf_path) - { - const char *path = g_getenv("GNC_GCONF_PATH"); - if (path) - gconf_path = path; - else - gconf_path = GCONF_PATH; - } - gnc_gconf_set_path_prefix(g_strdup(gconf_path)); - if (!gsettings_prefix) { const char *prefix = g_getenv("GNC_GSETTINGS_PREFIX"); diff --git a/src/core-utils/gnc-prefs.c b/src/core-utils/gnc-prefs.c index 72067d483e..9bbef1b7f8 100644 --- a/src/core-utils/gnc-prefs.c +++ b/src/core-utils/gnc-prefs.c @@ -34,7 +34,6 @@ static gboolean extras_enabled = FALSE; static gboolean use_compression = TRUE; // This is also the default in the prefs backend static gint file_retention_policy = 1; // 1 = "days", the default in the prefs backend static gint file_retention_days = 30; // This is also the default in the prefs backend -static const gchar *gconf_path = "/apps/gnucash"; // A sensible default /* This static indicates the debugging module that this .o belongs to. */ static QofLogModule log_module = G_LOG_DOMAIN; @@ -115,18 +114,6 @@ gnc_prefs_set_file_retention_days(gint days) file_retention_days = days; } -const gchar * -gnc_gconf_get_path_prefix (void) -{ - return gconf_path; -} - -void -gnc_gconf_set_path_prefix (const gchar *path) -{ - gconf_path = path; -} - guint gnc_prefs_get_long_version() { diff --git a/src/core-utils/gnc-prefs.h b/src/core-utils/gnc-prefs.h index e6d715303c..b265dc964a 100644 --- a/src/core-utils/gnc-prefs.h +++ b/src/core-utils/gnc-prefs.h @@ -47,8 +47,6 @@ #include -#define GCONF_PATH "/apps/gnucash" - /* Preference groups used across multiple modules */ #define GNC_PREFS_GROUP_GENERAL "general" #define GNC_PREFS_GROUP_GENERAL_REGISTER "general.register" @@ -100,9 +98,6 @@ void gnc_prefs_set_file_retention_policy(gint policy); gint gnc_prefs_get_file_retention_days(void); void gnc_prefs_set_file_retention_days(gint days); -const gchar *gnc_gconf_get_path_prefix(void); -void gnc_gconf_set_path_prefix(const gchar *prefix); - guint gnc_prefs_get_long_version( void ); /** @} */