gnucash stable: Multiple changes pushed
Robert Fewell
bobit at code.gnucash.org
Mon Oct 21 07:29:58 EDT 2024
Updated via https://github.com/Gnucash/gnucash/commit/6912c49a (commit)
via https://github.com/Gnucash/gnucash/commit/29ec4257 (commit)
via https://github.com/Gnucash/gnucash/commit/30886f70 (commit)
via https://github.com/Gnucash/gnucash/commit/469a1278 (commit)
from https://github.com/Gnucash/gnucash/commit/e63210f1 (commit)
commit 6912c49ae062b196c5e9fbf394bbf2b7a6c58ad4
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Mon Oct 21 12:23:07 2024 +0100
Errors in trace file if account deleted with open register
If an account is deleted with an open register there are multiple
errors in trace file due to the register plugin page event handler
trying to update the notebook tab contents.
Add a test for the ledger display leader being not NULL before trying
to update the tab contents.
diff --git a/gnucash/gnome/gnc-plugin-page-register.cpp b/gnucash/gnome/gnc-plugin-page-register.cpp
index 061339572d..ec9de039a8 100644
--- a/gnucash/gnome/gnc-plugin-page-register.cpp
+++ b/gnucash/gnome/gnc-plugin-page-register.cpp
@@ -5335,6 +5335,14 @@ gnc_plugin_page_register_event_handler (QofInstance* entity,
{
if (GNC_IS_MAIN_WINDOW (window))
{
+ GncPluginPageRegisterPrivate *priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
+
+ if (!gnc_ledger_display_leader (priv->ledger))
+ {
+ LEAVE ("account is NULL");
+ return;
+ }
+
gchar *name = gnc_plugin_page_register_get_tab_name (GNC_PLUGIN_PAGE (page));
main_window_update_page_name (GNC_PLUGIN_PAGE (page), name);
@@ -5350,7 +5358,7 @@ gnc_plugin_page_register_event_handler (QofInstance* entity,
g_free (name);
g_free (long_name);
}
- LEAVE ("tab name updated");
+ LEAVE ("tab contents updated");
return;
}
commit 29ec4257db35ddf0b3e41d80ab8e30ffc57aef84
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Mon Oct 21 12:21:54 2024 +0100
Error in trace file suspend counter not zero
When importing from OFX, an error can be seen in the trace file when
gnc_gui_refresh_all is called when refresh is suspended. Add a check
for refresh being suspended before calling for a refresh.
diff --git a/gnucash/import-export/import-main-matcher.cpp b/gnucash/import-export/import-main-matcher.cpp
index 6abcea631f..74e435bb56 100644
--- a/gnucash/import-export/import-main-matcher.cpp
+++ b/gnucash/import-export/import-main-matcher.cpp
@@ -247,7 +247,8 @@ gnc_gen_trans_list_delete (GNCImportMainMatcher *info)
g_free (info);
- gnc_gui_refresh_all ();
+ if (!gnc_gui_refresh_suspended ())
+ gnc_gui_refresh_all ();
}
bool
commit 30886f70e60185ed55c9ca61521b930944c5b5ae
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Mon Oct 21 12:20:55 2024 +0100
Bug 799433 - Right-click issue in import window
When you right click a transaction in the import window, the popup menu
should act on that transaction but instead works on the currently
highlighted transaction. Added check to see if current path is selected.
diff --git a/gnucash/import-export/import-main-matcher.cpp b/gnucash/import-export/import-main-matcher.cpp
index c7adc11ef4..6abcea631f 100644
--- a/gnucash/import-export/import-main-matcher.cpp
+++ b/gnucash/import-export/import-main-matcher.cpp
@@ -1461,20 +1461,21 @@ gnc_gen_trans_onButtonPressed_cb (GtkTreeView *treeview,
DEBUG("Right mouseClick detected - popup the menu.");
auto selection = gtk_tree_view_get_selection (treeview);
- auto selected_rows = gtk_tree_selection_count_selected_rows (selection);
- /* If no rows are selected yet, select the row that was clicked on
- * before proceeding */
- if (!selected_rows)
+ GtkTreePath* path = nullptr;
+
+ /* Get tree path for row that was clicked */
+ if (gtk_tree_view_get_path_at_pos (treeview, event_button->x,
+ event_button->y, &path,
+ nullptr, nullptr, nullptr))
{
- GtkTreePath* path = nullptr;
- if (gtk_tree_view_get_path_at_pos (treeview, event_button->x,
- event_button->y, &path, nullptr, nullptr, nullptr))
+ if (!gtk_tree_selection_path_is_selected (selection, path))
{
+ gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_path (selection, path);
- selected_rows++;
- gtk_tree_path_free (path);
}
+ gtk_tree_path_free (path);
}
+
if (gtk_tree_selection_count_selected_rows (selection) > 0)
{
GtkTreeModel *model;
commit 469a1278c0c7e687dfa163adb2bbbfca0bbe7ce3
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Mon Oct 21 12:17:19 2024 +0100
Bug 799435 - Right-click issue in reconcile window
If another transaction(s) is(are) already selected, right-click will
add to the selection rather than select the new transaction and bring
up the right-click menu. Added check to see if current path is selected.
diff --git a/gnucash/gnome/window-reconcile.cpp b/gnucash/gnome/window-reconcile.cpp
index 336123a84e..802914184c 100644
--- a/gnucash/gnome/window-reconcile.cpp
+++ b/gnucash/gnome/window-reconcile.cpp
@@ -983,7 +983,11 @@ gnc_reconcile_window_button_press_cb (GtkWidget *widget,
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(qview));
- gtk_tree_selection_select_path (selection, path);
+ if (!gtk_tree_selection_path_is_selected (selection, path))
+ {
+ gtk_tree_selection_unselect_all (selection);
+ gtk_tree_selection_select_path (selection, path);
+ }
gtk_tree_path_free (path);
}
do_popup_menu (recnData, event);
Summary of changes:
gnucash/gnome/gnc-plugin-page-register.cpp | 10 +++++++++-
gnucash/gnome/window-reconcile.cpp | 6 +++++-
gnucash/import-export/import-main-matcher.cpp | 22 ++++++++++++----------
3 files changed, 26 insertions(+), 12 deletions(-)
More information about the gnucash-changes
mailing list