r23256 - gnucash/trunk/src/report - Gnc-Prefs: cleanup gconf wiring in report system
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 7 10:24:33 EDT 2013
Author: gjanssens
Date: 2013-10-07 10:23:52 -0400 (Mon, 07 Oct 2013)
New Revision: 23256
Trac: http://svn.gnucash.org/trac/changeset/23256
Modified:
gnucash/trunk/src/report/report-gnome/Makefile.am
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
gnucash/trunk/src/report/standard-reports/register.scm
gnucash/trunk/src/report/stylesheets/Makefile.am
Log:
Gnc-Prefs: cleanup gconf wiring in report system
Modified: gnucash/trunk/src/report/report-gnome/Makefile.am
===================================================================
--- gnucash/trunk/src/report/report-gnome/Makefile.am 2013-10-07 14:22:52 UTC (rev 23255)
+++ gnucash/trunk/src/report/report-gnome/Makefile.am 2013-10-07 14:23:52 UTC (rev 23256)
@@ -15,7 +15,6 @@
-I${top_srcdir}/src/report/report-system \
-I${top_srcdir}/src/libqof/qof \
${GUILE_INCS} \
- ${GCONF_CFLAGS} \
${GTK_CFLAGS} \
${GLIB_CFLAGS}
@@ -48,7 +47,6 @@
${top_builddir}/src/report/report-system/libgncmod-report-system.la \
${top_builddir}/src/libqof/qof/libgnc-qof.la \
${GUILE_LIBS} \
- ${GCONF_LIBS} \
${GLIB_LIBS}
if BUILDING_FROM_SCM
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2013-10-07 14:22:52 UTC (rev 23255)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2013-10-07 14:23:52 UTC (rev 23256)
@@ -50,7 +50,6 @@
#include "dialog-custom-report.h"
#include "gnc-component-manager.h"
#include "gnc-engine.h"
-#include "gnc-gconf-utils.h"
#include "gnc-gnome-utils.h"
#include "gnc-guile-utils.h"
#include "gnc-html-history.h"
@@ -1614,7 +1613,9 @@
"Invoice Number", NULL);
}
-#define GCONF_GENERAL_REPORT_PDFEXPORT GCONF_GENERAL_REPORT "/pdf_export"
+#define GNC_PREFS_GROUP_REPORT_PDFEXPORT GNC_PREFS_GROUP_GENERAL_REPORT "/pdf_export"
+#define GNC_PREF_FILENAME_DATE_FMT "filename_date_format"
+#define GNC_PREF_FILENAME_FMT "filename_format"
static gchar *report_create_jobname(GncPluginPageReportPrivate *priv)
{
@@ -1627,18 +1628,11 @@
g_assert(priv);
{
- // Look up the date format that was chosen in the gconf registry
+ // Look up the date format that was chosen in the preferences database
QofDateFormat date_format_here;
QofDateFormat date_format_old = qof_date_format_get();
- char *format_code = gnc_gconf_get_string(GCONF_GENERAL_REPORT_PDFEXPORT,
- "filename_date_format", NULL);
-
- if (format_code == NULL)
- {
- format_code = g_strdup("locale");
- g_warning("No gconf key found for " GCONF_GENERAL_REPORT_PDFEXPORT
- "/filename_date_format, using default %s", format_code);
- }
+ char *format_code = gnc_prefs_get_string(GNC_PREFS_GROUP_REPORT_PDFEXPORT,
+ GNC_PREF_FILENAME_DATE_FMT);
if (*format_code == '\0')
{
g_free(format_code);
@@ -1707,14 +1701,8 @@
if (report_name && job_date)
{
- // Look up the sprintf format of the output name from the gconf registry
- char* format = gnc_gconf_get_string(GCONF_GENERAL_REPORT_PDFEXPORT, "filename_format", NULL);
- if (!format)
- {
- // Fallback name format in case the gconf does not contain this key
- format = g_strdup("%s_%s_%s");
- g_warning("No gconf key found for " GCONF_GENERAL_REPORT_PDFEXPORT "/filename_format, using default %s", format);
- }
+ // Look up the sprintf format of the output name from the preferences database
+ char* format = gnc_prefs_get_string(GNC_PREFS_GROUP_REPORT_PDFEXPORT, GNC_PREF_FILENAME_FMT);
job_name = g_strdup_printf(format, report_name, report_number, job_date);
Modified: gnucash/trunk/src/report/standard-reports/register.scm
===================================================================
--- gnucash/trunk/src/report/standard-reports/register.scm 2013-10-07 14:22:52 UTC (rev 23255)
+++ gnucash/trunk/src/report/standard-reports/register.scm 2013-10-07 14:23:52 UTC (rev 23256)
@@ -830,14 +830,10 @@
document
(gnc:make-html-text
(gnc:html-markup-br)
- ;;(gnc:option-value
- ;; (gnc:gconf-get-string "user_info" "name"))
- "User Name"
+ "User Name"
(gnc:html-markup-br)
(string-expand
- ;;(gnc:option-value
- ;; (gnc:gconf-get-string "user_info" "address"))
- "User Address"
+ "User Address"
#\newline
"<br>")
(gnc:html-markup-br)))
Modified: gnucash/trunk/src/report/stylesheets/Makefile.am
===================================================================
--- gnucash/trunk/src/report/stylesheets/Makefile.am 2013-10-07 14:22:52 UTC (rev 23255)
+++ gnucash/trunk/src/report/stylesheets/Makefile.am 2013-10-07 14:23:52 UTC (rev 23256)
@@ -31,8 +31,7 @@
-I${top_srcdir}/src/libqof/qof \
${GUILE_INCS} \
${GLIB_CFLAGS} \
- ${GTK_CFLAGS} \
- ${GCONF_CFLAGS}
+ ${GTK_CFLAGS}
gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/
gncscmmod_DATA = \
More information about the gnucash-changes
mailing list