Start implementing Playlist functionality via KotoCurrentPlaylist and KotoPlaylist.

Implement functionality for gracefully showing the play button on top of KotoAlbumArt images. Implemented a new koto_indexed_album_set_as_current_playlist function for setting an album as the current playlist, useful when clicking to play an album via its artwork.
This commit is contained in:
Joshua Strobl 2021-03-10 13:44:08 +02:00
parent 35762ca233
commit cf81682f8c
13 changed files with 551 additions and 7 deletions

View file

@ -18,14 +18,18 @@
#include <gtk-4.0/gdk/x11/gdkx.h>
#include "indexer/structs.h"
#include "pages/music/music-local.h"
#include "playlist/current.h"
#include "koto-config.h"
#include "koto-nav.h"
#include "koto-playerbar.h"
#include "koto-window.h"
extern KotoCurrentPlaylist *current_playlist;
struct _KotoWindow {
GtkApplicationWindow parent_instance;
KotoIndexedLibrary *library;
KotoCurrentPlaylist *current_playlist;
GtkWidget *header_bar;
GtkWidget *menu_button;
@ -46,6 +50,8 @@ static void koto_window_class_init (KotoWindowClass *klass) {
}
static void koto_window_init (KotoWindow *self) {
current_playlist = koto_current_playlist_new();
GtkCssProvider* provider = gtk_css_provider_new();
gtk_css_provider_load_from_resource(provider, "/com/github/joshstrobl/koto/style.css");
gtk_style_context_add_provider_for_display(gdk_display_get_default(), GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);