Use GTK Composite Templates for GUI elements to clean up and simplify
the code for widgets and all UI elements. This includes splitting the
large “gtk.glade” file into smaller .ui files and the large “widgets.py”
file into smaller .py files.
Load the playlist before loading the status for the idle event “changed”
to make sure the playlist information is attached to the current album
correctly.
Load the album covers using MPD’s new “albumart” command instead of
reading the covers from the harddrive. Remove the corresponding UI
elements and configuration option.
Use the recv() method to read data from the socket instead of makefile()
to allow reading of binary data that is not text. This requires using a
custom buffer.
Introduce two new callbacks for this: one when initializing the loading
of albums and another one on handling the loading of each album. Use the
first one to initialize and the second one to pulse the progress bar on
the Library panel.
Additionally use the text of the progress as status label instead of a
separate label widget.
Fix setting the default image (if the selected/current album does not
has a cover) for the Cover panel, the Playlist panel and the Library
panel by using the default image instead of clearing the image widget.
Additionally fix the check for the empty URL String.
As the documentation on the “locale” module states, the “gettext” module
should be used instead. Therefore adjust the localization calls to use
gettext instead.
Additionally fix one button label which did not use localization at all
and update the message catalogues.
Drawing the cover image on the Cover panel triggers the re-allocation of
the widget which in turn triggers the re-drawing of the cover image.
This led to an infinite loop of drawing the cover image causing high CPU
usage. To prevent this, the widget size is now stored and the the
resizing of the cover image is only done if the size has really changed.
Handle the window state as recommended by the Gnome HowDoI guide by
using the wrapper class WindowState with GObject properties and
bindings. Additionally use separate settings for width and height
instead of an array.