mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'maint'
This commit is contained in:
commit
d8711619ce
@ -56,6 +56,7 @@ OPTION (WITH_AQBANKING "Build this project with aqbanking (online banking) suppo
|
||||
OPTION (WITH_GNUCASH "Build all of GnuCash, not just cutecash" ON)
|
||||
OPTION (WITH_CUTECASH "Also build cutecash" OFF)
|
||||
OPTION (WITH_OFX "compile with ofx support (needs LibOFX)" ON)
|
||||
OPTION (WITH_PYTHON "enable python plugin and bindings" OFF)
|
||||
OPTION (ENABLE_BINRELOC "compile with binary relocation support" ON)
|
||||
OPTION (ENABLE_DEBUG "compile with debugging flags set" OFF)
|
||||
OPTION (ENABLE_REGISTER2 "compile with register2 enabled" OFF)
|
||||
@ -100,6 +101,19 @@ IF (SHELL_FROM_ENV) # Replacing this with IF ($ENV{SHELL}) doesn't work.
|
||||
SET(SHELL ${SHELL_FROM_ENV})
|
||||
ENDIF()
|
||||
|
||||
# Determine whether we are building from a VCS or from a tarball
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${SHELL} ${CMAKE_SOURCE_DIR}/util/gnc-vcs-info -t ${CMAKE_SOURCE_DIR}
|
||||
RESULT_VARIABLE GNC_VCS_INFO_RESULT
|
||||
OUTPUT_VARIABLE GNC_VCS_INFO_OUTPUT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
SET(BUILDING_FROM_VCS "NO")
|
||||
IF (GNC_VCS_INFO_RESULT EQUAL 0)
|
||||
SET(BUILDING_FROM_VCS "YES")
|
||||
ENDIF()
|
||||
|
||||
IF (WIN32)
|
||||
# Help Windows find the various dependencies. We assume here that the standard advice for building
|
||||
# GnuCash has been followed and that these dependencies live underneath something like C:/GCDEV, which
|
||||
@ -124,6 +138,8 @@ IF (WIN32)
|
||||
SET(LIBXSLT_XSLTPROC_EXECUTABLE ${CMAKE_PREFIX_PATH}/libxslt/bin/xsltproc)
|
||||
# I have not yet debugged the intltool-merge file generation process on Windows.
|
||||
SET(NO_INTLTOOL TRUE)
|
||||
#Prevent creating a console window on startup.
|
||||
SET(CMAKE_EXE_LINKER_FLAGS -mwindows)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF (APPLE)
|
||||
@ -213,8 +229,10 @@ ENDIF (WIN32)
|
||||
# ############################################################
|
||||
|
||||
# SWIG
|
||||
FIND_PACKAGE (SWIG REQUIRED)
|
||||
INCLUDE (${SWIG_USE_FILE})
|
||||
IF(BUILDING_FROM_VCS)
|
||||
FIND_PACKAGE (SWIG REQUIRED)
|
||||
INCLUDE (${SWIG_USE_FILE})
|
||||
ENDIF()
|
||||
|
||||
# Find Guile and determine which version we are using.
|
||||
# First look for guile-2.0. If not found, try to locate guile-1.8
|
||||
@ -273,6 +291,31 @@ ENDIF (WITH_AQBANKING)
|
||||
|
||||
IF (WITH_OFX)
|
||||
GNC_PKG_CHECK_MODULES (LIBOFX REQUIRED libofx)
|
||||
INCLUDE(CheckCXXSourceRuns)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "-lofx")
|
||||
CHECK_CXX_SOURCE_RUNS("
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
extern time_t ofxdate_to_time_t(const std::string ofxdate);
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
const std::string timestr = \"20160319000000\";
|
||||
struct tm ts;
|
||||
ts.tm_year = 116;
|
||||
ts.tm_mon = 2;
|
||||
ts.tm_mday = 19;
|
||||
|
||||
setenv(\"TZ\", \"PST 08 PDT 07 M 4.1.0, M 10.6.0\", 1);
|
||||
time_t t = ofxdate_to_time_t(timestr);
|
||||
if (t == mktime(&ts))
|
||||
exit(1);
|
||||
exit(0);
|
||||
}
|
||||
" HAVE_OFX_BUG_39)
|
||||
SET(HAVE_OFX_BUG_39 ${HAVE_OFX_BUG_39})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||
ENDIF(WITH_OFX)
|
||||
# ############################################################
|
||||
|
||||
@ -323,6 +366,24 @@ ENDIF (WITH_SQL)
|
||||
|
||||
# ############################################################
|
||||
|
||||
IF (WITH_PYTHON)
|
||||
FIND_PACKAGE(PythonInterp)
|
||||
IF (NOT PYTHONINTERP_FOUND)
|
||||
MESSAGE(SEND_ERROR "Python support enabled, but Python interpreter not found.")
|
||||
ENDIF()
|
||||
|
||||
IF (PYTHON_VERSION_STRING VERSION_LESS "2.4.0")
|
||||
MESSAGE(SEND_ERROR "Found python version ${PYTHON_VERSION_STRING}, but it's too old. Need python >= 2.4.0")
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE(PythonLibs)
|
||||
IF (NOT PYTHONLIBS_FOUND)
|
||||
MESSAGE(SEND_ERROR "Python support enabled, but Python libraries not found.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
FIND_PACKAGE(Perl)
|
||||
|
||||
if (NOT PERL_FOUND)
|
||||
@ -446,6 +507,7 @@ ENDIF()
|
||||
ADD_SUBDIRECTORY (accounts)
|
||||
ADD_SUBDIRECTORY (checks)
|
||||
ADD_SUBDIRECTORY (doc)
|
||||
ADD_SUBDIRECTORY (packaging)
|
||||
ADD_SUBDIRECTORY (po)
|
||||
ADD_SUBDIRECTORY (src)
|
||||
|
||||
|
222
ChangeLog
222
ChangeLog
@ -1,6 +1,226 @@
|
||||
2016-09-16 John Ralls
|
||||
|
||||
* Synchronize translation project. (HEAD, maint)
|
||||
|
||||
2016-09-15 John Ralls
|
||||
|
||||
* Bug 769746 - Zero interest loan formula fails. (origin/maint)
|
||||
|
||||
2016-08-01 Robert Fewell
|
||||
|
||||
* Add option to recn cell type to be read only
|
||||
|
||||
2016-08-01 Robert Fewell
|
||||
|
||||
* Make a distinction between file/link Association
|
||||
|
||||
2016-08-01 Robert Fewell
|
||||
|
||||
* Indicate an Association in the Register
|
||||
|
||||
2016-09-13 John Ralls
|
||||
|
||||
* Bug 771379 - GnuCash doesn't support Russian Ruble Symbol
|
||||
|
||||
2016-09-12 Mike Evans
|
||||
|
||||
* Bug 771246 - Set Invoice/Bill items date correctly from imported CSV.
|
||||
|
||||
2016-09-11 John Ralls
|
||||
|
||||
* Bug 770181 - gnc-fq-dump incorrectly says "quote cannot be used...
|
||||
|
||||
2016-09-11 John Ralls
|
||||
|
||||
* Bug 761667 - Crash opening associated location that has no scheme
|
||||
|
||||
2016-09-11 John Ralls
|
||||
|
||||
* Australian (GMT-10) OFX transactions imported have previous days date
|
||||
|
||||
2016-09-08 Geert Janssens
|
||||
|
||||
* Bug 643025 - RFE: Ability to select and open multiple invoices
|
||||
|
||||
2016-09-07 Geert Janssens
|
||||
|
||||
* Bug 733153 - Ambiguous view of buttons in search dialog Linux version
|
||||
|
||||
2016-09-07 Geert Janssens
|
||||
|
||||
* Add small note the split action field is pre-filled by the business features
|
||||
|
||||
2016-08-03 Robert Fewell
|
||||
|
||||
* Bug 762901 [PATCH] Fix saving Account Treeview sort order.
|
||||
|
||||
2016-09-02 Serge Gebhardt
|
||||
|
||||
* Value "price" allowed in attr cd:type for element book (RELAX NG file)
|
||||
|
||||
2016-09-01 John Ralls
|
||||
|
||||
* Bug 769730 - Investments: Lots in This Account, Closed column shows
|
||||
|
||||
2016-08-26 Rob Gowin
|
||||
|
||||
* CMake improvements for SWIG handling and Python bindings.
|
||||
|
||||
2016-08-25 Geoff Lee
|
||||
|
||||
* Bug 770303 - Incorrect commodity match during import OFX and possible solution.
|
||||
|
||||
2016-08-25 John Ralls
|
||||
|
||||
* Whitespace cleanup in gnc_import_select_commodity.
|
||||
|
||||
2016-08-24 Geert Janssens
|
||||
|
||||
* SX - recalculate all occurrences of all SX if the calendar is updated to start on another month
|
||||
|
||||
2016-08-24 Geert Janssens
|
||||
|
||||
* SX Window: correctly show first sx on calendar when it is moved to next weekday
|
||||
|
||||
2016-08-24 Geert Janssens
|
||||
|
||||
* Bug 770136 - 'Reverse Order' in 'View'->'Sort by' is not saved
|
||||
|
||||
2016-08-22 John Ralls
|
||||
|
||||
* Bug 742461 - SQL backend doesn't update customer info
|
||||
|
||||
2016-08-22 Pierre-André Jacquod
|
||||
|
||||
* Bug 770196 - cppcheck va_list not closed
|
||||
|
||||
2016-08-21 John Ralls
|
||||
|
||||
* Revert "temporarily disable pre-logging messages."
|
||||
|
||||
2016-08-20 John Ralls
|
||||
|
||||
* Suppress the console window on launch when building with CMake on MSWin.
|
||||
|
||||
2016-08-20 John Ralls
|
||||
|
||||
* Merge branch 'maint' of ssh://code.gnucash.org/gnucash into maint
|
||||
|
||||
2016-08-19 John Ralls
|
||||
|
||||
* Bug 770113 - compiling issue with libdbi.
|
||||
|
||||
2016-08-19 John Ralls
|
||||
|
||||
* Fix compilation error in sqlite3_error_fn.
|
||||
|
||||
2016-08-18 John Ralls
|
||||
|
||||
* temporarily disable pre-logging messages.
|
||||
|
||||
2016-08-08 Stefan Talpalaru
|
||||
|
||||
* remove duplicate line
|
||||
|
||||
2016-08-08 Stefan Talpalaru
|
||||
|
||||
* fix compilation with guile-2.0.12
|
||||
|
||||
2016-04-28 fell
|
||||
|
||||
* Minor improvement of singe quote sources SIX*
|
||||
|
||||
2016-08-01 John Ralls
|
||||
|
||||
* Attempt to fix Travis test failure.
|
||||
|
||||
2016-07-31 fell
|
||||
|
||||
* de.po: merge new template
|
||||
|
||||
2016-07-31 fell
|
||||
|
||||
* Fix a typo in dialog invoice
|
||||
|
||||
2016-07-31 fell
|
||||
|
||||
* de.po: review of commit d5fa61d
|
||||
|
||||
2016-07-31 fell
|
||||
|
||||
* minor fix of de.po
|
||||
|
||||
2016-07-16 Marco Zietzling
|
||||
|
||||
* fixed some more German translations
|
||||
|
||||
2016-07-16 Marco Zietzling
|
||||
|
||||
* fixed some more German translations
|
||||
|
||||
2016-07-16 Marco Zietzling
|
||||
|
||||
* fixed some more German translations
|
||||
|
||||
2016-07-16 Marco Zietzling
|
||||
|
||||
* fixed German translations
|
||||
|
||||
2016-07-16 Rob Gowin
|
||||
|
||||
* Fixes to get CMake "MinGW Makefiles" generator to work. (github/maint)
|
||||
|
||||
2016-07-14 Rob Gowin
|
||||
|
||||
* Allow HTMLHELP_DIR to be specified on cmake command line
|
||||
|
||||
2016-07-12 Mike Evans
|
||||
|
||||
* Bug 756416 - CSV data with Posted information will always have last invoice not posted.
|
||||
|
||||
2016-07-08 John Ralls
|
||||
|
||||
* Tweak version.cmake to work on Windows.
|
||||
|
||||
2016-07-05 John Ralls
|
||||
|
||||
* Make CMake use the same scm-revision program as Autotools.
|
||||
|
||||
2016-07-03 John Ralls
|
||||
|
||||
* Clear the GDate before use.
|
||||
|
||||
2016-07-02 John Ralls
|
||||
|
||||
* Bug 137017 - date of transaction change with time zone change
|
||||
|
||||
2016-07-02 John Ralls
|
||||
|
||||
* Don't override optimization flags in CMakeLists.txt.
|
||||
|
||||
2016-07-02 Geert Janssens
|
||||
|
||||
* When default tax table is 'None', set a new invoice/bill entry as not taxabl by default as well.
|
||||
|
||||
2016-06-28 John Ralls
|
||||
|
||||
* Fix incomplete function name from 74fa556. (tag: 2.6.13b)
|
||||
|
||||
2016-06-27 John Ralls
|
||||
|
||||
* Reset release date to 28 June. (tag: 2.6.13a)
|
||||
|
||||
2016-06-27 John Ralls
|
||||
|
||||
* containsString wasn't introduced until OS X 10.10.
|
||||
|
||||
2016-06-25 John Ralls
|
||||
|
||||
* Release 2.6.13 (tag: 2.6.13)
|
||||
|
||||
2016-06-24 John Ralls
|
||||
|
||||
* Update translations from the translation project. (HEAD, origin/maint, maint)
|
||||
* Update translations from the translation project.
|
||||
|
||||
2016-06-23 John Ralls
|
||||
|
||||
|
44
NEWS
44
NEWS
@ -1,5 +1,49 @@
|
||||
Version history:
|
||||
------- -------
|
||||
2.6.14 - 17 September 2016
|
||||
Announcement: GnuCash 2.6.14 Release 2016-09-17
|
||||
GnuCash 2.6.14 released
|
||||
|
||||
The GnuCash development team proudly announces GnuCash 2.6.14, the
|
||||
fourteenth maintenance release in the 2.6-stable series.
|
||||
|
||||
The following bugs are fixed:
|
||||
Bug 643025 - RFE: Ability to select and open multiple invoices.
|
||||
Bug 733153 - Ambiguous view of buttons in search dialog Linux version.
|
||||
Bug 742461 - SQL backend doesn't update customer info.
|
||||
Bug 756416 - CSV data with Posted information will always have last
|
||||
invoice not posted.
|
||||
Bug 761667 - Crash opening associated location that has no scheme.
|
||||
Bug 762901 - Fix saving Account Treeview sort order.
|
||||
Bug 769730 - Investments: Lots in This Account, Closed column shows
|
||||
date 25/11/1833 instead of Open.
|
||||
Bug 769746 - Zero interest loan formula fails.
|
||||
Bug 770113 - compiling issue with libdbi.
|
||||
Bug 770136 - 'Reverse Order' in 'View'->'Sort by' is not saved.
|
||||
Bug 770181 - gnc-fq-dump incorrectly says "quote cannot be used...
|
||||
Bug 770196 - cppcheck va_list not closed.
|
||||
Bug 770303 - Incorrect commodity match during import OFX and possible
|
||||
solution.
|
||||
Bug 771246 - Set Invoice/Bill items date correctly from imported CSV.
|
||||
Bug 771379 - GnuCash doesn't support Russian Ruble Symbol.
|
||||
|
||||
Other repairs that weren't marked as bugs in git:
|
||||
Build improvements with CMake, accomodation for Guile-2.0.12 on Gentoo.
|
||||
Change the date_posted timestamp from midnight local to 11:00 AM GMT,
|
||||
which will be the same date in nearly all timezones.
|
||||
SX - Recalculate all occurrences of all SX if the calendar is updated
|
||||
to start on another month
|
||||
SX Window: correctly show first sx on calendar when it is moved to next
|
||||
weekday.
|
||||
Work around libofx bug which caused OFX imports to have the wrong
|
||||
date_posted when in an eastern-hemisphere timezone and not
|
||||
daylight time.
|
||||
Indicate in the register when a transaction has an associated file or
|
||||
URI. The indicator will appear in the "reconciled" column in the
|
||||
second transaction line (enable double-line view to see it).
|
||||
|
||||
Translation Updates: Dutch, German, Serbian, Spanish
|
||||
|
||||
2.6.13 - 28 June 2016
|
||||
Announcement: GnuCash 2.6.13 Release 2016-06-28
|
||||
GnuCash 2.6.13 released
|
||||
|
35
configure.ac
35
configure.ac
@ -1064,6 +1064,41 @@ if test x${have_ofx} = xyes ; then
|
||||
MIGRATABLE_PREFS_OFX="$srcdir/src/import-export/ofx/migratable-prefs-ofx.xml"
|
||||
fi
|
||||
|
||||
ofx_has_bug_39=no
|
||||
if test x${have_ofx} = xyes ; then
|
||||
AC_MSG_CHECKING([Does libofx have bug 39])
|
||||
libs_old="$LIBS"
|
||||
LIBS="$LIBS -lofx"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
extern time_t ofxdate_to_time_t(const std::string ofxdate);
|
||||
],[
|
||||
const std::string timestr = "20160319000000";
|
||||
struct tm ts;
|
||||
ts.tm_year = 116;
|
||||
ts.tm_mon = 2;
|
||||
ts.tm_mday = 19;
|
||||
|
||||
setenv("TZ", "PST 08 PDT 07 M 4.1.0, M 10.6.0", 1);
|
||||
time_t t = ofxdate_to_time_t(timestr);
|
||||
if (t == mktime(&ts))
|
||||
exit(0);
|
||||
exit(1);
|
||||
])],
|
||||
[AC_MSG_RESULT(no)], [
|
||||
AC_MSG_RESULT(yes)
|
||||
ofx_has_bug_39=yes
|
||||
])
|
||||
if test x$ofx_has_bug_39 = "xyes"; then
|
||||
AC_DEFINE(HAVE_OFX_BUG_39, 1, [Libofx has a daylight-time handling bug.])
|
||||
fi
|
||||
AC_LANG_POP([C++])
|
||||
LIBS="$libs_old"
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_OFX], [test "x${have_ofx}" = xyes])
|
||||
AC_SUBST_FILE([MIGRATABLE_PREFS_OFX])
|
||||
### --------------------------------------------------------------------------
|
||||
|
2
packaging/CMakeLists.txt
Normal file
2
packaging/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
GNC_CONFIGURE(gnucash.spec.in gnucash.spec)
|
9
po/ar.po
9
po/ar.po
@ -4,11 +4,6 @@
|
||||
#
|
||||
# Translators:
|
||||
# Aziz2013 <Abdulaziz_ahmed2001@hotmail.com>, 2013
|
||||
# ashalash <ashalash@msn.com>, 2013
|
||||
# ashalash1409 <ashalash1409@hotmail.com>, 2013
|
||||
# ashalash1409 <ashalash1409@hotmail.com>, 2013
|
||||
# ashalash <ashalash@msn.com>, 2013
|
||||
# Aziz2013 <Abdulaziz_ahmed2001@hotmail.com>, 2013
|
||||
# khadiramd <khadird@yahoo.com>, 2013
|
||||
# ashalash <ashalash@msn.com>, 2013
|
||||
msgid ""
|
||||
@ -18,9 +13,9 @@ msgstr ""
|
||||
"POT-Creation-Date: 2015-10-05 12:57-0700\n"
|
||||
"PO-Revision-Date: 2015-10-23 10:00+0300\n"
|
||||
"Last-Translator: Abdulsalam ALshilash <ashalash@msn.com>\n"
|
||||
"Language-Team: Arabic (http://www.transifex.com/projects/p/gnucash-2410/language/ar/)\n"
|
||||
"<ashalash@msn.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: ar\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
1
po/sv.po
1
po/sv.po
@ -18,6 +18,7 @@ msgstr ""
|
||||
"Last-Translator: Erik Johansson <erik@ejohansson.se>\n"
|
||||
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
|
||||
"Language: sv\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
42305
po/zh_CN.po
42305
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@ -171,13 +171,18 @@ IF (WITH_GNUCASH)
|
||||
ADD_SUBDIRECTORY (bin)
|
||||
ADD_SUBDIRECTORY (business/business-ledger)
|
||||
ADD_SUBDIRECTORY (business/business-gnome)
|
||||
ADD_SUBDIRECTORY (doc/design)
|
||||
ADD_SUBDIRECTORY (gnome)
|
||||
ADD_SUBDIRECTORY (gnome-utils)
|
||||
ADD_SUBDIRECTORY (gnome-search)
|
||||
ADD_SUBDIRECTORY (html)
|
||||
ADD_SUBDIRECTORY (optional/python-bindings)
|
||||
ADD_SUBDIRECTORY (plugins/bi_import)
|
||||
ADD_SUBDIRECTORY (plugins/customer_import)
|
||||
ADD_SUBDIRECTORY (pixmaps)
|
||||
IF (WITH_PYTHON)
|
||||
ADD_SUBDIRECTORY (python)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY (quotes)
|
||||
ADD_SUBDIRECTORY (register/ledger-core)
|
||||
ADD_SUBDIRECTORY (register/register-core)
|
||||
|
@ -36,9 +36,16 @@ SET (app_utils_HEADERS
|
||||
|
||||
)
|
||||
|
||||
# Command to generate the swig-app-utils.c wrapper file
|
||||
SET (SWIG_APP_UTILS_C ${CMAKE_CURRENT_BINARY_DIR}/swig-app-utils.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_APP_UTILS_C} ${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i)
|
||||
IF (BUILDING_FROM_VCS)
|
||||
# Command to generate the swig-app-utils.c wrapper file
|
||||
SET (SWIG_APP_UTILS_GUILE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-app-utils-guile.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_APP_UTILS_GUILE_C} ${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i)
|
||||
SET (SWIG_APP_UTILS_PYTHON_C ${CMAKE_CURRENT_BINARY_DIR}/swig-app-utils-python.c)
|
||||
GNC_ADD_SWIG_PYTHON_COMMAND (swig-app-utils-python ${SWIG_APP_UTILS_PYTHON_C} ${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i)
|
||||
ELSE()
|
||||
SET (SWIG_APP_UTILS_GUILE_C swig-app-utils-guile.c)
|
||||
SET (SWIG_APP_UTILS_PYTHON_C swig-app-utils-python.c)
|
||||
ENDIF()
|
||||
|
||||
SET (app_utils_SOURCES
|
||||
calculation/expression_parser.c
|
||||
@ -66,47 +73,57 @@ SET (app_utils_SOURCES
|
||||
gncmod-app-utils.c
|
||||
guile-util.c
|
||||
option-util.c
|
||||
${SWIG_APP_UTILS_C}
|
||||
${SWIG_APP_UTILS_GUILE_C}
|
||||
)
|
||||
|
||||
IF (WIN32)
|
||||
SET (app_utils_SOURCES ${app_utils_SOURCES} gnc-help-utils.c)
|
||||
ENDIF (WIN32)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES (${app_utils_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
|
||||
|
||||
ADD_LIBRARY (gncmod-app-utils
|
||||
${app_utils_SOURCES}
|
||||
${app_utils_HEADERS}
|
||||
${app_utils_noinst_HEADERS}
|
||||
)
|
||||
SET(app_utils_ALL_SOURCES ${app_utils_SOURCES} ${app_utils_HEADERS} ${app_utils_noinst_HEADERS})
|
||||
SET(app_utils_ALL_LIBRARIES gncmod-engine gnc-module ${GTK2_LDFLAGS} ${LIBXML2_LDFLAGS} ${LIBXSLT_LDFLAGS})
|
||||
SET(app_utils_ALL_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/calculation ${LIBXML2_INCLUDE_DIRS}
|
||||
${LIBXSLT_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(gncmod-app-utils gncmod-engine gnc-module
|
||||
${GTK2_LDFLAGS} ${LIBXML2_LDFLAGS} ${LIBXSLT_LDFLAGS}
|
||||
)
|
||||
IF (WIN32)
|
||||
LIST(APPEND app_utils_ALL_SOURCES gnc-help-utils.c)
|
||||
LIST(APPEND app_utils_ALL_LIBRARIES ${HTMLHELP_LIBRARY})
|
||||
LIST(APPEND app_utils_ALL_INCLUDES ${HTMLHELP_INCLUDE_PATH})
|
||||
ENDIF()
|
||||
|
||||
IF (WIN32)
|
||||
TARGET_LINK_LIBRARIES(gncmod-app-utils ${HTMLHELP_LIBRARY})
|
||||
ENDIF(WIN32)
|
||||
ADD_LIBRARY (gncmod-app-utils ${app_utils_ALL_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(gncmod-app-utils ${app_utils_ALL_LIBRARIES})
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES (gncmod-app-utils
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/calculation
|
||||
${LIBXML2_INCLUDE_DIRS}
|
||||
${LIBXSLT_INCLUDE_DIRS}
|
||||
${HTMLHELP_INCLUDE_PATH}
|
||||
${GTK2_INCLUDE_DIRS}
|
||||
PRIVATE ${app_utils_ALL_INCLUDES}
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS (gncmod-app-utils PRIVATE -DG_LOG_DOMAIN=\"gnc.app-utils\")
|
||||
|
||||
|
||||
INSTALL(TARGETS gncmod-app-utils
|
||||
LIBRARY DESTINATION lib/gnucash
|
||||
ARCHIVE DESTINATION lib/gnucash
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib/gnucash
|
||||
ARCHIVE DESTINATION lib/gnucash
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
IF (WITH_PYTHON)
|
||||
ADD_LIBRARY (gncmod-app-utils-python ${app_utils_ALL_SOURCES} ${SWIG_APP_UTILS_PYTHON_C})
|
||||
|
||||
TARGET_LINK_LIBRARIES(gncmod-app-utils-python ${app_utils_ALL_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES (gncmod-app-utils-python
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE ${app_utils_ALL_INCLUDES} ${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
TARGET_COMPILE_DEFINITIONS (gncmod-app-utils-python PRIVATE -DG_LOG_DOMAIN=\"gnc.app-utils\")
|
||||
|
||||
INSTALL(TARGETS gncmod-app-utils-python
|
||||
LIBRARY DESTINATION lib/gnucash
|
||||
ARCHIVE DESTINATION lib/gnucash
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
INSTALL(FILES ${app_utils_HEADERS} DESTINATION include/gnucash)
|
||||
|
||||
FILE(READ ${CMAKE_SOURCE_DIR}/src/import-export/ofx/migratable-prefs-ofx.xml MIGRATABLE_PREFS_OFX)
|
||||
|
@ -137,9 +137,11 @@ struct QofPGSQLBackendProvider : public QofBackendProvider
|
||||
|
||||
#if LIBDBI_VERSION >= 900
|
||||
#define HAVE_LIBDBI_R 1
|
||||
#define HAVE_LIBDBI_TO_LONGLONG 1
|
||||
static dbi_inst dbi_instance = NULL;
|
||||
#else
|
||||
#define HAVE_LIBDBI_R 0
|
||||
#define HAVE_LIBDBI_TO_LONGLONG 0
|
||||
#endif
|
||||
|
||||
#define GNC_HOST_NAME_MAX 255
|
||||
@ -2236,6 +2238,13 @@ row_get_value_at_col_name (GncSqlRow* row, const gchar* col_name)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HAVE_LIBDBI_TO_LONGLONG
|
||||
/* A less evil hack than the one equrie by libdbi-0.8, but
|
||||
* still necessary to work around the same bug.
|
||||
*/
|
||||
time64 time = dbi_result_get_as_longlong(dbi_row->result,
|
||||
col_name);
|
||||
#else
|
||||
/* A seriously evil hack to work around libdbi bug #15
|
||||
* https://sourceforge.net/p/libdbi/bugs/15/. When libdbi
|
||||
* v0.9 is widely available this can be replaced with
|
||||
@ -2245,6 +2254,7 @@ row_get_value_at_col_name (GncSqlRow* row, const gchar* col_name)
|
||||
guint64 row = dbi_result_get_currow (result);
|
||||
guint idx = dbi_result_get_field_idx (result, col_name) - 1;
|
||||
time64 time = result->rows[row]->field_values[idx].d_datetime;
|
||||
#endif //HAVE_LIBDBI_TO_LONGLONG
|
||||
(void)g_value_init (value, G_TYPE_INT64);
|
||||
g_value_set_int64 (value, time);
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ load_address (const GncSqlBackend* be, GncSqlRow* row,
|
||||
g_return_if_fail (pObject != NULL);
|
||||
g_return_if_fail (table_row != NULL);
|
||||
|
||||
addr = gncAddressCreate (be->book, NULL);
|
||||
addr = gncAddressCreate (be->book, QOF_INSTANCE(pObject));
|
||||
for (subtable = col_table; subtable->col_name != NULL; subtable++)
|
||||
{
|
||||
buf = g_strdup_printf ("%s_%s", table_row->col_name, subtable->col_name);
|
||||
|
@ -168,14 +168,14 @@ sixtp_set_any (sixtp* tochange, int cleanup, ...)
|
||||
va_list ap;
|
||||
sixtp_handler_type type;
|
||||
|
||||
va_start (ap, cleanup);
|
||||
|
||||
if (!tochange)
|
||||
{
|
||||
g_warning ("Null tochange passed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
va_start (ap, cleanup);
|
||||
|
||||
do
|
||||
{
|
||||
type = static_cast<decltype (type)> (va_arg (ap, int));
|
||||
|
@ -2800,12 +2800,17 @@ edit_invoice_direct (gpointer invoice, gpointer user_data)
|
||||
}
|
||||
|
||||
static void
|
||||
edit_invoice_cb (gpointer *invoice_p, gpointer user_data)
|
||||
edit_invoice_cb (gpointer inv, gpointer user_data)
|
||||
{
|
||||
g_return_if_fail (invoice_p && user_data);
|
||||
if (! *invoice_p)
|
||||
return;
|
||||
edit_invoice_direct (*invoice_p, user_data);
|
||||
GncInvoice *invoice = inv;
|
||||
g_return_if_fail (invoice && user_data);
|
||||
edit_invoice_direct (invoice, user_data);
|
||||
}
|
||||
|
||||
static void
|
||||
multi_edit_invoice_cb (GList *invoice_list, gpointer user_data)
|
||||
{
|
||||
g_list_foreach(invoice_list, edit_invoice_cb, user_data);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2999,7 +3004,7 @@ gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book)
|
||||
static GNCSearchCallbackButton *buttons;
|
||||
static GNCSearchCallbackButton inv_buttons[] =
|
||||
{
|
||||
{ N_("View/Edit Invoice"), edit_invoice_cb, NULL, TRUE},
|
||||
{ N_("View/Edit Invoice"), NULL, multi_edit_invoice_cb, TRUE},
|
||||
{ N_("Process Payment"), pay_invoice_cb, NULL, FALSE},
|
||||
{ N_("Duplicate"), NULL, multi_duplicate_invoice_cb, FALSE},
|
||||
{ N_("Post"), NULL, multi_post_invoice_cb, FALSE},
|
||||
@ -3008,7 +3013,7 @@ gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book)
|
||||
};
|
||||
static GNCSearchCallbackButton bill_buttons[] =
|
||||
{
|
||||
{ N_("View/Edit Bill"), edit_invoice_cb, NULL, TRUE},
|
||||
{ N_("View/Edit Bill"), NULL, multi_edit_invoice_cb, TRUE},
|
||||
{ N_("Process Payment"), pay_invoice_cb, NULL, FALSE},
|
||||
{ N_("Duplicate"), NULL, multi_duplicate_invoice_cb, FALSE},
|
||||
{ N_("Post"), NULL, multi_post_invoice_cb, FALSE},
|
||||
@ -3019,7 +3024,7 @@ gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book)
|
||||
{
|
||||
/* Translators: The terms 'Voucher' and 'Expense Voucher' are used
|
||||
interchangeably in gnucash and mean the same thing. */
|
||||
{ N_("View/Edit Voucher"), edit_invoice_cb, NULL, TRUE},
|
||||
{ N_("View/Edit Voucher"), NULL, multi_edit_invoice_cb, TRUE},
|
||||
{ N_("Process Payment"), pay_invoice_cb, NULL, FALSE},
|
||||
{ N_("Duplicate"), NULL, multi_duplicate_invoice_cb, FALSE},
|
||||
{ N_("Post"), NULL, multi_post_invoice_cb, FALSE},
|
||||
|
@ -9,7 +9,21 @@ MACRO (GNC_ADD_SWIG_COMMAND _target _input)
|
||||
ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${_target}
|
||||
DEPENDS ${_input} ${CMAKE_SOURCE_DIR}/src/base-typemaps.i ${ARGN}
|
||||
COMMAND ${SWIG_EXECUTABLE} -guile ${SWIG_ARGS} -Linkage module -I${CMAKE_SOURCE_DIR}/src/libqof/qof -I${CMAKE_SOURCE_DIR}/src -o ${_target} ${_input}
|
||||
COMMAND ${SWIG_EXECUTABLE} -guile ${SWIG_ARGS} -Linkage module -I${CMAKE_SOURCE_DIR}/src/libqof/qof -I${CMAKE_SOURCE_DIR}/src -o ${_target} ${_input}
|
||||
)
|
||||
|
||||
ENDMACRO (GNC_ADD_SWIG_COMMAND)
|
||||
|
||||
|
||||
MACRO (GNC_ADD_SWIG_PYTHON_COMMAND _target _output _input)
|
||||
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${_output}
|
||||
|
||||
COMMAND ${SWIG_EXECUTABLE} -python -Wall -Werror ${SWIG_ARGS}
|
||||
-I${CMAKE_SOURCE_DIR}/src/libqof/qof -I${CMAKE_SOURCE_DIR}/src
|
||||
-I${CMAKE_SOURCE_DIR}/src/engine -I${CMAKE_SOURCE_DIR}/src/app-utils
|
||||
-o ${_output} ${_input}
|
||||
DEPENDS ${_input} ${CMAKE_SOURCE_DIR}/src/base-typemaps.i ${ARGN}
|
||||
)
|
||||
ADD_CUSTOM_TARGET(${_target} ALL DEPENDS ${_output} ${CMAKE_SOURCE_DIR}/src/base-typemaps.i ${_input} ${ARGN})
|
||||
ENDMACRO()
|
||||
|
@ -327,6 +327,10 @@
|
||||
your system. */
|
||||
#cmakedefine PTHREAD_CREATE_JOINABLE 1
|
||||
|
||||
/* Result of LibOFX Bug 39 detection (see
|
||||
https://sourceforge.net/p/libofx/bugs/39/ for details). */
|
||||
#cmakedefine HAVE_OFX_BUG_39 1
|
||||
|
||||
/* Name of package containing qt3-wizard. */
|
||||
#define QT3_WIZARD_PACKAGE "aqbanking"
|
||||
|
||||
|
@ -1,9 +1,16 @@
|
||||
# CMakeLists.txt for src/core-utils
|
||||
|
||||
ADD_SUBDIRECTORY(test)
|
||||
# Command to generate the swig-engine.c wrapper file
|
||||
SET (SWIG_CORE_UTILS_C ${CMAKE_CURRENT_BINARY_DIR}/swig-core-utils.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_CORE_UTILS_C} ${CMAKE_CURRENT_SOURCE_DIR}/core-utils.i)
|
||||
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_CORE_UTILS_GUILE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-core-utils-guile.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_CORE_UTILS_GUILE_C} ${CMAKE_CURRENT_SOURCE_DIR}/core-utils.i)
|
||||
SET (SWIG_CORE_UTILS_PYTHON_C ${CMAKE_CURRENT_BINARY_DIR}/swig-core-utils-python.c)
|
||||
GNC_ADD_SWIG_PYTHON_COMMAND (swig-core-utils-python ${SWIG_CORE_UTILS_PYTHON_C} ${CMAKE_CURRENT_SOURCE_DIR}/core-utils.i)
|
||||
ELSE()
|
||||
SET(SWIG_CORE_UTILS_GUILE_C swig-core-utils-guile.c)
|
||||
SET(SWIG_CORE_UTILS_PYTHON_C swig-core-utils-python.c)
|
||||
ENDIF()
|
||||
|
||||
SET (core_utils_SOURCES
|
||||
binreloc.c
|
||||
@ -19,7 +26,6 @@ SET (core_utils_SOURCES
|
||||
gnc-locale-utils.c
|
||||
gnc-path.c
|
||||
gnc-uri-utils.c
|
||||
${SWIG_CORE_UTILS_C}
|
||||
)
|
||||
|
||||
# Add dependency on config.h
|
||||
@ -102,33 +108,59 @@ SET(core_utils_noinst_HEADERS
|
||||
gnc-uri-utils.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY (gnc-core-utils
|
||||
${core_utils_SOURCES}
|
||||
${core_utils_noinst_HEADERS}
|
||||
)
|
||||
SET(core_utils_ALL_SOURCES ${core_utils_SOURCES} ${core_utils_noinst_HEADERS})
|
||||
SET(core_utils_ALL_LIBRARIES gnc-qof ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS} ${GOBJECT_LDFLAGS} ${GTK_MAC_LDFLAGS})
|
||||
SET(core_utils_ALL_INCLUDES ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${GUILE_INCLUDE_DIRS} ${GTK_MAC_INCLUDE_DIRS})
|
||||
|
||||
IF (MAC_INTEGRATION)
|
||||
LIST(APPEND core_utils_ALL_LIBRARIES ${OSX_EXTRA_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY (gnc-core-utils ${core_utils_ALL_SOURCES} ${SWIG_CORE_UTILS_GUILE_C})
|
||||
ADD_DEPENDENCIES(gnc-core-utils gnc-vcs-info)
|
||||
|
||||
TARGET_LINK_LIBRARIES(gnc-core-utils gnc-qof ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS} ${GOBJECT_LDFLAGS} ${GTK_MAC_LDFLAGS})
|
||||
TARGET_LINK_LIBRARIES(gnc-core-utils ${core_utils_ALL_LIBRARIES})
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(gnc-core-utils
|
||||
PRIVATE -DG_LOG_DOMAIN=\"gnc.core-utils\" ${GTK_MAC_CFLAGS_OTHER})
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(gnc-core-utils PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR} # for headers generated in core-utils build directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${GUILE_INCLUDE_DIRS}
|
||||
${GTK_MAC_INCLUDE_DIRS}
|
||||
)
|
||||
TARGET_INCLUDE_DIRECTORIES(gnc-core-utils PUBLIC ${core_utils_ALL_INCLUDES})
|
||||
|
||||
IF (MAC_INTEGRATION)
|
||||
TARGET_COMPILE_OPTIONS(gnc-core-utils PRIVATE ${OSX_EXTRA_COMPILE_FLAGS})
|
||||
TARGET_LINK_LIBRARIES(gnc-core-utils ${OSX_EXTRA_LIBRARIES})
|
||||
ENDIF(MAC_INTEGRATION)
|
||||
|
||||
INSTALL(TARGETS gnc-core-utils
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
IF (WITH_PYTHON)
|
||||
ADD_LIBRARY (gnc-core-utils-python ${core_utils_ALL_SOURCES} ${SWIG_CORE_UTILS_PYTHON_C})
|
||||
ADD_DEPENDENCIES(gnc-core-utils-python gnc-vcs-info)
|
||||
|
||||
TARGET_LINK_LIBRARIES(gnc-core-utils-python ${core_utils_ALL_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(gnc-core-utils-python
|
||||
PRIVATE -DG_LOG_DOMAIN=\"gnc.core-utils\" ${GTK_MAC_CFLAGS_OTHER}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(gnc-core-utils-python PUBLIC ${core_utils_ALL_INCLUDES} ${PYTHON_INCLUDE_DIRS})
|
||||
|
||||
IF (MAC_INTEGRATION)
|
||||
TARGET_COMPILE_OPTIONS(gnc-core-utils-python PRIVATE ${OSX_EXTRA_COMPILE_FLAGS})
|
||||
ENDIF(MAC_INTEGRATION)
|
||||
|
||||
INSTALL(TARGETS gnc-core-utils-python
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
ENDIF()
|
||||
|
||||
# No headers to install
|
||||
|
||||
# Scheme
|
||||
|
38
src/doc/design/CMakeLists.txt
Normal file
38
src/doc/design/CMakeLists.txt
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
SET(gnucash_design_TEXINFOS
|
||||
component-manager.texi
|
||||
concept-index.texi
|
||||
engine.texi
|
||||
fdl.texi
|
||||
function-index.texi
|
||||
intro.texi
|
||||
register.texi
|
||||
reports.texi
|
||||
top-level.texi
|
||||
type-index.texi
|
||||
user-preferences.texi
|
||||
)
|
||||
|
||||
|
||||
EXECUTE_PROCESS(COMMAND date +%e OUTPUT_VARIABLE CURRENT_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
EXECUTE_PROCESS(COMMAND date +%B OUTPUT_VARIABLE CURRENT_MONTH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
EXECUTE_PROCESS(COMMAND date +%Y OUTPUT_VARIABLE CURRENT_YEAR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
SET(UPDATED "${CURRENT_DATE} ${CURRENT_MONTH} ${CURRENT_YEAR}")
|
||||
SET(UPDATED_MONTH "${CURRENT_MONTH} ${CURRENT_YEAR}")
|
||||
|
||||
SET(VERSION_TEXI_IN
|
||||
"@set UPDATED ${UPDATED}
|
||||
@set UPDATED-MONTH ${UPDATED_MONTH}
|
||||
@set EDITION ${VERSION}
|
||||
@set VERSION ${VERSION}
|
||||
")
|
||||
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/version.texi ${VERSION_TEXI_IN})
|
||||
|
||||
FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" TEXI_BINARY_DIR)
|
||||
FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/gnucash-design.texi" TEXI_SOURCE_FILE)
|
||||
|
||||
ADD_CUSTOM_TARGET(gnucash-design.texi ALL
|
||||
COMMAND makeinfo -I ${TEXI_BINARY_DIR} ${TEXI_SOURCE_FILE}
|
||||
DEPENDS ${gnucash_design_TEXINFOS}
|
||||
)
|
@ -86,6 +86,7 @@ Book = element gnc:book {
|
||||
element gnc:count-data { attribute cd:type { "transaction" }, xsd:int }?,
|
||||
element gnc:count-data { attribute cd:type { "schedxaction" }, xsd:int }?,
|
||||
element gnc:count-data { attribute cd:type { "budget" }, xsd:int }?,
|
||||
element gnc:count-data { attribute cd:type { "price" }, xsd:int }?,
|
||||
|
||||
# plugins (those with a get_count slot)
|
||||
|
||||
|
@ -88,6 +88,7 @@ enum
|
||||
PROP_PLACEHOLDER, /* Table slot exists, but in KVP in memory & xml */
|
||||
PROP_FILTER, /* KVP */
|
||||
PROP_SORT_ORDER, /* KVP */
|
||||
PROP_SORT_REVERSED,
|
||||
|
||||
PROP_LOT_NEXT_ID, /* KVP */
|
||||
PROP_ONLINE_ACCOUNT, /* KVP */
|
||||
@ -400,6 +401,8 @@ gnc_account_get_property (GObject *object,
|
||||
case PROP_SORT_ORDER:
|
||||
g_value_set_string(value, xaccAccountGetSortOrder(account));
|
||||
break;
|
||||
case PROP_SORT_REVERSED:
|
||||
g_value_set_boolean(value, xaccAccountGetSortReversed(account));
|
||||
case PROP_LOT_NEXT_ID:
|
||||
key = "lot-mgmt/next-id";
|
||||
/* Pre-set the value in case the frame is empty */
|
||||
@ -532,6 +535,8 @@ gnc_account_set_property (GObject *object,
|
||||
case PROP_SORT_ORDER:
|
||||
xaccAccountSetSortOrder(account, g_value_get_string(value));
|
||||
break;
|
||||
case PROP_SORT_REVERSED:
|
||||
xaccAccountSetSortReversed(account, g_value_get_boolean(value));
|
||||
case PROP_LOT_NEXT_ID:
|
||||
key = "lot-mgmt/next-id";
|
||||
qof_instance_set_kvp (QOF_INSTANCE (account), key, value);
|
||||
@ -918,6 +923,15 @@ gnc_account_class_init (AccountClass *klass)
|
||||
NULL,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_SORT_REVERSED,
|
||||
g_param_spec_boolean ("sort-reversed",
|
||||
"Account Sort Reversed",
|
||||
"Parameter to store whether the sort order is reversed or not.",
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_LOT_NEXT_ID,
|
||||
@ -2339,6 +2353,12 @@ xaccAccountSetSortOrder (Account *acc, const char *str)
|
||||
set_kvp_string_tag (acc, "sort-order", str);
|
||||
}
|
||||
|
||||
void
|
||||
xaccAccountSetSortReversed (Account *acc, gboolean sortreversed)
|
||||
{
|
||||
set_kvp_string_tag (acc, "sort-reversed", sortreversed ? "true" : NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
qofAccountSetParent (Account *acc, QofInstance *parent)
|
||||
{
|
||||
@ -3098,6 +3118,14 @@ xaccAccountGetSortOrder (const Account *acc)
|
||||
return get_kvp_string_tag (acc, "sort-order");
|
||||
}
|
||||
|
||||
gboolean
|
||||
xaccAccountGetSortReversed (const Account *acc)
|
||||
{
|
||||
|
||||
g_return_val_if_fail(GNC_IS_ACCOUNT(acc), FALSE);
|
||||
return g_strcmp0 (get_kvp_string_tag (acc, "sort-reversed"), "true") == 0;
|
||||
}
|
||||
|
||||
const char *
|
||||
xaccAccountGetNotes (const Account *acc)
|
||||
{
|
||||
@ -6019,6 +6047,11 @@ gboolean xaccAccountRegister (void)
|
||||
(QofAccessFunc) xaccAccountGetSortOrder,
|
||||
(QofSetterFunc) xaccAccountSetSortOrder
|
||||
},
|
||||
{
|
||||
ACCOUNT_SORT_REVERSED_, QOF_TYPE_BOOLEAN,
|
||||
(QofAccessFunc) xaccAccountGetSortReversed,
|
||||
(QofSetterFunc) xaccAccountSetSortReversed
|
||||
},
|
||||
{
|
||||
ACCOUNT_NOTES_, QOF_TYPE_STRING,
|
||||
(QofAccessFunc) xaccAccountGetNotes,
|
||||
|
@ -299,6 +299,8 @@ void xaccAccountSetColor (Account *account, const char *color);
|
||||
void xaccAccountSetFilter (Account *account, const char *filter);
|
||||
/** Set the account's Sort Order */
|
||||
void xaccAccountSetSortOrder (Account *account, const char *sortorder);
|
||||
/** Set the account's Sort Order direction */
|
||||
void xaccAccountSetSortReversed (Account *account, gboolean sortreversed);
|
||||
/** Set the account's notes */
|
||||
void xaccAccountSetNotes (Account *account, const char *notes);
|
||||
/** Set the last num field of an Account */
|
||||
@ -390,6 +392,8 @@ const char * xaccAccountGetColor (const Account *account);
|
||||
const char * xaccAccountGetFilter (const Account *account);
|
||||
/** Get the account's Sort Order */
|
||||
const char * xaccAccountGetSortOrder (const Account *account);
|
||||
/** Get the account's Sort Order direction */
|
||||
gboolean xaccAccountGetSortReversed (const Account *account);
|
||||
/** Get the account's notes */
|
||||
const char * xaccAccountGetNotes (const Account *account);
|
||||
/** Get the last num field of an Account */
|
||||
@ -1489,6 +1493,7 @@ const char * dxaccAccountGetQuoteTZ (const Account *account);
|
||||
#define ACCOUNT_COLOR_ "color"
|
||||
#define ACCOUNT_FILTER_ "filter"
|
||||
#define ACCOUNT_SORT_ORDER_ "sort-order"
|
||||
#define ACCOUNT_SORT_REVERSED_ "sort-reversed"
|
||||
#define ACCOUNT_NOTES_ "notes"
|
||||
#define ACCOUNT_BALANCE_ "balance"
|
||||
#define ACCOUNT_CLEARED_ "cleared"
|
||||
|
@ -73,9 +73,13 @@ SET (engine_HEADERS
|
||||
gncVendorP.h
|
||||
)
|
||||
|
||||
# Command to generate the swig-engine.c wrapper file
|
||||
SET (SWIG_ENGINE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-engine.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_ENGINE_C} ${CMAKE_CURRENT_SOURCE_DIR}/engine.i ${engine_HEADERS})
|
||||
IF (BUILDING_FROM_VCS)
|
||||
# Command to generate the swig-engine.c wrapper file
|
||||
SET (SWIG_ENGINE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-engine.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_ENGINE_C} ${CMAKE_CURRENT_SOURCE_DIR}/engine.i ${engine_HEADERS})
|
||||
ELSE()
|
||||
SET (SWIG_ENGINE_C swig-engine.c)
|
||||
ENDIF()
|
||||
|
||||
# Command to generate the iso-4217-currencies.c file
|
||||
SET (ISO_4217_C ${CMAKE_CURRENT_BINARY_DIR}/iso-4217-currencies.c)
|
||||
|
@ -158,7 +158,8 @@ const char * xaccSplitGetMemo (const Split *split);
|
||||
* It is meant to be a very short (one to ten character) string that
|
||||
* signifies the "type" of this split, such as e.g. Buy, Sell, Div,
|
||||
* Withdraw, Deposit, ATM, Check, etc. The idea is that this field
|
||||
* can be used to create custom reports or graphs of data. Rather than use
|
||||
* can be used to create custom reports or graphs of data. Note that the
|
||||
* business features auto-fill this value, but doesn't depend on it. Rather than use
|
||||
* this function directly, see 'gnc_set_num_action' in
|
||||
* engine/engine-helpers.c & .h which takes a user-set book option for selecting
|
||||
* the source for the num-cell (the transaction-number or the split-action field)
|
||||
|
@ -66,6 +66,8 @@ void mark_address (GncAddress *address)
|
||||
{
|
||||
address->dirty = TRUE;
|
||||
|
||||
if (address->parent)
|
||||
qof_instance_set_dirty(address->parent);
|
||||
qof_event_gen (QOF_INSTANCE(address), QOF_EVENT_MODIFY, address->parent);
|
||||
qof_event_gen (address->parent, QOF_EVENT_MODIFY, NULL);
|
||||
}
|
||||
|
@ -2158,7 +2158,7 @@
|
||||
exchange-code="643"
|
||||
parts-per-unit="100"
|
||||
smallest-fraction="100"
|
||||
local-symbol="руб"
|
||||
local-symbol="₽"
|
||||
/>
|
||||
<!-- "RWF" - "Rwanda Franc"
|
||||
-->
|
||||
|
@ -73,13 +73,15 @@ GNC_TEST_DEPS = \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/engine/test \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/core-utils \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/app-utils \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/engine/test
|
||||
|
||||
test_account_object_SOURCES = test-account-object.cpp
|
||||
test_commodities_SOURCES = test-commodities.cpp
|
||||
|
@ -1,9 +1,13 @@
|
||||
# CMakeLists.txt for src/gnc-module
|
||||
ADD_SUBDIRECTORY(test)
|
||||
|
||||
# Command to generate the swig-engine.c wrapper file
|
||||
SET (SWIG_GNC_MODULE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnc-module.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNC_MODULE_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnc-module.i)
|
||||
IF (BUILDING_FROM_VCS)
|
||||
# Command to generate the swig-engine.c wrapper file
|
||||
SET (SWIG_GNC_MODULE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnc-module.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNC_MODULE_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnc-module.i)
|
||||
ELSE()
|
||||
SET (SWIG_GNC_MODULE_C swig-gnc-module.c)
|
||||
ENDIF()
|
||||
|
||||
SET (gnc_module_SOURCES
|
||||
gnc-module.c
|
||||
|
@ -1,6 +1,10 @@
|
||||
|
||||
SET (SWIG_BAR_C ${CMAKE_CURRENT_BINARY_DIR}/swig-bar.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_BAR_C} ${CMAKE_CURRENT_SOURCE_DIR}/bar.i bar.h)
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_BAR_C ${CMAKE_CURRENT_BINARY_DIR}/swig-bar.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_BAR_C} ${CMAKE_CURRENT_SOURCE_DIR}/bar.i bar.h)
|
||||
ELSE()
|
||||
SET (SWIG_BAR_C swig-bar.c)
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(bar EXCLUDE_FROM_ALL bar.c bar.h)
|
||||
ADD_LIBRARY(gncmodbar EXCLUDE_FROM_ALL gnc-mod-bar.c)
|
||||
|
@ -1,6 +1,10 @@
|
||||
|
||||
SET (SWIG_BAZ_C ${CMAKE_CURRENT_BINARY_DIR}/swig-baz.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_BAZ_C} ${CMAKE_CURRENT_SOURCE_DIR}/baz.i baz.h)
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_BAZ_C ${CMAKE_CURRENT_BINARY_DIR}/swig-baz.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_BAZ_C} ${CMAKE_CURRENT_SOURCE_DIR}/baz.i baz.h)
|
||||
ELSE()
|
||||
SET (SWIG_BAZ_C swig-baz.c)
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(baz EXCLUDE_FROM_ALL baz.c baz.h)
|
||||
TARGET_INCLUDE_DIRECTORIES(baz PRIVATE
|
||||
|
@ -1,6 +1,10 @@
|
||||
|
||||
SET (SWIG_FOO_C ${CMAKE_CURRENT_BINARY_DIR}/swig-foo.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_FOO_C} ${CMAKE_CURRENT_SOURCE_DIR}/foo.i foo.h)
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_FOO_C ${CMAKE_CURRENT_BINARY_DIR}/swig-foo.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_FOO_C} ${CMAKE_CURRENT_SOURCE_DIR}/foo.i foo.h)
|
||||
ELSE()
|
||||
SET (SWIG_FOO_C swig-foo.c)
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(foo EXCLUDE_FROM_ALL foo.c foo.h)
|
||||
ADD_LIBRARY(gncmodfoo EXCLUDE_FROM_ALL gnc-mod-foo.c)
|
||||
|
@ -107,7 +107,6 @@ gnc_search_boolean_class_init (GNCSearchBooleanClass *klass)
|
||||
static void
|
||||
gnc_search_boolean_init (GNCSearchBoolean *o)
|
||||
{
|
||||
o->how = QOF_COMPARE_EQUAL;
|
||||
o->value = TRUE;
|
||||
}
|
||||
|
||||
@ -143,14 +142,6 @@ gnc_search_boolean_set_value (GNCSearchBoolean *fi, gboolean value)
|
||||
fi->value = value;
|
||||
}
|
||||
|
||||
void
|
||||
gnc_search_boolean_set_how (GNCSearchBoolean *fi, QofQueryCompare how)
|
||||
{
|
||||
g_return_if_fail (fi);
|
||||
g_return_if_fail (IS_GNCSEARCH_BOOLEAN (fi));
|
||||
fi->how = how;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gncs_validate (GNCSearchCoreType *fe)
|
||||
{
|
||||
@ -171,25 +162,10 @@ toggle_changed (GtkToggleButton *button, GNCSearchBoolean *fe)
|
||||
fe->value = gtk_toggle_button_get_active (button);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
make_menu (GNCSearchCoreType *fe)
|
||||
{
|
||||
GNCSearchBoolean *fi = (GNCSearchBoolean *)fe;
|
||||
GtkComboBox *combo;
|
||||
|
||||
combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
|
||||
gnc_combo_box_search_add(combo, _("is"), QOF_COMPARE_EQUAL);
|
||||
gnc_combo_box_search_add(combo, _("is not"), QOF_COMPARE_NEQ);
|
||||
gnc_combo_box_search_changed(combo, &fi->how);
|
||||
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_COMPARE_EQUAL);
|
||||
|
||||
return GTK_WIDGET(combo);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
gncs_get_widget (GNCSearchCoreType *fe)
|
||||
{
|
||||
GtkWidget *toggle, *menu, *box;
|
||||
GtkWidget *toggle, *box;
|
||||
GNCSearchBoolean *fi = (GNCSearchBoolean *)fe;
|
||||
|
||||
g_return_val_if_fail (fi, NULL);
|
||||
@ -197,12 +173,8 @@ gncs_get_widget (GNCSearchCoreType *fe)
|
||||
|
||||
box = gtk_hbox_new (FALSE, 3);
|
||||
|
||||
/* Build and connect the option menu */
|
||||
menu = make_menu (fe);
|
||||
gtk_box_pack_start (GTK_BOX (box), menu, FALSE, FALSE, 3);
|
||||
|
||||
/* Build and connect the toggle */
|
||||
toggle = gtk_toggle_button_new_with_label (_("set true"));
|
||||
toggle = gtk_check_button_new ();
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), fi->value);
|
||||
g_signal_connect (G_OBJECT (toggle), "toggled", G_CALLBACK (toggle_changed), fe);
|
||||
gtk_box_pack_start (GTK_BOX (box), toggle, FALSE, FALSE, 3);
|
||||
@ -218,7 +190,7 @@ static QofQueryPredData* gncs_get_predicate (GNCSearchCoreType *fe)
|
||||
g_return_val_if_fail (fi, NULL);
|
||||
g_return_val_if_fail (IS_GNCSEARCH_BOOLEAN (fi), NULL);
|
||||
|
||||
return qof_query_boolean_predicate (fi->how, fi->value);
|
||||
return qof_query_boolean_predicate (QOF_COMPARE_EQUAL, fi->value);
|
||||
}
|
||||
|
||||
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)
|
||||
@ -230,7 +202,6 @@ static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)
|
||||
|
||||
se = gnc_search_boolean_new ();
|
||||
gnc_search_boolean_set_value (se, fse->value);
|
||||
gnc_search_boolean_set_how (se, fse->how);
|
||||
|
||||
return (GNCSearchCoreType *)se;
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ struct _GNCSearchBoolean
|
||||
{
|
||||
GNCSearchCoreType parent;
|
||||
|
||||
QofQueryCompare how;
|
||||
gboolean value;
|
||||
};
|
||||
|
||||
@ -55,7 +54,6 @@ GNCSearchBoolean *gnc_search_boolean_new (void);
|
||||
|
||||
/* methods */
|
||||
void gnc_search_boolean_set_value (GNCSearchBoolean *fi, gboolean val);
|
||||
void gnc_search_boolean_set_how (GNCSearchBoolean *fi, QofQueryCompare how);
|
||||
|
||||
#endif /* ! _GNCSEARCH_BOOLEAN_H */
|
||||
|
||||
|
@ -199,7 +199,7 @@ make_toggle (GNCSearchReconciled *fi, char *label, cleared_match_t option)
|
||||
{
|
||||
GtkWidget *toggle;
|
||||
|
||||
toggle = gtk_toggle_button_new_with_label (label);
|
||||
toggle = gtk_check_button_new_with_label (label);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), (fi->value & option));
|
||||
g_object_set_data (G_OBJECT (toggle), "button-value", (gpointer) option);
|
||||
g_signal_connect (G_OBJECT (toggle), "toggled", G_CALLBACK (toggle_changed), fi);
|
||||
|
@ -5,8 +5,12 @@ ADD_SUBDIRECTORY(gtkbuilder)
|
||||
ADD_SUBDIRECTORY(ui)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
|
||||
SET (SWIG_GNOME_UTILS_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnome-utils.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNOME_UTILS_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnome-utils.i)
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_GNOME_UTILS_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnome-utils.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNOME_UTILS_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnome-utils.i)
|
||||
ELSE()
|
||||
SET (SWIG_GNOME_UTILS_C swig-gnome-utils.c)
|
||||
ENDIF()
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/gschemas/org.gnucash.warnings.gschema.xml.in.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gschemas/org.gnucash.warnings.gschema.xml.in)
|
||||
|
@ -182,9 +182,6 @@ gdcs_generic_update_recurrences(GncDenseCalStore *trans, GDate *start, GList *re
|
||||
GDate date, next;
|
||||
|
||||
date = *start;
|
||||
/* go one day before what's in the box so we can get the correct start
|
||||
* date. */
|
||||
g_date_subtract_days(&date, 1);
|
||||
recurrenceListNextInstance(recurrences, &date, &next);
|
||||
|
||||
i = 0;
|
||||
|
@ -1738,17 +1738,25 @@ gdc_add_tag_markings(GncDenseCal *cal, guint tag)
|
||||
}
|
||||
if (g_date_valid(dates[0]))
|
||||
{
|
||||
if (g_date_get_julian(dates[0]) < g_date_get_julian(calDate))
|
||||
{
|
||||
_gnc_dense_cal_set_month(cal, g_date_get_month(dates[0]), FALSE);
|
||||
_gnc_dense_cal_set_year(cal, g_date_get_year(dates[0]), FALSE);
|
||||
}
|
||||
if (g_date_get_julian(dates[0]) < g_date_get_julian(calDate))
|
||||
{
|
||||
/* Oops, first marking is earlier than months displayed.
|
||||
* Choose new first month and recalculate all markings for all
|
||||
* tags. Their offsets are all wrong with the newly added month(s).
|
||||
*/
|
||||
_gnc_dense_cal_set_month(cal, g_date_get_month(dates[0]), FALSE);
|
||||
_gnc_dense_cal_set_year(cal, g_date_get_year(dates[0]), FALSE);
|
||||
|
||||
gdc_remove_markings (cal);
|
||||
gdc_add_markings (cal);
|
||||
}
|
||||
else
|
||||
gdc_mark_add(cal, tag, name, info, num_marks, dates);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning("Bad date, skipped.");
|
||||
g_warning("Bad date, skipped.");
|
||||
}
|
||||
gdc_mark_add(cal, tag, name, info, num_marks, dates);
|
||||
|
||||
for (idx = 0; idx < num_marks; idx++)
|
||||
{
|
||||
|
@ -431,9 +431,10 @@ void
|
||||
gnc_launch_assoc (const char *uri)
|
||||
{
|
||||
wchar_t *winuri = NULL;
|
||||
char* scheme = g_uri_parse_scheme(uri);
|
||||
/* ShellExecuteW open doesn't decode http escapes if it's passed a
|
||||
* file URI so we have to do it. */
|
||||
if (strcmp (g_uri_parse_scheme(uri), "file") == 0)
|
||||
if (scheme && strcmp (scheme, "file") == 0)
|
||||
{
|
||||
gchar *filename = g_filename_from_uri (uri, NULL, NULL);
|
||||
winuri = (wchar_t *)g_utf8_to_utf16(filename, -1, NULL, NULL, NULL);
|
||||
@ -455,6 +456,7 @@ gnc_launch_assoc (const char *uri)
|
||||
g_free (wincmd);
|
||||
g_free (winuri);
|
||||
}
|
||||
g_free (scheme);
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -1104,10 +1104,8 @@ void gnc_tree_view_save_state (GncTreeView *view)
|
||||
gchar *sort_order = gnc_tree_view_get_sort_order (view);
|
||||
gchar **col_order = gnc_tree_view_get_column_order (view, &num_cols);
|
||||
|
||||
/* Default sort column is the first column */
|
||||
if (sort_column &&
|
||||
(gnc_tree_view_find_column_by_name (view, sort_column) !=
|
||||
gtk_tree_view_get_column (GTK_TREE_VIEW (view), 0)))
|
||||
/* Default sort column is the name column */
|
||||
if (sort_column && (g_strcmp0 (sort_column, "name") != 0))
|
||||
g_key_file_set_string (state_file, priv->state_section, STATE_KEY_SORT_COLUMN, sort_column);
|
||||
else if (g_key_file_has_key (state_file, priv->state_section, STATE_KEY_SORT_COLUMN, NULL))
|
||||
g_key_file_remove_key (state_file, priv->state_section, STATE_KEY_SORT_COLUMN, NULL);
|
||||
|
@ -41,8 +41,12 @@ SET (gnc_gnome_noinst_HEADERS
|
||||
window-autoclear.h
|
||||
)
|
||||
|
||||
SET (SWIG_GNOME_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnome.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNOME_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnome.i ${gnc_gnome_HEADERS})
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_GNOME_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnome.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNOME_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnome.i ${gnc_gnome_HEADERS})
|
||||
ELSE()
|
||||
SET (SWIG_GNOME_C swig-gnome.c)
|
||||
ENDIF()
|
||||
|
||||
SET (gnc_gnome_SOURCES
|
||||
${SWIG_GNOME_C}
|
||||
|
@ -392,7 +392,7 @@ gnc_lot_viewer_fill (GNCLotViewer *lv)
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_list_store_set(store, &iter, LOT_COL_CLOSE, 0, -1);
|
||||
gtk_list_store_set(store, &iter, LOT_COL_CLOSE, 0LL, -1);
|
||||
}
|
||||
|
||||
/* Title */
|
||||
|
@ -1607,9 +1607,15 @@ gnc_sxed_update_cal(GncSxEditorDialog *sxed)
|
||||
&& g_date_valid(&first_date)
|
||||
&& g_date_compare(last_sx_inst, &first_date) != 0)
|
||||
{
|
||||
/* last occurrence will be passed as initial date to update store
|
||||
* later on as well */
|
||||
start_date = *last_sx_inst;
|
||||
recurrenceListNextInstance(recurrences, &start_date, &first_date);
|
||||
}
|
||||
else
|
||||
/* move one day back so the store can get the proper first recurrence. */
|
||||
g_date_subtract_days(&start_date, 1);
|
||||
|
||||
}
|
||||
|
||||
if (!g_date_valid(&first_date))
|
||||
@ -1635,17 +1641,17 @@ gnc_sxed_update_cal(GncSxEditorDialog *sxed)
|
||||
GDate end_date;
|
||||
g_date_clear (&end_date, 1);
|
||||
gnc_gdate_set_time64 (&end_date, gnc_date_edit_get_date(sxed->endDateEntry));
|
||||
gnc_dense_cal_store_update_recurrences_date_end(sxed->dense_cal_model, &first_date, recurrences, &end_date);
|
||||
gnc_dense_cal_store_update_recurrences_date_end(sxed->dense_cal_model, &start_date, recurrences, &end_date);
|
||||
}
|
||||
else if (gtk_toggle_button_get_active(sxed->optEndNone))
|
||||
{
|
||||
gnc_dense_cal_store_update_recurrences_no_end(sxed->dense_cal_model, &first_date, recurrences);
|
||||
gnc_dense_cal_store_update_recurrences_no_end(sxed->dense_cal_model, &start_date, recurrences);
|
||||
}
|
||||
else if (gtk_toggle_button_get_active(sxed->optEndCount))
|
||||
{
|
||||
gint num_remain
|
||||
= gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(sxed->endRemainSpin));
|
||||
gnc_dense_cal_store_update_recurrences_count_end(sxed->dense_cal_model, &first_date, recurrences, num_remain);
|
||||
gnc_dense_cal_store_update_recurrences_count_end(sxed->dense_cal_model, &start_date, recurrences, num_remain);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1569,9 +1569,14 @@ gnc_sxed_update_cal (GncSxEditorDialog2 *sxed)
|
||||
&& g_date_valid (&first_date)
|
||||
&& g_date_compare (last_sx_inst, &first_date) != 0)
|
||||
{
|
||||
/* last occurrence will be passed as initial date to update store
|
||||
* later on as well */
|
||||
start_date = *last_sx_inst;
|
||||
recurrenceListNextInstance (recurrences, &start_date, &first_date);
|
||||
}
|
||||
else
|
||||
/* move one day back so the store can get the proper first recurrence. */
|
||||
g_date_subtract_days(&start_date, 1);
|
||||
}
|
||||
|
||||
if (!g_date_valid (&first_date))
|
||||
@ -1597,17 +1602,17 @@ gnc_sxed_update_cal (GncSxEditorDialog2 *sxed)
|
||||
GDate end_date;
|
||||
g_date_clear (&end_date, 1);
|
||||
gnc_gdate_set_time64 (&end_date, gnc_date_edit_get_date (sxed->endDateEntry));
|
||||
gnc_dense_cal_store_update_recurrences_date_end (sxed->dense_cal_model, &first_date, recurrences, &end_date);
|
||||
gnc_dense_cal_store_update_recurrences_date_end (sxed->dense_cal_model, &start_date, recurrences, &end_date);
|
||||
}
|
||||
else if (gtk_toggle_button_get_active (sxed->optEndNone))
|
||||
{
|
||||
gnc_dense_cal_store_update_recurrences_no_end (sxed->dense_cal_model, &first_date, recurrences);
|
||||
gnc_dense_cal_store_update_recurrences_no_end (sxed->dense_cal_model, &start_date, recurrences);
|
||||
}
|
||||
else if (gtk_toggle_button_get_active (sxed->optEndCount))
|
||||
{
|
||||
gint num_remain
|
||||
= gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (sxed->endRemainSpin));
|
||||
gnc_dense_cal_store_update_recurrences_count_end (sxed->dense_cal_model, &first_date, recurrences, num_remain);
|
||||
gnc_dense_cal_store_update_recurrences_count_end (sxed->dense_cal_model, &start_date, recurrences, num_remain);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -715,16 +715,17 @@ sxftd_update_example_cal( SXFromTransInfo *sxfti )
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(sxfti->endDateGDE), (get.type == END_ON_DATE) );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(sxfti->n_occurences), (get.type == END_AFTER_N_OCCS) );
|
||||
|
||||
/* Use the day preceding the start date for the store to find the correct real start date */
|
||||
switch (get.type)
|
||||
{
|
||||
case NEVER_END:
|
||||
gnc_dense_cal_store_update_recurrences_no_end(sxfti->dense_cal_model, &startDate, schedule);
|
||||
gnc_dense_cal_store_update_recurrences_no_end(sxfti->dense_cal_model, &date, schedule);
|
||||
break;
|
||||
case END_ON_DATE:
|
||||
gnc_dense_cal_store_update_recurrences_date_end(sxfti->dense_cal_model, &startDate, schedule, &get.end_date);
|
||||
gnc_dense_cal_store_update_recurrences_date_end(sxfti->dense_cal_model, &date, schedule, &get.end_date);
|
||||
break;
|
||||
case END_AFTER_N_OCCS:
|
||||
gnc_dense_cal_store_update_recurrences_count_end(sxfti->dense_cal_model, &startDate, schedule, get.n_occurrences);
|
||||
gnc_dense_cal_store_update_recurrences_count_end(sxfti->dense_cal_model, &date, schedule, get.n_occurrences);
|
||||
break;
|
||||
default:
|
||||
g_warning("unknown get.type [%d]\n", get.type);
|
||||
|
@ -115,6 +115,8 @@ void gnc_plugin_page_register_sort_order_reverse_cb(GtkToggleButton *button, Gnc
|
||||
|
||||
static gchar *gnc_plugin_page_register_get_sort_order (GncPluginPage *plugin_page);
|
||||
void gnc_plugin_page_register_set_sort_order (GncPluginPage *plugin_page, const gchar *sort_order);
|
||||
static gboolean gnc_plugin_page_register_get_sort_reversed (GncPluginPage *plugin_page);
|
||||
void gnc_plugin_page_register_set_sort_reversed (GncPluginPage *plugin_page, gboolean reverse_order);
|
||||
|
||||
/* Callbacks for the "Filter By" dialog */
|
||||
void gnc_plugin_page_register_filter_select_range_cb(GtkRadioButton *button, GncPluginPageRegister *page);
|
||||
@ -540,6 +542,7 @@ typedef struct GncPluginPageRegisterPrivate
|
||||
gboolean original_save_order;
|
||||
gboolean save_order;
|
||||
gboolean reverse_order;
|
||||
gboolean original_reverse_order;
|
||||
} sd;
|
||||
|
||||
struct
|
||||
@ -1103,7 +1106,6 @@ gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page)
|
||||
{
|
||||
/* Set the sort order for the split register and status of save order button */
|
||||
priv->sd.save_order = FALSE;
|
||||
priv->sd.reverse_order = FALSE;
|
||||
order = gnc_plugin_page_register_get_sort_order(plugin_page);
|
||||
|
||||
PINFO("Loaded Sort order is %s", order);
|
||||
@ -1116,6 +1118,13 @@ gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page)
|
||||
priv->sd.original_save_order = priv->sd.save_order;
|
||||
g_free(order);
|
||||
|
||||
priv->sd.reverse_order = gnc_plugin_page_register_get_sort_reversed(plugin_page);
|
||||
gnc_split_reg_set_sort_reversed(priv->gsr, priv->sd.reverse_order);
|
||||
if (priv->sd.reverse_order)
|
||||
priv->sd.save_order = TRUE;
|
||||
|
||||
priv->sd.original_reverse_order = priv->sd.reverse_order;
|
||||
|
||||
/* Set the filter for the split register and status of save filter button */
|
||||
priv->fd.save_filter = FALSE;
|
||||
|
||||
@ -1743,6 +1752,45 @@ gnc_plugin_page_register_set_sort_order (GncPluginPage *plugin_page, const gchar
|
||||
return;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_plugin_page_register_get_sort_reversed (GncPluginPage *plugin_page)
|
||||
{
|
||||
GncPluginPageRegisterPrivate *priv;
|
||||
GNCLedgerDisplayType ledger_type;
|
||||
GNCLedgerDisplay *ld;
|
||||
Account *leader;
|
||||
gboolean sort_reversed = FALSE;
|
||||
|
||||
g_return_val_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (plugin_page), FALSE);
|
||||
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
|
||||
ld = priv->ledger;
|
||||
ledger_type = gnc_ledger_display_type (ld);
|
||||
leader = gnc_ledger_display_leader (ld);
|
||||
|
||||
if ((ledger_type == LD_SINGLE) || (ledger_type == LD_SUBACCOUNT))
|
||||
sort_reversed = xaccAccountGetSortReversed (leader);
|
||||
|
||||
return sort_reversed;
|
||||
}
|
||||
|
||||
void
|
||||
gnc_plugin_page_register_set_sort_reversed (GncPluginPage *plugin_page, gboolean reverse_order)
|
||||
{
|
||||
GncPluginPageRegisterPrivate *priv;
|
||||
GNCLedgerDisplay *ld;
|
||||
Account *leader;
|
||||
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
|
||||
ld = priv->ledger;
|
||||
leader = gnc_ledger_display_leader (ld);
|
||||
|
||||
if (leader != NULL)
|
||||
xaccAccountSetSortReversed (leader, reverse_order);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gnc_plugin_page_register_get_long_name (GncPluginPage *plugin_page)
|
||||
{
|
||||
@ -1893,6 +1941,8 @@ gnc_plugin_page_register_sort_response_cb (GtkDialog *dialog,
|
||||
if (response != GTK_RESPONSE_OK)
|
||||
{
|
||||
/* Restore the original sort order */
|
||||
gnc_split_reg_set_sort_reversed(priv->gsr, priv->sd.original_reverse_order);
|
||||
priv->sd.reverse_order = priv->sd.original_reverse_order;
|
||||
gnc_split_reg_set_sort_type(priv->gsr, priv->sd.original_sort_type);
|
||||
priv->sd.save_order = priv->sd.original_save_order;
|
||||
}
|
||||
@ -1905,6 +1955,7 @@ gnc_plugin_page_register_sort_response_cb (GtkDialog *dialog,
|
||||
type = gnc_split_reg_get_sort_type(priv->gsr);
|
||||
order = SortTypeasString(type);
|
||||
gnc_plugin_page_register_set_sort_order (plugin_page, order);
|
||||
gnc_plugin_page_register_set_sort_reversed (plugin_page, priv->sd.reverse_order);
|
||||
}
|
||||
}
|
||||
gnc_book_option_remove_cb(OPTION_NAME_NUM_FIELD_SOURCE,
|
||||
@ -1998,16 +2049,8 @@ gnc_plugin_page_register_sort_order_reverse_cb (GtkToggleButton *button,
|
||||
/* Compute the new save sort order */
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
|
||||
|
||||
if (gtk_toggle_button_get_active(button))
|
||||
{
|
||||
gnc_split_reg_set_sort_reversed(priv->gsr, FALSE);
|
||||
priv->sd.reverse_order = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gnc_split_reg_set_sort_reversed(priv->gsr, TRUE);
|
||||
priv->sd.reverse_order = FALSE;
|
||||
}
|
||||
priv->sd.reverse_order = gtk_toggle_button_get_active(button);
|
||||
gnc_split_reg_set_sort_reversed(priv->gsr, priv->sd.reverse_order);
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
@ -3122,6 +3165,7 @@ gnc_plugin_page_register_cmd_view_sort_by (GtkAction *action,
|
||||
button = GTK_WIDGET(gtk_builder_get_object (builder, "sort_reverse"));
|
||||
if(priv->sd.reverse_order == TRUE)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||
priv->sd.original_reverse_order = priv->sd.reverse_order;
|
||||
|
||||
priv->sd.num_radio = GTK_WIDGET(gtk_builder_get_object (builder, "BY_NUM"));
|
||||
priv->sd.act_radio = GTK_WIDGET(gtk_builder_get_object (builder, "BY_ACTION"));
|
||||
|
@ -1844,8 +1844,13 @@ gnc_split_reg_sort_notes_cb(GtkWidget *w, gpointer data)
|
||||
void
|
||||
gnc_split_reg_set_sort_reversed(GNCSplitReg *gsr, gboolean rev)
|
||||
{
|
||||
/* Note: sort_reversed is the boolean opposite of sort_increasing
|
||||
* so when rev == true, we're sorting decreasing
|
||||
* In other words, qof_query_set_sort_increasing should
|
||||
* always use the inverse of rev.
|
||||
*/
|
||||
Query *query = gnc_ledger_display_get_query( gsr->ledger );
|
||||
qof_query_set_sort_increasing (query, rev, rev, rev);
|
||||
qof_query_set_sort_increasing (query, !rev, !rev, !rev);
|
||||
gnc_ledger_display_refresh( gsr->ledger );
|
||||
}
|
||||
|
||||
|
@ -257,6 +257,7 @@ If you make a mistake or want to make changes later, you can edit the created Sc
|
||||
<property name="digits">3</property>
|
||||
<property name="snap_to_ticks">True</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Enter the annual interest rate in percent. Accepts values from 0.001 - 100. The Mortgage Assistant does not support zero-interest loans.</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@ -660,6 +661,7 @@ All accounts must have valid entries to continue.
|
||||
<object class="GtkEntry" id="amount_ent">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
|
@ -9,8 +9,12 @@ SET (html_HEADERS
|
||||
gnc-html-webkit-p.h
|
||||
)
|
||||
|
||||
SET (SWIG_GNC_HTML_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnc-html.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNC_HTML_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnc-html.i ${gncmod_html_HEADERS})
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_GNC_HTML_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnc-html.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_GNC_HTML_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnc-html.i ${gncmod_html_HEADERS})
|
||||
ELSE()
|
||||
SET (SWIG_GNC_HTML_C swig-gnc-html.c)
|
||||
ENDIF()
|
||||
|
||||
SET (html_SOURCES
|
||||
gncmod-html.c
|
||||
|
@ -78,34 +78,32 @@ gnc_commodity * gnc_import_select_commodity(const char * cusip,
|
||||
{
|
||||
tmp_namespace = namespace_list->data;
|
||||
DEBUG("Looking at namespace %s", tmp_namespace);
|
||||
|
||||
|
||||
/*Nested loop*/
|
||||
commodity_list = gnc_commodity_table_get_commodities(commodity_table,
|
||||
tmp_namespace);
|
||||
tmp_namespace);
|
||||
commodity_list = g_list_first(commodity_list);
|
||||
while ( commodity_list != NULL && retval == NULL)
|
||||
{
|
||||
const char* tmp_cusip = NULL;
|
||||
tmp_commodity = commodity_list->data;
|
||||
DEBUG("Looking at commodity %s", gnc_commodity_get_fullname(tmp_commodity));
|
||||
|
||||
if (gnc_commodity_get_cusip(tmp_commodity) != NULL &&
|
||||
cusip != NULL &&
|
||||
strncmp(gnc_commodity_get_cusip(tmp_commodity), cusip, strlen(cusip)) == 0)
|
||||
DEBUG("Looking at commodity %s",
|
||||
gnc_commodity_get_fullname(tmp_commodity));
|
||||
tmp_cusip = gnc_commodity_get_cusip(tmp_commodity);
|
||||
if (tmp_cusip != NULL && cusip != NULL)
|
||||
{
|
||||
retval = tmp_commodity;
|
||||
DEBUG("Commodity %s%s", gnc_commodity_get_fullname(retval), " matches.");
|
||||
int len = strlen(cusip) > strlen(tmp_cusip) ? strlen(cusip) :
|
||||
strlen(tmp_cusip);
|
||||
if (strncmp(tmp_cusip, cusip, len) == 0)
|
||||
{
|
||||
retval = tmp_commodity;
|
||||
DEBUG("Commodity %s%s",
|
||||
gnc_commodity_get_fullname(retval), " matches.");
|
||||
}
|
||||
}
|
||||
commodity_list = g_list_next(commodity_list);
|
||||
}
|
||||
/*End nested loop*/
|
||||
|
||||
namespace_list = g_list_next(namespace_list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
g_list_free(commodity_list);
|
||||
g_list_free(namespace_list);
|
||||
|
||||
|
@ -325,7 +325,28 @@ static Account *gnc_ofx_new_account(const char* name,
|
||||
g_list_free(valid_types);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* LibOFX has a daylight time handling bug,
|
||||
* https://sourceforge.net/p/libofx/bugs/39/, which causes it to adjust the
|
||||
* timestamp for daylight time even when daylight time is not in
|
||||
* effect. HAvE_OFX_BUG_39 reflects the result of checking for this bug during
|
||||
* configuration, and fix_ofx_bug_39() corrects for it.
|
||||
*/
|
||||
static time64
|
||||
fix_ofx_bug_39 (time64 t)
|
||||
{
|
||||
#if HAVE_OFX_BUG_39
|
||||
struct tm stm;
|
||||
gnc_localtime_r(&t, &stm);
|
||||
if (!stm.tm_isdst)
|
||||
{
|
||||
time64 new_t;
|
||||
stm.tm_isdst = 1;
|
||||
new_t = gnc_mktime(&stm);
|
||||
t += t - new_t;
|
||||
}
|
||||
#endif
|
||||
return t;
|
||||
}
|
||||
|
||||
int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_user_data)
|
||||
{
|
||||
@ -386,11 +407,13 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_u
|
||||
if (data.date_posted_valid && (data.date_posted != 0))
|
||||
{
|
||||
/* The hopeful case: We have a posted_date */
|
||||
data.date_posted = fix_ofx_bug_39 (data.date_posted);
|
||||
xaccTransSetDatePostedSecsNormalized(transaction, data.date_posted);
|
||||
}
|
||||
else if (data.date_initiated_valid && (data.date_initiated != 0))
|
||||
{
|
||||
/* No posted date? Maybe we have an initiated_date */
|
||||
data.date_initiated = fix_ofx_bug_39 (data.date_initiated);
|
||||
xaccTransSetDatePostedSecsNormalized(transaction, data.date_initiated);
|
||||
}
|
||||
else
|
||||
|
103
src/optional/python-bindings/CMakeLists.txt
Normal file
103
src/optional/python-bindings/CMakeLists.txt
Normal file
@ -0,0 +1,103 @@
|
||||
|
||||
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET(SWIG_FILES ${CMAKE_CURRENT_SOURCE_DIR}/gnucash_core.i ${CMAKE_CURRENT_SOURCE_DIR}/timespec.i)
|
||||
SET(GNUCASH_CORE_C_INCLUDES
|
||||
${CMAKE_BINARY_DIR}/src/config.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/qofsession.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/qofbook.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/qofbackend.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/qoflog.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/qofutil.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/qofid.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/guid.h
|
||||
${CMAKE_SOURCE_DIR}/src/gnc-module/gnc-module.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gnc-engine.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/Transaction.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/Split.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/Account.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gnc-commodity.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gnc-lot.h
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof/gnc-numeric.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncCustomer.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncEmployee.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncVendor.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncAddress.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncBillTerm.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncOwner.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncInvoice.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncJob.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncEntry.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncTaxTable.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gncIDSearch.h
|
||||
${CMAKE_SOURCE_DIR}/src/engine/gnc-pricedb.h
|
||||
${CMAKE_SOURCE_DIR}/src/app-utils/gnc-prefs-utils.h
|
||||
)
|
||||
|
||||
SET (SWIG_GNUCASH_CORE_C ${CMAKE_CURRENT_BINARY_DIR}/gnucash_core.c)
|
||||
|
||||
GNC_ADD_SWIG_PYTHON_COMMAND (swig-gnucash-core ${SWIG_GNUCASH_CORE_C}
|
||||
${SWIG_FILES}
|
||||
${CMAKE_SOURCE_DIR}/src/base-typemaps.i
|
||||
${CMAKE_SOURCE_DIR}/src/engine/engine-common.i
|
||||
${GNUCASH_CORE_C_INCLUDES}
|
||||
)
|
||||
ELSE()
|
||||
SET (SWIG_GNUCASH_CORE_C gnucash_core.c)
|
||||
ENDIF()
|
||||
|
||||
IF(WITH_PYTHON)
|
||||
|
||||
SET(gnucash_core_c_INCLUDE_DIRS
|
||||
${CMAKE_SOURCE_DIR}/src/libqof/qof
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/engine
|
||||
${CMAKE_SOURCE_DIR}/src/gnome-utils
|
||||
${CMAKE_SOURCE_DIR}/src/app-utils
|
||||
${CMAKE_SOURCE_DIR}/src/gnc-module
|
||||
${CMAKE_SOURCE_DIR}/src/gnome
|
||||
${CMAKE_SOURCE_DIR}/src/core-utils
|
||||
${CMAKE_SOURCE_DIR}/src/gnc-module
|
||||
${GLIB_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
ADD_LIBRARY(gnucash_core_c MODULE ${SWIG_GNUCASH_CORE_C})
|
||||
TARGET_INCLUDE_DIRECTORIES(gnucash_core_c PRIVATE ${gnucash_core_c_INCLUDE_DIRS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(gnucash_core_c gnc-qof gnc-module gncmod-engine gncmod-app-utils ${GLIB_LIBS} ${PYTHON_LIBRARIES})
|
||||
SET_TARGET_PROPERTIES(gnucash_core_c PROPERTIES PREFIX "_")
|
||||
TARGET_COMPILE_OPTIONS(gnucash_core_c PRIVATE -Wno-implicit -Wno-missing-prototypes -Wno-declaration-after-statement -Wno-missing-declarations)
|
||||
|
||||
ADD_EXECUTABLE(sqlite3test EXCLUDE_FROM_ALL sqlite3test.c ${SWIG_GNUCASH_CORE_C})
|
||||
TARGET_LINK_LIBRARIES(sqlite3test gnc-qof gnc-module gncmod-engine gncmod-app-utils ${GLIB_LIBS} ${PYTHON_LIBRARIES})
|
||||
TARGET_INCLUDE_DIRECTORIES(sqlite3test PRIVATE ${gnucash_core_c_INCLUDE_DIRS})
|
||||
TARGET_COMPILE_OPTIONS(sqlite3test PRIVATE -Wno-implicit -Wno-missing-prototypes -Wno-declaration-after-statement -Wno-missing-declarations)
|
||||
|
||||
ADD_TEST(NAME sqlite3test COMMAND sqlite3test)
|
||||
ADD_DEPENDENCIES(check sqlite3test)
|
||||
|
||||
|
||||
# Determine where to install the python libraries.
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig; print sysconfig.get_path('platlib', vars = { 'platbase' : '${CMAKE_INSTALL_PREFIX}' } )"
|
||||
RESULT_VARIABLE PYTHON_SYSCONFIG_RESULT
|
||||
OUTPUT_VARIABLE PYTHON_SYSCONFIG_OUTPUT
|
||||
ERROR_VARIABLE PYTHON_SYSCONFIG_ERROR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
IF (PYTHON_SYSCONFIG_RESULT)
|
||||
MESSAGE(SEND_ERROR "Could not determine Python site-package directory:\n${PYTHON_SYSCONFIG_ERROR}")
|
||||
ENDIF()
|
||||
|
||||
INSTALL(TARGETS gnucash_core_c
|
||||
LIBRARY DESTINATION ${PYTHON_SYSCONFIG_OUTPUT}/gnucash
|
||||
ARCHIVE DESTINATION ${PYTHON_SYSCONFIG_OUTPUT}/gnucash
|
||||
)
|
||||
INSTALL(FILES __init__.py function_class.py gnucash_business.py gnucash_core.py
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gnucash_core_c.py
|
||||
DESTINATION ${PYTHON_SYSCONFIG_OUTPUT}/gnucash
|
||||
)
|
||||
|
||||
ENDIF()
|
@ -62,6 +62,7 @@
|
||||
#include "Split.h"
|
||||
#include "Account.h"
|
||||
#include "gnc-commodity.h"
|
||||
#include "gnc-environment.h"
|
||||
#include "gnc-lot.h"
|
||||
#include "gnc-numeric.h"
|
||||
#include "gncCustomer.h"
|
||||
|
@ -710,7 +710,15 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|
||||
g_date_free (date);
|
||||
}
|
||||
timespecFromTime64 (&today, gnc_time (NULL)); // set today to the current date
|
||||
gncEntrySetDateEntered (entry, today);
|
||||
if (strlen (date_opened) != 0) // If a date is specified in CSV
|
||||
{
|
||||
qof_scan_date (date_opened, &day, &month, &year); // FIXME: Must check for the return value of qof_scan_date!
|
||||
gncEntrySetDate(entry, gnc_dmy2timespec (day, month, year));
|
||||
}
|
||||
else
|
||||
{
|
||||
gncEntrySetDateEntered(entry, today);
|
||||
}
|
||||
// Remove escaped quotes
|
||||
desc = un_escape(desc);
|
||||
notes = un_escape(notes);
|
||||
|
17
src/python/CMakeLists.txt
Normal file
17
src/python/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# handle pycons directory
|
||||
|
||||
SET(gncmod_python_SOURCES gncmod-python.c)
|
||||
|
||||
ADD_LIBRARY(gncmod-python ${gncmod_python_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(gncmod-python gnc-module gnc-core-utils-python gncmod-app-utils-python
|
||||
${PYTHON_LIBRARIES} ${GLIB_LIBS}) # ${PYTHON_EXTRA_LIBS}
|
||||
TARGET_INCLUDE_DIRECTORIES(gncmod-python
|
||||
PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/core_utils ${CMAKE_SOURCE_DIR}/gnc-module ${PYTHON_INCLUDE_DIR})
|
||||
TARGET_COMPILE_OPTIONS(gncmod-python PRIVATE -DG_LOG_DOMAIN=\"gnc.python\")
|
||||
INSTALL(TARGETS gncmod-python
|
||||
LIBRARY DESTINATION lib/gnucash
|
||||
ARCHIVE DESTINATION lib/gnucash
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
INSTALL(FILES init.py DESTINATION share/python)
|
@ -49,7 +49,7 @@ sub check_modules {
|
||||
sub report {
|
||||
my($itemname, $qh, $verbose) = @_;
|
||||
my ($symbol, $date, $currency, $last, $nav, $price, $timezone, $keyname);
|
||||
my($gccanuse);
|
||||
my($gccanuse, $gcshoulduse) = (1, 1);
|
||||
|
||||
# Sanity check returned results
|
||||
if ((keys %$qh) < 1) {
|
||||
@ -76,7 +76,6 @@ sub report {
|
||||
}
|
||||
|
||||
# Parse the quote fields and put warnings where necessary.
|
||||
$gccanuse = 1;
|
||||
if (defined($$qh{$itemname, "symbol"})) {
|
||||
$symbol = $$qh{$itemname, "symbol"};
|
||||
} else {
|
||||
@ -87,7 +86,7 @@ sub report {
|
||||
$date = $$qh{$itemname, "date"};
|
||||
} else {
|
||||
$date = "** missing **";
|
||||
$gccanuse = 0;
|
||||
$gcshoulduse = 0;
|
||||
}
|
||||
if (defined($$qh{$itemname, "currency"})) {
|
||||
$currency = $$qh{$itemname, "currency"};
|
||||
@ -116,7 +115,7 @@ sub report {
|
||||
# Dump gnucash recognized fields
|
||||
printf "Finance::Quote fields Gnucash uses:\n";
|
||||
printf " symbol: %-20s <=== required\n", $symbol;
|
||||
printf " date: %-20s <=== required\n", $date;
|
||||
printf " date: %-20s <=== recommended\n", $date;
|
||||
printf " currency: %-20s <=== required\n", $currency;
|
||||
printf " last: %-20s <=\\ \n", $last;
|
||||
printf " nav: %-20s <=== one of these\n", $nav;
|
||||
@ -125,9 +124,11 @@ sub report {
|
||||
|
||||
# Report failure
|
||||
if ($gccanuse == 0) {
|
||||
printf "\n** This stock quote cannot be used by gnucash!!\n\n";
|
||||
printf "\n** This stock quote cannot be used by GnuCash!\n\n";
|
||||
} elsif ($gcshoulduse == 0) {
|
||||
printf "\n** This quote will have today's date, which might be incorrect.\n";
|
||||
printf " GnuCash will use it, but you might prefer that it doesn't.\n\n";
|
||||
}
|
||||
|
||||
# Dump all fields if requested
|
||||
if ($verbose) {
|
||||
printf "\nAll fields returned by Finance::Quote for stock $itemname\n\n";
|
||||
|
@ -54,6 +54,7 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
|
||||
--gnc-module-dir ${top_builddir}/src/report/business-reports \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
@ -61,6 +62,7 @@ GUILE_COMPILE_ENV = \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/report/standard-reports \
|
||||
--guile-load-dir ${top_builddir}/src/report/business-reports \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
@ -71,7 +73,8 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/gnc-module \
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/business-reports
|
||||
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
|
@ -58,6 +58,7 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/locale-specific/us \
|
||||
--gnc-module-dir ${top_builddir}/src/tax/us \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
@ -65,6 +66,7 @@ GUILE_COMPILE_ENV = \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/report/locale-specific/us \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/tax/us \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
@ -76,7 +78,8 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/locale-specific/us
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
GNC_UNINSTALLED=yes \
|
||||
|
@ -8,8 +8,12 @@ SET (report_gnome_HEADERS
|
||||
window-report.h
|
||||
)
|
||||
|
||||
SET (SWIG_REPORT_GNOME_C ${CMAKE_CURRENT_BINARY_DIR}/swig-report-gnome.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_REPORT_GNOME_C} ${CMAKE_CURRENT_SOURCE_DIR}/report-gnome.i ${report_gnome_HEADERS})
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_REPORT_GNOME_C ${CMAKE_CURRENT_BINARY_DIR}/swig-report-gnome.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_REPORT_GNOME_C} ${CMAKE_CURRENT_SOURCE_DIR}/report-gnome.i ${report_gnome_HEADERS})
|
||||
ELSE()
|
||||
SET (SWIG_REPORT_GNOME_C swig-report-gnome.c)
|
||||
ENDIF()
|
||||
|
||||
SET (report_gnome_SOURCES
|
||||
${SWIG_REPORT_GNOME_C}
|
||||
|
@ -4,8 +4,13 @@ SET (report_system_HEADERS
|
||||
gnc-report.h
|
||||
)
|
||||
|
||||
SET (SWIG_REPORT_SYSTEM_C ${CMAKE_CURRENT_BINARY_DIR}/swig-report-system.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_REPORT_SYSTEM_C} ${CMAKE_CURRENT_SOURCE_DIR}/report-system.i ${report_system_HEADERS})
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_REPORT_SYSTEM_C ${CMAKE_CURRENT_BINARY_DIR}/swig-report-system.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_REPORT_SYSTEM_C} ${CMAKE_CURRENT_SOURCE_DIR}/report-system.i ${report_system_HEADERS})
|
||||
ELSE()
|
||||
SET (SWIG_REPORT_SYSTEM_C swig-report-system.c)
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET (report_system_SOURCES
|
||||
${SWIG_REPORT_SYSTEM_C}
|
||||
|
@ -119,6 +119,7 @@ GUILE_COMPILE_ENV = \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/app-utils \
|
||||
|
@ -81,12 +81,14 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/standard-reports \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/report/standard-reports \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
@ -97,7 +99,8 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/standard-reports
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
GNC_UNINSTALLED=yes \
|
||||
|
@ -69,12 +69,14 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/stylesheets \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/report/stylesheets \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
@ -85,7 +87,8 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/stylesheets
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
GNC_UNINSTALLED=yes \
|
||||
|
@ -53,12 +53,14 @@ GUILE_COMPILE_ENV = \
|
||||
--gnc-module-dir ${top_builddir}/src/gnome-utils \
|
||||
--gnc-module-dir ${top_builddir}/src/html \
|
||||
--gnc-module-dir ${top_builddir}/src/report/report-system \
|
||||
--gnc-module-dir ${top_builddir}/src/report/utility-reports \
|
||||
--guile-load-dir ${top_builddir}/src/app-utils \
|
||||
--guile-load-dir ${top_builddir}/src/core-utils \
|
||||
--guile-load-dir ${top_builddir}/src/engine \
|
||||
--guile-load-dir ${top_builddir}/src/gnc-module \
|
||||
--guile-load-dir ${top_builddir}/src/gnome-utils \
|
||||
--guile-load-dir ${top_builddir}/src/report/report-system \
|
||||
--guile-load-dir ${top_builddir}/src/report/utility-reports \
|
||||
--guile-load-dir ${top_builddir}/src/scm \
|
||||
--library-dir ${top_builddir}/src/engine \
|
||||
--library-dir ${top_builddir}/src/libqof/qof \
|
||||
@ -69,7 +71,8 @@ GUILE_COMPILE_ENV = \
|
||||
--library-dir ${top_builddir}/src/backend/xml \
|
||||
--library-dir ${top_builddir}/src/backend/sql \
|
||||
--library-dir ${top_builddir}/src/html \
|
||||
--library-dir ${top_builddir}/src/report/report-system
|
||||
--library-dir ${top_builddir}/src/report/report-system \
|
||||
--library-dir ${top_builddir}/src/report/utility-reports
|
||||
|
||||
%.go : %.scm .scm-links $(pkglib_LTLIBRARIES)
|
||||
GNC_UNINSTALLED=yes \
|
||||
|
@ -24,16 +24,28 @@ IF (UNIX)
|
||||
TARGET_COMPILE_OPTIONS(test-core PRIVATE -fPIC)
|
||||
ENDIF()
|
||||
|
||||
SET (SWIG_UNITTEST_SUPPORT_GUILE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-unittest-support-guile.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_UNITTEST_SUPPORT_GUILE_C}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unittest-support.i ${test_core_HEADERS})
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_UNITTEST_SUPPORT_GUILE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-unittest-support-guile.c)
|
||||
GNC_ADD_SWIG_COMMAND (${SWIG_UNITTEST_SUPPORT_GUILE_C}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unittest-support.i ${test_core_HEADERS})
|
||||
SET (SWIG_UNITTEST_SUPPORT_PYTHON_C ${CMAKE_CURRENT_BINARY_DIR}/swig-unittest-support-python.c)
|
||||
GNC_ADD_SWIG_PYTHON_COMMAND (swig-unittest-support-python ${SWIG_UNITTEST_SUPPORT_PYTHON_C} ${CMAKE_CURRENT_SOURCE_DIR}/unittest-support.i)
|
||||
ELSE()
|
||||
SET (SWIG_UNITTEST_SUPPORT_GUILE_C swig-unittest-support-guile.c)
|
||||
SET (SWIG_UNITTEST_SUPPORT_PYTHON_C swig-unittest-support-python.c)
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(test_core_guile_SOURCES ${SWIG_UNITTEST_SUPPORT_GUILE_C})
|
||||
|
||||
ADD_LIBRARY(test-core-guile ${test_core_guile_SOURCES})
|
||||
ADD_LIBRARY(test-core-guile ${SWIG_UNITTEST_SUPPORT_GUILE_C})
|
||||
TARGET_LINK_LIBRARIES(test-core-guile test-core ${GUILE_LDFLAGS} ${GLIB2_LDFLAGS})
|
||||
|
||||
IF (WITH_PYTHON)
|
||||
ADD_LIBRARY(unittest_support MODULE ${SWIG_UNITTEST_SUPPORT_PYTHON_C})
|
||||
TARGET_LINK_LIBRARIES(unittest_support test-core ${PYTHON_LIBRARIES})
|
||||
TARGET_INCLUDE_DIRECTORIES(unittest_support PRIVATE ${PYTHON_INCLUDE_DIRS})
|
||||
SET_TARGET_PROPERTIES(unittest_support PROPERTIES PREFIX "_")
|
||||
ENDIF()
|
||||
|
||||
SET(test_core_SCHEME unittest-support.scm)
|
||||
|
||||
SET(GUILE_OUTPUT_DIR gnucash)
|
||||
|
Loading…
Reference in New Issue
Block a user