diff --git a/gnucash/gnucash-core-app.cpp b/gnucash/gnucash-core-app.cpp index 1592f4fb6b..946ff7e8ec 100644 --- a/gnucash/gnucash-core-app.cpp +++ b/gnucash/gnucash-core-app.cpp @@ -270,9 +270,6 @@ Gnucash::CoreApp::parse_command_line (int argc, char **argv) gnc_prefs_set_debugging (m_debug); gnc_prefs_set_extra (m_extra); - - if (m_gsettings_prefix) - gnc_gsettings_set_prefix (m_gsettings_prefix->c_str()); } /* Define command line options common to all gnucash binaries. */ @@ -292,9 +289,7 @@ Gnucash::CoreApp::add_common_program_options (void) ("log", bpo::value (&m_log_flags), _("Log level overrides, of the form \"modulename={debug,info,warn,crit,error}\"\nExamples: \"--log qof=debug\" or \"--log gnc.backend.file.sx=info\"\nThis can be invoked multiple times.")) ("logto", bpo::value (&m_log_to_filename), - _("File to log into; defaults to \"/tmp/gnucash.trace\"; can be \"stderr\" or \"stdout\".")) - ("gsettings-prefix", bpo::value (&m_gsettings_prefix), - _("Set the prefix for gsettings schemas for gsettings queries. This can be useful to have a different settings tree while debugging.")); + _("File to log into; defaults to \"/tmp/gnucash.trace\"; can be \"stderr\" or \"stdout\".")); bpo::options_description hidden_options(_("Hidden Options")); hidden_options.add_options() diff --git a/libgnucash/app-utils/gnc-gsettings.cpp b/libgnucash/app-utils/gnc-gsettings.cpp index d766569b27..969ed0afe9 100644 --- a/libgnucash/app-utils/gnc-gsettings.cpp +++ b/libgnucash/app-utils/gnc-gsettings.cpp @@ -129,41 +129,27 @@ handlers_hash_unblock_helper (gpointer key, gpointer settings_ptr, gpointer poin /* GSettings Utilities */ /************************************************************/ -void -gnc_gsettings_set_prefix (const gchar *prefix) -{ - gsettings_prefix = prefix; -} - const gchar * gnc_gsettings_get_prefix (void) { - if (!gsettings_prefix) - { - const char *prefix = g_getenv("GNC_GSETTINGS_PREFIX"); - if (prefix) - gsettings_prefix = prefix; - else - gsettings_prefix = GSET_SCHEMA_PREFIX; - } - return gsettings_prefix; + return GSET_SCHEMA_PREFIX; } gchar * gnc_gsettings_normalize_schema_name (const gchar *name) { - if (name == NULL) + if (!name) { /* Need to return a newly allocated string */ - return g_strdup(gnc_gsettings_get_prefix()); + return g_strdup(GSET_SCHEMA_PREFIX); } - if (g_str_has_prefix (name, gnc_gsettings_get_prefix ())) + if (g_str_has_prefix (name, GSET_SCHEMA_PREFIX)) { /* Need to return a newly allocated string */ return g_strdup(name); } - return g_strjoin(".", gnc_gsettings_get_prefix(), name, NULL); + return g_strjoin(".", GSET_SCHEMA_PREFIX, name, NULL); } diff --git a/libgnucash/app-utils/gnc-gsettings.h b/libgnucash/app-utils/gnc-gsettings.h index fcf213ed83..7f2d9f3a00 100644 --- a/libgnucash/app-utils/gnc-gsettings.h +++ b/libgnucash/app-utils/gnc-gsettings.h @@ -70,13 +70,6 @@ */ gchar *gnc_gsettings_normalize_schema_name (const gchar *name); - -/** Set the default gsettings schema prefix. This is - * used to generate complete schema id's if only - * partial id's are passed. - */ -void gnc_gsettings_set_prefix (const gchar *prefix); - /** Get the default gsettings schema prefix. * If none was set explicitly, this defaults to * "org.gnucash.GnuCash"