mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
04aacb5c25
commit
eb5ae2a3e0
@ -183,25 +183,25 @@ xaccMainWindowAddAcct (Widget acctrix, AccountGroup *grp, int depth )
|
|||||||
XmNshadowThickness, 0,
|
XmNshadowThickness, 0,
|
||||||
XmNarrowDirection, XmARROW_DOWN,
|
XmNarrowDirection, XmARROW_DOWN,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
|
||||||
XbaeMatrixSetCellWidget (acctrix, currow, XACC_MAIN_ACC_ARRW, acc->arrowb);
|
|
||||||
XtManageChild (acc->arrowb);
|
|
||||||
|
|
||||||
XtAddCallback (acc->arrowb, XmNactivateCallback,
|
XtAddCallback (acc->arrowb, XmNactivateCallback,
|
||||||
expandListCB, (XtPointer *) acc);
|
expandListCB, (XtPointer *) acc);
|
||||||
|
|
||||||
#define __XACC_DO_ARROW_CALLBACK
|
#define __XACC_DO_ARROW_CALLBACK
|
||||||
#ifdef __XACC_DO_ARROW_CALLBACK
|
#ifdef __XACC_DO_ARROW_CALLBACK
|
||||||
/* add a button press event handler just in case the
|
/* add a button press event handler just in case the
|
||||||
* XmNactivate callback is broken. See notes for the
|
* XmNactivate callback is broken. See notes for the
|
||||||
* ArrowEventCallback for details. -- Linas */
|
* ArrowEventCallback for details. -- Linas */
|
||||||
acc->PreviousArrowReason = 0;
|
acc->PreviousArrowReason = 0;
|
||||||
XtAddEventHandler(acc->arrowb,
|
XtAddEventHandler(acc->arrowb,
|
||||||
ButtonPressMask | ButtonReleaseMask,
|
ButtonPressMask | ButtonReleaseMask,
|
||||||
False, (XtEventHandler) ArrowEventCallback,
|
False, (XtEventHandler) ArrowEventCallback,
|
||||||
(XtPointer) acc);
|
(XtPointer) acc);
|
||||||
#endif /* __XACC_DO_ARROW_CALLBACK */
|
#endif /* __XACC_DO_ARROW_CALLBACK */
|
||||||
|
|
||||||
|
}
|
||||||
|
XbaeMatrixSetCellWidget (acctrix, currow, XACC_MAIN_ACC_ARRW, acc->arrowb);
|
||||||
|
XtManageChild (acc->arrowb);
|
||||||
|
|
||||||
/* recursively display children accounts */
|
/* recursively display children accounts */
|
||||||
if (acc->expand) {
|
if (acc->expand) {
|
||||||
@ -214,6 +214,16 @@ xaccMainWindowAddAcct (Widget acctrix, AccountGroup *grp, int depth )
|
|||||||
*/
|
*/
|
||||||
if (acc->arrowb) {
|
if (acc->arrowb) {
|
||||||
XbaeMatrixSetCellWidget (acctrix, currow, XACC_MAIN_ACC_ARRW, NULL);
|
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);
|
XtUnmanageChild (acc->arrowb);
|
||||||
XtDestroyWidget (acc->arrowb);
|
XtDestroyWidget (acc->arrowb);
|
||||||
acc->arrowb = NULL;
|
acc->arrowb = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user