Random numbers are 0 sometimes, especially on systems with smaller
RAND_MAX. Do not use it as divisor and repeat the run when we hit one.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15474 57a11ea4-9604-0410-9ed3-97b8803252fd
Calculate the seconds since the start of the UNIX epoch directly without
the help of mktime. This also works on Windows. Systems with timegm are
unaffected.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15472 57a11ea4-9604-0410-9ed3-97b8803252fd
If the new user dialog is closed with the help of the window manager,
the delete_event is not handled and g_assert_not_reached() is reached by
the code. Treat it like a click on "Cancel" instead.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15459 57a11ea4-9604-0410-9ed3-97b8803252fd
Mkstemp is unavailable on Windows and g_rename is preferred. Completes
r15435 on trunk and must not be backported.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15449 57a11ea4-9604-0410-9ed3-97b8803252fd
Update glib, freetype, pango, gtk and gtkhtml. Use libgnurx which should
be equivalent to regex-spencer despite the naming change. Put -lregex
into REGEX_LDFLAGS. Freetype 2.2.1 has a pkgconfig file included now.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15446 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove empty directory lib/glib26. Add lib/glib28 instead with the
necessary sources and headers to have the following functions even on a
GLib 2.6 system (!defined(HAVE_GLIB_2_8))
- g_access, g_chmod,
- g_file_set_contents,
- g_win32_locale_filename_from_utf8.
Make use of them, improving r15429 and r15430.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15445 57a11ea4-9604-0410-9ed3-97b8803252fd
If DISABLE_OPTIMIZATIONS is "yes", add "-O0" to CFLAGS. This will make the
binaries slower, smaller and easier to debug. Also add
"--disable-static" to the configuration of libtool, guile and libgsf.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15434 57a11ea4-9604-0410-9ed3-97b8803252fd
As g_access is new in GLib 2.8, use _waccess directly. Also free the
results of g_utf8_to_utf16.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15430 57a11ea4-9604-0410-9ed3-97b8803252fd
To unlink the lock file we need write-access on it. As g_chmod is new in
GLib 2.8, use _wchmod directly.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15429 57a11ea4-9604-0410-9ed3-97b8803252fd
Slib 3a4 changed the way to determine whether to use natively supported
features or the ones provided by slib. This leads to several problems:
* some code creates a record with one implementation and code uses it
with the other implementation
* slibs sort does not seem to work with guile 1.6.8 arrays and even
exposes a bug in those arrays
Return to the status quo by removing all (require 'sort) and (require
'record). GnuCash depends on Guile >= 1.6 which should feature that.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15428 57a11ea4-9604-0410-9ed3-97b8803252fd
The DDLs of OpenSSL, Gwenhywfar and AqBanking must be in the PATH for
GnuCash+AqBanking to work. The distributed version includes them in
\bin, but PATH was incomplete for the gnucash shell and batch scripts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15423 57a11ea4-9604-0410-9ed3-97b8803252fd
The average balance report does not specify a title for the plot, so we
must not printf it or GnuCash will crash on Windows.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15420 57a11ea4-9604-0410-9ed3-97b8803252fd
g_open is necessary to use the wide character api and creat() is
equivalent to open with O_CREAT|O_WRONLY|O_TRUNC.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15413 57a11ea4-9604-0410-9ed3-97b8803252fd
getenv returns the pure bytes, whereas g_getenv converts the value to
the GLib filename encoding, i.e. UTF-8 on Windows. Also use TRUE instead
of 1 as overwrite argument to g_setenv.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15412 57a11ea4-9604-0410-9ed3-97b8803252fd
* Add $_OPENSSL_UDIR/bin to PATH.
* No need to copy OpenSSL libraries from WINDIR\\system32, because we
switched to the GnuWin32 package and even checked that system32 is
clean.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15411 57a11ea4-9604-0410-9ed3-97b8803252fd
g_open is not #defined as open on Windows and always needs three
arguments. Use 0 where missing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15410 57a11ea4-9604-0410-9ed3-97b8803252fd
Avoid memory corruption by reserving enough bytes on the stack for a
date buffer. Patch by Richard Earnshaw <rearnsha@netbsd.org>.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15409 57a11ea4-9604-0410-9ed3-97b8803252fd
Replace open, fopen, stat and unlink by their GLib wrappers so that
files on Windows will be handled with the wide character api.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15407 57a11ea4-9604-0410-9ed3-97b8803252fd
Replace opendir, readdir and closedir by their GLib wrappers so that
files on Windows will be retrieved with the wide character api.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15403 57a11ea4-9604-0410-9ed3-97b8803252fd
Ask for GLib 2.6 and GTK+ 2.6. Let the included GOffice 0.0.4 and LibGSF
1.12.3 use their native base dependencies. Remove all #ifdefs and
compatibility code that were necessary to make GnuCash, GOffice and
LibGSF compile on an older setup (GLib 2.4, Pango 1.6, GTK+ 2.4).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15400 57a11ea4-9604-0410-9ed3-97b8803252fd
When entering the page about choosing the date format (d-m-y, etc.) the
list of entries of the combobox is to be cleared and refilled.
Therefore, loop through all entries instead of
gtk_combo_box_remove_text'ing only the first entry. Trunk-only bug.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15392 57a11ea4-9604-0410-9ed3-97b8803252fd
Let the tests exit with status get_rv() instead of 0 so that 'make
check' really fails if necessary.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15391 57a11ea4-9604-0410-9ed3-97b8803252fd
gnc-backend-file has been renamed to gncmod-backend-file, so all tests
should use that new name.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15390 57a11ea4-9604-0410-9ed3-97b8803252fd
GnuCashs APIs, ABIs, and libraries are not designed for third-party
development, so do not encourage it at this point of time.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15379 57a11ea4-9604-0410-9ed3-97b8803252fd
Both are equal to pkglibdir and only used in src/bin/, even mixed with
pkglibdir. The module installation paths are hard-coded to pkglibdir
anyway, so we do not provide that flexibility right now.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15378 57a11ea4-9604-0410-9ed3-97b8803252fd
On MacOS, the load-extension calls need DYLD_LIBRARY_PATH to be set to
find the libraries. This was missing in the startup script.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15377 57a11ea4-9604-0410-9ed3-97b8803252fd
In the import account matcher and import transaction match picker tree
views, let double-clicks on rows close the corresponding dialogs.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15347 57a11ea4-9604-0410-9ed3-97b8803252fd
In the account picker dialogs, double clicks now close the dialogs. More
importantly, these dialogs are showed as a result of double clicks
(row-activated) instead of selection changes. This lets the user choose
the matching account more than once if there is only one item to match.
Introduces new i18n strings
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15336 57a11ea4-9604-0410-9ed3-97b8803252fd
On the payees/memo page in the QIF import druid, provide the callback
for line clicks the correct display information and not the one of
another/previous page. This slipped in r14588, 2.0 is crash-free.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15332 57a11ea4-9604-0410-9ed3-97b8803252fd
* add $prefix/lib/gnucash to $PATH
* move all modules to $prefix/lib/gnucash, even if not compiled with
'-module'. This happens in install.sh after 'make install', so add
$prefix/lib/bin to PATH and GNC_MODULE_PATH or move the dlls manually
if you run 'make install' yourself
* distribute only the .la files for the shared libraries
* shutdown gconfd-2 in dish.sh so that inno can access the schemas.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15328 57a11ea4-9604-0410-9ed3-97b8803252fd
Mark the names and memos of expenses (Taxes, Insurance, PMI, Other
Expenses) in the Mortgage/Loan Setup Druid for translation. Spotted by
Fabrice Kurz.
Introduces new i18n strings
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15327 57a11ea4-9604-0410-9ed3-97b8803252fd
When enlarging the Payment Dialog window, space is currently allocated
to each widget equally. The only widget that would benefit from
additional space is the Transfer Account tree.
Patch by cardinal@dodds.net.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15326 57a11ea4-9604-0410-9ed3-97b8803252fd
The button label in the warning dialog about reconciled splits when
removing splits from a transaction used N_ without gettext, so was
untranslated.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15325 57a11ea4-9604-0410-9ed3-97b8803252fd
Move these two files to gncmod-business-core.c and
gncmod-business-gnome.c, resp., to better match the common naming.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15323 57a11ea4-9604-0410-9ed3-97b8803252fd
Rename libcore-utils to libgnc-core-utils
Rename libgncgnome to libgnc-gnome
Rename libgncmodule to libgnc-module
Rename libgncqof to libgnc-qof
Rename libgnc-backend-file to libgncmod-backend-file
Move libgnc-business-ledger to $prefix/lib
Move libgncqof-backend-qsf to $prefix/lib/gnucash
Move libgncmod-backend-file to $prefix/lib/gnucash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15321 57a11ea4-9604-0410-9ed3-97b8803252fd
If the GncModule system finds a QofBackendProvider module M before that
has been initialized by QOF, M will register itself with QOF but does
not mark itself as resident, so the module system will unload it again,
leaving bogus pointers in QOF. Now it does.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15320 57a11ea4-9604-0410-9ed3-97b8803252fd
Modules are loaded directly with the g_symbol_* API now while dropping
the dependency on libltdl.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15317 57a11ea4-9604-0410-9ed3-97b8803252fd
Patch gnc-svnversion to check for .git, but in the top-level source
directory instead of src/gnome-utils. Use the output of "git-rev-parse
HEAD" as version string.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15292 57a11ea4-9604-0410-9ed3-97b8803252fd
using the automake prefix check_ instead of noinst_. The modules created
in src/gnc-module/test now use that prefix too, but with LDFLAGS="-rpath
${PWD}" to make them shared (we never install them).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15260 57a11ea4-9604-0410-9ed3-97b8803252fd
GUILE_LOAD_PATH) and slibcat, because the user running GnuCash later on
may not have the rights to do that.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15251 57a11ea4-9604-0410-9ed3-97b8803252fd
may point to still existing libraries that will be dlopened and conflict
with those loaded on startup.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15248 57a11ea4-9604-0410-9ed3-97b8803252fd
* Use $GNUCASH_DIR\\{repos,build,inst,dist} as directories for the
source, build, installation and packaging
* `mkdir -p' cannot handle backslashes, use unix paths
* Downgrade to ORBit2-2.13.3
* Print command to create /etc/profile.d if needed
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15246 57a11ea4-9604-0410-9ed3-97b8803252fd
pkg-config-msys.sh. Use correct header directory for regex (differs
between v3.8 and v3.8.g.3). Untested.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15224 57a11ea4-9604-0410-9ed3-97b8803252fd
make use of it and it made problems on MinGW (output was two lines).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15223 57a11ea4-9604-0410-9ed3-97b8803252fd
in builds of revisions <15213.
Replace shebang in packaging/win32/functions by a local variables list.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15221 57a11ea4-9604-0410-9ed3-97b8803252fd
GnuCash on Windows and puts them into $DIST_DIR. The plan is to call the
Inno Setup Compiler from it and create gnucash-$ver-setup.exe with one
command. A complete GnuCash build on MinGW is needed to run it.
Factor out common functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15214 57a11ea4-9604-0410-9ed3-97b8803252fd
* Replace RegEx-Gnu by RegEx-Spencer 3.8, because GtkHTML is linked
against that
* Update fontconfig, use expat-2.0.0.zip from ftp.gnome.org, drop
inst_expat
* Use $GNOME_WIN32_URL/dependencies for other packages too
* Build guile with -avoid-version
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15213 57a11ea4-9604-0410-9ed3-97b8803252fd
insensitive, but rather the underlying action groups. This way even
keyboard accelerators will not make sneaking calls while saving.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15162 57a11ea4-9604-0410-9ed3-97b8803252fd
initialization as #f instead of '(), the latter making qif imports work
again. Remove also a few lines of old commented cruft.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15102 57a11ea4-9604-0410-9ed3-97b8803252fd
* replace gnc_init_default_directory by gnc_get_default_directory and do
gconf query there
* remove gnc_extract_directory, but add gnc_set_default_directory
* do not save default directory with trailing (back)slash anymore
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15095 57a11ea4-9604-0410-9ed3-97b8803252fd
handling some command substitutions), by adding a wrapper script for
pkg-config.exe.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15093 57a11ea4-9604-0410-9ed3-97b8803252fd
--add-missing. Warn the user if he has put install.sh in ., .., or
..\.. from the repository. Improves r15037.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15092 57a11ea4-9604-0410-9ed3-97b8803252fd
- Updated versions: MinGW, GLib, ATK, Pango, GTK+, Gail, LibGnome,
LibGSF, Glade, SVN
- Move autotools up in the chain (guile1.8 will need that)
- Stick with GOffice 0.3.0 (newer version need code changes), but
provide patch for 0.3.2
- Other minor install.sh improvements
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15076 57a11ea4-9604-0410-9ed3-97b8803252fd
force_slashes parameter to gnc_path_get_gconfdir to get a slash
separated path instead of using G_DIR_SEPARATOR (backslash).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15067 57a11ea4-9604-0410-9ed3-97b8803252fd
therefore crashes on Solaris and Windows. r14675 had fixed that, r14945
(me) undermined it though.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15041 57a11ea4-9604-0410-9ed3-97b8803252fd
* Add a few GUILE_LIBS
* Remove platform specific .so from a load-extension parameter
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15039 57a11ea4-9604-0410-9ed3-97b8803252fd
* Replace g-wrap by swig
* Bump SVN_REV (prior SVNREV_FLAG) to HEAD
* Remove backup files in the repository to cleanup `svn status'
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15038 57a11ea4-9604-0410-9ed3-97b8803252fd
remove_notification functions. Now the pair of section and whoami has to
be unique, as GncMainWindow adds notifications to two different
sections. Extends r14675.
Remove a superfluous leading slash and doubly defined gconf key macros.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14945 57a11ea4-9604-0410-9ed3-97b8803252fd
header files. This way automake and config.status agree upon the list of
these files. Otherwise, in rare cases, make distclean might not remove a
file stamp-h5, making distcheck fail.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14932 57a11ea4-9604-0410-9ed3-97b8803252fd
Before, we did not enforce compatibility with the parent account and
suggested to change only children or children and all parent accounts up
to the top-level one. We do enforce it now and only need to look at the
children.
The filling of the hash of (children) account (type) changes has been
replaced by showing the user a filtered account tree and the types are
adjusted recursively once the user verified the change.
This is another attempt to resolve#344966.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14899 57a11ea4-9604-0410-9ed3-97b8803252fd
based on compatibility to the parent account.
* add gnc_account_parent_changed_cb. Filter by valid_types & parent
compatible types
* add aw->preferred_account_type to remember what we chose but may not
work currently
* make valid_types a guint32 (was GList*)
* last_used_account_type is only set in gnc_ui_to_account
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14897 57a11ea4-9604-0410-9ed3-97b8803252fd
because of a bug in gtk+ (#357791). Also add
gnc_tree_model_account_types_get_mask.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14896 57a11ea4-9604-0410-9ed3-97b8803252fd
model instead using it as data of the filter function, because those can
only be set once per filter.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14895 57a11ea4-9604-0410-9ed3-97b8803252fd