r18808 - gnucash/trunk/src/backend/sql - Use "template-account" property to get/set template account.

Phil Longstaff plongstaff at code.gnucash.org
Wed Mar 3 19:58:28 EST 2010


Author: plongstaff
Date: 2010-03-03 19:58:28 -0500 (Wed, 03 Mar 2010)
New Revision: 18808
Trac: http://svn.gnucash.org/trac/changeset/18808

Modified:
   gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c
Log:
Use "template-account" property to get/set template account.


Modified: gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c	2010-03-04 00:56:41 UTC (rev 18807)
+++ gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.c	2010-03-04 00:58:28 UTC (rev 18808)
@@ -55,9 +55,6 @@
 
 #define SX_MAX_NAME_LEN 2048
 
-static /*@ null @*/ gpointer get_template_acct( gpointer pObject );
-static void set_template_acct( gpointer pObject, /*@ null @*/ gpointer pValue );
-
 static const GncSqlColumnTableEntry col_table[] =
 {
 	/*@ -full_init_block @*/
@@ -74,41 +71,12 @@
     { "adv_creation",      CT_INT,        0,               COL_NNUL,          "advance-creation-days" },
     { "adv_notify",        CT_INT,        0,               COL_NNUL,          "advance-reminder-days" },
 	{ "instance_count",    CT_INT,        0,               COL_NNUL,          "instance-count" },
-    { "template_act_guid", CT_ACCOUNTREF, 0,               COL_NNUL,          NULL, NULL,
-			(QofAccessFunc)get_template_acct, set_template_acct },
+    { "template_act_guid", CT_ACCOUNTREF, 0,               COL_NNUL,          "template-account" },
     { NULL }
 	/*@ +full_init_block @*/
 };
 
 /* ================================================================= */
-
-static gpointer
-get_template_acct( gpointer pObject )
-{
-    const SchedXaction* pSx;
-
-	g_return_val_if_fail( pObject != NULL, NULL );
-	g_return_val_if_fail( GNC_IS_SX(pObject), NULL );
-
-    pSx = GNC_SX(pObject);
-    return pSx->template_acct;
-}
-
-static void 
-set_template_acct( gpointer pObject, gpointer pValue )
-{
-    SchedXaction* pSx;
-	Account* pAcct;
-
-	g_return_if_fail( pObject != NULL && GNC_IS_SX(pObject) );
-	g_return_if_fail( pValue != NULL && GNC_IS_ACCOUNT(pValue) );
-
-    pSx = GNC_SX(pObject);
-    pAcct = GNC_ACCOUNT(pValue);
-	sx_set_template_account( pSx, pAcct );
-}
-
-/* ================================================================= */
 static /*@ null @*/ SchedXaction*
 load_single_sx( GncSqlBackend* be, GncSqlRow* row )
 {



More information about the gnucash-changes mailing list