QofBackend now use GError to store backend erros, you need to call commit and begin edit with a parameter GError** to get any error in these calls, or use
the QofBackend's API to set and delete this errors.
QofEntity and QofInstance have been merged together and now QofInstance (may in the future GncObject) manages the GUID and the book the object belongs to.
The type system use the GObject's GType system to know the object's types.
QofObject and QofClass have been modified in order to fit in the new type system, but the work pretends in the next milestones deprecate them and eventualy delete
from the GC code.
KvpValue and KvpFrame doesn't change to much, just a few to fit in the new type system; but now we can sustitud KvpValue with GValue with out afect KvpFrame,
even better, this will save too many code here and there to manage the KvpValue type system (this is diferent from the Qof object type system), and get unifed type
system using just GType. All the objects managed by KvpValue has its own GType, some derived from GObject, some from QofInstance (derived from GObject too),
and some derived from a GBoxed (any struct type).
The file backend, has been changed in order to fit in the new type system too, but actualy it breaks the load of previews files saved in the old type system,
becouse when you save a file some data is saved with its type's name, but I'll add code to manage this converting the old type names to the new type's name. The
names used in GType is in order to avoid any problem with any previews existing one, just using a prefix Gnc or Qof in each name, this is a practice in GLib and I think we need to follow, i. e. the a type name "book" is "QofBook" and "account" is "GncAccount", this is for all the objects derived from GObject and GBoxed.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gobject-engine-dev@15690 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
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
This could be a security issue if someone else, say, makes a symlink
to somewhere else. Instead, create a tempfile and then rename it
into place which is safe against the symlink attack.
Patch by Bill Nottingham <notting@redhat.com>
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15435 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
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
Change it to check_PROGRAMS
use <prog>_CPPFLAGS instead of DEFS -- this works great!
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15302 57a11ea4-9604-0410-9ed3-97b8803252fd
Add a lock to the QofSession object, and use it in qof_session_save() to
protect against re-entrance.
The lock always starts at 1 and is 0 while inside qof_session_save().
If another call is made to qof_session_save() while one is in progress,
the lock will momentarily drop below 0 before returning to zero.
Note: The per-session nature of the lock would make it appear that we support
concurrent saving of different sessions. In fact, we do not, because the
file backend blocks the main process until the forked gzip process is
finished, and it only knows how to keep track of one child pid at a time.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15168 57a11ea4-9604-0410-9ed3-97b8803252fd
g-wrap is gone. I, for one, welcome our new swig overlords.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15024 57a11ea4-9604-0410-9ed3-97b8803252fd
Override the Transaction Number to sort numerically.
* lib/libqof/qof/qofclass.h:
* lib/libqof/qof/qofquery.c:
* lib/libqof/qof/qofquerycore-p.h:
* lib/libqof/qof/qofquerycore.[ch]:
- Publish the QofCompareFunc prototype.
- Add a new QofParam param_compfcn parameter
- Change QofQuery to use the param_compfcn over the
default type compare function.
- create (and publish) a qof API to compare strings
as numbers: qof_string_number_compare_func()
* src/engine/Transaction.c:
Assign TRANS_NUM to use qof_string_numer_compare_func()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14903 57a11ea4-9604-0410-9ed3-97b8803252fd
Now you can run one query off of the results of another query.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14901 57a11ea4-9604-0410-9ed3-97b8803252fd
This new type is like QOF_TYPE_STRING but it sorts numerically
(first) and then sorts alphanumerically (by the tail of the
number). Added the QOF Type, the gnome-search support, and
modified TRANS_NUM to use the new type.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14892 57a11ea4-9604-0410-9ed3-97b8803252fd
Reference that gave me this hint: http://acm.pku.edu.cn/JudgeOnline/faq.htm
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14806 57a11ea4-9604-0410-9ed3-97b8803252fd
of no read permission and give appropriate user feedback if yes.
Feel free to adjust the wording.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14791 57a11ea4-9604-0410-9ed3-97b8803252fd
Scheme files are now symlinked or copied into subdirectories gnucash/ and g-wrapped/. This will work on a platform without symlinks just fine.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14746 57a11ea4-9604-0410-9ed3-97b8803252fd
Removes an often regenerated dependency from qof.h.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14688 57a11ea4-9604-0410-9ed3-97b8803252fd
- Don't distribute (most) generated files.
- Be (more) consistent about when generated files are cleaned.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14555 57a11ea4-9604-0410-9ed3-97b8803252fd
Just modify GLIB_LIBS and GLIB_CFLAGS so everyone properly
links against the glib26 compatibility library when necessary.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14330 57a11ea4-9604-0410-9ed3-97b8803252fd