r22940 - gnucash/trunk/src/core-utils - Add new core prefs

Geert Janssens gjanssens at code.gnucash.org
Fri May 3 08:03:12 EDT 2013


Author: gjanssens
Date: 2013-05-03 08:03:12 -0400 (Fri, 03 May 2013)
New Revision: 22940
Trac: http://svn.gnucash.org/trac/changeset/22940

Modified:
   gnucash/trunk/src/core-utils/gnc-core-prefs.c
   gnucash/trunk/src/core-utils/gnc-core-prefs.h
Log:
Add new core prefs

Modified: gnucash/trunk/src/core-utils/gnc-core-prefs.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-core-prefs.c	2013-05-03 12:03:00 UTC (rev 22939)
+++ gnucash/trunk/src/core-utils/gnc-core-prefs.c	2013-05-03 12:03:12 UTC (rev 22940)
@@ -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 @@
     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)
 {

Modified: gnucash/trunk/src/core-utils/gnc-core-prefs.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-core-prefs.h	2013-05-03 12:03:00 UTC (rev 22939)
+++ gnucash/trunk/src/core-utils/gnc-core-prefs.h	2013-05-03 12:03:12 UTC (rev 22940)
@@ -37,6 +37,15 @@
 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);
 



More information about the gnucash-changes mailing list