Unfortunately a rather massive change. Gets rid of GncSqlColumnTypeHandler
and its hideous run-time registry by making the handler functions members
of GncSqlColumnTableEntry. GncSqlColumnTableEntry becomes an abstract super-
class with a templatized subclass GncSqlColumnTableEntryImpl whose template
parameter is the GncSqlObjectType that's also the GncSqlColumnTableEntryImpl's
m_col_type member. That member is a candidate for future removal as it's not
necessary. An explicit specialization is provided for each GncSqlObjectType and
that's a candidate for future code-shrinkage as there's still a fair amount
of duplication in spite of adding several helper template functions to absorb
most of the meat. The abstract GncSqlColumnTableEntry class is motivated by
the need to have an iterable container which in turn requires runtime
polymorphism. This can probably be replaced with a variadic-template
pseudo-container.
The two major benefits of this change are that it gets rid of one more set
of macro functions and provides vtable dispatch that has only one level
of indirection instead of the cumbersome string-hash-table-lookup to
find the handler followed by invoking the handler's function.
The two header files are removed because they exposed only the initialization
function which in turn only registered the respective GncSqlColumnTypeHandler.
The two lists were always used together so replace them with a single
vector of std::pair<std::string, std::string>; this also gets rid of the
intermediate GValue which was used to convert the returned value to a string.
operator<<() can do that for us more transparently.
Also template most of the add_value_to_vec functions.
day's date. Previous efforts didn't work on Windows and shouldn't have
elsewhere because gnc_localtime and gnc_mktime are inverse functions;
in particular gnc_mktime doesn't adjust the time based on the value
of tm_isdst, though some implementations of STDC mktime do.
Rather than being too clever about trying to find the DST offset this
implementation just uses 1 hour.
The Python includes files for Windows define HAVE_PUTENV to be
empty. GnuCash under MINGW (only) defines it to be 1. This causes
redefinition errors when building the Python bindings on Windows.
HAVE_PUTENV is not used in the GnuCash code base, so the best
solution seems to be to just get rid of it.
Use the date-time functions in gnc-date instead of the guile ones for more consistent behaviour.
Do the same for test test-cash-flow, which was also time-of-day sensitive
This commit makes the test work in all timezones from -11 to +10. Timezone +11 still fails, but that's the compromise we have made in the rest of gnucash as well.
Change from using <control> to <primary> for part of key accelerator
definitions. This will map the accelerator to Command on OSX and to
Control for anything else
When the dialogue is started from the menu bar, all accounts will be
searchable and so hide the 'Search from' radio buttons. These are only
displayed when the started from the context menu.
This update adds the option to search for an account in an account list
and once selected it will jump to that account in the Account Treeview
or if it is a hidden account the account editor will open.
E.g. CEST01CEDT,M4.1.0,M10.1.0.
Also reorder priority of finding TZ information: Passed-in timezone string
is tried first; if that's empty or fails, try the TZ variable, then
/etc/localtime, and finally give up and use UTC. Exceptions never leave
GncTimeZoneProvider and *some* timezone is always returned.
Provide a new test for posix timezones and invert the exception test.