This required some adjustments:
* New warnings character-conversion and deprecated-volatile are
disabled for the reasons indicated in the adjacent comments.
* C23 is a lot stricter about function pointer signatures so some
callbacks in gnc-frequency.c and dialog-sx-editor had to be cast using
the long-available GLib macros.
* C++23 is stricter about a reference (foo&) parameter taking an
lvalue only; a lambda used in several csv-importer files was trying to
pass an rvalue so the parameter had to be changed to perfect
forward (foo&&).
* C++23 doesn't allow oring together enum values from different enum
types, even anonymous ones, so the two gnc_numeric enums for rounding
and denominators are combined into a single enum GncNumericRoundDenom.
* C++20's new automatic generation of comparison functions combined
with its stricter automatic conversion rules caused trouble with
operator==() and operator!=() for gnc::GUID and GncGUID, complaining
about ambiguity or not being able to find operator==(const GncGuid&,
const GncGuid&). The fix has two parts: Changing operator!=(const
gnc::GUID&, const gnc::GUID&) to operator==(const gnc::GUID&, const
gnc::GUID&) to resolve the conversion problem and changing the call
forwarding operator==(const GncGuid&, const GncGuid&) to only cast the
first argument to gnc::GUID so that it could work unambiguously with
operator==(const gnc::GUID&, const GncGuid&).
* python sqlite3test: C23 apparently makes AppleClang a lot pickier
about includes.
ubuntu-latest isn't latest enough. Recent lcov v2 errors
out if there are no GCDA files in the target directory.
Call it with a shell script that checks first.
numerator/denominator properly
- Use GNC_HOW_DENOM_REDUCE | GNC_HOW_RND_ROUND to preserve precision while
avoiding overflows.
- Rearrange the function's tests to perform only one division or
multiplication instead of unconditionally dividing
- Rename the from_ and to_ variables to p(rice)1 and p2 to reduce
conflation with the input from and to.
After the changes to fix bug 799753, when the register default is to
show double lines the search results were only showing one line of the
transaction, a refresh of the search register would fix this.
This was down to the removal of a refresh from the register creation as
it is now done when the register is focused. In the find transaction
dialog a refresh was being done before the register creation which was
not reflected in the register when it was focused.
To fix this, do not do a refresh when creating the search register but
only when 'updating the search'.
Implements the approach suggested by jralls in PR #2222: instead of a
context menu action, introduce GncCellRendererLabel - a
GtkCellRendererText subclass that returns a read-only, selectable
GtkEntry when a cell is activated.
All numeric columns (Balance, Total, Cleared, Reconciled, Present,
Future Minimum, and their report/period variants) are affected because
they all go through gnc_tree_view_add_numeric_column.
Usage:
- Click once to select the row (unchanged behaviour)
- Click again on a numeric cell to activate it; the value appears in a
read-only entry field with the text pre-selected
- Ctrl+C copies the value to the clipboard; Escape or clicking away
dismisses the field without modifying the model
- Unicode bidi control characters (added by GnuCash for RTL display)
are stripped before showing the value so the copied text is clean
This patch enables the use of the Escape key to cancel an edit of a field in a transaction or a split restoring the value the field held when the user navigated to the transaction or split.
Fix blurry text on HiDPI/Retina displays in custom GnuCash widgets
that render into offscreen Cairo image surfaces.
This updates the register header and dense calendar widgets to
create scale-aware backing surfaces using the GTK widget scale
factor and `cairo_surface_set_device_scale()`.
- Register column headers
- Scheduled transaction dense calendar
Tested locally on macOS Apple Silicon with a native arm64 build.
Confirmed that:
- register header text now renders crisply
- scheduled transaction dense calendar text now renders crisply
While debugging another issue, noted the improper void return definition of the key-press-event callback function key_press_item() in combocell-gnome.c. A quick search found the same issue in completioncell-gnome.c and datecell-gnome.c and inconsistent scope and return types in five other files.