gnucash maint: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Fri Dec 27 12:19:22 EST 2019
Updated via https://github.com/Gnucash/gnucash/commit/3be7f993 (commit)
via https://github.com/Gnucash/gnucash/commit/1dc59558 (commit)
via https://github.com/Gnucash/gnucash/commit/77ddaf91 (commit)
via https://github.com/Gnucash/gnucash/commit/41b4faf5 (commit)
from https://github.com/Gnucash/gnucash/commit/9291ad23 (commit)
commit 3be7f993ac95d385cf63118d5e45ccbac4aee452
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Dec 27 18:18:39 2019 +0100
Allow account selection by typing into the post-to field of the payment window
diff --git a/gnucash/gnome/dialog-payment.c b/gnucash/gnome/dialog-payment.c
index 3c4ad9a4f..2f952451d 100644
--- a/gnucash/gnome/dialog-payment.c
+++ b/gnucash/gnome/dialog-payment.c
@@ -432,7 +432,7 @@ gnc_payment_window_fill_docs_list (PaymentWindow *pw)
g_return_if_fail (pw->docs_list_tree_view && GTK_IS_TREE_VIEW(pw->docs_list_tree_view));
/* Get a list of open lots for this owner and post account */
- if (pw->owner.owner.undefined)
+ if (pw->owner.owner.undefined && pw->post_acct)
list = xaccAccountFindOpenLots (pw->post_acct, gncOwnerLotMatchOwnerFunc,
&pw->owner, NULL);
diff --git a/gnucash/gtkbuilder/dialog-payment.glade b/gnucash/gtkbuilder/dialog-payment.glade
index a500f2952..b99b45e90 100644
--- a/gnucash/gtkbuilder/dialog-payment.glade
+++ b/gnucash/gtkbuilder/dialog-payment.glade
@@ -207,8 +207,7 @@
<signal name="changed" handler="gnc_payment_dialog_post_to_changed_cb" swapped="no"/>
<child internal-child="entry">
<object class="GtkEntry" id="combobox-entry">
- <property name="can_focus">False</property>
- <property name="overwrite_mode">True</property>
+ <property name="can_focus">True</property>
</object>
</child>
</object>
commit 1dc595589e1a6bd1a78132e9ee5eecac2b014468
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Dec 27 17:59:00 2019 +0100
Bug 796530 - [txn csv importer] usability suggestions
Fix account selection by typing in the base account combo box text field
The typing triggered the combobox' changed event. That triggered a repopulation
of the csv data treeview (due to possibly having to unset an account column).
That then in the end retriggered setting the base account. However while typing
in the combo box there may not be a valid account selected in the combo box.
So break this short circuit by testing for a change in the last-known base account
compared to what the combo box believes is the proper account. This last-known
account nore the combo box' internal state will change while typing allowing
proper user input.
diff --git a/gnucash/gnome-utils/gnc-account-sel.c b/gnucash/gnome-utils/gnc-account-sel.c
index f3a291642..cd69f2c62 100644
--- a/gnucash/gnome-utils/gnc-account-sel.c
+++ b/gnucash/gnome-utils/gnc-account-sel.c
@@ -139,6 +139,11 @@ gnc_account_sel_class_init (GNCAccountSelClass *klass)
static void
combo_changed_cb(GNCAccountSel *gas, gpointer combo)
{
+ gint selected = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
+ if (selected == gas->currentSelection)
+ return;
+
+ gas->currentSelection = selected;
g_signal_emit_by_name(gas, "account_sel_changed");
}
@@ -152,6 +157,7 @@ gnc_account_sel_init (GNCAccountSel *gas)
gas->initDone = FALSE;
gas->acctTypeFilters = FALSE;
gas->newAccountButton = NULL;
+ gas->currentSelection = -1;
g_object_set(gas, "spacing", 2, (gchar*)NULL);
diff --git a/gnucash/gnome-utils/gnc-account-sel.h b/gnucash/gnome-utils/gnc-account-sel.h
index 49d837f57..7cfe25124 100644
--- a/gnucash/gnome-utils/gnc-account-sel.h
+++ b/gnucash/gnome-utils/gnc-account-sel.h
@@ -51,6 +51,7 @@ typedef struct
/* The state of this pointer also serves as a flag about what state
* the widget is in WRT the new-account-button ability. */
GtkWidget *newAccountButton;
+ gint currentSelection;
#if 0 /* completion not implemented. */
GCompletion *completion;
diff --git a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
index abdc54b94..373c4633e 100644
--- a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
+++ b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
@@ -1596,10 +1596,14 @@ void CsvImpTransAssist::preview_refresh_table ()
g_object_unref (combostore);
/* Also reset the base account combo box as it's value may have changed due to column changes here */
- g_signal_handlers_block_by_func (acct_selector, (gpointer) csv_tximp_preview_acct_sel_cb, this);
- gnc_account_sel_set_account(GNC_ACCOUNT_SEL(acct_selector),
- tx_imp->base_account() , false);
- g_signal_handlers_unblock_by_func (acct_selector, (gpointer) csv_tximp_preview_acct_sel_cb, this);
+ auto base_acct = gnc_account_sel_get_account(GNC_ACCOUNT_SEL(acct_selector));
+ if (tx_imp->base_account() != base_acct)
+ {
+ g_signal_handlers_block_by_func (acct_selector, (gpointer) csv_tximp_preview_acct_sel_cb, this);
+ gnc_account_sel_set_account(GNC_ACCOUNT_SEL(acct_selector),
+ tx_imp->base_account() , false);
+ g_signal_handlers_unblock_by_func (acct_selector, (gpointer) csv_tximp_preview_acct_sel_cb, this);
+ }
/* Make the things actually appear. */
gtk_widget_show_all (GTK_WIDGET(treeview));
commit 77ddaf91ab4738646733d035e3d8861a35230b63
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Dec 27 17:54:16 2019 +0100
Bug 796530 - [txn csv importer] usability suggestions
Do the same for the price csv importer
diff --git a/gnucash/gtkbuilder/assistant-csv-price-import.glade b/gnucash/gtkbuilder/assistant-csv-price-import.glade
index 85a96ca5e..543805f4a 100644
--- a/gnucash/gtkbuilder/assistant-csv-price-import.glade
+++ b/gnucash/gtkbuilder/assistant-csv-price-import.glade
@@ -137,7 +137,11 @@ Select location and file name for the Import, then click "OK"...
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Delete Settings</property>
+ <property name="tooltip_text" translatable="yes">Delete Settings
+Deletes the settings saved under the name as entered in the adjacent text field.
+There are two reserved names which can never be deleted:
+- No settings
+- Gnucash default export format</property>
<signal name="clicked" handler="csv_price_imp_preview_del_settings_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image2">
@@ -159,7 +163,11 @@ Select location and file name for the Import, then click "OK"...
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Save Settings</property>
+ <property name="tooltip_text" translatable="yes">Save Settings
+Saves current settings under the name as entered in the adjacent text field.
+There are two reserved names which can't be used to save custom settings:
+- No settings
+- Gnucash default export format</property>
<signal name="clicked" handler="csv_price_imp_preview_save_settings_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image1">
commit 41b4faf5eb66e1e67e6fb5d22ff33feea5089737
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Dec 27 17:50:04 2019 +0100
Bug 796530 - [txn csv importer] usability suggestions
Add note to tooltips for 'Save Settings' and 'Delete Settings' regarding
reserved save names
diff --git a/gnucash/gtkbuilder/assistant-csv-trans-import.glade b/gnucash/gtkbuilder/assistant-csv-trans-import.glade
index b2ff9ced4..e5a5f9c68 100644
--- a/gnucash/gtkbuilder/assistant-csv-trans-import.glade
+++ b/gnucash/gtkbuilder/assistant-csv-trans-import.glade
@@ -128,7 +128,11 @@ Select location and file name for the Import, then click 'OK'...
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Delete Settings</property>
+ <property name="tooltip_text" translatable="yes">Delete Settings
+Deletes the settings saved under the name as entered in the adjacent text field.
+There are two reserved names which can never be deleted:
+- No settings
+- Gnucash default export format</property>
<signal name="clicked" handler="csv_tximp_preview_del_settings_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image2">
@@ -150,7 +154,11 @@ Select location and file name for the Import, then click 'OK'...
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Save Settings</property>
+ <property name="tooltip_text" translatable="yes">Save Settings
+Saves current settings under the name as entered in the adjacent text field.
+There are two reserved names which can't be used to save custom settings:
+- No settings
+- Gnucash default export format</property>
<signal name="clicked" handler="csv_tximp_preview_save_settings_cb" swapped="no"/>
<child>
<object class="GtkImage" id="image1">
Summary of changes:
gnucash/gnome-utils/gnc-account-sel.c | 6 ++++++
gnucash/gnome-utils/gnc-account-sel.h | 1 +
gnucash/gnome/dialog-payment.c | 2 +-
gnucash/gtkbuilder/assistant-csv-price-import.glade | 12 ++++++++++--
gnucash/gtkbuilder/assistant-csv-trans-import.glade | 12 ++++++++++--
gnucash/gtkbuilder/dialog-payment.glade | 3 +--
gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp | 12 ++++++++----
7 files changed, 37 insertions(+), 11 deletions(-)
More information about the gnucash-changes
mailing list