Add on_ticks() and max_ticks to simplify code using progress indicators.
And support final ticks to set progress to 100% before a final long
operation.
Change interval from 100ms to 250ms, to allow more time to be spent on
the operation.
Fixes flake8 error F401.
Most errors were fixed by running
autoflake -i -r --remove-all-unused-imports .
which also removes unnecessary 'pass' statements, some by hand-editing.
The preferences-desktop icon is not available for 64x64 and larger icon
sizes, and gtk displays a missing icon instead of falling back to
smaller icons. Switching to preferences-other-symbolic would fix the
issue, but the other toolbar icons should probably be changed to
symbolic to match.
When dragging and dropping a podcast into another program, e.g VLC, some
filenames would cause issues (i.e ones with `#`).
Signed-off-by: B Horn <b@horn.uk>
The dialog is created inside the function and can be destroyed there as
well. This prevents the idle_add from being blocked forever by a
timeout_add, and the dialog never closing.
Fixes#1311.
It can take a while to populate the list when there are a lot of
downloads to resume. This leaves the list empty and UI, including the
`Resume All` button unresponsive. Keeping the dialog open while Gtk
populates the list prevents this from happening.
Closing gpodder while tasks are downloading or pausing causes a hang and
must be killed from task manager or interrupted if launched from command
line. This was introduced in ed5d18e1b0
but only applicable when using python 3.10. The idle_add() callback is
no longer invoked to wake up the dequeue wait_for() condition, likely
due to the main thread terminating early, which didn't happen in older
python versions. Simply waiting for all worker threads to terminate
fixes the issue.
Fixes#1306.
The new setting defaults to enabled to preserve the current behavior of
opening search fields in channel and episode lists when the user begins
typing. Disabling the feature ignores the keypresses and requires ctrl-f
or ctrl-shift-f to open or focus the search field.