> On Jul 26, 2026, at 13:26, Paul Kroitor <[email protected]> wrote: > > In puttering about with register presentation and my dream of getting GnuCash > to grey out reconciled register lines (like Quicken), I've noticed that if a > read-only boundary is set in File > Properties, all the transactions that > have become read-only have their background colour de-saturated (greyed out). > > Furthermore, if I define READONLY_LINES_WITH_CHANGED_FG_COLOR in > gnucash-sheet-private.c, the foreground text becomes de-saturated too (after > fixing a couple of minor compile errors that were introduced). > > Several questions come to mind: > > 1. Does anyone remember why two different and possibly co-existing mechanisms > for identifying read-only transactions were established, of which one was > implemented and the other apparently scrapped? > > 2. Is there any reason not to co-opt the disabled foreground de-saturation > logic for reconciled lines instead? > > 3. Is there a central place where all these conditional compilation > directives are documented or discussed (short of doing greps for IFDEFs)? > > 4. Thoughts about achieving the goal using the above approach vs making a > whole new CSS class for a reconciled line style? > > Thanks as always,
I was able to work out the history from git: READONLY_LINES_WITH_CHANGED_FG_COLOR was added in https://github.com/Gnucash/gnucash/commit/af3cec54df87b132e25b8ab617f3c7b64598b71d and effectively removed in https://github.com/Gnucash/gnucash/commit/9973bbe6eb1594912703ba91734a545ede752855, which converted everything to use CSS as part of the Gtk2->Gtk3 conversion. When Bob did so he just removed the calls to inc_intensity_10percent() and dec_intensity_10percent() without removing the now unused code. I think that change also introduced the current read-only desaturation. Those old functions aren’t the Gtk3 way to do things and should be removed. They were probably experimental: I looked for READONLY_LINES_WITH_CHANGED_FG_COLOR in 2.6.0 (the change was made in 2.5.0, the development branch leading up to 2.6.0) and found only the two #ifdefs. That makes it mostly untested cruft. I’m a bit surprised by your claim that simply defining READONLY_LINES_WITH_CHANGED_FG_COLOR does anything: The functions that block defines are never called. In current GnuCash all of the effective ones are listed with mostly minimal comments in common/config.h.cmake.in. If a macro isn’t in there you should grep for it with —include=CMakeLists.txt —include=*.cmake, then for its #define. If neither turn up anything then it’s cruft. GnuCash is 30 years old. There’s lots of cruft. A lot of history is in the ChangeLogs, but a lot isn’t. I don’t think you need a new CSS class, the above-mentioned CSS commit created one that seems to do what you want. You just need to apply it to reconciled transactions in your personal build of GnuCash. Regards, John Ralls
_______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
