Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 799443 - Edit find account jump then open, open the last highlighted account not the jumped to account #2036

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

christopherlam
Copy link
Contributor

but gnc_tree_view_account_set_selected_account is called from multiple places. @Bob-IT ?

@Bob-IT
Copy link
Contributor

Bob-IT commented Oct 19, 2024

I think there are several possibilities for this...

It does seem reasonable that if you select an account then the cursor should follow but you would have to check where used.

Another option would be to add a parameter to gnc_tree_view_account_set_selected_account that selectively did the set cursor but that would involve updating all occurrences accordingly.

So possibly create gnc_tree_view_account_set_selected_account_with_cusor which calls the modified and renamed static version of gnc_tree_view_account_set_selected_account as above, this would then be called from the exposed version of gnc_tree_view_account_set_selected_account. Then gnc_tree_view_account_set_selected_account_with_cusor would replace the call in gnc_plugin_page_account_tree_open

@jralls
Copy link
Member

jralls commented Oct 29, 2024

It does seem reasonable that if you select an account then the cursor should follow but you would have to check where used.

All of the other uses are account selectors in dialogs where keyboard editing (which is what the cursor is for) isn't an issue. Having the cursor follow the selection will be harmless.

Separately it's not necessary to call both gtk_tree_view_set_cursor and gtk_tree_selection_select_path, GtkTreeSelection handles the cursor_changed signal emitted by gtk_tree_view_set_cursor and moves the selection to the new cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants