gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Thu Sep 17 18:23:46 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/0c71410e (commit)
via https://github.com/Gnucash/gnucash/commit/779c6b65 (commit)
from https://github.com/Gnucash/gnucash/commit/9c8fa5cd (commit)
commit 0c71410e538ba3afb879fbde5df10bb4eb523e39
Merge: 9c8fa5cd2 779c6b65c
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Sep 17 15:19:40 2020 -0700
Merge Dean Jagels's bug-102787 into maint.
commit 779c6b65cf177912e69fe98b51fc7e1b6542b67f
Author: Dean Jagels <brooksidesw.llc at gmail.com>
Date: Fri Sep 11 13:55:00 2020 -0400
Bug 102787: Allow entry completion on currency selection
diff --git a/gnucash/gnome-utils/gnc-currency-edit.c b/gnucash/gnome-utils/gnc-currency-edit.c
index 773465992..15aea6064 100644
--- a/gnucash/gnome-utils/gnc-currency-edit.c
+++ b/gnucash/gnome-utils/gnc-currency-edit.c
@@ -269,14 +269,19 @@ static void gnc_currency_edit_active_changed (GtkComboBox *gobject,
{
GNCCurrencyEdit *self = GNC_CURRENCY_EDIT (gobject);
- gnc_commodity *currency = gnc_currency_edit_get_currency (self);
- const gchar *mnemonic = gnc_commodity_get_mnemonic (currency);
-
- g_signal_handlers_block_by_func(G_OBJECT(self),
- G_CALLBACK(gnc_currency_edit_active_changed), user_data);
- g_object_set (G_OBJECT (self), "mnemonic", mnemonic, NULL);
- g_signal_handlers_unblock_by_func(G_OBJECT(self),
- G_CALLBACK(gnc_currency_edit_active_changed), user_data);
+ /* Check that there is a proper selection before proceeding. Doing so allows
+ * GTK entry completion to proceed. */
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(self)) != -1)
+ {
+ gnc_commodity *currency = gnc_currency_edit_get_currency (self);
+ const gchar *mnemonic = gnc_commodity_get_mnemonic (currency);
+
+ g_signal_handlers_block_by_func(G_OBJECT(self),
+ G_CALLBACK(gnc_currency_edit_active_changed), user_data);
+ g_object_set (G_OBJECT (self), "mnemonic", mnemonic, NULL);
+ g_signal_handlers_unblock_by_func(G_OBJECT(self),
+ G_CALLBACK(gnc_currency_edit_active_changed), user_data);
+ }
}
/** This auxiliary function adds a single currency name to the combo
Summary of changes:
gnucash/gnome-utils/gnc-currency-edit.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
More information about the gnucash-changes
mailing list