diff --git a/configure.ac b/configure.ac index 4bfed8cbfd..2a6ef1ead7 100644 --- a/configure.ac +++ b/configure.ac @@ -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}" diff --git a/src/python/init.py b/src/python/init.py index 81807934c5..59a49c1ddc 100644 --- a/src/python/init.py +++ b/src/python/init.py @@ -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() diff --git a/src/report/standard-reports/transaction.scm b/src/report/standard-reports/transaction.scm index 210722bd79..84345ebd85 100644 --- a/src/report/standard-reports/transaction.scm +++ b/src/report/standard-reports/transaction.scm @@ -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) diff --git a/src/scm/price-quotes.scm b/src/scm/price-quotes.scm index 354e3f1d1b..7daacd0cec 100644 --- a/src/scm/price-quotes.scm +++ b/src/scm/price-quotes.scm @@ -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)