r23260 - gnucash/trunk/src - Gnc-Prefs: Convert gnc user warnings

Geert Janssens gjanssens at code.gnucash.org
Mon Oct 7 10:27:37 EDT 2013


Author: gjanssens
Date: 2013-10-07 10:27:34 -0400 (Mon, 07 Oct 2013)
New Revision: 23260
Trac: http://svn.gnucash.org/trac/changeset/23260

Added:
   gnucash/trunk/src/gnome-utils/gschemas/org.gnucash.warnings.gschema.xml.in
   gnucash/trunk/src/gnome-utils/make-gnc-warnings-c.xsl
   gnucash/trunk/src/gnome-utils/make-gnc-warnings-h.xsl
Removed:
   gnucash/trunk/src/gnome/gschemas/org.gnucash.warnings.gschema.xml.in
Modified:
   gnucash/trunk/src/business/business-ledger/Makefile.am
   gnucash/trunk/src/business/business-ledger/gncEntryLedger.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
   gnucash/trunk/src/core-utils/gnc-prefs.h
   gnucash/trunk/src/gnome-utils/Makefile.am
   gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c
   gnucash/trunk/src/gnome-utils/dialog-utils.c
   gnucash/trunk/src/gnome-utils/dialog-utils.h
   gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c
   gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
   gnucash/trunk/src/gnome-utils/gschemas/Makefile.am
   gnucash/trunk/src/gnome/dialog-commodities.c
   gnucash/trunk/src/gnome/dialog-price-edit-db.c
   gnucash/trunk/src/gnome/gnc-plugin-page-register.c
   gnucash/trunk/src/gnome/gnc-plugin-page-register2.c
   gnucash/trunk/src/gnome/gnc-split-reg.c
   gnucash/trunk/src/gnome/gnc-split-reg2.c
   gnucash/trunk/src/gnome/gschemas/Makefile.am
   gnucash/trunk/src/register/ledger-core/Makefile.am
   gnucash/trunk/src/register/ledger-core/split-register-control.c
   gnucash/trunk/src/register/ledger-core/split-register-model.c
   gnucash/trunk/src/register/ledger-core/split-register.c
Log:
Gnc-Prefs: Convert gnc user warnings

This is a little more involved that a simple
find/replace of gconf->gsettings functions.

Gsettings doesn't allow introspection on the schema
like gconf does. So we need another way to extract
the warnings' summaries and long descriptions to
show the user. To fix this, a new set of source
files is auto-generated based on the gsettings schema
source file for the warnings: gnc-warnings.[ch]

gnc-warnings.c: contains an array of warning
description structs and the implementation of
an accessor function. The array is to be assumed
read only

gnc-warnings.h: defines each warning using #define
and exposes the accessor function to the rest of the
source tree.

The two source files are constructed using an xsl
transformation on the gsettings schema source file.
This is done using the tool xsltproc, which should
already be available on each platform GnuCash supports
because it gets installed together with libxml2,
which is already a required dependency for GnuCash.



More information about the gnucash-patches mailing list