Inject views as explicit dependencies into BlaView

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
Construct the UIManager during UI initialization

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blagui: add `get_accelerator_group' function

Add convenience function `add_accelerator_group' to the blagui package
which retrieves the accelerator group of the toplevel owning window of
the widget passed to the function.

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blametadata.py: emit signals in the main thread

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
Limit use of the global instance of ui_manager

The only place where we still use the fact that UIManager is a singleton
is in playlist.py. Once the circular dependency between the playlist
manager and the queue has been resolved, we can make UIManager a regular
class again.

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blautil: add `thread_id' function

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blautil: add `cdll' function as ctypes front-end

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blatrackinfo.py: clean up

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
Initial version of a major design overhaul

This is the first commit in an attempt to loosen the excessive
coupling between major components of blaplay. Over time, we built up
too many dependencies which made it hard to reason about the effect of
changes to certain components, and which made it largely impossible to
write unit tests. One major issue was the excessive use of
singleton classes throughout the code base. This has been largely
corrected now by using dependency injection in favor of singletons.
There are still a lot of dependency issues to work out, but it's a step
in the right direction. Unfortunately, due to tight coupling, it was too
troublesome to incrementally correct these design issues which is why
this commit is rather invasive, and removes many core features which
will be re-implemented once the new design has been stabilized.

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blautil: completely remove BlaSingletonMeta

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
Give timeout and callback ids more sensible names

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
Don't call gobject.source_remove with invalid ids

Since GLib 2.39, calling `g_source_remove' resp. `gobject.source_remove'
with an invalid source id is considered a programming error and results
in a warning. We leveraged the old behavior excessively to remove
scheduled timeouts without worrying about the validity of source ids.
We now make sure that source ids are set to 0 once we removed them and
only call `gobject.source_remove' with nonzero ids.

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
Remove remaining code fragments for radio streams

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blafm.py: clean up

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blaguiutils.py: rename BlaPopupMenu to BlaMenu

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
Rename blaguiutils.py to blaguiutil.py

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>
blatabview.py: clean up click event detection

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>