Take out account group guids.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2482 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-06-19 20:22:54 +00:00
parent dc99c087e5
commit e5788c1ba2
5 changed files with 12 additions and 68 deletions

View File

@ -1,5 +1,12 @@
2000-06-19 Dave Peticolas <dave@krondo.com>
* src/guile/gnc.gwp: take out GUIDs for Groups.
* src/engine/Group.c: take out GUIDs for Groups. Groups are really
just lists with no additional structure, and giving them GUIDs
complicates matters without adding any utility. You can always use
the parent account GUID instead.
* src/gnome/top-level.c: configure list auto-popping from here.
* src/register/gnome/combocell-gnome.c: determine whether or not

View File

@ -26,11 +26,11 @@
/* This file defines an API for using gnucash entity identifiers.
*
* Identifiers can be used to reference Account Groups, Accounts,
* Transactions, and Splits. These four Gnucash types are referred to
* as Gnucash entities. Identifiers are globally-unique and permanent,
* i.e., once an entity has been assigned an identifier, it retains
* that same identifier for its lifetime.
* Identifiers can be used to reference Accounts, Transactions, and
* Splits. These four Gnucash types are referred to as Gnucash
* entities. Identifiers are globally-unique and permanent, i.e., once
* an entity has been assigned an identifier, it retains that same
* identifier for its lifetime.
*
* Identifiers can be encoded as hex strings. */
@ -52,7 +52,6 @@ typedef enum
{
GNC_ID_NONE = 0,
GNC_ID_NULL,
GNC_ID_GROUP,
GNC_ID_ACCOUNT,
GNC_ID_TRANS,
GNC_ID_SPLIT,

View File

@ -61,9 +61,6 @@ xaccInitializeAccountGroup (AccountGroup *grp)
grp->balance = 0.0;
xaccGUIDNew(&grp->guid);
xaccStoreEntity(grp, &grp->guid, GNC_ID_GROUP);
grp->backend = NULL;
}
@ -91,8 +88,6 @@ xaccFreeAccountGroup( AccountGroup *grp )
if (NULL == grp) return;
xaccRemoveEntity(&grp->guid);
for( i=0; i<grp->numAcc; i++ )
xaccFreeAccount( grp->account[i] );
@ -153,44 +148,6 @@ xaccGroupNotSaved (AccountGroup *grp)
return 0;
}
/********************************************************************\
\********************************************************************/
const GUID *
xaccGroupGetGUID (AccountGroup *group)
{
if (!group)
return xaccGUIDNULL();
return &group->guid;
}
/********************************************************************\
\********************************************************************/
void
xaccGroupSetGUID (AccountGroup *group, GUID *guid)
{
if (!group || !guid) return;
xaccRemoveEntity(&group->guid);
group->guid = *guid;
xaccStoreEntity(group, &group->guid, GNC_ID_GROUP);
}
/********************************************************************\
\********************************************************************/
AccountGroup *
xaccGroupLookup (const GUID *guid)
{
if (!guid) return NULL;
return xaccLookupEntity(guid, GNC_ID_GROUP);
}
/********************************************************************\
* Get the number of accounts, including subaccounts *
\********************************************************************/

View File

@ -36,17 +36,6 @@
AccountGroup *xaccMallocAccountGroup( void );
void xaccFreeAccountGroup( AccountGroup *account_group );
/*
* The xaccGroupGetGUID() subroutine will return the
* globally unique id associated with that group.
*
* The xaccGroupLookup() subroutine will return the
* group associated with the given id, or NULL
* if there is no such group.
*/
const GUID * xaccGroupGetGUID (AccountGroup *group);
AccountGroup * xaccGroupLookup (const GUID *guid);
/*
* The xaccConcatGroups() subroutine will move all accounts
* from the "from" group to the "to" group

View File

@ -53,18 +53,10 @@ struct _account_group {
int numAcc; /* number of accounts in array */
Account **account; /* array of account pointers */
GUID guid; /* globally unique id */
Backend *backend; /* persistant storage backend */
/* cached parameters */
double balance;
};
/* Set the group's GUID. This should only be done when reading
* a group from a datafile, or some other external source. Never
* call this on an existing group! */
void xaccGroupSetGUID (AccountGroup *group, GUID *guid);
#endif /* __XACC_ACCOUNT_GROUP_P_H__ */