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.
While debugging bug 799762, noted replacing the account in a split with the identical account was processed as if the account had actually changed. This otherwise superfluous processing blocks the transaction edit when the account is a placeholder. This patch adds a test in gnc_split_register_check_account() to verify the account has actually changed before proceeding as if it has.