gnucash future: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sat Oct 10 19:33:55 EDT 2026
Updated via https://github.com/Gnucash/gnucash/commit/7988711b (commit)
via https://github.com/Gnucash/gnucash/commit/f1a5b525 (commit)
via https://github.com/Gnucash/gnucash/commit/857ca0b5 (commit)
via https://github.com/Gnucash/gnucash/commit/a87f3706 (commit)
via https://github.com/Gnucash/gnucash/commit/b029607a (commit)
via https://github.com/Gnucash/gnucash/commit/8f3537b8 (commit)
via https://github.com/Gnucash/gnucash/commit/b38a56a8 (commit)
from https://github.com/Gnucash/gnucash/commit/e7835057 (commit)
commit 7988711bb87e5d76d8c604f508bf8885a037bb72
Merge: e783505772 f1a5b525a1
Author: John Ralls <jralls at ceridwen.us>
Date: Sat Oct 10 16:20:40 2026 -0700
Merge Noah Noerr's 'tracelog-viewer' into future.
commit f1a5b525a1b6bd671b62a06ee69022c03e32c976
Author: Noerr <Noerr at users.noreply.github.com>
Date: Sat Oct 10 11:31:17 2026 -0700
[gui] Trace log: address review feedback
- Add a copyright line to the new files' headers and replace the old FSF
postal address with the current "see <https://www.gnu.org/licenses/>"
wording (gnc-plugin-page-tracelog.{cpp,h}, gtest-qoflog.cpp).
- Classify a trace line by testing the fixed 5-wide level column via
std::string_view rather than scanning the whole line with strstr: faster,
and it can't be fooled by a level word appearing in a message body.
- Make the filter dialog response-driven (no gtk_dialog_run) for the Gtk4
dialog preparation, and gtk_window_present() it so it opens focused.
commit 857ca0b5d47a23f1f0392e8f6974aef43245868f
Author: Noerr <Noerr at users.noreply.github.com>
Date: Sun Oct 4 14:20:43 2026 -0700
[engine] qoflog: open the Windows trace file read/write so it can be read back
On Windows the trace file is (re)opened by name with "wb" (write-only), so
qof_log_read_current()'s ReadFile on the log's own descriptor failed with
access-denied and returned nothing -- the in-app viewer would show an empty
log there. (The POSIX path works because the mkstemp descriptor fdopen'd
there is already O_RDWR, so pread can read it.) Open it "w+b" so the same
descriptor is readable; the positional ReadFile reads to EOF and leaves the
file pointer where the next append belongs, so logging is unaffected. Fixes
test-qof-log on the Windows CI.
commit a87f3706d93199b9dc79a010a3a4fb40a8db0695
Author: Noerr <Noerr at users.noreply.github.com>
Date: Sun Oct 4 13:38:33 2026 -0700
[gui] Trace log: add a text filter, render via std::vector
Add a Filter action (View menu + toolbar) that prompts for a substring
and shows only matching lines, with a header noting how many of the
total are shown. An empty filter shows everything; the filter persists
across Reload, and applying it re-reads the trace (filter = reload +
filter).
Rework tracelog_render off GString/g_strsplit onto a std::vector<std::string>
built once and filtered with the STL, accumulating into a std::string --
cheaper for large (e.g. --debug) logs and simpler to reason about. Each
line is still escaped (g_utf8_make_valid + g_markup_escape_text) before
it enters the HTML.
commit b029607ae59157fa39310cd7447c259df24f0e7c
Author: Noerr <Noerr at users.noreply.github.com>
Date: Sun Oct 4 13:38:33 2026 -0700
[gui] Main window: null-safe page-type compare when restoring saved tabs
gnc_main_window_restore_page compared the saved page type against an
already-open page's class->plugin_name with strcmp. A page with no
plugin_name -- such as the trace-log viewer, which is deliberately kept
out of saved state -- made that strcmp(type, NULL) crash when a book
with saved tabs was opened while such a page was present. Use g_strcmp0
(already used for this field elsewhere in the file); a null plugin_name
then falls to the existing "types don't match" path instead of
segfaulting.
commit 8f3537b812f5d2643bbd32a34a218e0b839545f4
Author: Noerr <Noerr at users.noreply.github.com>
Date: Sat Oct 3 20:13:54 2026 -0700
[gui] Status bar: indicate when warnings or errors are logged
Add a status-bar pill, hidden until a WARNING/ERROR/FATAL message is
written to the trace, that then shows a running session count and opens
the trace-log viewer when clicked. This surfaces diagnostics that are
otherwise only visible by hunting for the trace file.
Engine: a GUI-less hook, qof_log_set_alert_callback(), invoked from
log4glib_handler for messages at WARNING or more severe that pass the
level filter -- so it counts exactly what lands in the trace.
GUI: gnc-main-window registers the hook, keeps an atomic cumulative
count, and coalesces UI updates onto the main loop (so a burst during
book load or Check & Repair costs a single refresh). The pill is packed
at the right of each window's status bar; clicking it activates the
existing Tools->Show Trace Log action by name, so gnome-utils needs no
link dependency on the gnome-layer page.
commit b38a56a8fccc368272a0c28323e6b87c94533d6c
Author: Noerr <Noerr at users.noreply.github.com>
Date: Fri Oct 2 17:04:47 2026 -0700
[gui] Tools: add a Show Trace Log viewer
Add a Tools -> Show Trace Log command that opens the current session's
trace log as a report-style notebook tab: colorized, read-only HTML
(ERROR/FATAL red, WARN amber) with Refresh and Print, closed via the
tab's X. The page is a singleton and re-reads the log when the menu
item reopens it.
The log is read through the log's own file descriptor
(qof_log_read_current: fileno(fout) + pread, ReadFile+OVERLAPPED on
Windows), so the viewer always shows this process's log even when another
instance has renamed the shared gnucash.trace name onto its own file; it
returns nothing for the stderr/stdout sinks.
The page renders a self-contained HTML string in memory via a new
gnc_html_load_html_string() on the gnc-html backends (WebKit2 and the
Windows WebView2 wrapper), avoiding the temp-file file:// round-trip that
gnc_html_show_data() uses for report-embedded local images. Every log
line passes through g_utf8_make_valid() then g_markup_escape_text()
before entering the HTML.
Adds a unit test (test-qof-log) covering qof_log_read_current.
Summary of changes:
gnucash/CMakeLists.txt | 1 +
gnucash/gnome-utils/gnc-main-window.cpp | 104 ++++++-
gnucash/gnome/CMakeLists.txt | 2 +
gnucash/gnome/gnc-plugin-basic-commands.c | 12 +
gnucash/gnome/gnc-plugin-page-tracelog.cpp | 441 +++++++++++++++++++++++++++++
gnucash/gnome/gnc-plugin-page-tracelog.h | 69 +++++
gnucash/html/gnc-html-webkit2.cpp | 28 ++
gnucash/html/gnc-html-webview2.cpp | 29 ++
gnucash/html/gnc-html.cpp | 22 ++
gnucash/html/gnc-html.h | 14 +
gnucash/ui/gnc-plugin-basic-commands.ui | 5 +
gnucash/ui/gnc-plugin-page-tracelog.ui | 106 +++++++
libgnucash/engine/qoflog.cpp | 69 ++++-
libgnucash/engine/qoflog.h | 20 ++
libgnucash/engine/test/CMakeLists.txt | 6 +
libgnucash/engine/test/gtest-qoflog.cpp | 91 ++++++
po/POTFILES.in | 2 +
17 files changed, 1018 insertions(+), 3 deletions(-)
create mode 100644 gnucash/gnome/gnc-plugin-page-tracelog.cpp
create mode 100644 gnucash/gnome/gnc-plugin-page-tracelog.h
create mode 100644 gnucash/ui/gnc-plugin-page-tracelog.ui
create mode 100644 libgnucash/engine/test/gtest-qoflog.cpp
More information about the gnucash-patches
mailing list