Skip to content

Commit

Permalink
[import-main-matcher.cpp] After clicking/toggling A/U+C/C checkbox, r…
Browse files Browse the repository at this point in the history
…eselect the row

because it'll be much faster to use keyboard navigation -- use
up/down/left/right to target desired checkbox, hit <down> <space>
repeatedly to repeat the same action over several consecutive rows.
  • Loading branch information
christopherlam committed Jul 28, 2023
1 parent d6a025e commit de1764c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gnucash/import-export/import-main-matcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit de1764c

Please sign in to comment.