oops, fix multiple invocations

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@256 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1997-12-03 23:10:22 +00:00
parent 04aacb5c25
commit eb5ae2a3e0

View File

@ -183,9 +183,6 @@ xaccMainWindowAddAcct (Widget acctrix, AccountGroup *grp, int depth )
XmNshadowThickness, 0,
XmNarrowDirection, XmARROW_DOWN,
NULL);
}
XbaeMatrixSetCellWidget (acctrix, currow, XACC_MAIN_ACC_ARRW, acc->arrowb);
XtManageChild (acc->arrowb);
XtAddCallback (acc->arrowb, XmNactivateCallback,
expandListCB, (XtPointer *) acc);
@ -202,6 +199,9 @@ xaccMainWindowAddAcct (Widget acctrix, AccountGroup *grp, int depth )
(XtPointer) acc);
#endif /* __XACC_DO_ARROW_CALLBACK */
}
XbaeMatrixSetCellWidget (acctrix, currow, XACC_MAIN_ACC_ARRW, acc->arrowb);
XtManageChild (acc->arrowb);
/* recursively display children accounts */
if (acc->expand) {
@ -214,6 +214,16 @@ xaccMainWindowAddAcct (Widget acctrix, AccountGroup *grp, int depth )
*/
if (acc->arrowb) {
XbaeMatrixSetCellWidget (acctrix, currow, XACC_MAIN_ACC_ARRW, NULL);
XtRemoveCallback (acc->arrowb, XmNactivateCallback,
expandListCB, (XtPointer *) acc);
#ifdef __XACC_DO_ARROW_CALLBACK
acc->PreviousArrowReason = 0;
XtRemoveEventHandler(acc->arrowb,
ButtonPressMask | ButtonReleaseMask,
False, (XtEventHandler) ArrowEventCallback,
(XtPointer) acc);
#endif /* __XACC_DO_ARROW_CALLBACK */
XtUnmanageChild (acc->arrowb);
XtDestroyWidget (acc->arrowb);
acc->arrowb = NULL;