Merge branch 'maint'

* Fix price quotes after removal of yahoo-get-historical-quotes
  * calculate num-columns-required in transaction report correctly
  * Additional changes to column calculations in transaction report
  * Fix configure.ac code that customizes parameters for specific gcc versions
  * Ignore SIGTTOU while importing Python console class.
This commit is contained in:
Mike Alexander 2014-04-27 16:42:34 -04:00
commit c7f4bf7fed
4 changed files with 33 additions and 9 deletions

View File

@ -1318,18 +1318,18 @@ then
# -Wdeclaration-after-statement in order to preserve source code
# compatibility to gcc 2.95 and other compilers.
GCC_VERSION=`${CC} -dumpversion`
if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 3; then
# This is gcc >= 3.x.x
if test "`echo ${GCC_VERSION} | cut -d. -f1`" -eq 3; then
# This is gcc 3.x.x
if test "`echo ${GCC_VERSION} | cut -d. -f2`" -ge 4; then
# This is gcc >= 3.4.x
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
# This is gcc == 4.x.x
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
# rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
fi
fi
else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
# This is gcc >= 4.x.x
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
# rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
fi
fi
AM_CFLAGS="${warnFLAGS} ${AM_CFLAGS}"
AM_CXXFLAGS="${warnXXFLAGS} ${AM_CXXFLAGS}"

View File

@ -8,8 +8,17 @@ sys.path.append(os.path.dirname(__file__))
noisy = gnc_prefs_is_extra_enabled()
if noisy:
print "woop", os.path.dirname(__file__)
# Importing the console class causes SIGTTOU to be thrown if GnuCash is
# started in the background. This causes a hang if it is not handled,
# so ignore it for the duration
import signal
old_sigttou = signal.signal(signal.SIGTTOU, signal.SIG_IGN)
import pycons.console as cons
# Restore the SIGTTOU handler
signal.signal(signal.SIGTTOU, old_sigttou)
if noisy:
print "Hello from python!"
print "test", sys.modules.keys()

View File

@ -355,7 +355,21 @@
(do ((i 0 (+ i 1))
(col-req 0 col-req))
((>= i columns-used-size) col-req)
(if (vector-ref columns-used i) (set! col-req (+ col-req 1)))))
; If column toggle is true, increase column count. But attention:
; some toggles only change the meaning of another toggle. Don't count these modifier toggles
(if (and (not (= i 12)) ; Skip Account Full Name toggle - modifies Account Name column
(not (= i 16)) ; Skip Other Account Full Name toggle - modifies Other Account Name column
(not (= i 17)) ; Skip Sort Account Code - modifies Account Name subheading
(not (= i 18)) ; Skip Sort Account Full Name - modifies Account Name subheading
(not (= i 19)) ; Skip Note toggle - modifies Memo column
(vector-ref columns-used i))
(set! col-req (+ col-req 1)))
; Account Code and Account Name share one column so if both were ticked the
; the check above would have set up one column too much. The check below
; will compensate these again.
(if (or (and (= i 14) (vector-ref columns-used 14) (vector-ref columns-used 4)) ; Account Code and Name
(and (= i 15) (vector-ref columns-used 15) (vector-ref columns-used 5))) ; Other Account Code and Name
(set! col-req (- col-req 1)))))
(define (build-column-used options)
(define (opt-val section name)

View File

@ -28,6 +28,7 @@
(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing.
(use-modules (gnucash gnc-module))
(use-modules (gnucash core-utils))
(use-modules (srfi srfi-1))
(gnc:module-load "gnucash/gnome-utils" 0) ;; for gnucash-ui-is-running
(gnc:module-load "gnucash/app-utils" 0)