gnucash stable: Edit Exchange Rate: Improve the message and comment
John Ralls
jralls at code.gnucash.org
Sun Jul 26 14:52:11 EDT 2026
Updated via https://github.com/Gnucash/gnucash/commit/c935c2fb (commit)
from https://github.com/Gnucash/gnucash/commit/1547719b (commit)
commit c935c2fbb8e4a318ffa5a8a8ffbae90274f103e7
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Jul 26 11:49:56 2026 -0700
Edit Exchange Rate: Improve the message and comment
explaining why the Transfer Dialog isn't shown when Edit Exchange
Rate is selected from the context menu in a stock-type register.
diff --git a/gnucash/register/ledger-core/split-register-control.cpp b/gnucash/register/ledger-core/split-register-control.cpp
index 9d5fda1521..16a47de5bd 100644
--- a/gnucash/register/ledger-core/split-register-control.cpp
+++ b/gnucash/register/ledger-core/split-register-control.cpp
@@ -1355,12 +1355,19 @@ gnc_split_register_handle_exchange (SplitRegister *reg, gboolean force_dialog)
return FALSE;
}
- /* Make sure we NEED this for this type of register */
+ /* Registers have either a visible PRIC_CELL (price cell) or a
+ * hidden RATE_CELL. We need launch the Transfer Dialog to collect
+ * an exchange rate only when the RATE_CELL is provided. The first
+ * check looks at the register type to see which kind it's
+ * supposed to use, the second looks at what's actually in the
+ * register layout but doesn't always look at the right
+ * register.
+ */
if (!gnc_split_reg_has_rate_cell (reg->type))
{
if (force_dialog)
{
- message = _("This register does not support editing exchange rates.");
+ message = _("Edit prices/exchange rates directly in the split line.");
gnc_error_dialog (GTK_WINDOW(gnc_split_register_get_parent (reg)), "%s", message);
}
LEAVE("no rate cell");
@@ -1373,7 +1380,7 @@ gnc_split_register_handle_exchange (SplitRegister *reg, gboolean force_dialog)
{
if (force_dialog)
{
- message = _("This register does not support editing exchange rates.");
+ message = _("Edit prices/exchange rates directly in the split line.");
gnc_error_dialog (GTK_WINDOW(gnc_split_register_get_parent (reg)), "%s", message);
}
LEAVE("null rate cell");
Summary of changes:
gnucash/register/ledger-core/split-register-control.cpp | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list