For use from tests based on glib testing. Create a private structure to
compare to and register a handler which tests the event parameters
against the private structure and counts the number of valid hits.
Provides a test function for checking that the event handler has been
hit the requisite number of times.
Pass through, rather than testing, logs with a lower (i.e., less
important rather than lower-value) loglevel than the one the handler was
set up for. Test the log message rather than overwriting the pre-set one
with the actual message.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21523 57a11ea4-9604-0410-9ed3-97b8803252fd
No more CamelCase in engine C++ wrappers, hopefully.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21509 57a11ea4-9604-0410-9ed3-97b8803252fd
Somehow Transaction.hpp erroneously appeared here in r19802.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21507 57a11ea4-9604-0410-9ed3-97b8803252fd
Changes:
- Use QT_NO_KEYWORDS because the identifier "signal" collides with some glibmm dependency
- Use Glib::RefPtr<> of gnucash objects everywhere.
- Use Glib::ustring and Glib::Date instead of qt types
The WeakPointer.hpp file is still used for gnc::Session, which is not
(yet) a GObject.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21506 57a11ea4-9604-0410-9ed3-97b8803252fd
If an register is open on an account that has capital gains transactions
created by the lot scrubber when you quit Gnucash, a capital gains
transaction may be freed twice since it is freed when the associated
sale is freed and again when it is encountered on the list of
transactions to be freed.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21495 57a11ea4-9604-0410-9ed3-97b8803252fd
utility functions. GtkOptionMenu is deprecated.
The original functions remain available for now as they are still in
use.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21491 57a11ea4-9604-0410-9ed3-97b8803252fd
This would be an excellent test case for those wrappers...
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21485 57a11ea4-9604-0410-9ed3-97b8803252fd
The second argument to Glib::wrap was the important one. While at it,
I added a few more wrappers to gnc::Book and implemented their unittests.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21482 57a11ea4-9604-0410-9ed3-97b8803252fd
The file chooser dialog would return a directory if the user selected
one and clicked "Open"; then, or if the users specified a directory on
the command line, Gnucash would present the rather misleading error "No
backend found".
So, first, if the user selects a directory and clicks open, the chooser
will now open the directory for browsing, just as if she had
double-clicked on the directory name in the tree view.
Next, if a directory is presented to qof_session_begin it will detect
that and set ERR_BACKEND_BAD_URL, which gnc_post_file_open will detect
and re-present the file chooser, open to that directory. (To prevent
confusion, gnc_post_file_open will put up the error dialog for BAD_URL;
the new file chooser dialog will open after that's dismissed. Since
there are other possible causes of a BAD_URL, if the filename isn't a
directory the chooser will open to the registered default directory from
GConf.)
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21459 57a11ea4-9604-0410-9ed3-97b8803252fd
Unfortunately, this reveals the C++ wrappers will only work if the GObject
system is used properly, that is, including ref() and unref() and such.
This is not what I'd expect throughout gnucash.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21431 57a11ea4-9604-0410-9ed3-97b8803252fd
As usual, re-indentation was done using astyle-1.24 using the following options:
astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21430 57a11ea4-9604-0410-9ed3-97b8803252fd