mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Use xaccGroupGetAccountList instead of old api.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3364 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
47a0ffaca7
commit
d8dca024bf
@ -718,32 +718,33 @@ xml_add_account_restorer(xmlNodePtr p, Account* a) {
|
|||||||
{
|
{
|
||||||
AccountGroup *g = xaccAccountGetChildren(a);
|
AccountGroup *g = xaccAccountGetChildren(a);
|
||||||
if(g) {
|
if(g) {
|
||||||
guint32 num_accounts = xaccGroupGetNumAccounts(g);
|
GList *list = xaccGroupGetAccountList (g);
|
||||||
guint32 i = 0;
|
GList *node;
|
||||||
while(i < num_accounts) {
|
|
||||||
Account *current_acc = xaccGroupGetAccount(g, i);
|
|
||||||
|
|
||||||
if(!xml_add_account_restorer(p, current_acc)) return(FALSE);
|
for (node = list; node; node = node->next) {
|
||||||
i++;
|
Account *current_acc = node->data;
|
||||||
|
|
||||||
|
if(!xml_add_account_restorer(p, current_acc))
|
||||||
|
return(FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
xml_add_account_restorers(xmlNodePtr p, AccountGroup *g) {
|
xml_add_account_restorers(xmlNodePtr p, AccountGroup *g) {
|
||||||
guint32 i = 0;
|
GList *list;
|
||||||
guint32 num_accounts;
|
GList *node;
|
||||||
|
|
||||||
if(!p) return(FALSE);
|
if(!p) return(FALSE);
|
||||||
if(!g) return(FALSE);
|
if(!g) return(FALSE);
|
||||||
|
|
||||||
num_accounts = xaccGroupGetNumAccounts(g);
|
list = xaccGroupGetAccountList (g);
|
||||||
while(i < num_accounts) {
|
|
||||||
Account *current_acc = xaccGroupGetAccount(g, i);
|
for (node = list; node; node = node->next) {
|
||||||
|
Account *current_acc = node->data;
|
||||||
xml_add_account_restorer(p, current_acc);
|
xml_add_account_restorer(p, current_acc);
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user