r16739 - gnucash/branches/gda-dev2 - 1) When load tax tables, if the parent guid is NULL, don't call

Phil Longstaff plongstaff at cvs.gnucash.org
Wed Dec 26 18:20:54 EST 2007


Author: plongstaff
Date: 2007-12-26 18:20:53 -0500 (Wed, 26 Dec 2007)
New Revision: 16739
Trac: http://svn.gnucash.org/trac/changeset/16739

Modified:
   gnucash/branches/gda-dev2/packaging/win32/
   gnucash/branches/gda-dev2/src/backend/gda/
   gnucash/branches/gda-dev2/src/backend/gda/test/
   gnucash/branches/gda-dev2/src/business/business-core/gda/
   gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-tax-table-gda.c
Log:
1) When load tax tables, if the parent guid is NULL, don't call
gncTaxTableSetParent() because the tax table will be made invisible.
2) Update svn:ignore property on some directories




Property changes on: gnucash/branches/gda-dev2/packaging/win32
___________________________________________________________________
Name: svn:ignore
   - gnucash.iss
custom.sh
Makefile.in
Makefile

   + gnucash.iss
custom.sh
Makefile.in
Makefile
.deps



Property changes on: gnucash/branches/gda-dev2/src/backend/gda
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in
.deps
.libs



Property changes on: gnucash/branches/gda-dev2/src/backend/gda/test
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in
.deps



Property changes on: gnucash/branches/gda-dev2/src/business/business-core/gda
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in
.libs
.deps


Modified: gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-tax-table-gda.c
===================================================================
--- gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-tax-table-gda.c	2007-12-26 22:22:26 UTC (rev 16738)
+++ gnucash/branches/gda-dev2/src/business/business-core/gda/gnc-tax-table-gda.c	2007-12-26 23:20:53 UTC (rev 16739)
@@ -53,6 +53,7 @@
 static gpointer get_obj_guid( gpointer pObject, const QofParam* param );
 static void set_obj_guid( gpointer pObject, gpointer pValue );
 static gpointer get_child( gpointer pObject, const QofParam* param );
+static void set_parent( gpointer pObject, gpointer pValue );
 
 #define MAX_NAME_LEN 50
 
@@ -68,7 +69,7 @@
 	{ "child",     CT_TAXTABLEREF, 0,			 0,        NULL, NULL,
 			get_child, (QofSetterFunc)gncTaxTableSetChild },
 	{ "parent",    CT_TAXTABLEREF, 0,			 0,        NULL, NULL,
-			(QofAccessFunc)gncTaxTableGetParent, (QofSetterFunc)gncTaxTableSetParent },
+			(QofAccessFunc)gncTaxTableGetParent, set_parent },
 	{ NULL }
 };
 
@@ -142,6 +143,18 @@
 }
 
 static void
+set_parent( gpointer data, gpointer value )
+{
+	GncTaxTable* tt = GNC_TAXTABLE(data);
+	GncTaxTable* parent;
+
+	if( value != NULL ) {
+		parent = GNC_TAXTABLE(value);
+		gncTaxTableSetParent( tt, parent );
+	}
+}
+
+static void
 load_single_ttentry( GncGdaBackend* be, GdaDataModel* pModel, int row, GncTaxTable* tt )
 {
 	GncTaxTableEntry* e = gncTaxTableEntryCreate();



More information about the gnucash-changes mailing list