mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
Fixed FIXME's, cleaned up string literals.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5063 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d7ce67bb66
commit
ad7945d7f6
@ -1,3 +1,12 @@
|
||||
2001-08-02 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/engine/SchedXaction.c (xaccSchedXactionSetEndDate): Reject
|
||||
bad data, log warning. (xaccSchedXactionSetRemOccur): ditto.
|
||||
(xaccSchedXactionSetSplits): remove already-#if'd out function.
|
||||
|
||||
* src/engine/gnc-schedxaction-xml-v2.c: #define more tags.
|
||||
|
||||
|
||||
2001-08-01 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/engine/SchedXaction.{ch}: modified indenting to 2 spaces.
|
||||
|
@ -70,7 +70,6 @@ xaccSchedXactionInit( SchedXaction *sx, GNCBook *book)
|
||||
sx->advanceRemindDays = 0;
|
||||
sx->dirty = TRUE;
|
||||
|
||||
/* sx->templateSplits = NULL; */
|
||||
/* create a new template account for our splits */
|
||||
sx->template_acct = xaccMallocAccount();
|
||||
name = guid_to_string( &sx->guid );
|
||||
@ -223,13 +222,25 @@ xaccSchedXactionSetEndDate( SchedXaction *sx, GDate *newEnd )
|
||||
{
|
||||
if ( g_date_valid( newEnd ) ) {
|
||||
if ( g_date_compare( newEnd, &sx->start_date ) < 0 ) {
|
||||
/* FIXME:error
|
||||
error( "New end date before start date" ); */
|
||||
/* XXX: I reject the bad data - is this the right
|
||||
* thing to do <rgmerk>.
|
||||
* This warning is only human readable - the caller
|
||||
* doesn't know the call failed. This is bad
|
||||
*/
|
||||
PWARN( "New end date before start date" );
|
||||
}
|
||||
else
|
||||
{
|
||||
sx->end_date = *newEnd;
|
||||
sx->dirty = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sx->end_date = *newEnd;
|
||||
sx->dirty = TRUE;
|
||||
else
|
||||
{
|
||||
PWARN("New end date invalid");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
GDate*
|
||||
@ -278,11 +289,15 @@ xaccSchedXactionSetRemOccur( SchedXaction *sx,
|
||||
{
|
||||
/* FIXME This condition can be tightened up */
|
||||
if ( numRemain > sx->num_occurances_total ) {
|
||||
/* FIXME:error
|
||||
error( "more remaining occurances than total" ); */
|
||||
PWARN("The number remaining is greater than the \
|
||||
total occurrences");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
sx->num_occurances_remain = numRemain;
|
||||
sx->dirty = TRUE;
|
||||
}
|
||||
sx->num_occurances_remain = numRemain;
|
||||
sx->dirty = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -457,23 +472,6 @@ xaccSchedXactionGetSplits( SchedXaction *sx )
|
||||
return xaccAccountGetSplitList(sx->template_acct);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: This can be removed, I think <rgmerk>
|
||||
*/
|
||||
|
||||
#if 0
|
||||
void
|
||||
xaccSchedXactionSetSplits( SchedXaction *sx, GList *newSplits )
|
||||
{
|
||||
g_return_if_fail( sx );
|
||||
sx->templateSplits = newSplits;
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
xaccSchedXactionSetDirtyness( SchedXaction *sx, gboolean dirty_p)
|
||||
{
|
||||
|
@ -121,6 +121,14 @@ static short module = MOD_SX;
|
||||
#define SX_SLOTS "sx:slots"
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: These should be defined in a header somewhere
|
||||
*/
|
||||
|
||||
#define GNC_ACCOUNT_TAG "gnc:account"
|
||||
#define GNC_TRANSACTION_TAG "gnc:transaction"
|
||||
#define GNC_SCHEDXACTION_TAG "gnc:schedxaction"
|
||||
|
||||
const gchar *schedxaction_version_string = "1.0.0";
|
||||
|
||||
xmlNodePtr
|
||||
@ -135,7 +143,7 @@ gnc_schedXaction_dom_tree_create(SchedXaction *sx)
|
||||
templ_acc_guid = xaccAccountGetGUID(sx->template_acct);
|
||||
|
||||
/* FIXME: this should be the same as the def in io-gncxml-v2.c */
|
||||
ret = xmlNewNode( NULL, "gnc:schedxaction" );
|
||||
ret = xmlNewNode( NULL, GNC_SCHEDXACTION_TAG );
|
||||
|
||||
xmlSetProp( ret, "version", schedxaction_version_string );
|
||||
|
||||
@ -466,7 +474,12 @@ gnc_schedXaction_end_handler(gpointer data_for_children,
|
||||
}
|
||||
DEBUG( "Got template account with name \"%s\" for SX with GUID \"%s\"",
|
||||
xaccAccountGetName( acct ), id );
|
||||
/* FIXME: free existing template account. */
|
||||
/* FIXME: free existing template account.
|
||||
* HUH????? We only execute this if there isn't
|
||||
* currently an existing template account, don't we?
|
||||
* <rgmerk>
|
||||
*/
|
||||
|
||||
sx->template_acct = acct;
|
||||
}
|
||||
|
||||
@ -532,13 +545,10 @@ tt_trn_handler( xmlNodePtr node, gpointer data )
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: These tags should be #defined elsewhere
|
||||
*/
|
||||
|
||||
struct dom_tree_handler tt_dom_handlers[] = {
|
||||
{ "gnc:account", tt_act_handler, 0, 0 },
|
||||
{ "gnc:transaction", tt_trn_handler, 0, 0 },
|
||||
{ GNC_ACCOUNT_TAG, tt_act_handler, 0, 0 },
|
||||
{ GNC_TRANSACTION_TAG, tt_trn_handler, 0, 0 },
|
||||
};
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user