fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
179 stars 24 forks source link

Using QFileDialog #197

Closed aviral-batra closed 3 years ago

aviral-batra commented 3 years ago

Changed it so that you can select dirs and files using a QFileDialog getting rid of the QRunnable for the search.

Also, I left the options in a grid layout rather than a horizontal layout in case more need to be added.

P.S. It's corode - I noticed the gaping spelling error in my username so changed it!

aviral-batra commented 3 years ago

Also, there still might be a problem when rendering the returned files if there are too many. Maybe we shouldn't render them at all? Then we won't run into the gui related problems encountered before. A tag like 'bulk import' could be added so a person can easily see what files have successfully been imported in from the main addon section.

Then the actual adding (which might be the main thread blocking task) could go in the QRunnable.

fonol commented 3 years ago

P.S. It's corode - I noticed the gaping spelling error in my username so changed it!

Well I hadn't noticed up to now either :).

Also, there still might be a problem when rendering the returned files if there are too many. Maybe we shouldn't render them at all? Then we won't run into the gui related problems encountered before. A tag like 'bulk import' could be added so a person can easily see what files have successfully been imported in from the main addon section.

Sound good to me!

Sorry for late answer, absolutely swamped at the moment.