mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug fixes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2468 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a293c1bf94
commit
4a64186a5c
@ -1,7 +1,10 @@
|
||||
2000-06-13 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/engine/Account.c (xaccAccountRemoveSplit): recompute the
|
||||
balance after removal.
|
||||
* src/SplitLedger.c: refresh the main window before refreshing the
|
||||
register. This makes sure balances are recomputed first.
|
||||
|
||||
* src/engine/Transaction.c (xaccSplitSetBaseValue): mark the split
|
||||
as having changed.
|
||||
|
||||
* src/gnome/gnc-currency-edit.c: loosen the restrictions on what
|
||||
can be typed in. The 'currency' could potentially be a stock
|
||||
|
@ -921,8 +921,8 @@ LedgerAutoCompletion(SplitRegister *reg, gncTableTraversalDir dir,
|
||||
refresh_accounts = gnc_trans_prepend_account_list(trans,
|
||||
refresh_accounts);
|
||||
|
||||
gnc_account_glist_ui_refresh(refresh_accounts);
|
||||
gnc_refresh_main_window();
|
||||
gnc_account_glist_ui_refresh(refresh_accounts);
|
||||
|
||||
g_list_free(refresh_accounts);
|
||||
|
||||
@ -1652,8 +1652,8 @@ xaccSRDuplicateCurrent (SplitRegister *reg)
|
||||
}
|
||||
|
||||
/* Refresh the GUI. */
|
||||
gnc_transaction_ui_refresh(trans);
|
||||
gnc_refresh_main_window();
|
||||
gnc_transaction_ui_refresh(trans);
|
||||
|
||||
return return_split;
|
||||
}
|
||||
@ -1887,8 +1887,8 @@ xaccSRPasteCurrent (SplitRegister *reg)
|
||||
accounts = gnc_trans_prepend_account_list(trans, accounts);
|
||||
|
||||
/* Refresh the GUI. */
|
||||
gnc_account_glist_ui_refresh(accounts);
|
||||
gnc_refresh_main_window();
|
||||
gnc_account_glist_ui_refresh(accounts);
|
||||
|
||||
g_list_free(accounts);
|
||||
}
|
||||
@ -1942,11 +1942,10 @@ xaccSRDeleteCurrentSplit (SplitRegister *reg)
|
||||
pending_trans = NULL;
|
||||
}
|
||||
|
||||
gnc_refresh_main_window ();
|
||||
gnc_account_glist_ui_refresh(accounts);
|
||||
|
||||
g_list_free(accounts);
|
||||
|
||||
gnc_refresh_main_window ();
|
||||
}
|
||||
|
||||
/* ======================================================== */
|
||||
@ -2011,11 +2010,10 @@ xaccSRDeleteCurrentTrans (SplitRegister *reg)
|
||||
pending_trans = NULL;
|
||||
}
|
||||
|
||||
gnc_refresh_main_window ();
|
||||
gnc_account_glist_ui_refresh(accounts);
|
||||
|
||||
g_list_free(accounts);
|
||||
|
||||
gnc_refresh_main_window ();
|
||||
}
|
||||
|
||||
/* ======================================================== */
|
||||
@ -2085,12 +2083,11 @@ xaccSREmptyCurrentTrans (SplitRegister *reg)
|
||||
pending_trans = NULL;
|
||||
}
|
||||
|
||||
gnc_refresh_main_window ();
|
||||
gnc_account_glist_ui_refresh(accounts);
|
||||
|
||||
g_list_free(accounts);
|
||||
g_list_free(splits);
|
||||
|
||||
gnc_refresh_main_window ();
|
||||
}
|
||||
|
||||
/* ======================================================== */
|
||||
@ -2171,8 +2168,8 @@ xaccSRRedrawRegEntry (SplitRegister *reg)
|
||||
* to affect any account windows associated with the other splits
|
||||
* in this transaction. So basically, send redraw events to all
|
||||
* of the splits. */
|
||||
gnc_transaction_ui_refresh(trans);
|
||||
gnc_refresh_main_window();
|
||||
gnc_transaction_ui_refresh(trans);
|
||||
}
|
||||
|
||||
/* ======================================================== */
|
||||
@ -2474,8 +2471,8 @@ xaccSRSaveRegEntry (SplitRegister *reg, gncBoolean do_commit)
|
||||
xaccSplitRegisterClearChangeFlag(reg);
|
||||
|
||||
if (refresh_accounts != NULL) {
|
||||
gnc_account_glist_ui_refresh(refresh_accounts);
|
||||
gnc_refresh_main_window();
|
||||
gnc_account_glist_ui_refresh(refresh_accounts);
|
||||
g_list_free(refresh_accounts);
|
||||
}
|
||||
|
||||
|
@ -488,8 +488,6 @@ xaccAccountRemoveSplit ( Account *acc, Split *split )
|
||||
|
||||
/* make sure the array is NULL terminated */
|
||||
acc->splits[acc->numSplits] = NULL;
|
||||
|
||||
xaccAccountRecomputeBalance (acc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -282,6 +282,8 @@ xaccCountSplits (Split **tarray)
|
||||
|
||||
void xaccSplitSetSharePriceAndAmount (Split *s, double price, double amt)
|
||||
{
|
||||
if (!s) return;
|
||||
|
||||
MARK_SPLIT(s);
|
||||
s -> share_price = price;
|
||||
s -> damount = amt;
|
||||
@ -292,6 +294,8 @@ void xaccSplitSetSharePriceAndAmount (Split *s, double price, double amt)
|
||||
|
||||
void xaccSplitSetSharePrice (Split *s, double amt)
|
||||
{
|
||||
if (!s) return;
|
||||
|
||||
MARK_SPLIT(s);
|
||||
s -> share_price = amt;
|
||||
|
||||
@ -301,6 +305,8 @@ void xaccSplitSetSharePrice (Split *s, double amt)
|
||||
|
||||
void xaccSplitSetShareAmount (Split *s, double amt)
|
||||
{
|
||||
if (!s) return;
|
||||
|
||||
MARK_SPLIT(s);
|
||||
s -> damount = amt;
|
||||
|
||||
@ -310,6 +316,8 @@ void xaccSplitSetShareAmount (Split *s, double amt)
|
||||
|
||||
void xaccSplitSetValue (Split *s, double amt)
|
||||
{
|
||||
if (!s) return;
|
||||
|
||||
MARK_SPLIT(s);
|
||||
/* remember, damount is actually share price */
|
||||
s -> damount = amt / (s->share_price);
|
||||
@ -570,6 +578,8 @@ xaccSplitSetBaseValue (Split *s, double value, const char * base_currency)
|
||||
{
|
||||
if (!s) return;
|
||||
|
||||
MARK_SPLIT(s);
|
||||
|
||||
/* Novice/casual users may not want or use the double entry
|
||||
* features of this engine. So, in particular, there
|
||||
* may be the occasional split without a parent account.
|
||||
|
@ -20,7 +20,7 @@ EXTRA_DIST = \
|
||||
examples/scan-acct.pl \
|
||||
perl5_swig_annotations.i
|
||||
|
||||
CFLAGS += ${GNOME_CFLAGS} -Dbool=char
|
||||
CFLAGS = @CFLAGS@ ${GNOME_CFLAGS} -Dbool=char
|
||||
|
||||
INCLUDES = \
|
||||
-I@PERLINCL@/CORE \
|
||||
@ -68,7 +68,13 @@ SWIG_INPUT_HDRS := \
|
||||
## aren't named lib*.so...
|
||||
install-data-local: libgncswig.la
|
||||
cd ${perllibdir} && rm -f gnucash.so
|
||||
cd ${perllibdir} && ln -s libgncswig.so gnucash.so
|
||||
if [ -f ${perllibdir}/libgncswig.so ]; then \
|
||||
cd ${perllibdir} && ln -s libgncswig.so gnucash.so; \
|
||||
elif [ -f ${perllibdir}/libgncswig.so.1.1 ]; then \
|
||||
cd ${perllibdir} && ln -s libgncswig.so.1.1 gnucash.so; \
|
||||
else \
|
||||
echo "Can't find libgncswig shared library!"; \
|
||||
fi
|
||||
|
||||
uninstall-local:
|
||||
rm -f ${perllibdir}/gnucash.so
|
||||
|
@ -134,7 +134,7 @@ noinst_HEADERS = helperfuncs.h
|
||||
EXTRA_DIST = .cvsignore examples/scan-acct.pl perl5_swig_annotations.i
|
||||
|
||||
|
||||
CFLAGS = ${GNOME_CFLAGS} -Dbool=char
|
||||
CFLAGS = @CFLAGS@ ${GNOME_CFLAGS} -Dbool=char
|
||||
|
||||
INCLUDES = -I@PERLINCL@/CORE -I${top_srcdir}/src/engine
|
||||
|
||||
@ -450,7 +450,13 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
install-data-local: libgncswig.la
|
||||
cd ${perllibdir} && rm -f gnucash.so
|
||||
cd ${perllibdir} && ln -s libgncswig.so gnucash.so
|
||||
if [ -f ${perllibdir}/libgncswig.so ]; then \
|
||||
cd ${perllibdir} && ln -s libgncswig.so gnucash.so; \
|
||||
elif [ -f ${perllibdir}/libgncswig.so.1.1 ]; then \
|
||||
cd ${perllibdir} && ln -s libgncswig.so.1.1 gnucash.so; \
|
||||
else \
|
||||
echo "Can't find libgncswig shared library!"; \
|
||||
fi
|
||||
|
||||
uninstall-local:
|
||||
rm -f ${perllibdir}/gnucash.so
|
||||
|
Loading…
Reference in New Issue
Block a user