Commit Graph

253 Commits

Author SHA1 Message Date
Christopher Lam
f7378e9332 TR & options: upgrade HTML to XHTML
Upgrade <br> tags to <br /> to allow well-formed XML parsing.
2018-02-23 18:19:59 +08:00
John Ralls
a4399ee732 Bug 792157 - Cannot create account with different currency
Restore force-insert logic that had gotten lost in the C++ conversion.
2018-02-20 17:32:22 -08:00
John Ralls
78705dc8be Bug 792833 - User specifies source of 'num' field'; either...
transaction number or split action (requires at least GnuCash 2.5.0)

Strip leading delimiters from KVP keys when reading them from the
database. Leading delimiters are incorrectly included in databases
created with GnuCash 2.6.x.
2018-02-20 12:02:38 -08:00
Geert Janssens
50e2a3def7 Use a platform dependent package name for gnc_user[config|data]_dir
Windows and OS X expect the directory name to be capitalized while linux typically uses an all-lowercase name.
2018-02-19 22:53:32 +01:00
John Ralls
36ad5064e4 Move gnc:substring-replace-from-to back to utilities.scm
It's used in report.scm as well as qif-imp.
2018-02-19 13:27:44 -08:00
John Ralls
9865934410 Reduce warning about failing to dlopen a module to debug.
There's another warning for runtime about not being able to load
a specified module and this one creates a lot of noise during a parallel
build.
2018-02-19 12:27:59 -08:00
Geert Janssens
62fd179f87 Adjust gnc_userconfig_dir and get_userconfig_home to the former returns a subdirectory of the latter
Also add a few comments to make the distinction more clear.
2018-02-19 20:31:51 +01:00
Geert Janssens
27256357f5 Merge branch 'BUG792809' of https://github.com/Bob-IT/gnucash into unstable 2018-02-19 20:31:33 +01:00
John Ralls
5929bb3bf8 Move string.scm to qif-imp, the only place it's used. 2018-02-19 11:25:08 -08:00
John Ralls
4ad2359872 Remove unused functions from utilities.scm
moving safe-strcmp to aging.scm, it's sole use.
2018-02-19 11:10:14 -08:00
John Ralls
720acddff2 Restore fin.scm, incorrectly removed earlier.
But put it in app-utils where it's used and load it explicitly.
2018-02-19 10:50:38 -08:00
fell
464281644c Merge branch 'maint' into unstable
Should resolve issue mentioned in PR #277
Conflicts:
	libgnucash/app-utils/gnc-sx-instance-model.c: resolved
	po/de.po: changes in maint ignored
2018-02-19 15:25:53 +01:00
John Ralls
f4965ae2ac Move direct check dependencies to the originating CMakeLists.txt.
Removing transitive dependencies from being declared direct.
2018-02-18 22:16:27 -08:00
John Ralls
605f3466cb Rename the gnc-module test libraries to be consistent with other modules. 2018-02-18 16:07:25 -08:00
John Ralls
a5f46a5e45 More Scheme dependency additions. 2018-02-18 15:59:00 -08:00
Robert Fewell
b2ed250db1 Change gsettings upgrade test so old_maj_min is < 207
With the original value of 208, the use-gnucash-color-theme kept on
being reset to what ever the use-theme-colors was, by default false.
2018-02-18 22:41:39 +00:00
Robert Fewell
7c9ac17cb6 Move the user CSS settings file
Move the CSS settings file to a location based on XDG_CONFIG_HOME which
is OS dependant but with slight changes for Windows and OS X.

- Windows: CSIDL_APPDATA/Gnucash
- OS X: $HOME/Application Support/Gnucash
- Linux: $XDG_CONFIG_HOME/gnucash (or the default $HOME/.config/gnucash)
2018-02-18 22:40:45 +00:00
John Ralls
48bdab38d4 Replace sprintf with Guile's built-in format. 2018-02-17 15:24:44 -08:00
Geert Janssens
e3cd9f88c9 Merge branch 'unstable-TR-progress' of https://github.com/christopherlam/gnucash into unstable 2018-02-17 23:22:23 +01:00
Geert Janssens
07c3162a73 Fix a few leftovers from work on main.scm
- Load proper file in gnucash-bin.c
- Load string.scm (now in gnucash subdir) to make reports and qif-import work again
2018-02-17 21:09:07 +01:00
Geert Janssens
de4b72dc11 Drop install rule for previously removed (scm) config file 2018-02-17 20:09:36 +01:00
Christopher Lam
b261eb18b3 Revert options.scm lookup-options renaming
and use (gnc:error) as advised
2018-02-17 08:17:01 +08:00
Christopher Lam
276a7d24d2 REWRITE income-gst-statement.scm
This commit rewrites income-gst-statement.scm to be a derivation
of transaction.scm, modifying the options database and passing
custom arguments to the trep-renderer.

This should hopefully reduce risk of errors.
2018-02-17 08:17:01 +08:00
Christopher Lam
88b3446299 ADD-API: gnc:option-make-internal!, gnc:unregister-option
This commit adds 2 additional helper calls, primarily useful for
derived reports.

gnc:option-make-internal! will hide an existing option. e.g.
a derived report can set the value for a Display/* option and
hide it from the user.

gnc:unregister-option will unregister option. This is primarily
useful for derived options e.g. another report copies from
transaction.scm and removes some options and recreates them with
different parameters.

For example, unregister existing option from section "Accounts"
name "Accounts", and recreate with different parameters e.g.
limited account types.
2018-02-17 08:16:23 +08:00
Christopher Lam
12f3099f59 (infobox)->(gnc:render-options-changed) in options.scm
This commit will change (infobox) to a general-purpose
renderer for "all options changed by user" in options.scm
and can be inserted into any report. It reduces the
number of strings required.
2018-02-17 08:16:23 +08:00
John Ralls
cd8f2b7c7e Rename libgnucash/scm/main.scm to utilities.scm
Because it hasn't been "main" since GnuCash became a C program.
2018-02-16 15:52:19 -08:00
John Ralls
32f6958ebb We're done modularizing. About 16 years ago. 2018-02-16 15:41:47 -08:00
John Ralls
8b0d9425e9 Remove some obsolete and unused Scheme files. 2018-02-16 15:37:46 -08:00
John Ralls
26e51339a6 Rework the Scheme target dependencies.
Should fix Bug 793122 - 2.7.3: ninja build fails
along with the nagging parallel-build problems.
2018-02-16 14:28:46 -08:00
John Ralls
04408650c1 Fix double free, caused test to crash on Mac. 2018-02-15 11:04:15 -08:00
John Ralls
6b49b3ba4c Bug 792763 - deleting a transaction can cause a SIGSEGV
Prevent a NULL transaction from crashing xaccTransCountSplits and
prevent gnc_plugin_business_update_menus from calling it with a
NULL transaction.
2018-02-02 13:05:20 -08:00
Geert Janssens
59fb8efaf9 Merge branch 'maint' into unstable 2018-02-02 18:57:24 +01:00
Geert Janssens
0d4f6e054d Improve gnc_data_home verification and creation
- Don't attempt to create a subdirectory of a non-existing home directory (use tmpdir as base directory in that case)
- Make sure all tests run in an environment with GNC_BUILDDIR and GNC_UNINSTALLED set. Otherwise
  the one-shot old .gnucash to new GNC_DATA_HOME migration may already have run at build time,
  preventing us from informing the user a run time.
- Re-enable the userdata-dir with invalid home test (linux only).
2018-02-02 10:24:04 +01:00
Geert Janssens
0f5bb35166 Disable the proper test... 2018-02-01 22:31:27 +01:00
Geert Janssens
90517b69ce Temporarily disable test that breaks on travis only
It needs some more tweaking to cope with the false
assumption the builder can't create a temporary directory on /
2018-02-01 20:43:49 +01:00
Geert Janssens
2f16b092f5 Simplify filepath init code
It will no longer attempt to use /home/janssege/.gnucash. That was
requiring lots of extra conditions.
It will also default to a base directory (gnc_data_home) in the
build dir if it detects the code is run during building or testing.
That again allows to simplify it as there's no need for temp dir
juggling in case the build environment doesn't have a writable home dir.
2018-02-01 19:17:17 +01:00
Geert Janssens
3c13f565d3 Merge branch 'unstable-fix-business-reports' of https://github.com/christopherlam/gnucash into unstable 2018-01-31 18:44:04 +01:00
Geert Janssens
ff24970f5f Add GENERATE_SWIG_WRAPPERS option to control the generation of swig wrappers independently of whether we're building from git
The swig wrappers don't really depend on git (but rather on swig) and there can be
situations the builder wants to generate the wrappers also from a tar ball.
2018-01-31 16:16:59 +01:00
Christopher Lam
862956a760 BUGFIX: invoice posted-date is no longer 0 for unposted invoices
This commit fixes business reports caused by 91f4b19039
whereby the posted-date for unposted invoice was changed
from 0 to MAXINT. Now we need to use (gncInvoiceIsPosted)
or (gncInvoiceDateExists) instead.
2018-01-30 19:29:04 +08:00
Geert Janssens
49a936c1fd Rewrite gnc_add_swig_guile_command to work in dist tarball as well
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
2018-01-29 19:46:44 +01:00
Geert Janssens
36cb167b68 Rewrite gnc_add_swig_python_command to work in dist tarball as well
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
2018-01-29 19:46:44 +01:00
Geert Janssens
ec213360f3 Review which built files are really needed in the dist tarball
Several were only there because they used to be generated via autogen.sh
and hence had to be included because autogen.sh was not supposed to be run
in a tarball based build.
A few others aren't clear so I have left them in for now:
- gnucash.1 (man page)
- gnucash-design.info (because it's unclear what we want to do with that one)

These files should clearly be in the tarball:
- gnucash.pot -> for our translators
- ChangeLog -> can't be generated outside of a git repo
- gnc-vcs-info.h -> can't be generated outside of a git repo
- guile/python bindings -> to avoid a swig dependency when building from tarball
2018-01-29 19:46:44 +01:00
Geert Janssens
4317d8a8f6 Improve handling of generated distributable files
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
  no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
  reason they were defined as targets was to ensure they got built
  before the dist tarball. This is now properly handled by the
  dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
  was not the way to do it according to that property's help page)
2018-01-29 19:46:44 +01:00
Geert Janssens
3dff4e5211 Fix make dist on a clean checkout
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.

This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).

Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
2018-01-29 19:46:44 +01:00
Geert Janssens
18feaa16a7 Remove support code to load qof backend in autotools based build environment 2018-01-26 18:26:06 +01:00
Geert Janssens
00396db560 Remove the .in extension from test-real-data.sh and stop configuring it for autotools
We have dropped support for autotools and cmake invokes this script using /bin/bash <script>
So the exact shebang value is not relevant any more
2018-01-26 18:26:06 +01:00
Geert Janssens
0f4a72b49f Remove unused file 2018-01-26 18:26:06 +01:00
Geert Janssens
85bfbd8e82 Some minor cleanups after the autotools removal
This includes removal of the now unused make-gnucash-potfiles.in,
checking for CMakeLists.txt rather than Makefile.am in gnc-vcs-info,
upating the HACKING file,
and generally updating references to autotools.

I have kept "Makefile.*" exclude patterns in our CMakeLists.txt files
because they may still be lingering in the source directory from
previous autogen.sh runs. At some point these should probably be
removed as well still, together with the gitignore references to them.
2018-01-26 18:22:48 +01:00
John Ralls
43ad7accda Remove stray addition from 34cc103e94. 2018-01-25 14:17:23 -08:00
John Ralls
a7cfedb9dd Remove overview links to nonexistant articles. 2018-01-25 13:45:02 -08:00