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
This commit is contained in:
Geert Janssens 2013-10-07 14:22:09 +00:00
parent e5bccf7e5c
commit cc1fa9216f
4 changed files with 4 additions and 40 deletions

View File

@ -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 *

View File

@ -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");

View File

@ -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()
{

View File

@ -47,8 +47,6 @@
#include <glib.h>
#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 );
/** @} */