-
Notifications
You must be signed in to change notification settings - Fork 40
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
Support deletion of multiple sources #2252
base: main
Are you sure you want to change the base?
Conversation
MainView layout to QVBoxLayout and add inner horizontal container to accommodate inner top bar. Update strings
MainView layout to QVBoxLayout and add inner horizontal container to accommodate inner top bar. Update strings
@@ -74,26 +74,24 @@ def _set_enabled_initial_value(self) -> None: | |||
|
|||
|
|||
class DeleteSourceAction(QAction): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(these changes aren't strictly needed and I might revert them; I initially was thinking we could use a single DeleteSourceAction for both the source menu and the toolbar, but in the case of the source menu, the target sources are supplied when the action is created, but in the case of the toolbar, the action is created before the target sources are available. The benefit to keeping the changes in is that they will work for if/when we do eventually deprecate the source menu and consolidate around one deletion mechanism.)
@@ -75,6 +80,13 @@ def __init__( | |||
self.main_pane.setLayout(layout) | |||
self.left_pane = LeftPane() | |||
self.main_view = MainView(self.main_pane, app_state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I think I've introduced a bug here that I need to fix - there's a logline about attempting to apply a layout to MainView when a layout has already been applied. It doesn't have any ill effects, but it's on my radar to find + fix before this PR is ready for review.)
self.main_view.add_sourcelist_listener( | ||
self.top_pane._source_requester(), self.top_pane._source_listener() | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a couple different ways we can do this, this one felt like the least-worst way, but I'm open to opinions.
Basically, the main view (holds the sourcelist) and the top bar (holds the toolbar) need a way of communicating; either the top bar receives a constant feed of events as the selected item of the sourcelist changes (in which case it would just connect to onItemChanged
in the sourcelist and would not need to have a request signal, but it would need to push or pop items from the selected set all the time to keep track of the list); or, on demand it requests the selected set when it needs them (what I have implemented here). I felt like this way was a little less error-prone than that way.
I could have/could still skip the main_view and top_pane abstraction, and go for self.main_view.source_list.connect....
etc, but that felt like reaching quite far into the business of another gui element; similarly, top_pane.batch_actions.toolbar.
could be accessed directly. I have no strong preferences and was trying make things fairly easy to read/follow. feedback welcome.
msgid "Select or de-select sources using Ctrl+click, Shift+click, or by dragging the mouse." | ||
msgstr "" | ||
|
||
msgid "Use the top toolbar to delete multiple sources at once." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(When/if we add more options, this text will change. I'm not attached to it)
#InnerTopPane { | ||
background-color: #f3f5f9; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These colours aren't right, someone please help me, this is a cry for help :) (I will try and make some changes to the button disabled state and the active states to make them less jarring, but help slash a reminder that I don't do a good job at visual things)
…pdated list of selected sources from sourcelist. Disable toolbar unless logged in. Change list selection method of SourceList to allow for multi-select.
…iew pane in the conversationview.
f433abe
to
ddbb33a
Compare
Status
WIP and not yet runnable
Description
Still WIP - probably not yet runnable.
Fixes #2160. Details TK
Test Plan
TK
Checklist
If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:
If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:
If these changes modify the database schema, you should include a database migration. Please check as applicable:
main
and confirmed that the migration is self-contained and applies cleanlymain
and would like the reviewer to do so