-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Remove project filter #1172
Remove project filter #1172
Conversation
I know this anectdotal, but I have nearly 60 projects open currently, so the search and scroll I think is useful 😅 I guess the proper way to suppress this warning is to set the filter on the model instead of the list |
Thanks for the review! I found more than a few projects open at once unwieldy so I did not envisage so many would be kept open (probably my machine is too slow). I'll rethink this. |
@danrabbit The latest version now suppresses the warning without otherwise changing the UX. I think some more thought needs to go into what "Active Project" actually means; at the moment if you have a document in one project focuses and use the button to change the active project, the active project immediately reverts to the first one as soon as the document is refocused. The changed active project only persists if the sidebar or other non-document widget is focused to close the popup or if there are no documents open. Should "Active Project" follow the focused document as currently? |
So the main use for "Active Project" is as the target for shortcuts performing Git actions:
Maybe this should be made clearer in the UI? Is there anything else this concept could be useful for? |
Just realized that #1114 does in fact give another use to the Active Project (when selected with the Chooser button) - it collapses the other projects and hides their documents. Fortunately it does not conflict much with this one. |
Yeah, I really liked your branch that swaps out the tabs when you change the project selection. Originally, my thought was to only show the file tree from the active project in the sidebar since I have like 40 collapsed tree headers to scroll through to find my open project 😅 |
There is a valid use for having documents from more than one project open at a time - I do this quite often to copy code from one to the other. Another thought I had was to make non-active documents read-only and non-focusable which would mean you have to use the ProjectChooser button, rather than the active project automatically changing to match the focused document. |
To be honest I am not sure this PR is worth the diff as it only suppresses a terminal warning which has no ill effect as far as I can tell. |
Yeah, it's hard to strike the balance of what would be a better way to filter out things you don't want to see |
It can be revisited in the Gtk4 port anyway. |
In master, the presence of the filter when the listbox is bound to a model gives rise to a run-time warning:
GtkListBox with a model will ignore sort and filter functions
(though the filter does in fact work).To avoid this code managing the contents, filtering and sorting of the listbox is moved to the ChooseProjectButton from GitManager and the listbox is no longer bound to a model.
A better solution may be possible with Gtk4, using a FilterListModel.