Add new core prefs

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22940 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens
2013-05-03 12:03:12 +00:00
parent f4872f6e6c
commit 9c65cb20b4
2 changed files with 63 additions and 3 deletions

View File

@@ -26,9 +26,12 @@
#include "gnc-core-prefs.h"
#include "gnc-version.h"
static gchar *namespace_regexp = NULL;
static gboolean is_debugging = 0;
static gboolean extras_enabled = 0;
static gchar *namespace_regexp = NULL;
static gboolean is_debugging = FALSE;
static gboolean extras_enabled = FALSE;
static gboolean use_compression = FALSE;
static gint file_retention_policy = 0;
static gint file_retention_days = 0;
static const gchar *gconf_path;
const gchar *
@@ -59,6 +62,54 @@ gnc_core_prefs_set_debugging(gboolean d)
is_debugging = d;
}
gboolean
gnc_core_prefs_is_extra_enabled(void)
{
return extras_enabled;
}
void
gnc_core_prefs_set_extra(gboolean enabled)
{
extras_enabled = enabled;
}
gboolean
gnc_core_prefs_get_file_save_compressed(void)
{
return use_compression;
}
void
gnc_core_prefs_set_file_save_compressed(gboolean compressed)
{
use_compression = compressed;
}
gint
gnc_core_prefs_get_file_retention_policy(void)
{
return file_retention_policy;
}
void
gnc_core_prefs_set_file_retention_policy(gint policy)
{
file_retention_policy = policy;
}
gint
gnc_core_prefs_get_file_retention_days(void)
{
return file_retention_days;
}
void
gnc_core_prefs_set_file_retention_days(gint days)
{
file_retention_days = days;
}
const gchar *
gnc_gconf_get_path_prefix (void)
{

View File

@@ -37,6 +37,15 @@ void gnc_core_prefs_set_debugging(gboolean d);
gboolean gnc_core_prefs_is_extra_enabled(void);
void gnc_core_prefs_set_extra(gboolean enabled);
gboolean gnc_core_prefs_get_file_save_compressed(void);
void gnc_core_prefs_set_file_save_compressed(gboolean compressed);
gint gnc_core_prefs_get_file_retention_policy(void);
void gnc_core_prefs_set_file_retention_policy(gint policy);
gint gnc_core_prefs_get_file_retention_days(void);
void gnc_core_prefs_set_file_retention_days(gint days);
const gchar *gnc_gconf_get_path_prefix(void);
void gnc_gconf_set_path_prefix(const gchar *prefix);