From 5ac8ffdd41a0b0076dd31c9947859487ee5f35ca Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Thu, 27 Jul 2023 19:54:03 +0800 Subject: [PATCH] [import-main-matcher.cpp] After clicking/toggling A/U+C/C checkbox, reselect the row because it'll be much faster to use keyboard navigation -- use up/down/left/right to target desired checkbox, hit repeatedly to repeat the same action over several consecutive rows. --- gnucash/import-export/import-main-matcher.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gnucash/import-export/import-main-matcher.cpp b/gnucash/import-export/import-main-matcher.cpp index 76671173b6..dd109c89bc 100644 --- a/gnucash/import-export/import-main-matcher.cpp +++ b/gnucash/import-export/import-main-matcher.cpp @@ -673,6 +673,15 @@ run_match_dialog (GNCImportMainMatcher *info, trans_info, info->pending_matches); } +static void +set_treeview_selection_from_path (GtkTreeView* view, const char* path) +{ + auto selection = gtk_tree_view_get_selection (view); + auto tree_path = gtk_tree_path_new_from_string (path); + gtk_tree_selection_select_path (selection, tree_path); + gtk_tree_path_free (tree_path); +} + static void gen_trans_common_toggled_cb (GtkCellRendererToggle *cell_renderer, gchar *path, GNCImportMainMatcher *gui, GNCImportAction action) @@ -689,6 +698,8 @@ gen_trans_common_toggled_cb (GtkCellRendererToggle *cell_renderer, gchar *path, else gnc_import_TransInfo_set_action (transaction_info, action); refresh_model_row (gui, model, &tree_iter, transaction_info); + + set_treeview_selection_from_path (GTK_TREE_VIEW(gui->view), path); } static void