r23253 - gnucash/trunk/src - Drop option to customize gconf_path via command line or environment variable
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 7 10:22:10 EDT 2013
Author: gjanssens
Date: 2013-10-07 10:22:09 -0400 (Mon, 07 Oct 2013)
New Revision: 23253
Trac: http://svn.gnucash.org/trac/changeset/23253
Modified:
gnucash/trunk/src/app-utils/gnc-gconf-utils.c
gnucash/trunk/src/bin/gnucash-bin.c
gnucash/trunk/src/core-utils/gnc-prefs.c
gnucash/trunk/src/core-utils/gnc-prefs.h
Log:
Drop option to customize gconf_path via command line or environment variable
Modified: gnucash/trunk/src/app-utils/gnc-gconf-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-gconf-utils.c 2013-10-07 14:21:44 UTC (rev 23252)
+++ gnucash/trunk/src/app-utils/gnc-gconf-utils.c 2013-10-07 14:22:09 UTC (rev 23253)
@@ -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 @@
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 @@
* 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 @@
* 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 *
Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c 2013-10-07 14:21:44 UTC (rev 23252)
+++ gnucash/trunk/src/bin/gnucash-bin.c 2013-10-07 14:22:09 UTC (rev 23253)
@@ -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 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;
@@ -122,13 +120,6 @@
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."),
/* Translators: Argument description for autohelp; see
@@ -574,16 +565,6 @@
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");
Modified: gnucash/trunk/src/core-utils/gnc-prefs.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-prefs.c 2013-10-07 14:21:44 UTC (rev 23252)
+++ gnucash/trunk/src/core-utils/gnc-prefs.c 2013-10-07 14:22:09 UTC (rev 23253)
@@ -34,7 +34,6 @@
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 @@
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()
{
Modified: gnucash/trunk/src/core-utils/gnc-prefs.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-prefs.h 2013-10-07 14:21:44 UTC (rev 23252)
+++ gnucash/trunk/src/core-utils/gnc-prefs.h 2013-10-07 14:22:09 UTC (rev 23253)
@@ -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 @@
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 );
/** @} */
More information about the gnucash-changes
mailing list