This makes it easier to move it out of the Gtk
UI code later on and in a more generic module.
This will be required for gPodder bug 1445 in
the CLI module, so this is a preparing refactor.
When the feed is redirected, we usually simply rewrite
the URL. However, if the new URL already exists in the
subscriptions, we must not allow this, and ideally
fail to update the feed to avoid duplicates.
This right now only syncs actions when an account is
already configured. The configuration UI will come only
on the Harmattan QML UI (it has Qt Quick Components).
The gPodderWelcome Python object was deleted and/or collected
after it fell out of scope, while the Gtk dialog was still
displayed. Work around this by running a separate main loop
for the dialog, so that the Python object stays alive longer.
This bug has been haunting us for quite some time now, and it
seems like the object hasn't always been collected, making it
harder to track down the bug. But rejoice, we finally fixed it!
Conflicts:
src/gpodder/gtkui/desktop/welcome.py
src/gpodder/gtkui/main.py
Instead of initializing woodchuck explicitly, let the
hooks module know then the UI has been initialized,
and provide some callbacks (that Woodchuck needs, but
which could be used by other hook scripts) and the model.
- Add an __init__ method to Model taking the DB to model.
- Make get_podcasts and load_podcast instance methods rather than
class methods. Don't require that the caller pass the DB to use.
- Update users.
- Have Core.__init__ take an additional parameter, model_class.
Instantiate a model from self.db using the provided model_class.
Toggling the new status of episodes works when the clicked episode
is selected and the icon is clicked. Setting the new status also
works when multiple episodes are selected - the clicked episode is
toggled, and depending on the new status of the clicked episode,
the rest of the selected episodes is also updated with this status.
Our Gtk+ UI only supports Desktop now (with the mobile
UIs all using QML or something else), so we can assume
that "gpodder.ui.desktop" is True when using gtkui.