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
PICARD-319: Add an action toolbar to file browser #543
Conversation
I want to add a couple more buttons to this toolbar
|
It would be nice to provide a screenshot for such UI changes in the PR description. |
else: | ||
directories.append(path) | ||
|
||
if len(files): |
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.
if files:
should be enough.
|
||
if len(files): | ||
self.tagger.add_files(files) | ||
if len(directories): |
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.
if directories:
should be enough
Imho this should be discussed, i'm not an UI guy at all, but i have the feeling adding more buttons don't make things easier. |
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.
This adds new icons in the user interface that need to interact in some form with the "Show text labels under icons" setting (Advanced -> User Interface).
The + sign is intuitive for the single add-items-to-picard function, but if more buttons are going to be added, not all of them are going to have an obvious meaning. We should take this into consideration because either more buttons are going to be added or the Add one is going to stay the only one. |
if os.path.isfile(path): | ||
files.append(path) | ||
else: | ||
directories.append(path) |
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.
Why not add directories directly here ?
I understand why you are building a list of files to pass to tagger.add_files()
, but you may skip this for directories and just do self.tagger.add_directory(path)
here.
paths = [] | ||
for index in self.file_browser.selectedIndexes(): | ||
paths.append(self.file_browser.model.filePath(index)) | ||
return paths |
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.
A list comprehension is prolly faster:
return [self.file_browser.model.filePath(index) for index in self.file_browser.selectedIndexes()]
This PR is complete from my side pending any reviews :) |
To be honest, I still can't get myself to like that toolbar very much :( On your screenshot it looks really good, but on a higher resolution the toolbar is 70%+ empty whitespace. Maybe this is just because there's only one button now there at the moment... Since I don't have any other suggestions, I'll leave it to zas to decide about this. |
I have the same feeling. I think we can do better, not sure yet how. |
Let's postpone this until we have more operations that we'd like to put into that toolbar. |
No description provided.