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

Select all checkbox #150

Merged
merged 2 commits into from May 21, 2024

Conversation

artjomsR
Copy link
Contributor

simple checkbox to make it easier to extract new words when reading multiple books

2024-04-18.23-17-54.mp4

@1over137
Copy link
Contributor

Personally I would like it to not be a checkbox like all the other normal ones. Maybe a button, next to the "Select books" label would be better. I wonder if it is a common use case. I actually haven't really used it like that at all, except in testing, since I am never actively reading more than more than one book at the same time.

@artjomsR artjomsR force-pushed the feat/select_all_checkbox branch 3 times, most recently from 8702bc5 to 8eaeec9 Compare April 20, 2024 17:57
@artjomsR
Copy link
Contributor Author

artjomsR commented Apr 20, 2024

I wanted to do a "toggle all" button to begin with but the logic could be complicated when only some checkboxes are ticked, so it'd be cleaner to just have 2 separate buttons

VS.mov

@1over137
Copy link
Contributor

1over137 commented Apr 21, 2024

I wanted to do a "toggle all" button to begin with but the logic could be complicated when only some checkboxes are ticked, so it'd be cleaner to just have 2 separate buttons

Would this not work?

checkbox.setChecked(not checkbox.isChecked())

Again my concern is that the buttons take up space for the selections

Honestly I'm not sure this is a good idea
How about instead of this, we can let the importer remember last selected options just like the dates? You should only have to change it infrequently
The idea is set a setting when an import succeeds, recording the books users selected, and auto-populate it when the user presses "repeat last import" (this will only trigger either kindle or koreader, not others).

@artjomsR
Copy link
Contributor Author

artjomsR commented May 4, 2024

Ok, now there's no new UI elements, the checkboxes simply keep their checked status after an import

@1over137
Copy link
Contributor

1over137 commented May 4, 2024

don't actually store the python list in the settings, since it would be written as some QVariant binary thing. Store them with json strings (json.dumps, loads) and read them out

@1over137
Copy link
Contributor

1over137 commented May 4, 2024

also let's just get rid of all the truncate_middle calls, because I think they cause issues with the filtering and don't really have benefits anyways (the viewport can scroll).

@1over137 1over137 merged commit af99d26 into FreeLanguageTools:master May 21, 2024
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.

None yet

2 participants