From 641055dcf34e0c8c4695aa903f5bfe0e862913cc Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Wed, 23 May 2001 09:42:34 +0000 Subject: [PATCH] 2001-05-23 Dave Peticolas * src/doc/design/gnucash-design.texinfo: update docs * src/doc/design/engine.texinfo: update docs * src/gnome/window-reconcile.c (startRecnWindow): fix bug git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4265 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 6 +++ src/doc/design/engine.texinfo | 77 ++++++++++++++++++++++++++- src/doc/design/gnucash-design.texinfo | 5 ++ src/gnome/window-reconcile.c | 3 +- 4 files changed, 89 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fe4413b00..720a9b848d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2001-05-23 Dave Peticolas + * src/doc/design/gnucash-design.texinfo: update docs + + * src/doc/design/engine.texinfo: update docs + + * src/gnome/window-reconcile.c (startRecnWindow): fix bug + * src/scm/bootstrap.scm.in: fix test for slib 2001-05-22 Christian Stimming diff --git a/src/doc/design/engine.texinfo b/src/doc/design/engine.texinfo index 79e57a7584..7ac18ee68c 100644 --- a/src/doc/design/engine.texinfo +++ b/src/doc/design/engine.texinfo @@ -2097,9 +2097,10 @@ Account Groups do not have key-value frames or GUIDs. @menu * General Account Group API:: +* Account Group Account API:: @end menu -@node General Account Group API, , Account Groups, Account Groups +@node General Account Group API, Account Group Account API, Account Groups, Account Groups @subsection General Account Group API @deftypefun {AccountGroup *} xaccMallocAccountGroup (void) @@ -2116,6 +2117,80 @@ Recursively call @code{xaccAccountCommitEdit} on all child accounts and their children. @end deftypefun +@deftypefun void xaccGroupConcatGroup (AccountGroup * @var{to}, AccountGroup * @var{from}) +Move all accounts in @var{from} to @var{to}. After this function +returns, @var{from} will have been destroyed. +@end deftypefun + +@deftypefun void xaccGroupMergeAccounts (AccountGroup * @var{grp}) +Merge all accounts in @var{grp} that have the same name and description. +The semantics of this function are rather complex. Consult the +implementation before use! +@end deftypefun + +@deftypefun gboolean xaccGroupNotSaved (AccountGroup * @var{grp}) +Return true if @var{grp} has changes which have not been saved. +@end deftypefun + +@deftypefun void xaccGroupMarkSaved (AccountGroup * @var{grp}) +Mark @var{grp} and all its children as saved. +@end deftypefun + +@deftypefun void xaccGroupMarkNotSaved (AccountGroup * @var{grp}) +Mark @var{grp} as not saved. +@end deftypefun + +@deftypefun void xaccGroupMarkDoFree (AccountGroup * @var{grp}) +Mark all accounts in @var{grp} as slated for destruction. This will +improve the efficiency of destroying a large account hierarchy. +@end deftypefun + + +@node Account Group Account API, , General Account Group API, Account Groups +@subsection Account Group Account API + +@deftypefun void xaccGroupRemoveAccount (AccountGroup * @var{grp}, Account * @var{account}) +Remove @var{account} from @var{grp}. If @var{account} is not in +@var{grp}, the function will return without performing any action. +In no case will @var{account} be destroyed or modified. +@end deftypefun + +@deftypefun void xaccAccountRemoveGroup (Account * @var{acc}) +Remove @var{acc}'s child group. The child group is not otherwise +modified or destroyed. +@end deftypefun + +@deftypefun void xaccGroupInsertAccount (AccountGroup * @var{grp}, Account * @var{acc}) +Add @var{acc} to @var{grp}. If @var{acc} is in another Group, it will be +removed first. +@end deftypefun + +@deftypefun void xaccAccountInsertSubAccount (Account * @var{parent}, Account * @var{child}) +Like @code{xaccGroupInsertAccount}, but uses a parent Account instead +of a parent group. If @var{parent} does not have a child Group, one +will be created. +@end deftypefun + +@deftypefun int xaccGroupGetNumSubAccounts (AccountGroup * @var{grp}) +Return the total number of Accounts in the hierarchy rooted at @var{grp}. +@end deftypefun + +@deftypefun int xaccGroupGetNumAccounts (AccountGroup * @var{grp}) +Return the number of accounts in @var{grp}. This count does not +include Accounts lower in the hierarchy. +@end deftypefun + +@deftypefun int xaccGroupGetDepth (AccountGroup * @var{grp}) +Returns the length of the longest tree branch in the hierarchy +rooted at @var{grp}. Each link between an Account and its +(non-null) children counts as one unit of length. +@end deftypefun + +@deftypefun {Account *} xaccGroupGetAccount (AccountGroup * @var{group}, int @var{index}) +Return the @var{index}th Account in @var{group}, starting at zero. +If @var{index} is out of range, @code{NULL} is returned. +@end deftypefun + @node GNCBooks, Scrub, Account Groups, Engine @section GNCBooks diff --git a/src/doc/design/gnucash-design.texinfo b/src/doc/design/gnucash-design.texinfo index 7d51fdee61..4e49465c38 100644 --- a/src/doc/design/gnucash-design.texinfo +++ b/src/doc/design/gnucash-design.texinfo @@ -143,6 +143,11 @@ Accounts * Account Type API:: * Account Getters:: +Account Groups + +* General Account Group API:: +* Account Group Account API:: + GNCBooks * GNCBook API:: diff --git a/src/gnome/window-reconcile.c b/src/gnome/window-reconcile.c index e5e0273b7b..b0763d0f8b 100644 --- a/src/gnome/window-reconcile.c +++ b/src/gnome/window-reconcile.c @@ -496,7 +496,8 @@ startRecnWindow(GtkWidget *parent, Account *account, gtk_widget_show_all(dialog); - gtk_widget_grab_focus(end_value); + gtk_widget_grab_focus(gnc_amount_edit_gtk_entry + (GNC_AMOUNT_EDIT (end_value))); } while (TRUE)