/* store-panel.c generated by valac 0.56.19, the Vala compiler
 * generated from store-panel.vala, do not modify */

#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <adwaita.h>
#include <gdk/gdk.h>
#include <pango/pango.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>

#define G4_SEARCH_MODE_ANY ((guint) 0)
#define G4_SEARCH_MODE_ALBUM ((guint) 1)
#define G4_SEARCH_MODE_ARTIST ((guint) 2)
#define G4_SEARCH_MODE_TITLE ((guint) 3)
#define G4_STACK_FLAGS_FIRST ((guint) 1)
#define G4_STACK_FLAGS_ARTISTS ((guint) 1)
#define G4_STACK_FLAGS_ALBUMS ((guint) 2)
#define G4_STACK_FLAGS_PLAYLISTS ((guint) 3)
#define G4_STACK_FLAGS_LAST ((guint) 4)
#define G4_THUMBNAILER_ICON_SIZE 48
#define G4_PAGE_NAME_PLAYING "playing"
#define G4_PAGE_NAME_ARTIST "artist"
#define G4_PAGE_NAME_ALBUM "album"
#define G4_PAGE_NAME_PLAYLIST "playlist"
#define G4_SORT_MODE_ALBUM ((guint) 0)
#define G4_SORT_MODE_TITLE ((guint) 3)
#define G4_SORT_MODE_SHUFFLE ((guint) 5)
#define G4_ACTION_WIN "win."
#define G4_ACTION_SAVE_LIST "save-list"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define G4_TYPE_SIZE_WATCHER (g4_size_watcher_get_type ())
#define G4_SIZE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_SIZE_WATCHER, G4SizeWatcher))
#define G4_IS_SIZE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_SIZE_WATCHER))
#define G4_SIZE_WATCHER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G4_TYPE_SIZE_WATCHER, G4SizeWatcherIface))

typedef struct _G4SizeWatcher G4SizeWatcher;
typedef struct _G4SizeWatcherIface G4SizeWatcherIface;

#define G4_TYPE_STORE_PANEL (g4_store_panel_get_type ())
#define G4_STORE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_STORE_PANEL, G4StorePanel))
#define G4_STORE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_STORE_PANEL, G4StorePanelClass))
#define G4_IS_STORE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_STORE_PANEL))
#define G4_IS_STORE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_STORE_PANEL))
#define G4_STORE_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_STORE_PANEL, G4StorePanelClass))

typedef struct _G4StorePanel G4StorePanel;
typedef struct _G4StorePanelClass G4StorePanelClass;
typedef struct _G4StorePanelPrivate G4StorePanelPrivate;

#define G4_TYPE_STACK (g4_stack_get_type ())
#define G4_STACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_STACK, G4Stack))
#define G4_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_STACK, G4StackClass))
#define G4_IS_STACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_STACK))
#define G4_IS_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_STACK))
#define G4_STACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_STACK, G4StackClass))

typedef struct _G4Stack G4Stack;
typedef struct _G4StackClass G4StackClass;

#define G4_TYPE_MINI_BAR (g4_mini_bar_get_type ())
#define G4_MINI_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MINI_BAR, G4MiniBar))
#define G4_MINI_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MINI_BAR, G4MiniBarClass))
#define G4_IS_MINI_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MINI_BAR))
#define G4_IS_MINI_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MINI_BAR))
#define G4_MINI_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MINI_BAR, G4MiniBarClass))

typedef struct _G4MiniBar G4MiniBar;
typedef struct _G4MiniBarClass G4MiniBarClass;

#define G4_TYPE_APPLICATION (g4_application_get_type ())
#define G4_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_APPLICATION, G4Application))
#define G4_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_APPLICATION, G4ApplicationClass))
#define G4_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_APPLICATION))
#define G4_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_APPLICATION))
#define G4_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_APPLICATION, G4ApplicationClass))

typedef struct _G4Application G4Application;
typedef struct _G4ApplicationClass G4ApplicationClass;

#define G4_TYPE_MUSIC_LIST (g4_music_list_get_type ())
#define G4_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_LIST, G4MusicList))
#define G4_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_LIST, G4MusicListClass))
#define G4_IS_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_LIST))
#define G4_IS_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_LIST))
#define G4_MUSIC_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_LIST, G4MusicListClass))

typedef struct _G4MusicList G4MusicList;
typedef struct _G4MusicListClass G4MusicListClass;

#define G4_TYPE_MAIN_MUSIC_LIST (g4_main_music_list_get_type ())
#define G4_MAIN_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MAIN_MUSIC_LIST, G4MainMusicList))
#define G4_MAIN_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MAIN_MUSIC_LIST, G4MainMusicListClass))
#define G4_IS_MAIN_MUSIC_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MAIN_MUSIC_LIST))
#define G4_IS_MAIN_MUSIC_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MAIN_MUSIC_LIST))
#define G4_MAIN_MUSIC_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MAIN_MUSIC_LIST, G4MainMusicListClass))

typedef struct _G4MainMusicList G4MainMusicList;
typedef struct _G4MainMusicListClass G4MainMusicListClass;

#define G4_TYPE_MUSIC_LIBRARY (g4_music_library_get_type ())
#define G4_MUSIC_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_LIBRARY, G4MusicLibrary))
#define G4_MUSIC_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_LIBRARY, G4MusicLibraryClass))
#define G4_IS_MUSIC_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_LIBRARY))
#define G4_IS_MUSIC_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_LIBRARY))
#define G4_MUSIC_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_LIBRARY, G4MusicLibraryClass))

typedef struct _G4MusicLibrary G4MusicLibrary;
typedef struct _G4MusicLibraryClass G4MusicLibraryClass;
enum  {
	G4_STORE_PANEL_0_PROPERTY,
	G4_STORE_PANEL_CURRENT_LIST_PROPERTY,
	G4_STORE_PANEL_MODIFIED_PROPERTY,
	G4_STORE_PANEL_SORT_MODE_PROPERTY,
	G4_STORE_PANEL_VISIBLE_CHILD_PROPERTY,
	G4_STORE_PANEL_NUM_PROPERTIES
};
static GParamSpec* g4_store_panel_properties[G4_STORE_PANEL_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _gtk_bitset_unref0(var) ((var == NULL) ? NULL : (var = (gtk_bitset_unref (var), NULL)))

#define G4_TYPE_WINDOW (g4_window_get_type ())
#define G4_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_WINDOW, G4Window))
#define G4_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_WINDOW, G4WindowClass))
#define G4_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_WINDOW))
#define G4_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_WINDOW))
#define G4_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_WINDOW, G4WindowClass))

typedef struct _G4Window G4Window;
typedef struct _G4WindowClass G4WindowClass;

#define G4_TYPE_LEAFLET (g4_leaflet_get_type ())
#define G4_LEAFLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_LEAFLET, G4Leaflet))
#define G4_LEAFLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_LEAFLET, G4LeafletClass))
#define G4_IS_LEAFLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_LEAFLET))
#define G4_IS_LEAFLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_LEAFLET))
#define G4_LEAFLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_LEAFLET, G4LeafletClass))

typedef struct _G4Leaflet G4Leaflet;
typedef struct _G4LeafletClass G4LeafletClass;

#define G4_TYPE_MUSIC_LOADER (g4_music_loader_get_type ())
#define G4_MUSIC_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_LOADER, G4MusicLoader))
#define G4_MUSIC_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_LOADER, G4MusicLoaderClass))
#define G4_IS_MUSIC_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_LOADER))
#define G4_IS_MUSIC_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_LOADER))
#define G4_MUSIC_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_LOADER, G4MusicLoaderClass))

typedef struct _G4MusicLoader G4MusicLoader;
typedef struct _G4MusicLoaderClass G4MusicLoaderClass;

#define G4_TYPE_THUMBNAILER (g4_thumbnailer_get_type ())
#define G4_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_THUMBNAILER, G4Thumbnailer))
#define G4_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_THUMBNAILER, G4ThumbnailerClass))
#define G4_IS_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_THUMBNAILER))
#define G4_IS_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_THUMBNAILER))
#define G4_THUMBNAILER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_THUMBNAILER, G4ThumbnailerClass))

typedef struct _G4Thumbnailer G4Thumbnailer;
typedef struct _G4ThumbnailerClass G4ThumbnailerClass;

#define G4_TYPE_MUSIC (g4_music_get_type ())
#define G4_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC, G4Music))
#define G4_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC, G4MusicClass))
#define G4_IS_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC))
#define G4_IS_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC))
#define G4_MUSIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC, G4MusicClass))

typedef struct _G4Music G4Music;
typedef struct _G4MusicClass G4MusicClass;

#define G4_TYPE_ARTIST (g4_artist_get_type ())
#define G4_ARTIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_ARTIST, G4Artist))
#define G4_ARTIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_ARTIST, G4ArtistClass))
#define G4_IS_ARTIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_ARTIST))
#define G4_IS_ARTIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_ARTIST))
#define G4_ARTIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_ARTIST, G4ArtistClass))

typedef struct _G4Artist G4Artist;
typedef struct _G4ArtistClass G4ArtistClass;

#define G4_TYPE_NARROW_BAR (g4_narrow_bar_get_type ())
#define G4_NARROW_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_NARROW_BAR, G4NarrowBar))
#define G4_NARROW_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_NARROW_BAR, G4NarrowBarClass))
#define G4_IS_NARROW_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_NARROW_BAR))
#define G4_IS_NARROW_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_NARROW_BAR))
#define G4_NARROW_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_NARROW_BAR, G4NarrowBarClass))

typedef struct _G4NarrowBar G4NarrowBar;
typedef struct _G4NarrowBarClass G4NarrowBarClass;

#define G4_TYPE_ALBUM (g4_album_get_type ())
#define G4_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_ALBUM, G4Album))
#define G4_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_ALBUM, G4AlbumClass))
#define G4_IS_ALBUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_ALBUM))
#define G4_IS_ALBUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_ALBUM))
#define G4_ALBUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_ALBUM, G4AlbumClass))

typedef struct _G4Album G4Album;
typedef struct _G4AlbumClass G4AlbumClass;

#define G4_TYPE_PLAYLIST (g4_playlist_get_type ())
#define G4_PLAYLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_PLAYLIST, G4Playlist))
#define G4_PLAYLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_PLAYLIST, G4PlaylistClass))
#define G4_IS_PLAYLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_PLAYLIST))
#define G4_IS_PLAYLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_PLAYLIST))
#define G4_PLAYLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_PLAYLIST, G4PlaylistClass))

typedef struct _G4Playlist G4Playlist;
typedef struct _G4PlaylistClass G4PlaylistClass;
typedef void (*G4VoidFunc) (gpointer user_data);
typedef struct _Block37Data Block37Data;
typedef enum  {
	G4_RESULT_CANCEL = -1,
	G4_RESULT_FAILED = 0,
	G4_RESULT_OK = 1
} G4Result;

#define G4_TYPE_RESULT (g4_result_get_type ())
typedef struct _Block38Data Block38Data;
typedef struct _Block39Data Block39Data;

#define G4_TYPE_MUSIC_WIDGET (g4_music_widget_get_type ())
#define G4_MUSIC_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_WIDGET, G4MusicWidget))
#define G4_MUSIC_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_WIDGET, G4MusicWidgetClass))
#define G4_IS_MUSIC_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_WIDGET))
#define G4_IS_MUSIC_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_WIDGET))
#define G4_MUSIC_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_WIDGET, G4MusicWidgetClass))

typedef struct _G4MusicWidget G4MusicWidget;
typedef struct _G4MusicWidgetClass G4MusicWidgetClass;
typedef struct _G4MusicPrivate G4MusicPrivate;
typedef struct _G4MusicWidgetPrivate G4MusicWidgetPrivate;

#define G4_TYPE_STABLE_LABEL (g4_stable_label_get_type ())
#define G4_STABLE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_STABLE_LABEL, G4StableLabel))
#define G4_STABLE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_STABLE_LABEL, G4StableLabelClass))
#define G4_IS_STABLE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_STABLE_LABEL))
#define G4_IS_STABLE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_STABLE_LABEL))
#define G4_STABLE_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_STABLE_LABEL, G4StableLabelClass))

typedef struct _G4StableLabel G4StableLabel;
typedef struct _G4StableLabelClass G4StableLabelClass;

#define G4_TYPE_BASE_PAINTABLE (g4_base_paintable_get_type ())
#define G4_BASE_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_BASE_PAINTABLE, G4BasePaintable))
#define G4_BASE_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_BASE_PAINTABLE, G4BasePaintableClass))
#define G4_IS_BASE_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_BASE_PAINTABLE))
#define G4_IS_BASE_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_BASE_PAINTABLE))
#define G4_BASE_PAINTABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_BASE_PAINTABLE, G4BasePaintableClass))

typedef struct _G4BasePaintable G4BasePaintable;
typedef struct _G4BasePaintableClass G4BasePaintableClass;

#define G4_TYPE_ROUND_PAINTABLE (g4_round_paintable_get_type ())
#define G4_ROUND_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_ROUND_PAINTABLE, G4RoundPaintable))
#define G4_ROUND_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_ROUND_PAINTABLE, G4RoundPaintableClass))
#define G4_IS_ROUND_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_ROUND_PAINTABLE))
#define G4_IS_ROUND_PAINTABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_ROUND_PAINTABLE))
#define G4_ROUND_PAINTABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_ROUND_PAINTABLE, G4RoundPaintableClass))

typedef struct _G4RoundPaintable G4RoundPaintable;
typedef struct _G4RoundPaintableClass G4RoundPaintableClass;
typedef struct _Block40Data Block40Data;

#define G4_TYPE_MUSIC_ENTRY (g4_music_entry_get_type ())
#define G4_MUSIC_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_MUSIC_ENTRY, G4MusicEntry))
#define G4_MUSIC_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_MUSIC_ENTRY, G4MusicEntryClass))
#define G4_IS_MUSIC_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_MUSIC_ENTRY))
#define G4_IS_MUSIC_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_MUSIC_ENTRY))
#define G4_MUSIC_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_MUSIC_ENTRY, G4MusicEntryClass))

typedef struct _G4MusicEntry G4MusicEntry;
typedef struct _G4MusicEntryClass G4MusicEntryClass;
typedef struct _Block41Data Block41Data;
typedef struct _G4AlbumPrivate G4AlbumPrivate;
typedef struct _G4PlaylistPrivate G4PlaylistPrivate;
typedef struct _Block42Data Block42Data;
typedef struct _Block43Data Block43Data;
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))

#define G4_TYPE_GST_PLAYER (g4_gst_player_get_type ())
#define G4_GST_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_GST_PLAYER, G4GstPlayer))
#define G4_GST_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_GST_PLAYER, G4GstPlayerClass))
#define G4_IS_GST_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_GST_PLAYER))
#define G4_IS_GST_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_GST_PLAYER))
#define G4_GST_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_GST_PLAYER, G4GstPlayerClass))

typedef struct _G4GstPlayer G4GstPlayer;
typedef struct _G4GstPlayerClass G4GstPlayerClass;

struct _G4SizeWatcherIface {
	GTypeInterface parent_iface;
	void (*first_allocated) (G4SizeWatcher* self);
	void (*size_to_change) (G4SizeWatcher* self, gint width, gint height);
};

struct _G4StorePanel {
	GtkBox parent_instance;
	G4StorePanelPrivate * priv;
	GtkHeaderBar* header_bar;
	GtkLabel* indicator;
};

struct _G4StorePanelClass {
	GtkBoxClass parent_class;
};

struct _G4StorePanelPrivate {
	GtkMenuButton* sort_btn;
	GtkToggleButton* search_btn;
	GtkSearchBar* search_bar;
	GtkSearchEntry* search_entry;
	GtkStack* stack_view;
	G4Stack* _album_stack;
	G4Stack* _artist_stack;
	G4Stack* _playlist_stack;
	G4MiniBar* _mini_bar;
	GtkStackSwitcher* _switcher_top;
	GtkStackSwitcher* _switcher_btm;
	G4Application* _app;
	G4MusicList* _album_list;
	G4MusicList* _artist_list;
	G4MusicList* _current_list;
	G4MainMusicList* _main_list;
	G4MusicList* _playlist_list;
	G4MusicLibrary* _library;
	gchar* _library_uri;
	GdkPaintable* _loading_paintable;
	guint _search_mode;
	gchar* _search_text;
	gboolean _size_allocated;
	guint _sort_mode;
	gboolean _updating_store;
	GHashTable* _overlayed_lists;
	GtkBitset* _changing_stacks;
	gchar* _album_key_of_list;
};

struct _Block37Data {
	int _ref_count_;
	G4StorePanel* self;
	G4VoidFunc done;
	gpointer done_target;
};

struct _Block38Data {
	int _ref_count_;
	G4StorePanel* self;
	guint delay;
};

struct _Block39Data {
	int _ref_count_;
	G4StorePanel* self;
	G4Artist* artist;
};

struct _G4Music {
	GObject parent_instance;
	G4MusicPrivate * priv;
	gchar* album;
	gchar* artist;
	gchar* title;
	gchar* album_artist;
	guint32 date;
	gchar* genre;
	gint track;
	gint disc;
	gboolean has_cover;
	gint64 modified_time;
	gchar* uri;
	gchar* cover_uri;
	gchar* _album_key;
	gchar* _artist_key;
	gchar* _title_key;
	gint _order;
};

struct _G4MusicClass {
	GObjectClass parent_class;
	gchar* (*get_abbreviation) (G4Music* self);
};

struct _G4MusicWidget {
	GtkBox parent_instance;
	G4MusicWidgetPrivate * priv;
	GtkImage* _image;
	G4StableLabel* _title;
	G4StableLabel* _subtitle;
	G4RoundPaintable* _paintable;
	GtkImage* _playing;
	gulong first_draw_handler;
	G4Music* music;
};

struct _G4MusicWidgetClass {
	GtkBoxClass parent_class;
};

struct _Block40Data {
	int _ref_count_;
	G4StorePanel* self;
	guint sort_mode;
};

struct _Block41Data {
	int _ref_count_;
	G4StorePanel* self;
	GtkLabel* label;
};

struct _G4Album {
	G4Music parent_instance;
	G4AlbumPrivate * priv;
	GHashTable* _musics;
};

struct _G4AlbumClass {
	G4MusicClass parent_class;
	void (*get_sorted_musics) (G4Album* self, GPtrArray* musics);
	void (*sort) (G4Album* self, GPtrArray* arr);
};

struct _G4Playlist {
	G4Album parent_instance;
	G4PlaylistPrivate * priv;
	GPtrArray* items;
	gchar* list_uri;
};

struct _G4PlaylistClass {
	G4AlbumClass parent_class;
};

struct _Block42Data {
	int _ref_count_;
	Block41Data * _data41_;
	G4Playlist* playlist;
	GtkEntry* entry;
};

struct _Block43Data {
	int _ref_count_;
	G4StorePanel* self;
	G4Artist* artist;
	G4Album* album;
};

static gint G4StorePanel_private_offset;
static gpointer g4_store_panel_parent_class = NULL;
static G4SizeWatcherIface * g4_store_panel_g4_size_watcher_parent_iface = NULL;

VALA_EXTERN GType g4_size_watcher_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType g4_store_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4StorePanel, g_object_unref)
VALA_EXTERN GType g4_stack_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Stack, g_object_unref)
VALA_EXTERN GType g4_mini_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MiniBar, g_object_unref)
VALA_EXTERN GType g4_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Application, g_object_unref)
VALA_EXTERN GType g4_music_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicList, g_object_unref)
VALA_EXTERN GType g4_main_music_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MainMusicList, g_object_unref)
VALA_EXTERN GType g4_music_library_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicLibrary, g_object_unref)
VALA_EXTERN G4Stack* g4_stack_new (gboolean retain_last_popped);
VALA_EXTERN G4Stack* g4_stack_construct (GType object_type,
                             gboolean retain_last_popped);
VALA_EXTERN G4MiniBar* g4_mini_bar_new (void);
VALA_EXTERN G4MiniBar* g4_mini_bar_construct (GType object_type);
VALA_EXTERN GType g4_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Window, g_object_unref)
VALA_EXTERN GType g4_leaflet_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Leaflet, g_object_unref)
VALA_EXTERN G4StorePanel* g4_store_panel_new (G4Application* app,
                                  G4Window* win,
                                  G4Leaflet* leaflet);
VALA_EXTERN G4StorePanel* g4_store_panel_construct (GType object_type,
                                        G4Application* app,
                                        G4Window* win,
                                        G4Leaflet* leaflet);
VALA_EXTERN GType g4_music_loader_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicLoader, g_object_unref)
VALA_EXTERN G4MusicLoader* g4_application_get_loader (G4Application* self);
VALA_EXTERN G4MusicLibrary* g4_music_loader_get_library (G4MusicLoader* self);
VALA_EXTERN GType g4_thumbnailer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Thumbnailer, g_object_unref)
VALA_EXTERN G4Thumbnailer* g4_application_get_thumbnailer (G4Application* self);
VALA_EXTERN void g4_thumbnailer_set_pango_context (G4Thumbnailer* self,
                                       PangoContext* value);
VALA_EXTERN void g4_thumbnailer_set_scale_factor (G4Thumbnailer* self,
                                      gint value);
VALA_EXTERN GdkPaintable* g4_thumbnailer_create_simple_text_paintable (G4Thumbnailer* self,
                                                           const gchar* text,
                                                           gint size,
                                                           guint color_index);
static void g4_store_panel_on_search_btn_toggled (G4StorePanel* self);
static void _g4_store_panel_on_search_btn_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                      gpointer self);
static void g4_store_panel_on_search_text_changed (G4StorePanel* self);
static void _g4_store_panel_on_search_text_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                             gpointer self);
static G4MainMusicList* g4_store_panel_create_main_music_list (G4StorePanel* self);
VALA_EXTERN GListStore* g4_application_get_music_queue (G4Application* self);
VALA_EXTERN void g4_music_list_set_data_store (G4MusicList* self,
                                   GListStore* value);
VALA_EXTERN GtkFilterListModel* g4_music_list_get_filter_model (G4MusicList* self);
VALA_EXTERN void g4_application_set_current_list (G4Application* self,
                                      GtkFilterListModel* value);
static G4MusicList* g4_store_panel_create_artist_list (G4StorePanel* self);
VALA_EXTERN GtkWidget* g4_stack_add (G4Stack* self,
                         GtkWidget* child,
                         const gchar* tag);
VALA_EXTERN GtkWidget* g4_stack_get_widget (G4Stack* self);
VALA_EXTERN GType g4_music_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Music, g_object_unref)
VALA_EXTERN GType g4_artist_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Artist, g_object_unref)
static G4MusicList* g4_store_panel_create_album_list (G4StorePanel* self,
                                               G4Artist* artist);
static G4MusicList* g4_store_panel_create_playlist_list (G4StorePanel* self);
VALA_EXTERN void g4_leaflet_push (G4Leaflet* self);
static void _g4_leaflet_push_adw_action_row_activated (AdwActionRow* _sender,
                                                gpointer self);
VALA_EXTERN GType g4_narrow_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4NarrowBar, g_object_unref)
VALA_EXTERN G4NarrowBar* g4_narrow_bar_new (void);
VALA_EXTERN G4NarrowBar* g4_narrow_bar_construct (GType object_type);
VALA_EXTERN void g4_narrow_bar_set_child (G4NarrowBar* self,
                              GtkWidget* value);
VALA_EXTERN void g4_fix_switcher_style (GtkStackSwitcher* switcher);
static void g4_store_panel_on_music_changed (G4StorePanel* self,
                                      G4Music* music);
static void _g4_store_panel_on_music_changed_g4_application_music_changed (G4Application* _sender,
                                                                    G4Music* music,
                                                                    gpointer self);
static void g4_store_panel_on_music_library_changed (G4StorePanel* self,
                                              gboolean external);
static void _g4_store_panel_on_music_library_changed_g4_application_music_library_changed (G4Application* _sender,
                                                                                    gboolean external,
                                                                                    gpointer self);
VALA_EXTERN GType g4_album_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Album, g_object_unref)
VALA_EXTERN GType g4_playlist_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Playlist, g_object_unref)
static void g4_store_panel_on_playlist_added (G4StorePanel* self,
                                       G4Playlist* playlist);
static void _g4_store_panel_on_playlist_added_g4_application_playlist_added (G4Application* _sender,
                                                                      G4Playlist* playlist,
                                                                      gpointer self);
static void g4_store_panel_on_thumbnail_changed (G4StorePanel* self,
                                          G4Music* music,
                                          GdkPaintable* paintable);
static void _g4_store_panel_on_thumbnail_changed_g4_application_thumbnail_changed (G4Application* _sender,
                                                                            G4Music* music,
                                                                            GdkPaintable* paintable,
                                                                            gpointer self);
VALA_EXTERN GSettings* g4_application_get_settings (G4Application* self);
static void g4_store_panel_initialize_library_page (G4StorePanel* self);
static void g4_store_panel_real_first_allocated (G4SizeWatcher* base);
VALA_EXTERN void g4_store_panel_remove_from_list (G4StorePanel* self,
                                      G4Music* music);
VALA_EXTERN GListStore* g4_music_list_get_data_store (G4MusicList* self);
VALA_EXTERN void g4_music_list_set_modified (G4MusicList* self,
                                 gboolean value);
VALA_EXTERN gboolean g4_store_panel_save_if_modified (G4StorePanel* self,
                                          gboolean prompt,
                                          G4VoidFunc done,
                                          gpointer done_target);
static Block37Data* block37_data_ref (Block37Data* _data37_);
static void block37_data_unref (void * _userdata_);
VALA_EXTERN void g4_music_list_save_if_modified (G4MusicList* self,
                                     gboolean prompt,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
VALA_EXTERN GType g4_result_get_type (void) G_GNUC_CONST ;
VALA_EXTERN G4Result g4_music_list_save_if_modified_finish (G4MusicList* self,
                                                GAsyncResult* _res_);
static void ___lambda120_ (G4StorePanel* self,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda120__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
VALA_EXTERN gboolean g4_music_list_get_modified (G4MusicList* self);
static void ___lambda121_ (Block37Data* _data37_,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda121__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
VALA_EXTERN void g4_store_panel_set_mini_cover (G4StorePanel* self,
                                    GdkPaintable* cover);
VALA_EXTERN void g4_mini_bar_set_cover (G4MiniBar* self,
                            GdkPaintable* value);
static void g4_store_panel_real_size_to_change (G4SizeWatcher* base,
                                         gint width,
                                         gint height);
VALA_EXTERN void g4_store_panel_start_search (G4StorePanel* self,
                                  const gchar* text,
                                  guint mode);
static Block38Data* block38_data_ref (Block38Data* _data38_);
static void block38_data_unref (void * _userdata_);
VALA_EXTERN guint g4_run_idle_once (G4VoidFunc func,
                        gpointer func_target,
                        GDestroyNotify func_target_destroy_notify,
                        gint priority);
static void __lambda122_ (Block38Data* _data38_);
static void ___lambda122__g4_void_func (gpointer self);
VALA_EXTERN gboolean g4_store_panel_toggle_search (G4StorePanel* self);
static void g4_store_panel_bind_music_list_properties (G4StorePanel* self,
                                                G4MusicList* list,
                                                gboolean editable);
VALA_EXTERN GType g4_music_list_get_item_type (G4MusicList* self);
static Block39Data* block39_data_ref (Block39Data* _data39_);
static void block39_data_unref (void * _userdata_);
VALA_EXTERN G4MusicList* g4_music_list_new (G4Application* app,
                                GType item_type,
                                G4Music* node,
                                gboolean editable,
                                gboolean selectable);
VALA_EXTERN G4MusicList* g4_music_list_construct (GType object_type,
                                      G4Application* app,
                                      GType item_type,
                                      G4Music* node,
                                      gboolean editable,
                                      gboolean selectable);
static void __lambda108_ (Block39Data* _data39_,
                   guint position,
                   GObject* obj);
static void g4_store_panel_create_stack_page (G4StorePanel* self,
                                       G4Artist* artist,
                                       G4Album* album);
static void ___lambda108__g4_music_list_item_activated (G4MusicList* _sender,
                                                 guint position,
                                                 GObject* obj,
                                                 gpointer self);
static void __lambda109_ (Block39Data* _data39_,
                   GtkListItem* item);
VALA_EXTERN GType g4_music_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicWidget, g_object_unref)
VALA_EXTERN GType g4_stable_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4StableLabel, g_object_unref)
VALA_EXTERN GType g4_base_paintable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4BasePaintable, g_object_unref)
VALA_EXTERN GType g4_round_paintable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4RoundPaintable, g_object_unref)
VALA_EXTERN void g4_music_widget_set_paintable (G4MusicWidget* self,
                                    GdkPaintable* value);
VALA_EXTERN void g4_music_widget_set_title (G4MusicWidget* self,
                                const gchar* value);
VALA_EXTERN gchar* g4_music_get_date_string (G4Music* self);
VALA_EXTERN void g4_music_widget_set_subtitle (G4MusicWidget* self,
                                   const gchar* value);
static void ___lambda109__g4_music_list_item_binded (G4MusicList* _sender,
                                              GtkListItem* item,
                                              gpointer self);
static void __lambda105_ (G4StorePanel* self,
                   guint position,
                   GObject* obj);
static void ___lambda105__g4_music_list_item_activated (G4MusicList* _sender,
                                                 guint position,
                                                 GObject* obj,
                                                 gpointer self);
static void __lambda117_ (G4StorePanel* self,
                   GtkListItem* item);
VALA_EXTERN G4RoundPaintable* g4_music_widget_get_cover (G4MusicWidget* self);
VALA_EXTERN void g4_round_paintable_set_ratio (G4RoundPaintable* self,
                                   gdouble value);
static void ___lambda117__g4_music_list_item_binded (G4MusicList* _sender,
                                              GtkListItem* item,
                                              gpointer self);
static G4MusicList* g4_store_panel_create_music_list (G4StorePanel* self,
                                               G4Album* album,
                                               gboolean from_artist);
static Block40Data* block40_data_ref (Block40Data* _data40_);
static void block40_data_unref (void * _userdata_);
static void __lambda106_ (G4StorePanel* self,
                   guint position,
                   GObject* obj);
static void g4_store_panel_play_current_list (G4StorePanel* self,
                                       gint index);
static void ___lambda106__g4_music_list_item_activated (G4MusicList* _sender,
                                                 guint position,
                                                 GObject* obj,
                                                 gpointer self);
static void __lambda107_ (Block40Data* _data40_,
                   GtkListItem* item);
VALA_EXTERN GType g4_music_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicEntry, g_object_unref)
VALA_EXTERN void g4_music_entry_set_titles (G4MusicEntry* self,
                                G4Music* music,
                                guint sort);
static void ___lambda107__g4_music_list_item_binded (G4MusicList* _sender,
                                              GtkListItem* item,
                                              gpointer self);
VALA_EXTERN G4MainMusicList* g4_main_music_list_new (G4Application* app);
VALA_EXTERN G4MainMusicList* g4_main_music_list_construct (GType object_type,
                                               G4Application* app);
static void __lambda103_ (G4StorePanel* self,
                   guint position,
                   GObject* obj);
static void ___lambda103__g4_music_list_item_activated (G4MusicList* _sender,
                                                 guint position,
                                                 GObject* obj,
                                                 gpointer self);
static void __lambda104_ (G4StorePanel* self,
                   GtkListItem* item);
static void ___lambda104__g4_music_list_item_binded (G4MusicList* _sender,
                                              GtkListItem* item,
                                              gpointer self);
static void __lambda118_ (G4StorePanel* self,
                   guint position,
                   GObject* obj);
static void ___lambda118__g4_music_list_item_activated (G4MusicList* _sender,
                                                 guint position,
                                                 GObject* obj,
                                                 gpointer self);
static void __lambda119_ (G4StorePanel* self,
                   GtkListItem* item);
static void ___lambda119__g4_music_list_item_binded (G4MusicList* _sender,
                                              GtkListItem* item,
                                              gpointer self);
static GtkBox* g4_store_panel_create_title_bar (G4StorePanel* self,
                                         const gchar* title,
                                         const gchar* icon_name,
                                         G4Playlist* plist);
static Block41Data* block41_data_ref (Block41Data* _data41_);
static void block41_data_unref (void * _userdata_);
static Block42Data* block42_data_ref (Block42Data* _data42_);
static void block42_data_unref (void * _userdata_);
static void ___lambda110_ (Block42Data* _data42_);
VALA_EXTERN void g4_application_rename_playlist_async (G4Application* self,
                                           G4Playlist* playlist,
                                           const gchar* title,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN gboolean g4_application_rename_playlist_finish (G4Application* self,
                                                GAsyncResult* _res_);
static void ___lambda113_ (Block42Data* _data42_,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda113__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void ____lambda110__gtk_entry_activate (GtkEntry* _sender,
                                        gpointer self);
static gboolean ___lambda114_ (Block42Data* _data42_,
                        guint keyval,
                        guint keycode,
                        GdkModifierType state);
static gboolean ____lambda114__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                              guint keyval,
                                                              guint keycode,
                                                              GdkModifierType state,
                                                              gpointer self);
VALA_EXTERN GtkGestureClick* g4_make_widget_clickable (GtkWidget* label);
static void ___lambda115_ (Block42Data* _data42_);
static void ____lambda115__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                gint n_press,
                                                gdouble x,
                                                gdouble y,
                                                gpointer self);
static Block43Data* block43_data_ref (Block43Data* _data43_);
static void block43_data_unref (void * _userdata_);
VALA_EXTERN guint g4_music_list_update_store (G4MusicList* self);
VALA_EXTERN void g4_stack_pop (G4Stack* self);
static void _g4_stack_pop_gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN const gchar* g4_music_get_album_key (G4Music* self);
static gint* _int_dup (gint* self);
static void ___lambda116_ (Block43Data* _data43_);
VALA_EXTERN gboolean g4_store_panel_open_page (G4StorePanel* self,
                                   const gchar* uri,
                                   gboolean play_now,
                                   gboolean shuffle);
VALA_EXTERN gchar* g4_build_library_uri (G4Artist* artist,
                             G4Album* album);
static void ____lambda116__adw_split_button_clicked (AdwSplitButton* _sender,
                                              gpointer self);
VALA_EXTERN GMenu* g4_create_menu_for_artist (G4Artist* artist);
VALA_EXTERN GMenu* g4_create_menu_for_album (G4Album* album);
VALA_EXTERN gboolean g4_stack_get_animate_transitions (G4Stack* self);
VALA_EXTERN GtkWidget* g4_stack_get_visible_child (G4Stack* self);
VALA_EXTERN const gchar* g4_music_get_artist_name (G4Music* self);
static G4Stack* g4_store_panel_get_current_stack (G4StorePanel* self);
VALA_EXTERN gboolean g4_music_library_get_empty (G4MusicLibrary* self);
VALA_EXTERN gboolean g4_music_list_get_playable (G4MusicList* self);
VALA_EXTERN G4Music* g4_music_list_get_music_node (G4MusicList* self);
static void g4_store_panel_set_to_current_music (G4StorePanel* self,
                                          gboolean scroll);
static void g4_store_panel_save_current_page (G4StorePanel* self);
static void _g_free0_ (gpointer var);
VALA_EXTERN void g4_stack_get_visible_names (G4Stack* self,
                                 GPtrArray* names);
VALA_EXTERN gchar* g4_build_library_uri_from_sa (gchar** arr,
                                     gint arr_length1);
VALA_EXTERN gboolean g4_parse_library_uri (const gchar* uri_str,
                               gchar** artist,
                               gchar** album,
                               gchar** playlist,
                               gchar** host);
VALA_EXTERN void g4_stack_set_animate_transitions (G4Stack* self,
                                       gboolean value);
VALA_EXTERN G4Artist* g4_music_library_get_artist (G4MusicLibrary* self,
                                       const gchar* key);
VALA_EXTERN GtkWidget* g4_stack_get_child_by_name (G4Stack* self,
                                       const gchar* name);
VALA_EXTERN G4Album* g4_artist_get (G4Artist* self,
                        const gchar* name);
VALA_EXTERN G4Playlist* g4_artist_to_playlist (G4Artist* self);
VALA_EXTERN G4Album* g4_music_library_get_album (G4MusicLibrary* self,
                                     const gchar* key);
VALA_EXTERN G4Playlist* g4_music_library_get_playlist (G4MusicLibrary* self,
                                           const gchar* key);
static gboolean* _bool_dup (gboolean* self);
VALA_EXTERN void g4_sort_music_store (GListStore* store,
                          guint sort_mode);
VALA_EXTERN void g4_album_overwrite_to (G4Album* self,
                            GListStore* store);
VALA_EXTERN gint g4_store_panel_open_next_playable_page (G4StorePanel* self);
static void g4_store_panel_pop_page_without_animation (G4StorePanel* self,
                                                G4Stack* stack);
VALA_EXTERN gint g4_music_list_set_to_current_item (G4MusicList* self,
                                        gboolean scroll);
VALA_EXTERN guint g4_music_list_get_visible_count (G4MusicList* self);
VALA_EXTERN void g4_music_list_activate_item (G4MusicList* self,
                                  gint item);
VALA_EXTERN G4Playlist* g4_music_list_get_as_playlist (G4MusicList* self);
VALA_EXTERN gboolean g4_application_insert_to_queue (G4Application* self,
                                         G4Playlist* playlist,
                                         guint position,
                                         gboolean play_now);
VALA_EXTERN gint g4_application_get_current_item (G4Application* self);
VALA_EXTERN GtkFilterListModel* g4_application_get_current_list (G4Application* self);
VALA_EXTERN void g4_store_panel_open_playing_page (G4StorePanel* self);
VALA_EXTERN void g4_music_list_set_current_node (G4MusicList* self,
                                     G4Music* value);
VALA_EXTERN void g4_mini_bar_set_title (G4MiniBar* self,
                            const gchar* value);
VALA_EXTERN gint g4_music_list_get_dropping_item (G4MusicList* self);
VALA_EXTERN gboolean g4_music_list_get_multi_selection (G4MusicList* self);
VALA_EXTERN gboolean g4_application_get_list_modified (G4Application* self);
static void g4_store_panel_update_visible_stack (G4StorePanel* self);
static void _g_object_unref0_ (gpointer var);
VALA_EXTERN gboolean g4_merge_items_to_store (GListStore* store,
                                  GPtrArray* arr,
                                  guint* position);
static gboolean g4_store_panel_on_search_match (G4StorePanel* self,
                                         GObject* obj);
VALA_EXTERN G4Album* g4_artist_find_by_partial_artist (G4Artist* self,
                                           const gchar* artist);
VALA_EXTERN void g4_parse_search_mode (gchar** text,
                           guint* mode);
static gboolean _g4_store_panel_on_search_match_gtk_custom_filter_func (GObject* item,
                                                                 gpointer self);
VALA_EXTERN void g4_music_list_update_item_cover (G4MusicList* self,
                                      G4Music* music,
                                      GdkPaintable* paintable);
VALA_EXTERN void g4_application_set_current_item (G4Application* self,
                                      gint value);
VALA_EXTERN gint g4_application_insert_after_current (G4Application* self,
                                          G4Playlist* playlist);
VALA_EXTERN GType g4_gst_player_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4GstPlayer, g_object_unref)
VALA_EXTERN G4GstPlayer* g4_application_get_player (G4Application* self);
VALA_EXTERN gboolean g4_gst_player_get_playing (G4GstPlayer* self);
VALA_EXTERN void g4_gst_player_play (G4GstPlayer* self);
VALA_EXTERN G4Music* g4_application_get_current_music (G4Application* self);
static void g4_store_panel_update_stack_pages (G4StorePanel* self,
                                        G4Stack* stack);
VALA_EXTERN GPtrArray* g4_stack_get_children (G4Stack* self);
VALA_EXTERN void g4_music_library_overwrite_albums_to (G4MusicLibrary* self,
                                           GListStore* store);
VALA_EXTERN void g4_music_library_overwrite_artists_to (G4MusicLibrary* self,
                                            GListStore* store);
VALA_EXTERN gchar* g4_get_display_name (const gchar* uri);
VALA_EXTERN const gchar* g4_application_get_music_folder (G4Application* self);
VALA_EXTERN void g4_music_library_overwrite_playlists_to (G4MusicLibrary* self,
                                              GListStore* store);
VALA_EXTERN void g4_music_list_set_empty_text (G4MusicList* self,
                                   const gchar* text);
VALA_EXTERN G4MusicList* g4_store_panel_get_current_list (G4StorePanel* self);
VALA_EXTERN gboolean g4_store_panel_get_modified (G4StorePanel* self);
VALA_EXTERN void g4_store_panel_set_modified (G4StorePanel* self,
                                  gboolean value);
VALA_EXTERN guint g4_store_panel_get_sort_mode (G4StorePanel* self);
VALA_EXTERN void g4_store_panel_set_sort_mode (G4StorePanel* self,
                                   guint value);
VALA_EXTERN void g4_music_list_create_factory (G4MusicList* self);
VALA_EXTERN void g4_store_panel_set_visible_child (G4StorePanel* self,
                                       GtkWidget* value);
VALA_EXTERN void g4_size_watcher_first_allocated (G4SizeWatcher* self);
VALA_EXTERN void g4_size_watcher_size_to_change (G4SizeWatcher* self,
                                     gint width,
                                     gint height);
static void g4_store_panel_finalize (GObject * obj);
static GType g4_store_panel_get_type_once (void);
static void _vala_g4_store_panel_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec);
static void _vala_g4_store_panel_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

const gchar* G4_SORT_MODE_ICONS[6] = {"media-optical-cd-audio-symbolic", "system-users-symbolic", "avatar-default-symbolic", "folder-music-symbolic", "document-open-recent-symbolic", "media-playlist-shuffle-symbolic"};

static inline gpointer
g4_store_panel_get_instance_private (G4StorePanel* self)
{
	return G_STRUCT_MEMBER_P (self, G4StorePanel_private_offset);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
_g4_store_panel_on_search_btn_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                 gpointer self)
{
	g4_store_panel_on_search_btn_toggled ((G4StorePanel*) self);
}

static void
_g4_store_panel_on_search_text_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                        gpointer self)
{
	g4_store_panel_on_search_text_changed ((G4StorePanel*) self);
}

static void
_g4_leaflet_push_adw_action_row_activated (AdwActionRow* _sender,
                                           gpointer self)
{
	g4_leaflet_push ((G4Leaflet*) self);
}

static void
_g4_store_panel_on_music_changed_g4_application_music_changed (G4Application* _sender,
                                                               G4Music* music,
                                                               gpointer self)
{
	g4_store_panel_on_music_changed ((G4StorePanel*) self, music);
}

static void
_g4_store_panel_on_music_library_changed_g4_application_music_library_changed (G4Application* _sender,
                                                                               gboolean external,
                                                                               gpointer self)
{
	g4_store_panel_on_music_library_changed ((G4StorePanel*) self, external);
}

static void
_g4_store_panel_on_playlist_added_g4_application_playlist_added (G4Application* _sender,
                                                                 G4Playlist* playlist,
                                                                 gpointer self)
{
	g4_store_panel_on_playlist_added ((G4StorePanel*) self, playlist);
}

static void
_g4_store_panel_on_thumbnail_changed_g4_application_thumbnail_changed (G4Application* _sender,
                                                                       G4Music* music,
                                                                       GdkPaintable* paintable,
                                                                       gpointer self)
{
	g4_store_panel_on_thumbnail_changed ((G4StorePanel*) self, music, paintable);
}

G4StorePanel*
g4_store_panel_construct (GType object_type,
                          G4Application* app,
                          G4Window* win,
                          G4Leaflet* leaflet)
{
	G4StorePanel * self = NULL;
	G4Application* _tmp0_;
	G4MusicLoader* _tmp1_;
	G4MusicLoader* _tmp2_;
	G4MusicLibrary* _tmp3_;
	G4MusicLibrary* _tmp4_;
	G4MusicLibrary* _tmp5_;
	G4Thumbnailer* thumbnailer = NULL;
	G4Thumbnailer* _tmp6_;
	G4Thumbnailer* _tmp7_;
	G4Thumbnailer* _tmp8_;
	PangoContext* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	GdkPaintable* _tmp12_;
	GtkToggleButton* _tmp13_;
	GtkSearchBar* _tmp14_;
	GtkWidget* _tmp15_;
	GtkWidget* _tmp16_;
	GtkSearchEntry* _tmp17_;
	G4MainMusicList* _tmp18_;
	G4MainMusicList* _tmp19_;
	G4Application* _tmp20_;
	GListStore* _tmp21_;
	GListStore* _tmp22_;
	G4Application* _tmp23_;
	G4MainMusicList* _tmp24_;
	GtkFilterListModel* _tmp25_;
	GtkFilterListModel* _tmp26_;
	G4MainMusicList* _tmp27_;
	G4MusicList* _tmp28_;
	GtkStack* _tmp29_;
	G4MainMusicList* _tmp30_;
	GtkStackPage* _tmp31_;
	G4MusicList* _tmp32_;
	G4Stack* _tmp33_;
	G4MusicList* _tmp34_;
	GtkWidget* _tmp35_;
	GtkWidget* _tmp36_;
	G4Stack* _tmp37_;
	GtkStack* _tmp38_;
	G4Stack* _tmp39_;
	GtkWidget* _tmp40_;
	GtkWidget* _tmp41_;
	GtkStackPage* _tmp42_;
	G4MusicList* _tmp43_;
	G4Stack* _tmp44_;
	G4MusicList* _tmp45_;
	GtkWidget* _tmp46_;
	GtkWidget* _tmp47_;
	G4Stack* _tmp48_;
	GtkStack* _tmp49_;
	G4Stack* _tmp50_;
	GtkWidget* _tmp51_;
	GtkWidget* _tmp52_;
	GtkStackPage* _tmp53_;
	G4MusicList* _tmp54_;
	G4Stack* _tmp55_;
	G4MusicList* _tmp56_;
	GtkWidget* _tmp57_;
	GtkWidget* _tmp58_;
	G4Stack* _tmp59_;
	GtkStack* _tmp60_;
	G4Stack* _tmp61_;
	GtkWidget* _tmp62_;
	GtkWidget* _tmp63_;
	GtkStackPage* _tmp64_;
	GtkStack* _tmp65_;
	GtkStack* _tmp66_;
	GtkRevealer* mini_revealer = NULL;
	GtkRevealer* _tmp67_;
	G4MiniBar* _tmp68_;
	G4MiniBar* _tmp69_;
	GtkHeaderBar* _tmp70_;
	G4NarrowBar* top_revealer = NULL;
	G4NarrowBar* _tmp71_;
	GtkStackSwitcher* _tmp72_;
	GtkStackSwitcher* _tmp73_;
	GtkStack* _tmp74_;
	GtkStackSwitcher* _tmp75_;
	GtkHeaderBar* _tmp76_;
	GtkRevealer* btm_revealer = NULL;
	GtkRevealer* _tmp77_;
	GtkStackSwitcher* _tmp78_;
	GtkStackSwitcher* _tmp79_;
	GtkStackSwitcher* _tmp80_;
	GtkStackSwitcher* _tmp81_;
	GtkStackSwitcher* _tmp82_;
	GtkStack* _tmp83_;
	GtkStackSwitcher* _tmp84_;
	GSettings* settings = NULL;
	GSettings* _tmp85_;
	GSettings* _tmp86_;
	GSettings* _tmp87_;
	gchar* _tmp88_;
	g_return_val_if_fail (app != NULL, NULL);
	g_return_val_if_fail (win != NULL, NULL);
	g_return_val_if_fail (leaflet != NULL, NULL);
	self = (G4StorePanel*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (app);
	_g_object_unref0 (self->priv->_app);
	self->priv->_app = _tmp0_;
	_tmp1_ = g4_application_get_loader (app);
	_tmp2_ = _tmp1_;
	_tmp3_ = g4_music_loader_get_library (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->priv->_library);
	self->priv->_library = _tmp5_;
	gtk_widget_set_margin_bottom ((GtkWidget*) self, 6);
	_tmp6_ = g4_application_get_thumbnailer (app);
	_tmp7_ = _tmp6_;
	_tmp8_ = _g_object_ref0 (_tmp7_);
	thumbnailer = _tmp8_;
	_tmp9_ = gtk_widget_get_pango_context ((GtkWidget*) self);
	g4_thumbnailer_set_pango_context (thumbnailer, _tmp9_);
	_tmp10_ = gtk_widget_get_scale_factor ((GtkWidget*) self);
	_tmp11_ = _tmp10_;
	g4_thumbnailer_set_scale_factor (thumbnailer, _tmp11_);
	_tmp12_ = g4_thumbnailer_create_simple_text_paintable (thumbnailer, "...", G4_THUMBNAILER_ICON_SIZE, (guint) 0x7fffffff);
	_g_object_unref0 (self->priv->_loading_paintable);
	self->priv->_loading_paintable = _tmp12_;
	_tmp13_ = self->priv->search_btn;
	g_signal_connect_object (_tmp13_, "toggled", (GCallback) _g4_store_panel_on_search_btn_toggled_gtk_toggle_button_toggled, self, 0);
	_tmp14_ = self->priv->search_bar;
	_tmp15_ = adw_application_window_get_content ((AdwApplicationWindow*) win);
	_tmp16_ = _tmp15_;
	gtk_search_bar_set_key_capture_widget (_tmp14_, _tmp16_);
	_tmp17_ = self->priv->search_entry;
	g_signal_connect_object (_tmp17_, "search-changed", (GCallback) _g4_store_panel_on_search_text_changed_gtk_search_entry_search_changed, self, 0);
	_tmp18_ = g4_store_panel_create_main_music_list (self);
	_g_object_unref0 (self->priv->_main_list);
	self->priv->_main_list = _tmp18_;
	_tmp19_ = self->priv->_main_list;
	_tmp20_ = self->priv->_app;
	_tmp21_ = g4_application_get_music_queue (_tmp20_);
	_tmp22_ = _tmp21_;
	g4_music_list_set_data_store ((G4MusicList*) _tmp19_, _tmp22_);
	_tmp23_ = self->priv->_app;
	_tmp24_ = self->priv->_main_list;
	_tmp25_ = g4_music_list_get_filter_model ((G4MusicList*) _tmp24_);
	_tmp26_ = _tmp25_;
	g4_application_set_current_list (_tmp23_, _tmp26_);
	_tmp27_ = self->priv->_main_list;
	_tmp28_ = _g_object_ref0 ((G4MusicList*) _tmp27_);
	_g_object_unref0 (self->priv->_current_list);
	self->priv->_current_list = _tmp28_;
	_tmp29_ = self->priv->stack_view;
	_tmp30_ = self->priv->_main_list;
	_tmp31_ = gtk_stack_add_titled (_tmp29_, (GtkWidget*) _tmp30_, G4_PAGE_NAME_PLAYING, _ ("Playing"));
	gtk_stack_page_set_icon_name (_tmp31_, "user-home-symbolic");
	_tmp32_ = g4_store_panel_create_artist_list (self);
	_g_object_unref0 (self->priv->_artist_list);
	self->priv->_artist_list = _tmp32_;
	_tmp33_ = self->priv->_artist_stack;
	_tmp34_ = self->priv->_artist_list;
	_tmp35_ = g4_stack_add (_tmp33_, (GtkWidget*) _tmp34_, G4_PAGE_NAME_ARTIST);
	_tmp36_ = _tmp35_;
	_g_object_unref0 (_tmp36_);
	_tmp37_ = self->priv->_artist_stack;
	g_object_bind_property_with_closures ((GObject*) _tmp37_, "visible-child", (GObject*) self, "visible-child", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp38_ = self->priv->stack_view;
	_tmp39_ = self->priv->_artist_stack;
	_tmp40_ = g4_stack_get_widget (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = gtk_stack_add_titled (_tmp38_, _tmp41_, G4_PAGE_NAME_ARTIST, _ ("Artists"));
	gtk_stack_page_set_icon_name (_tmp42_, "system-users-symbolic");
	_tmp43_ = g4_store_panel_create_album_list (self, NULL);
	_g_object_unref0 (self->priv->_album_list);
	self->priv->_album_list = _tmp43_;
	_tmp44_ = self->priv->_album_stack;
	_tmp45_ = self->priv->_album_list;
	_tmp46_ = g4_stack_add (_tmp44_, (GtkWidget*) _tmp45_, G4_PAGE_NAME_ALBUM);
	_tmp47_ = _tmp46_;
	_g_object_unref0 (_tmp47_);
	_tmp48_ = self->priv->_album_stack;
	g_object_bind_property_with_closures ((GObject*) _tmp48_, "visible-child", (GObject*) self, "visible-child", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp49_ = self->priv->stack_view;
	_tmp50_ = self->priv->_album_stack;
	_tmp51_ = g4_stack_get_widget (_tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = gtk_stack_add_titled (_tmp49_, _tmp52_, G4_PAGE_NAME_ALBUM, _ ("Albums"));
	gtk_stack_page_set_icon_name (_tmp53_, "drive-multidisk-symbolic");
	_tmp54_ = g4_store_panel_create_playlist_list (self);
	_g_object_unref0 (self->priv->_playlist_list);
	self->priv->_playlist_list = _tmp54_;
	_tmp55_ = self->priv->_playlist_stack;
	_tmp56_ = self->priv->_playlist_list;
	_tmp57_ = g4_stack_add (_tmp55_, (GtkWidget*) _tmp56_, G4_PAGE_NAME_PLAYLIST);
	_tmp58_ = _tmp57_;
	_g_object_unref0 (_tmp58_);
	_tmp59_ = self->priv->_playlist_stack;
	g_object_bind_property_with_closures ((GObject*) _tmp59_, "visible-child", (GObject*) self, "visible-child", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp60_ = self->priv->stack_view;
	_tmp61_ = self->priv->_playlist_stack;
	_tmp62_ = g4_stack_get_widget (_tmp61_);
	_tmp63_ = _tmp62_;
	_tmp64_ = gtk_stack_add_titled (_tmp60_, _tmp63_, G4_PAGE_NAME_PLAYLIST, _ ("Playlists"));
	gtk_stack_page_set_icon_name (_tmp64_, "view-list-symbolic");
	_tmp65_ = self->priv->stack_view;
	gtk_stack_set_transition_type (_tmp65_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT);
	_tmp66_ = self->priv->stack_view;
	g_object_bind_property_with_closures ((GObject*) _tmp66_, "visible-child", (GObject*) self, "visible-child", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp67_ = (GtkRevealer*) gtk_revealer_new ();
	g_object_ref_sink (_tmp67_);
	mini_revealer = _tmp67_;
	_tmp68_ = self->priv->_mini_bar;
	gtk_revealer_set_child (mini_revealer, (GtkWidget*) _tmp68_);
	gtk_revealer_set_transition_type (mini_revealer, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	_tmp69_ = self->priv->_mini_bar;
	g_signal_connect_object ((AdwActionRow*) _tmp69_, "activated", (GCallback) _g4_leaflet_push_adw_action_row_activated, leaflet, 0);
	gtk_box_append ((GtkBox*) self, (GtkWidget*) mini_revealer);
	g_object_bind_property_with_closures ((GObject*) leaflet, "folded", (GObject*) mini_revealer, "reveal-child", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp70_ = self->header_bar;
	g_object_bind_property_with_closures ((GObject*) leaflet, "folded", (GObject*) _tmp70_, "show-title-buttons", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp71_ = g4_narrow_bar_new ();
	g_object_ref_sink (_tmp71_);
	top_revealer = _tmp71_;
	_tmp72_ = self->priv->_switcher_top;
	g4_narrow_bar_set_child (top_revealer, (GtkWidget*) _tmp72_);
	_tmp73_ = self->priv->_switcher_top;
	_tmp74_ = self->priv->stack_view;
	gtk_stack_switcher_set_stack (_tmp73_, _tmp74_);
	_tmp75_ = self->priv->_switcher_top;
	g4_fix_switcher_style (_tmp75_);
	_tmp76_ = self->header_bar;
	gtk_header_bar_pack_end (_tmp76_, (GtkWidget*) top_revealer);
	_tmp77_ = (GtkRevealer*) gtk_revealer_new ();
	g_object_ref_sink (_tmp77_);
	btm_revealer = _tmp77_;
	_tmp78_ = self->priv->_switcher_btm;
	gtk_revealer_set_child (btm_revealer, (GtkWidget*) _tmp78_);
	gtk_revealer_set_transition_type (btm_revealer, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	gtk_box_append ((GtkBox*) self, (GtkWidget*) btm_revealer);
	g_object_bind_property_with_closures ((GObject*) top_revealer, "reveal", (GObject*) btm_revealer, "reveal-child", G_BINDING_INVERT_BOOLEAN, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp79_ = self->priv->_switcher_btm;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp79_, 2);
	_tmp80_ = self->priv->_switcher_btm;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp80_, 6);
	_tmp81_ = self->priv->_switcher_btm;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp81_, 6);
	_tmp82_ = self->priv->_switcher_btm;
	_tmp83_ = self->priv->stack_view;
	gtk_stack_switcher_set_stack (_tmp82_, _tmp83_);
	_tmp84_ = self->priv->_switcher_btm;
	g4_fix_switcher_style (_tmp84_);
	g_signal_connect_object (app, "music-changed", (GCallback) _g4_store_panel_on_music_changed_g4_application_music_changed, self, 0);
	g_signal_connect_object (app, "music-library-changed", (GCallback) _g4_store_panel_on_music_library_changed_g4_application_music_library_changed, self, 0);
	g_signal_connect_object (app, "playlist-added", (GCallback) _g4_store_panel_on_playlist_added_g4_application_playlist_added, self, 0);
	g_signal_connect_object (app, "thumbnail-changed", (GCallback) _g4_store_panel_on_thumbnail_changed_g4_application_thumbnail_changed, self, 0);
	_tmp85_ = g4_application_get_settings (app);
	_tmp86_ = _tmp85_;
	_tmp87_ = _g_object_ref0 (_tmp86_);
	settings = _tmp87_;
	g_settings_bind (settings, "sort-mode", (GObject*) self, "sort-mode", G_SETTINGS_BIND_DEFAULT);
	_tmp88_ = g_settings_get_string (settings, "library-uri");
	_g_free0 (self->priv->_library_uri);
	self->priv->_library_uri = _tmp88_;
	g4_store_panel_initialize_library_page (self);
	_g_object_unref0 (settings);
	_g_object_unref0 (btm_revealer);
	_g_object_unref0 (top_revealer);
	_g_object_unref0 (mini_revealer);
	_g_object_unref0 (thumbnailer);
	return self;
}

G4StorePanel*
g4_store_panel_new (G4Application* app,
                    G4Window* win,
                    G4Leaflet* leaflet)
{
	return g4_store_panel_construct (G4_TYPE_STORE_PANEL, app, win, leaflet);
}

static void
g4_store_panel_real_first_allocated (G4SizeWatcher* base)
{
	G4StorePanel * self;
	self = (G4StorePanel*) base;
	self->priv->_size_allocated = TRUE;
}

void
g4_store_panel_remove_from_list (G4StorePanel* self,
                                 G4Music* music)
{
	guint position = 0U;
	G4MusicList* _tmp0_;
	GListStore* _tmp1_;
	GListStore* _tmp2_;
	guint _tmp3_ = 0U;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (music != NULL);
	position = (guint) -1;
	_tmp0_ = self->priv->_current_list;
	_tmp1_ = g4_music_list_get_data_store (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp4_ = g_list_store_find (_tmp2_, (GObject*) music, &_tmp3_);
	position = _tmp3_;
	if (_tmp4_) {
		G4MusicList* _tmp5_;
		GListStore* _tmp6_;
		GListStore* _tmp7_;
		G4MusicList* _tmp8_;
		_tmp5_ = self->priv->_current_list;
		_tmp6_ = g4_music_list_get_data_store (_tmp5_);
		_tmp7_ = _tmp6_;
		g_list_store_remove (_tmp7_, position);
		_tmp8_ = self->priv->_current_list;
		g4_music_list_set_modified (_tmp8_, TRUE);
	}
}

static Block37Data*
block37_data_ref (Block37Data* _data37_)
{
	g_atomic_int_inc (&_data37_->_ref_count_);
	return _data37_;
}

static void
block37_data_unref (void * _userdata_)
{
	Block37Data* _data37_;
	_data37_ = (Block37Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data37_->_ref_count_)) {
		G4StorePanel* self;
		self = _data37_->self;
		_g_object_unref0 (self);
		g_slice_free (Block37Data, _data37_);
	}
}

static void
___lambda120_ (G4StorePanel* self,
               GObject* obj,
               GAsyncResult* res)
{
	G4MainMusicList* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_main_list;
	g4_music_list_save_if_modified_finish ((G4MusicList*) _tmp0_, res);
}

static void
____lambda120__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda120_ ((G4StorePanel*) self, source_object, res);
	g_object_unref (self);
}

static void
___lambda121_ (Block37Data* _data37_,
               GObject* obj,
               GAsyncResult* res)
{
	G4StorePanel* self;
	G4Result ret = 0;
	G4MusicList* _tmp0_;
	self = _data37_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_current_list;
	ret = g4_music_list_save_if_modified_finish (_tmp0_, res);
	if (ret != G4_RESULT_FAILED) {
		G4MusicList* _tmp1_;
		_tmp1_ = self->priv->_current_list;
		g4_music_list_set_modified (_tmp1_, FALSE);
		if (_data37_->done != NULL) {
			((G4VoidFunc) _data37_->done) (_data37_->done_target);
		}
	}
}

static void
____lambda121__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda121_ (self, source_object, res);
	block37_data_unref (self);
}

gboolean
g4_store_panel_save_if_modified (G4StorePanel* self,
                                 gboolean prompt,
                                 G4VoidFunc done,
                                 gpointer done_target)
{
	Block37Data* _data37_;
	G4MusicList* _tmp0_;
	G4MainMusicList* _tmp1_;
	G4MusicList* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_data37_ = g_slice_new0 (Block37Data);
	_data37_->_ref_count_ = 1;
	_data37_->self = g_object_ref (self);
	_data37_->done = done;
	_data37_->done_target = done_target;
	_tmp0_ = self->priv->_current_list;
	_tmp1_ = self->priv->_main_list;
	if (_tmp0_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_LIST, G4MusicList)) {
		G4MainMusicList* _tmp2_;
		_tmp2_ = self->priv->_main_list;
		g4_music_list_save_if_modified ((G4MusicList*) _tmp2_, FALSE, ____lambda120__gasync_ready_callback, g_object_ref (self));
	}
	_tmp3_ = self->priv->_current_list;
	_tmp4_ = g4_music_list_get_modified (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		G4MusicList* _tmp6_;
		_tmp6_ = self->priv->_current_list;
		g4_music_list_save_if_modified (_tmp6_, prompt, ____lambda121__gasync_ready_callback, block37_data_ref (_data37_));
		result = TRUE;
		block37_data_unref (_data37_);
		_data37_ = NULL;
		return result;
	}
	result = FALSE;
	block37_data_unref (_data37_);
	_data37_ = NULL;
	return result;
}

void
g4_store_panel_set_mini_cover (G4StorePanel* self,
                               GdkPaintable* cover)
{
	G4MiniBar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_mini_bar;
	g4_mini_bar_set_cover (_tmp0_, cover);
}

static void
g4_store_panel_real_size_to_change (G4SizeWatcher* base,
                                    gint width,
                                    gint height)
{
	G4StorePanel * self;
	self = (G4StorePanel*) base;
}

static Block38Data*
block38_data_ref (Block38Data* _data38_)
{
	g_atomic_int_inc (&_data38_->_ref_count_);
	return _data38_;
}

static void
block38_data_unref (void * _userdata_)
{
	Block38Data* _data38_;
	_data38_ = (Block38Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data38_->_ref_count_)) {
		G4StorePanel* self;
		self = _data38_->self;
		_g_object_unref0 (self);
		g_slice_free (Block38Data, _data38_);
	}
}

static void
__lambda122_ (Block38Data* _data38_)
{
	G4StorePanel* self;
	GtkSearchEntry* _tmp0_;
	self = _data38_->self;
	_tmp0_ = self->priv->search_entry;
	gtk_search_entry_set_search_delay (_tmp0_, _data38_->delay);
}

static void
___lambda122__g4_void_func (gpointer self)
{
	__lambda122_ (self);
}

void
g4_store_panel_start_search (G4StorePanel* self,
                             const gchar* text,
                             guint mode)
{
	Block38Data* _data38_;
	GtkSearchEntry* _tmp10_;
	guint _tmp11_;
	guint _tmp12_;
	GtkSearchEntry* _tmp13_;
	GtkSearchEntry* _tmp14_;
	GtkSearchEntry* _tmp15_;
	GtkToggleButton* _tmp16_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_data38_ = g_slice_new0 (Block38Data);
	_data38_->_ref_count_ = 1;
	_data38_->self = g_object_ref (self);
	switch (mode) {
		case G4_SEARCH_MODE_ALBUM:
		{
			GtkStack* _tmp0_;
			G4Stack* _tmp1_;
			GtkWidget* _tmp2_;
			GtkWidget* _tmp3_;
			_tmp0_ = self->priv->stack_view;
			_tmp1_ = self->priv->_album_stack;
			_tmp2_ = g4_stack_get_widget (_tmp1_);
			_tmp3_ = _tmp2_;
			gtk_stack_set_visible_child (_tmp0_, _tmp3_);
			break;
		}
		case G4_SEARCH_MODE_ARTIST:
		{
			GtkStack* _tmp4_;
			G4Stack* _tmp5_;
			GtkWidget* _tmp6_;
			GtkWidget* _tmp7_;
			_tmp4_ = self->priv->stack_view;
			_tmp5_ = self->priv->_artist_stack;
			_tmp6_ = g4_stack_get_widget (_tmp5_);
			_tmp7_ = _tmp6_;
			gtk_stack_set_visible_child (_tmp4_, _tmp7_);
			break;
		}
		case G4_SEARCH_MODE_TITLE:
		{
			GtkStack* _tmp8_;
			G4MainMusicList* _tmp9_;
			_tmp8_ = self->priv->stack_view;
			_tmp9_ = self->priv->_main_list;
			gtk_stack_set_visible_child (_tmp8_, (GtkWidget*) _tmp9_);
			break;
		}
		default:
		break;
	}
	_tmp10_ = self->priv->search_entry;
	_tmp11_ = gtk_search_entry_get_search_delay (_tmp10_);
	_tmp12_ = _tmp11_;
	_data38_->delay = _tmp12_;
	_tmp13_ = self->priv->search_entry;
	gtk_search_entry_set_search_delay (_tmp13_, (guint) 0);
	g4_run_idle_once (___lambda122__g4_void_func, block38_data_ref (_data38_), block38_data_unref, G_PRIORITY_DEFAULT_IDLE);
	_tmp14_ = self->priv->search_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp14_, text);
	_tmp15_ = self->priv->search_entry;
	gtk_editable_select_region ((GtkEditable*) _tmp15_, 0, -1);
	_tmp16_ = self->priv->search_btn;
	gtk_toggle_button_set_active (_tmp16_, TRUE);
	self->priv->_search_mode = mode;
	block38_data_unref (_data38_);
	_data38_ = NULL;
}

gboolean
g4_store_panel_toggle_search (G4StorePanel* self)
{
	GtkToggleButton* _tmp0_;
	GtkToggleButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkToggleButton* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->search_btn;
	_tmp1_ = self->priv->search_btn;
	_tmp2_ = gtk_toggle_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_toggle_button_set_active (_tmp0_, !_tmp3_);
	_tmp4_ = self->priv->search_btn;
	_tmp5_ = gtk_toggle_button_get_active (_tmp4_);
	_tmp6_ = _tmp5_;
	result = _tmp6_;
	return result;
}

static void
g4_store_panel_bind_music_list_properties (G4StorePanel* self,
                                           G4MusicList* list,
                                           gboolean editable)
{
	G4Application* _tmp0_;
	GSettings* _tmp1_;
	GSettings* _tmp2_;
	G4Application* _tmp3_;
	GSettings* _tmp4_;
	GSettings* _tmp5_;
	GType _tmp6_;
	GType _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (list != NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_settings (_tmp0_);
	_tmp2_ = _tmp1_;
	g_settings_bind (_tmp2_, "compact-playlist", (GObject*) list, "compact-list", G_SETTINGS_BIND_DEFAULT);
	_tmp3_ = self->priv->_app;
	_tmp4_ = g4_application_get_settings (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_bind (_tmp5_, "single-click-activate", (GObject*) list, "single-click-activate", G_SETTINGS_BIND_DEFAULT);
	_tmp6_ = g4_music_list_get_item_type (list);
	_tmp7_ = _tmp6_;
	if (_tmp7_ != G4_TYPE_MUSIC) {
		G4Application* _tmp8_;
		GSettings* _tmp9_;
		GSettings* _tmp10_;
		_tmp8_ = self->priv->_app;
		_tmp9_ = g4_application_get_settings (_tmp8_);
		_tmp10_ = _tmp9_;
		g_settings_bind (_tmp10_, "grid-mode", (GObject*) list, "grid-mode", G_SETTINGS_BIND_DEFAULT);
	}
	if (editable) {
		g_object_bind_property_with_closures ((GObject*) list, "modified", (GObject*) self, "modified", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	}
}

static Block39Data*
block39_data_ref (Block39Data* _data39_)
{
	g_atomic_int_inc (&_data39_->_ref_count_);
	return _data39_;
}

static void
block39_data_unref (void * _userdata_)
{
	Block39Data* _data39_;
	_data39_ = (Block39Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data39_->_ref_count_)) {
		G4StorePanel* self;
		self = _data39_->self;
		_g_object_unref0 (_data39_->artist);
		_g_object_unref0 (self);
		g_slice_free (Block39Data, _data39_);
	}
}

static void
__lambda108_ (Block39Data* _data39_,
              guint position,
              GObject* obj)
{
	G4StorePanel* self;
	self = _data39_->self;
	g4_store_panel_create_stack_page (self, _data39_->artist, G4_IS_ALBUM (obj) ? ((G4Album*) obj) : NULL);
}

static void
___lambda108__g4_music_list_item_activated (G4MusicList* _sender,
                                            guint position,
                                            GObject* obj,
                                            gpointer self)
{
	__lambda108_ (self, position, obj);
}

static void
__lambda109_ (Block39Data* _data39_,
              GtkListItem* item)
{
	G4StorePanel* self;
	G4MusicWidget* cell = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	G4MusicWidget* _tmp2_;
	G4Album* album = NULL;
	GObject* _tmp3_;
	GObject* _tmp4_;
	G4Album* _tmp5_;
	gchar* album_artist = NULL;
	G4Album* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	G4MusicWidget* _tmp9_;
	G4Album* _tmp10_;
	G4Music* _tmp11_;
	G4MusicWidget* _tmp12_;
	GdkPaintable* _tmp13_;
	G4MusicWidget* _tmp14_;
	G4Album* _tmp15_;
	const gchar* _tmp16_;
	gchar* subtitle = NULL;
	G4Album* _tmp17_;
	gchar* _tmp18_;
	gboolean _tmp19_ = FALSE;
	const gchar* _tmp28_ = NULL;
	const gchar* _tmp29_;
	gint _tmp30_;
	gint _tmp31_;
	G4MusicWidget* _tmp33_;
	self = _data39_->self;
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_list_item_get_child (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
	cell = _tmp2_;
	_tmp3_ = gtk_list_item_get_item (item);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_ALBUM, G4Album));
	album = _tmp5_;
	_tmp6_ = album;
	_tmp7_ = ((G4Music*) _tmp6_)->album_artist;
	_tmp8_ = g_strdup (_tmp7_);
	album_artist = _tmp8_;
	_tmp9_ = cell;
	_tmp10_ = album;
	_tmp11_ = _g_object_ref0 ((G4Music*) _tmp10_);
	_g_object_unref0 (_tmp9_->music);
	_tmp9_->music = _tmp11_;
	_tmp12_ = cell;
	_tmp13_ = self->priv->_loading_paintable;
	g4_music_widget_set_paintable (_tmp12_, _tmp13_);
	_tmp14_ = cell;
	_tmp15_ = album;
	_tmp16_ = ((G4Music*) _tmp15_)->album;
	g4_music_widget_set_title (_tmp14_, _tmp16_);
	_tmp17_ = album;
	_tmp18_ = g4_music_get_date_string ((G4Music*) _tmp17_);
	subtitle = _tmp18_;
	if (_data39_->artist == NULL) {
		const gchar* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		_tmp20_ = album_artist;
		_tmp21_ = strlen (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp19_ = _tmp22_ > 0;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		const gchar* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		_tmp23_ = album_artist;
		_tmp24_ = g_strconcat (_tmp23_, " ", NULL);
		_tmp25_ = _tmp24_;
		_tmp26_ = subtitle;
		_tmp27_ = g_strconcat (_tmp25_, _tmp26_, NULL);
		_g_free0 (subtitle);
		subtitle = _tmp27_;
		_g_free0 (_tmp25_);
	}
	_tmp29_ = subtitle;
	_tmp30_ = strlen (_tmp29_);
	_tmp31_ = _tmp30_;
	if (_tmp31_ > 0) {
		const gchar* _tmp32_;
		_tmp32_ = subtitle;
		_tmp28_ = _tmp32_;
	} else {
		_tmp28_ = " ";
	}
	_tmp33_ = cell;
	g4_music_widget_set_subtitle (_tmp33_, _tmp28_);
	_g_free0 (subtitle);
	_g_free0 (album_artist);
	_g_object_unref0 (album);
	_g_object_unref0 (cell);
}

static void
___lambda109__g4_music_list_item_binded (G4MusicList* _sender,
                                         GtkListItem* item,
                                         gpointer self)
{
	__lambda109_ (self, item);
}

static G4MusicList*
g4_store_panel_create_album_list (G4StorePanel* self,
                                  G4Artist* artist)
{
	Block39Data* _data39_;
	G4Artist* _tmp0_;
	G4MusicList* list = NULL;
	G4Application* _tmp1_;
	G4MusicList* _tmp2_;
	G4MusicList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data39_ = g_slice_new0 (Block39Data);
	_data39_->_ref_count_ = 1;
	_data39_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (artist);
	_g_object_unref0 (_data39_->artist);
	_data39_->artist = _tmp0_;
	_tmp1_ = self->priv->_app;
	_tmp2_ = g4_music_list_new (_tmp1_, G4_TYPE_ALBUM, (G4Music*) _data39_->artist, FALSE, TRUE);
	g_object_ref_sink (_tmp2_);
	list = _tmp2_;
	g_signal_connect_data (list, "item-activated", (GCallback) ___lambda108__g4_music_list_item_activated, block39_data_ref (_data39_), (GClosureNotify) block39_data_unref, 0);
	g_signal_connect_data (list, "item-binded", (GCallback) ___lambda109__g4_music_list_item_binded, block39_data_ref (_data39_), (GClosureNotify) block39_data_unref, 0);
	g4_store_panel_bind_music_list_properties (self, list, FALSE);
	result = list;
	block39_data_unref (_data39_);
	_data39_ = NULL;
	return result;
}

static void
__lambda105_ (G4StorePanel* self,
              guint position,
              GObject* obj)
{
	g4_store_panel_create_stack_page (self, G4_IS_ARTIST (obj) ? ((G4Artist*) obj) : NULL, NULL);
}

static void
___lambda105__g4_music_list_item_activated (G4MusicList* _sender,
                                            guint position,
                                            GObject* obj,
                                            gpointer self)
{
	__lambda105_ ((G4StorePanel*) self, position, obj);
}

static void
__lambda117_ (G4StorePanel* self,
              GtkListItem* item)
{
	G4MusicWidget* cell = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	G4MusicWidget* _tmp2_;
	G4Artist* artist = NULL;
	GObject* _tmp3_;
	GObject* _tmp4_;
	G4Artist* _tmp5_;
	G4RoundPaintable* _tmp6_;
	G4RoundPaintable* _tmp7_;
	G4Music* _tmp8_;
	GdkPaintable* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_list_item_get_child (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
	cell = _tmp2_;
	_tmp3_ = gtk_list_item_get_item (item);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_ARTIST, G4Artist));
	artist = _tmp5_;
	_tmp6_ = g4_music_widget_get_cover (cell);
	_tmp7_ = _tmp6_;
	g4_round_paintable_set_ratio (_tmp7_, 0.5);
	_tmp8_ = _g_object_ref0 ((G4Music*) artist);
	_g_object_unref0 (cell->music);
	cell->music = _tmp8_;
	_tmp9_ = self->priv->_loading_paintable;
	g4_music_widget_set_paintable (cell, _tmp9_);
	_tmp10_ = ((G4Music*) artist)->artist;
	g4_music_widget_set_title (cell, _tmp10_);
	g4_music_widget_set_subtitle (cell, "");
	_g_object_unref0 (artist);
	_g_object_unref0 (cell);
}

static void
___lambda117__g4_music_list_item_binded (G4MusicList* _sender,
                                         GtkListItem* item,
                                         gpointer self)
{
	__lambda117_ ((G4StorePanel*) self, item);
}

static G4MusicList*
g4_store_panel_create_artist_list (G4StorePanel* self)
{
	G4MusicList* list = NULL;
	G4Application* _tmp0_;
	G4MusicList* _tmp1_;
	G4MusicList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_music_list_new (_tmp0_, G4_TYPE_ARTIST, NULL, FALSE, TRUE);
	g_object_ref_sink (_tmp1_);
	list = _tmp1_;
	g_signal_connect_object (list, "item-activated", (GCallback) ___lambda105__g4_music_list_item_activated, self, 0);
	g_signal_connect_object (list, "item-binded", (GCallback) ___lambda117__g4_music_list_item_binded, self, 0);
	g4_store_panel_bind_music_list_properties (self, list, FALSE);
	result = list;
	return result;
}

static Block40Data*
block40_data_ref (Block40Data* _data40_)
{
	g_atomic_int_inc (&_data40_->_ref_count_);
	return _data40_;
}

static void
block40_data_unref (void * _userdata_)
{
	Block40Data* _data40_;
	_data40_ = (Block40Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data40_->_ref_count_)) {
		G4StorePanel* self;
		self = _data40_->self;
		_g_object_unref0 (self);
		g_slice_free (Block40Data, _data40_);
	}
}

static void
__lambda106_ (G4StorePanel* self,
              guint position,
              GObject* obj)
{
	g4_store_panel_play_current_list (self, (gint) position);
}

static void
___lambda106__g4_music_list_item_activated (G4MusicList* _sender,
                                            guint position,
                                            GObject* obj,
                                            gpointer self)
{
	__lambda106_ ((G4StorePanel*) self, position, obj);
}

static void
__lambda107_ (Block40Data* _data40_,
              GtkListItem* item)
{
	G4StorePanel* self;
	G4MusicEntry* entry = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	G4MusicEntry* _tmp2_;
	G4Music* music = NULL;
	GObject* _tmp3_;
	GObject* _tmp4_;
	G4Music* _tmp5_;
	GdkPaintable* _tmp6_;
	self = _data40_->self;
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_list_item_get_child (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_ENTRY, G4MusicEntry));
	entry = _tmp2_;
	_tmp3_ = gtk_list_item_get_item (item);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_MUSIC, G4Music));
	music = _tmp5_;
	_tmp6_ = self->priv->_loading_paintable;
	g4_music_widget_set_paintable ((G4MusicWidget*) entry, _tmp6_);
	g4_music_entry_set_titles (entry, music, _data40_->sort_mode);
	_g_object_unref0 (music);
	_g_object_unref0 (entry);
}

static void
___lambda107__g4_music_list_item_binded (G4MusicList* _sender,
                                         GtkListItem* item,
                                         gpointer self)
{
	__lambda107_ (self, item);
}

static G4MusicList*
g4_store_panel_create_music_list (G4StorePanel* self,
                                  G4Album* album,
                                  gboolean from_artist)
{
	Block40Data* _data40_;
	gboolean is_playlist = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean is_artist_playlist = FALSE;
	guint _tmp1_ = 0U;
	G4MusicList* list = NULL;
	G4Application* _tmp2_;
	G4MusicList* _tmp3_;
	G4MusicList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (album != NULL, NULL);
	_data40_ = g_slice_new0 (Block40Data);
	_data40_->_ref_count_ = 1;
	_data40_->self = g_object_ref (self);
	is_playlist = G4_IS_PLAYLIST (album);
	if (is_playlist) {
		_tmp0_ = from_artist;
	} else {
		_tmp0_ = FALSE;
	}
	is_artist_playlist = _tmp0_;
	if (is_artist_playlist) {
		_tmp1_ = G4_SORT_MODE_ALBUM;
	} else {
		_tmp1_ = G4_SORT_MODE_TITLE;
	}
	_data40_->sort_mode = _tmp1_;
	_tmp2_ = self->priv->_app;
	_tmp3_ = g4_music_list_new (_tmp2_, G4_TYPE_MUSIC, (G4Music*) album, is_playlist, TRUE);
	g_object_ref_sink (_tmp3_);
	list = _tmp3_;
	g_signal_connect_object (list, "item-activated", (GCallback) ___lambda106__g4_music_list_item_activated, self, 0);
	g_signal_connect_data (list, "item-binded", (GCallback) ___lambda107__g4_music_list_item_binded, block40_data_ref (_data40_), (GClosureNotify) block40_data_unref, 0);
	g4_store_panel_bind_music_list_properties (self, list, is_playlist);
	result = list;
	block40_data_unref (_data40_);
	_data40_ = NULL;
	return result;
}

static void
__lambda103_ (G4StorePanel* self,
              guint position,
              GObject* obj)
{
	g4_store_panel_play_current_list (self, (gint) position);
}

static void
___lambda103__g4_music_list_item_activated (G4MusicList* _sender,
                                            guint position,
                                            GObject* obj,
                                            gpointer self)
{
	__lambda103_ ((G4StorePanel*) self, position, obj);
}

static void
__lambda104_ (G4StorePanel* self,
              GtkListItem* item)
{
	G4MusicEntry* entry = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	G4MusicEntry* _tmp2_;
	G4Music* music = NULL;
	GObject* _tmp3_;
	GObject* _tmp4_;
	G4Music* _tmp5_;
	GdkPaintable* _tmp6_;
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_list_item_get_child (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_ENTRY, G4MusicEntry));
	entry = _tmp2_;
	_tmp3_ = gtk_list_item_get_item (item);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_MUSIC, G4Music));
	music = _tmp5_;
	_tmp6_ = self->priv->_loading_paintable;
	g4_music_widget_set_paintable ((G4MusicWidget*) entry, _tmp6_);
	g4_music_entry_set_titles (entry, music, self->priv->_sort_mode);
	_g_object_unref0 (music);
	_g_object_unref0 (entry);
}

static void
___lambda104__g4_music_list_item_binded (G4MusicList* _sender,
                                         GtkListItem* item,
                                         gpointer self)
{
	__lambda104_ ((G4StorePanel*) self, item);
}

static G4MainMusicList*
g4_store_panel_create_main_music_list (G4StorePanel* self)
{
	G4MainMusicList* list = NULL;
	G4Application* _tmp0_;
	G4MainMusicList* _tmp1_;
	G4MainMusicList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_main_music_list_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	list = _tmp1_;
	g_signal_connect_object ((G4MusicList*) list, "item-activated", (GCallback) ___lambda103__g4_music_list_item_activated, self, 0);
	g_signal_connect_object ((G4MusicList*) list, "item-binded", (GCallback) ___lambda104__g4_music_list_item_binded, self, 0);
	g4_store_panel_bind_music_list_properties (self, (G4MusicList*) list, TRUE);
	result = list;
	return result;
}

static void
__lambda118_ (G4StorePanel* self,
              guint position,
              GObject* obj)
{
	g4_store_panel_create_stack_page (self, NULL, (G4Album*) (G4_IS_PLAYLIST (obj) ? ((G4Playlist*) obj) : NULL));
}

static void
___lambda118__g4_music_list_item_activated (G4MusicList* _sender,
                                            guint position,
                                            GObject* obj,
                                            gpointer self)
{
	__lambda118_ ((G4StorePanel*) self, position, obj);
}

static void
__lambda119_ (G4StorePanel* self,
              GtkListItem* item)
{
	G4MusicWidget* cell = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	G4MusicWidget* _tmp2_;
	G4Playlist* playlist = NULL;
	GObject* _tmp3_;
	GObject* _tmp4_;
	G4Playlist* _tmp5_;
	G4Music* _tmp6_;
	GdkPaintable* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_list_item_get_child (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_MUSIC_WIDGET, G4MusicWidget));
	cell = _tmp2_;
	_tmp3_ = gtk_list_item_get_item (item);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_PLAYLIST, G4Playlist));
	playlist = _tmp5_;
	_tmp6_ = _g_object_ref0 ((G4Music*) playlist);
	_g_object_unref0 (cell->music);
	cell->music = _tmp6_;
	_tmp7_ = self->priv->_loading_paintable;
	g4_music_widget_set_paintable (cell, _tmp7_);
	_tmp8_ = ((G4Music*) playlist)->title;
	g4_music_widget_set_title (cell, _tmp8_);
	_g_object_unref0 (playlist);
	_g_object_unref0 (cell);
}

static void
___lambda119__g4_music_list_item_binded (G4MusicList* _sender,
                                         GtkListItem* item,
                                         gpointer self)
{
	__lambda119_ ((G4StorePanel*) self, item);
}

static G4MusicList*
g4_store_panel_create_playlist_list (G4StorePanel* self)
{
	G4MusicList* list = NULL;
	G4Application* _tmp0_;
	G4MusicList* _tmp1_;
	G4MusicList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_music_list_new (_tmp0_, G4_TYPE_PLAYLIST, NULL, FALSE, TRUE);
	g_object_ref_sink (_tmp1_);
	list = _tmp1_;
	g_signal_connect_object (list, "item-activated", (GCallback) ___lambda118__g4_music_list_item_activated, self, 0);
	g_signal_connect_object (list, "item-binded", (GCallback) ___lambda119__g4_music_list_item_binded, self, 0);
	g4_store_panel_bind_music_list_properties (self, list, FALSE);
	result = list;
	return result;
}

static Block41Data*
block41_data_ref (Block41Data* _data41_)
{
	g_atomic_int_inc (&_data41_->_ref_count_);
	return _data41_;
}

static void
block41_data_unref (void * _userdata_)
{
	Block41Data* _data41_;
	_data41_ = (Block41Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data41_->_ref_count_)) {
		G4StorePanel* self;
		self = _data41_->self;
		_g_object_unref0 (_data41_->label);
		_g_object_unref0 (self);
		g_slice_free (Block41Data, _data41_);
	}
}

static Block42Data*
block42_data_ref (Block42Data* _data42_)
{
	g_atomic_int_inc (&_data42_->_ref_count_);
	return _data42_;
}

static void
block42_data_unref (void * _userdata_)
{
	Block42Data* _data42_;
	_data42_ = (Block42Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data42_->_ref_count_)) {
		G4StorePanel* self;
		self = _data42_->_data41_->self;
		_g_object_unref0 (_data42_->entry);
		_g_object_unref0 (_data42_->playlist);
		block41_data_unref (_data42_->_data41_);
		_data42_->_data41_ = NULL;
		g_slice_free (Block42Data, _data42_);
	}
}

static void
___lambda113_ (Block42Data* _data42_,
               GObject* obj,
               GAsyncResult* res)
{
	Block41Data* _data41_;
	G4StorePanel* self;
	gboolean ret = FALSE;
	G4Application* _tmp0_;
	_data41_ = _data42_->_data41_;
	self = _data41_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_app;
	ret = g4_application_rename_playlist_finish (_tmp0_, res);
	if (ret) {
		GtkLabel* _tmp1_;
		G4Playlist* _tmp2_;
		const gchar* _tmp3_;
		_tmp1_ = _data41_->label;
		_tmp2_ = _data42_->playlist;
		_tmp3_ = ((G4Music*) _tmp2_)->title;
		gtk_label_set_label (_tmp1_, _tmp3_);
	}
}

static void
____lambda113__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda113_ (self, source_object, res);
	block42_data_unref (self);
}

static void
___lambda110_ (Block42Data* _data42_)
{
	Block41Data* _data41_;
	G4StorePanel* self;
	GtkEntry* _tmp0_;
	GtkLabel* _tmp1_;
	gchar* text = NULL;
	GtkEntry* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	_data41_ = _data42_->_data41_;
	self = _data41_->self;
	_tmp0_ = _data42_->entry;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = _data41_->label;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, TRUE);
	_tmp2_ = _data42_->entry;
	_tmp3_ = gtk_editable_get_text ((GtkEditable*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup (_tmp4_);
	text = _tmp5_;
	_tmp7_ = text;
	_tmp8_ = strlen (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ > 0) {
		const gchar* _tmp10_;
		G4Playlist* _tmp11_;
		const gchar* _tmp12_;
		_tmp10_ = text;
		_tmp11_ = _data42_->playlist;
		_tmp12_ = ((G4Music*) _tmp11_)->title;
		_tmp6_ = g_strcmp0 (_tmp10_, _tmp12_) != 0;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		G4Application* _tmp13_;
		G4Playlist* _tmp14_;
		const gchar* _tmp15_;
		_tmp13_ = self->priv->_app;
		_tmp14_ = _data42_->playlist;
		_tmp15_ = text;
		g4_application_rename_playlist_async (_tmp13_, _tmp14_, _tmp15_, ____lambda113__gasync_ready_callback, block42_data_ref (_data42_));
	}
	_g_free0 (text);
}

static void
____lambda110__gtk_entry_activate (GtkEntry* _sender,
                                   gpointer self)
{
	___lambda110_ (self);
}

static gboolean
___lambda114_ (Block42Data* _data42_,
               guint keyval,
               guint keycode,
               GdkModifierType state)
{
	Block41Data* _data41_;
	G4StorePanel* self;
	gboolean result;
	_data41_ = _data42_->_data41_;
	self = _data41_->self;
	if (keyval == GDK_KEY_Escape) {
		GtkEntry* _tmp0_;
		GtkLabel* _tmp1_;
		_tmp0_ = _data42_->entry;
		gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
		_tmp1_ = _data41_->label;
		gtk_widget_set_visible ((GtkWidget*) _tmp1_, TRUE);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
____lambda114__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                     guint keyval,
                                                     guint keycode,
                                                     GdkModifierType state,
                                                     gpointer self)
{
	gboolean result;
	result = ___lambda114_ (self, keyval, keycode, state);
	return result;
}

static void
___lambda115_ (Block42Data* _data42_)
{
	Block41Data* _data41_;
	G4StorePanel* self;
	GtkEntry* _tmp0_;
	GtkLabel* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GtkEntry* _tmp4_;
	GtkEntry* _tmp5_;
	GtkLabel* _tmp6_;
	_data41_ = _data42_->_data41_;
	self = _data41_->self;
	_tmp0_ = _data42_->entry;
	_tmp1_ = _data41_->label;
	_tmp2_ = gtk_label_get_label (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, _tmp3_);
	_tmp4_ = _data42_->entry;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = _data42_->entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp5_);
	_tmp6_ = _data41_->label;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, FALSE);
}

static void
____lambda115__gtk_gesture_click_released (GtkGestureClick* _sender,
                                           gint n_press,
                                           gdouble x,
                                           gdouble y,
                                           gpointer self)
{
	___lambda115_ (self);
}

static GtkBox*
g4_store_panel_create_title_bar (G4StorePanel* self,
                                 const gchar* title,
                                 const gchar* icon_name,
                                 G4Playlist* plist)
{
	Block41Data* _data41_;
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	GtkImage* icon = NULL;
	GtkImage* _tmp2_;
	GtkBox* box = NULL;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkImage* _tmp7_;
	GtkBox* _tmp8_;
	GtkLabel* _tmp9_;
	gboolean _tmp10_ = FALSE;
	GtkBox* header = NULL;
	GtkBox* _tmp30_;
	GtkBox* _tmp31_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	_data41_ = g_slice_new0 (Block41Data);
	_data41_->_ref_count_ = 1;
	_data41_->self = g_object_ref (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (title);
	g_object_ref_sink (_tmp0_);
	_data41_->label = _tmp0_;
	_tmp1_ = _data41_->label;
	gtk_label_set_ellipsize (_tmp1_, PANGO_ELLIPSIZE_MIDDLE);
	_tmp2_ = (GtkImage*) gtk_image_new_from_icon_name (icon_name);
	g_object_ref_sink (_tmp2_);
	icon = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	_tmp4_ = box;
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	_tmp5_ = box;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = box;
	_tmp7_ = icon;
	gtk_box_append (_tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = box;
	_tmp9_ = _data41_->label;
	gtk_box_append (_tmp8_, (GtkWidget*) _tmp9_);
	if (plist != NULL) {
		const gchar* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		_tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (plist, G4_TYPE_PLAYLIST, G4Playlist)->list_uri;
		_tmp12_ = strlen (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp10_ = _tmp13_ > 0;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		Block42Data* _data42_;
		G4Playlist* _tmp14_;
		GtkEntry* _tmp15_;
		GtkEntry* _tmp16_;
		GtkEntry* _tmp17_;
		GtkEntry* _tmp18_;
		GtkEntry* _tmp19_;
		GtkEventControllerKey* event = NULL;
		GtkEventControllerKey* _tmp20_;
		GtkEventControllerKey* _tmp21_;
		GtkEntry* _tmp22_;
		GtkEventControllerKey* _tmp23_;
		GtkEventController* _tmp24_;
		GtkLabel* _tmp25_;
		GtkGestureClick* _tmp26_;
		GtkGestureClick* _tmp27_;
		GtkBox* _tmp28_;
		GtkEntry* _tmp29_;
		_data42_ = g_slice_new0 (Block42Data);
		_data42_->_ref_count_ = 1;
		_data42_->_data41_ = block41_data_ref (_data41_);
		_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (plist, G4_TYPE_PLAYLIST, G4Playlist));
		_data42_->playlist = _tmp14_;
		_tmp15_ = (GtkEntry*) gtk_entry_new ();
		g_object_ref_sink (_tmp15_);
		_data42_->entry = _tmp15_;
		_tmp16_ = _data42_->entry;
		gtk_editable_set_max_width_chars ((GtkEditable*) _tmp16_, 1024);
		_tmp17_ = _data42_->entry;
		gtk_editable_set_text ((GtkEditable*) _tmp17_, title);
		_tmp18_ = _data42_->entry;
		gtk_widget_set_visible ((GtkWidget*) _tmp18_, FALSE);
		_tmp19_ = _data42_->entry;
		g_signal_connect_data (_tmp19_, "activate", (GCallback) ____lambda110__gtk_entry_activate, block42_data_ref (_data42_), (GClosureNotify) block42_data_unref, 0);
		_tmp20_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
		event = _tmp20_;
		_tmp21_ = event;
		g_signal_connect_data (_tmp21_, "key-pressed", (GCallback) ____lambda114__gtk_event_controller_key_key_pressed, block42_data_ref (_data42_), (GClosureNotify) block42_data_unref, 0);
		_tmp22_ = _data42_->entry;
		_tmp23_ = event;
		_tmp24_ = _g_object_ref0 ((GtkEventController*) _tmp23_);
		gtk_widget_add_controller ((GtkWidget*) _tmp22_, _tmp24_);
		_tmp25_ = _data41_->label;
		_tmp26_ = g4_make_widget_clickable ((GtkWidget*) _tmp25_);
		_tmp27_ = _tmp26_;
		g_signal_connect_data (_tmp27_, "released", (GCallback) ____lambda115__gtk_gesture_click_released, block42_data_ref (_data42_), (GClosureNotify) block42_data_unref, 0);
		_g_object_unref0 (_tmp27_);
		_tmp28_ = box;
		_tmp29_ = _data42_->entry;
		gtk_box_append (_tmp28_, (GtkWidget*) _tmp29_);
		_g_object_unref0 (event);
		block42_data_unref (_data42_);
		_data42_ = NULL;
	}
	_tmp30_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp30_);
	header = _tmp30_;
	gtk_widget_set_hexpand ((GtkWidget*) header, TRUE);
	gtk_widget_add_css_class ((GtkWidget*) header, "flat");
	gtk_widget_add_css_class ((GtkWidget*) header, "toolbar");
	_tmp31_ = box;
	gtk_box_append (header, (GtkWidget*) _tmp31_);
	result = header;
	_g_object_unref0 (box);
	_g_object_unref0 (icon);
	block41_data_unref (_data41_);
	_data41_ = NULL;
	return result;
}

static Block43Data*
block43_data_ref (Block43Data* _data43_)
{
	g_atomic_int_inc (&_data43_->_ref_count_);
	return _data43_;
}

static void
block43_data_unref (void * _userdata_)
{
	Block43Data* _data43_;
	_data43_ = (Block43Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data43_->_ref_count_)) {
		G4StorePanel* self;
		self = _data43_->self;
		_g_object_unref0 (_data43_->artist);
		_g_object_unref0 (_data43_->album);
		_g_object_unref0 (self);
		g_slice_free (Block43Data, _data43_);
	}
}

static void
_g4_stack_pop_gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	g4_stack_pop ((G4Stack*) self);
}

static gint*
_int_dup (gint* self)
{
	gint* dup;
	dup = g_new0 (gint, 1);
	memcpy (dup, self, sizeof (gint));
	return dup;
}

static gpointer
__int_dup0 (gpointer self)
{
	return self ? _int_dup (self) : NULL;
}

static void
___lambda116_ (Block43Data* _data43_)
{
	G4StorePanel* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	self = _data43_->self;
	_tmp0_ = g4_build_library_uri (_data43_->artist, _data43_->album);
	_tmp1_ = _tmp0_;
	g4_store_panel_open_page (self, _tmp1_, TRUE, FALSE);
	_g_free0 (_tmp1_);
}

static void
____lambda116__adw_split_button_clicked (AdwSplitButton* _sender,
                                         gpointer self)
{
	___lambda116_ (self);
}

static void
g4_store_panel_create_stack_page (G4StorePanel* self,
                                  G4Artist* artist,
                                  G4Album* album)
{
	Block43Data* _data43_;
	G4Artist* _tmp0_;
	G4Album* _tmp1_;
	gboolean album_mode = FALSE;
	gboolean artist_mode = FALSE;
	gboolean playlist_mode = FALSE;
	G4MusicList* _tmp2_ = NULL;
	G4MusicList* mlist = NULL;
	G4MusicList* _tmp5_;
	G4MusicList* _tmp6_;
	const gchar* _tmp7_ = NULL;
	gchar* icon_name = NULL;
	gchar* _tmp9_;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp17_ = NULL;
	gchar* title = NULL;
	gchar* _tmp18_;
	GtkBox* header = NULL;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GtkBox* _tmp21_;
	G4MusicList* _tmp22_;
	GtkBox* _tmp23_;
	G4Stack* _tmp24_ = NULL;
	G4Stack* stack = NULL;
	G4Stack* _tmp29_;
	GtkButton* back_btn = NULL;
	GtkButton* _tmp30_;
	GtkButton* _tmp31_;
	GtkButton* _tmp32_;
	G4Stack* _tmp33_;
	GtkBox* _tmp34_;
	GtkButton* _tmp35_;
	G4Album* _tmp36_ = NULL;
	const gchar* _tmp37_ = NULL;
	const gchar* _tmp40_ = NULL;
	gint* _tmp41_ = NULL;
	gint* _tmp45_ = NULL;
	gint* _tmp46_;
	gint key_length = 0;
	gint* _tmp49_;
	gint _tmp50_;
	gboolean _tmp51_ = FALSE;
	gboolean _tmp70_ = FALSE;
	G4Stack* _tmp71_;
	gboolean _tmp72_;
	gboolean _tmp73_;
	const gchar* _tmp80_ = NULL;
	G4Stack* _tmp89_;
	G4MusicList* _tmp90_;
	GtkWidget* _tmp91_;
	GtkWidget* _tmp92_;
	g_return_if_fail (self != NULL);
	_data43_ = g_slice_new0 (Block43Data);
	_data43_->_ref_count_ = 1;
	_data43_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (artist);
	_g_object_unref0 (_data43_->artist);
	_data43_->artist = _tmp0_;
	_tmp1_ = _g_object_ref0 (album);
	_g_object_unref0 (_data43_->album);
	_data43_->album = _tmp1_;
	album_mode = _data43_->album != NULL;
	artist_mode = _data43_->artist != NULL;
	playlist_mode = G4_IS_PLAYLIST (_data43_->album);
	if (album_mode) {
		G4MusicList* _tmp3_;
		_tmp3_ = g4_store_panel_create_music_list (self, G_TYPE_CHECK_INSTANCE_CAST (_data43_->album, G4_TYPE_ALBUM, G4Album), artist_mode);
		_g_object_unref0 (_tmp2_);
		_tmp2_ = _tmp3_;
	} else {
		G4MusicList* _tmp4_;
		_tmp4_ = g4_store_panel_create_album_list (self, _data43_->artist);
		_g_object_unref0 (_tmp2_);
		_tmp2_ = _tmp4_;
	}
	_tmp5_ = _tmp2_;
	_tmp2_ = NULL;
	mlist = _tmp5_;
	_tmp6_ = mlist;
	g4_music_list_update_store (_tmp6_);
	if (G4_IS_PLAYLIST (_data43_->album)) {
		_tmp7_ = "x-office-document-symbolic";
	} else {
		const gchar* _tmp8_ = NULL;
		if (album_mode) {
			_tmp8_ = "media-optical-cd-audio-symbolic";
		} else {
			_tmp8_ = "avatar-default-symbolic";
		}
		_tmp7_ = _tmp8_;
	}
	_tmp9_ = g_strdup (_tmp7_);
	icon_name = _tmp9_;
	if (album_mode) {
		G4Album* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		_tmp11_ = _data43_->album;
		_tmp12_ = NULL;
		if (_tmp11_ != NULL) {
			const gchar* _tmp13_;
			_tmp13_ = ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, G4_TYPE_ALBUM, G4Album))->title;
			_tmp12_ = _tmp13_;
		}
		_tmp10_ = _tmp12_;
	} else {
		G4Artist* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		_tmp14_ = _data43_->artist;
		_tmp15_ = NULL;
		if (_tmp14_ != NULL) {
			const gchar* _tmp16_;
			_tmp16_ = ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, G4_TYPE_ARTIST, G4Artist))->title;
			_tmp15_ = _tmp16_;
		}
		_tmp10_ = _tmp15_;
	}
	_tmp17_ = _tmp10_;
	if (_tmp17_ == NULL) {
		_tmp17_ = "";
	}
	_tmp18_ = g_strdup ((const gchar*) _tmp17_);
	title = _tmp18_;
	_tmp19_ = title;
	_tmp20_ = icon_name;
	_tmp21_ = g4_store_panel_create_title_bar (self, _tmp19_, _tmp20_, G4_IS_PLAYLIST (_data43_->album) ? ((G4Playlist*) _data43_->album) : NULL);
	header = _tmp21_;
	_tmp22_ = mlist;
	_tmp23_ = header;
	gtk_box_prepend ((GtkBox*) _tmp22_, (GtkWidget*) _tmp23_);
	if (artist_mode) {
		G4Stack* _tmp25_;
		_tmp25_ = self->priv->_artist_stack;
		_tmp24_ = _tmp25_;
	} else {
		G4Stack* _tmp26_ = NULL;
		if (playlist_mode) {
			G4Stack* _tmp27_;
			_tmp27_ = self->priv->_playlist_stack;
			_tmp26_ = _tmp27_;
		} else {
			G4Stack* _tmp28_;
			_tmp28_ = self->priv->_album_stack;
			_tmp26_ = _tmp28_;
		}
		_tmp24_ = _tmp26_;
	}
	_tmp29_ = _g_object_ref0 (_tmp24_);
	stack = _tmp29_;
	_tmp30_ = (GtkButton*) gtk_button_new_from_icon_name ("go-previous-symbolic");
	g_object_ref_sink (_tmp30_);
	back_btn = _tmp30_;
	_tmp31_ = back_btn;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp31_, _ ("Back"));
	_tmp32_ = back_btn;
	_tmp33_ = stack;
	g_signal_connect_object (_tmp32_, "clicked", (GCallback) _g4_stack_pop_gtk_button_clicked, _tmp33_, 0);
	_tmp34_ = header;
	_tmp35_ = back_btn;
	gtk_box_prepend (_tmp34_, (GtkWidget*) _tmp35_);
	_tmp36_ = _data43_->album;
	_tmp37_ = NULL;
	if (_tmp36_ != NULL) {
		const gchar* _tmp38_;
		const gchar* _tmp39_;
		_tmp38_ = g4_music_get_album_key ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, G4_TYPE_ALBUM, G4Album));
		_tmp39_ = _tmp38_;
		_tmp37_ = _tmp39_;
	}
	_tmp40_ = _tmp37_;
	_tmp41_ = NULL;
	if (_tmp40_ != NULL) {
		gint _tmp42_;
		gint _tmp43_;
		gint* _tmp44_;
		_tmp42_ = strlen ((const gchar*) _tmp40_);
		_tmp43_ = _tmp42_;
		_tmp44_ = __int_dup0 (&_tmp43_);
		_g_free0 (_tmp41_);
		_tmp41_ = _tmp44_;
	}
	_tmp46_ = _tmp41_;
	_tmp41_ = NULL;
	_tmp45_ = _tmp46_;
	if (_tmp45_ == NULL) {
		gint _tmp47_;
		gint* _tmp48_;
		_tmp47_ = 0;
		_tmp48_ = __int_dup0 (&_tmp47_);
		_g_free0 (_tmp45_);
		_tmp45_ = _tmp48_;
	}
	_tmp49_ = _tmp45_;
	_tmp45_ = NULL;
	_tmp50_ = (gint) (*_tmp49_);
	_g_free0 (_tmp49_);
	key_length = _tmp50_;
	if (artist_mode) {
		_tmp51_ = TRUE;
	} else {
		_tmp51_ = key_length > 0;
	}
	if (_tmp51_) {
		AdwSplitButton* split_btn = NULL;
		AdwSplitButton* _tmp52_;
		AdwSplitButton* _tmp53_;
		AdwSplitButton* _tmp54_;
		AdwSplitButton* _tmp55_;
		GMenu* _tmp64_ = NULL;
		AdwSplitButton* _tmp65_;
		GMenuModel* _tmp66_;
		GMenuModel* _tmp67_;
		GtkBox* _tmp68_;
		AdwSplitButton* _tmp69_;
		_tmp52_ = (AdwSplitButton*) adw_split_button_new ();
		g_object_ref_sink (_tmp52_);
		split_btn = _tmp52_;
		_tmp53_ = split_btn;
		adw_split_button_set_icon_name (_tmp53_, "media-playback-start-symbolic");
		_tmp54_ = split_btn;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp54_, _ ("Play"));
		_tmp55_ = split_btn;
		g_signal_connect_data (_tmp55_, "clicked", (GCallback) ____lambda116__adw_split_button_clicked, block43_data_ref (_data43_), (GClosureNotify) block43_data_unref, 0);
		if (_data43_->artist != NULL) {
			GMenu* _tmp56_ = NULL;
			gboolean _tmp57_ = FALSE;
			AdwSplitButton* _tmp60_;
			if (_data43_->album == NULL) {
				_tmp57_ = TRUE;
			} else {
				_tmp57_ = G4_IS_PLAYLIST (_data43_->album);
			}
			if (_tmp57_) {
				GMenu* _tmp58_;
				_tmp58_ = g4_create_menu_for_artist (G_TYPE_CHECK_INSTANCE_CAST (_data43_->artist, G4_TYPE_ARTIST, G4Artist));
				_g_object_unref0 (_tmp56_);
				_tmp56_ = _tmp58_;
			} else {
				GMenu* _tmp59_;
				_tmp59_ = g4_create_menu_for_album (G_TYPE_CHECK_INSTANCE_CAST (_data43_->album, G4_TYPE_ALBUM, G4Album));
				_g_object_unref0 (_tmp56_);
				_tmp56_ = _tmp59_;
			}
			_tmp60_ = split_btn;
			adw_split_button_set_menu_model (_tmp60_, (GMenuModel*) _tmp56_);
			_g_object_unref0 (_tmp56_);
		} else {
			if (_data43_->album != NULL) {
				AdwSplitButton* _tmp61_;
				GMenu* _tmp62_;
				GMenu* _tmp63_;
				_tmp61_ = split_btn;
				_tmp62_ = g4_create_menu_for_album (G_TYPE_CHECK_INSTANCE_CAST (_data43_->album, G4_TYPE_ALBUM, G4Album));
				_tmp63_ = _tmp62_;
				adw_split_button_set_menu_model (_tmp61_, (GMenuModel*) _tmp63_);
				_g_object_unref0 (_tmp63_);
			}
		}
		_tmp65_ = split_btn;
		_tmp66_ = adw_split_button_get_menu_model (_tmp65_);
		_tmp67_ = _tmp66_;
		_tmp64_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp67_, g_menu_get_type ()) ? ((GMenu*) _tmp67_) : NULL;
		if (_tmp64_ != NULL) {
			g_menu_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, g_menu_get_type (), GMenu), 0);
		}
		_tmp68_ = header;
		_tmp69_ = split_btn;
		gtk_box_append (_tmp68_, (GtkWidget*) _tmp69_);
		_g_object_unref0 (split_btn);
	}
	_tmp71_ = stack;
	_tmp72_ = g4_stack_get_animate_transitions (_tmp71_);
	_tmp73_ = _tmp72_;
	if (_tmp73_) {
		G4Stack* _tmp74_;
		GtkWidget* _tmp75_;
		GtkWidget* _tmp76_;
		G4MusicList* _tmp77_;
		_tmp74_ = stack;
		_tmp75_ = g4_stack_get_visible_child (_tmp74_);
		_tmp76_ = _tmp75_;
		_tmp77_ = self->priv->_current_list;
		_tmp70_ = _tmp76_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, gtk_widget_get_type (), GtkWidget);
	} else {
		_tmp70_ = FALSE;
	}
	if (_tmp70_) {
		GHashTable* _tmp78_;
		G4MusicList* _tmp79_;
		_tmp78_ = self->priv->_overlayed_lists;
		_tmp79_ = self->priv->_current_list;
		g_hash_table_add (_tmp78_, _tmp79_);
	}
	if (album_mode) {
		G4Album* _tmp81_ = NULL;
		const gchar* _tmp82_ = NULL;
		_tmp81_ = _data43_->album;
		_tmp82_ = NULL;
		if (_tmp81_ != NULL) {
			const gchar* _tmp83_;
			const gchar* _tmp84_;
			_tmp83_ = g4_music_get_album_key ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, G4_TYPE_ALBUM, G4Album));
			_tmp84_ = _tmp83_;
			_tmp82_ = _tmp84_;
		}
		_tmp80_ = _tmp82_;
	} else {
		G4Artist* _tmp85_ = NULL;
		const gchar* _tmp86_ = NULL;
		_tmp85_ = _data43_->artist;
		_tmp86_ = NULL;
		if (_tmp85_ != NULL) {
			const gchar* _tmp87_;
			const gchar* _tmp88_;
			_tmp87_ = g4_music_get_artist_name ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, G4_TYPE_ARTIST, G4Artist));
			_tmp88_ = _tmp87_;
			_tmp86_ = _tmp88_;
		}
		_tmp80_ = _tmp86_;
	}
	_tmp89_ = stack;
	_tmp90_ = mlist;
	_tmp91_ = g4_stack_add (_tmp89_, (GtkWidget*) _tmp90_, _tmp80_);
	_tmp92_ = _tmp91_;
	_g_object_unref0 (_tmp92_);
	_g_free0 (_tmp45_);
	_g_free0 (_tmp41_);
	_g_object_unref0 (back_btn);
	_g_object_unref0 (stack);
	_g_object_unref0 (header);
	_g_free0 (title);
	_g_free0 (icon_name);
	_g_object_unref0 (mlist);
	_g_object_unref0 (_tmp2_);
	block43_data_unref (_data43_);
	_data43_ = NULL;
}

static G4Stack*
g4_store_panel_get_current_stack (G4StorePanel* self)
{
	GtkWidget* child = NULL;
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	G4Stack* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	G4Stack* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->stack_view;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	child = _tmp3_;
	_tmp4_ = self->priv->_artist_stack;
	_tmp5_ = g4_stack_get_widget (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = child;
	if (_tmp6_ == _tmp7_) {
		G4Stack* _tmp8_;
		G4Stack* _tmp9_;
		_tmp8_ = self->priv->_artist_stack;
		_tmp9_ = _g_object_ref0 (_tmp8_);
		result = _tmp9_;
		_g_object_unref0 (child);
		return result;
	} else {
		G4Stack* _tmp10_;
		GtkWidget* _tmp11_;
		GtkWidget* _tmp12_;
		GtkWidget* _tmp13_;
		_tmp10_ = self->priv->_album_stack;
		_tmp11_ = g4_stack_get_widget (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = child;
		if (_tmp12_ == _tmp13_) {
			G4Stack* _tmp14_;
			G4Stack* _tmp15_;
			_tmp14_ = self->priv->_album_stack;
			_tmp15_ = _g_object_ref0 (_tmp14_);
			result = _tmp15_;
			_g_object_unref0 (child);
			return result;
		} else {
			G4Stack* _tmp16_;
			GtkWidget* _tmp17_;
			GtkWidget* _tmp18_;
			GtkWidget* _tmp19_;
			_tmp16_ = self->priv->_playlist_stack;
			_tmp17_ = g4_stack_get_widget (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = child;
			if (_tmp18_ == _tmp19_) {
				G4Stack* _tmp20_;
				G4Stack* _tmp21_;
				_tmp20_ = self->priv->_playlist_stack;
				_tmp21_ = _g_object_ref0 (_tmp20_);
				result = _tmp21_;
				_g_object_unref0 (child);
				return result;
			}
		}
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

static void
g4_store_panel_initialize_library_page (G4StorePanel* self)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_library_uri;
	if (_tmp0_ != NULL) {
		const gchar* _tmp1_;
		G4MusicLibrary* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp1_ = self->priv->_library_uri;
		g4_store_panel_open_page (self, (const gchar*) _tmp1_, FALSE, FALSE);
		_tmp2_ = self->priv->_library;
		_tmp3_ = g4_music_library_get_empty (_tmp2_);
		_tmp4_ = _tmp3_;
		if (!_tmp4_) {
			G4MusicList* _tmp5_;
			gboolean _tmp6_;
			gboolean _tmp7_;
			_g_free0 (self->priv->_library_uri);
			self->priv->_library_uri = NULL;
			_tmp5_ = self->priv->_current_list;
			_tmp6_ = g4_music_list_get_playable (_tmp5_);
			_tmp7_ = _tmp6_;
			if (_tmp7_) {
				G4Music* _tmp8_ = NULL;
				G4MusicList* _tmp9_;
				G4Music* _tmp10_;
				G4Music* _tmp11_;
				const gchar* _tmp12_ = NULL;
				gchar* _tmp15_;
				_tmp9_ = self->priv->_current_list;
				_tmp10_ = g4_music_list_get_music_node (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp8_ = _tmp11_;
				_tmp12_ = NULL;
				if (_tmp8_ != NULL) {
					const gchar* _tmp13_;
					const gchar* _tmp14_;
					_tmp13_ = g4_music_get_album_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G4_TYPE_MUSIC, G4Music));
					_tmp14_ = _tmp13_;
					_tmp12_ = _tmp14_;
				}
				_tmp15_ = g_strdup (_tmp12_);
				_g_free0 (self->priv->_album_key_of_list);
				self->priv->_album_key_of_list = _tmp15_;
			}
			g4_store_panel_set_to_current_music (self, TRUE);
		}
	}
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static void
g4_store_panel_save_current_page (G4StorePanel* self)
{
	GPtrArray* paths = NULL;
	GPtrArray* _tmp0_;
	G4Stack* stack = NULL;
	G4Stack* _tmp1_;
	G4Stack* _tmp2_;
	gchar* uri = NULL;
	GPtrArray* _tmp10_;
	gpointer* _tmp11_;
	gint _tmp11__length1;
	gchar* _tmp12_;
	G4Application* _tmp13_;
	GSettings* _tmp14_;
	GSettings* _tmp15_;
	const gchar* _tmp16_;
	G4Music* _tmp17_ = NULL;
	G4MusicList* _tmp18_;
	G4Music* _tmp19_;
	G4Music* _tmp20_;
	const gchar* _tmp21_ = NULL;
	gchar* _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 4, _g_free0_);
	paths = _tmp0_;
	_tmp1_ = g4_store_panel_get_current_stack (self);
	stack = _tmp1_;
	_tmp2_ = stack;
	if (_tmp2_ != NULL) {
		G4Stack* _tmp3_;
		GPtrArray* _tmp4_;
		_tmp3_ = stack;
		_tmp4_ = paths;
		g4_stack_get_visible_names (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, G4_TYPE_STACK, G4Stack), _tmp4_);
	} else {
		const gchar* _tmp5_ = NULL;
		GtkStack* _tmp6_;
		const gchar* _tmp7_;
		GPtrArray* _tmp8_;
		gchar* _tmp9_;
		_tmp6_ = self->priv->stack_view;
		_tmp7_ = gtk_stack_get_visible_child_name (_tmp6_);
		_tmp5_ = _tmp7_;
		if (_tmp5_ == NULL) {
			_tmp5_ = "";
		}
		_tmp8_ = paths;
		_tmp9_ = g_strdup ((const gchar*) _tmp5_);
		g_ptr_array_add (_tmp8_, _tmp9_);
	}
	_tmp10_ = paths;
	_tmp11_ = _tmp10_->pdata;
	_tmp11__length1 = _tmp10_->len;
	_tmp12_ = g4_build_library_uri_from_sa (_tmp11_, (gint) _tmp11__length1);
	uri = _tmp12_;
	_tmp13_ = self->priv->_app;
	_tmp14_ = g4_application_get_settings (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = uri;
	g_settings_set_string (_tmp15_, "library-uri", _tmp16_);
	_tmp18_ = self->priv->_current_list;
	_tmp19_ = g4_music_list_get_music_node (_tmp18_);
	_tmp20_ = _tmp19_;
	_tmp17_ = _tmp20_;
	_tmp21_ = NULL;
	if (_tmp17_ != NULL) {
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		_tmp22_ = g4_music_get_album_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, G4_TYPE_MUSIC, G4Music));
		_tmp23_ = _tmp22_;
		_tmp21_ = _tmp23_;
	}
	_tmp24_ = g_strdup (_tmp21_);
	_g_free0 (self->priv->_album_key_of_list);
	self->priv->_album_key_of_list = _tmp24_;
	_g_free0 (uri);
	_g_object_unref0 (stack);
	_g_ptr_array_unref0 (paths);
}

static gboolean*
_bool_dup (gboolean* self)
{
	gboolean* dup;
	dup = g_new0 (gboolean, 1);
	memcpy (dup, self, sizeof (gboolean));
	return dup;
}

static gpointer
__bool_dup0 (gpointer self)
{
	return self ? _bool_dup (self) : NULL;
}

gboolean
g4_store_panel_open_page (G4StorePanel* self,
                          const gchar* uri,
                          gboolean play_now,
                          gboolean shuffle)
{
	gchar* ar = NULL;
	gchar* al = NULL;
	gchar* pl = NULL;
	gchar* page = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (uri != NULL, FALSE);
	ar = NULL;
	al = NULL;
	pl = NULL;
	page = NULL;
	_tmp4_ = g4_parse_library_uri (uri, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
	_g_free0 (ar);
	ar = _tmp0_;
	_g_free0 (al);
	al = _tmp1_;
	_g_free0 (pl);
	pl = _tmp2_;
	_g_free0 (page);
	page = _tmp3_;
	if (_tmp4_) {
		GtkStack* _tmp5_;
		GtkStack* _tmp6_;
		const gchar* _tmp7_;
		GtkStack* _tmp8_;
		G4Stack* stk = NULL;
		G4Stack* _tmp9_;
		G4Stack* _tmp10_;
		_tmp5_ = self->priv->stack_view;
		gtk_stack_set_transition_type (_tmp5_, GTK_STACK_TRANSITION_TYPE_NONE);
		_tmp6_ = self->priv->stack_view;
		_tmp7_ = page;
		gtk_stack_set_visible_child_name (_tmp6_, (const gchar*) _tmp7_);
		_tmp8_ = self->priv->stack_view;
		gtk_stack_set_transition_type (_tmp8_, GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT);
		_tmp9_ = g4_store_panel_get_current_stack (self);
		stk = _tmp9_;
		_tmp10_ = stk;
		if (_tmp10_ != NULL) {
			G4Stack* stack = NULL;
			G4Stack* _tmp11_;
			G4Stack* _tmp12_;
			G4Stack* _tmp13_;
			G4Artist* artist = NULL;
			G4Album* album = NULL;
			const gchar* _tmp14_;
			gboolean _tmp43_ = FALSE;
			G4Album* _tmp44_;
			G4Stack* _tmp66_;
			G4Album* _tmp67_;
			_tmp11_ = stk;
			_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, G4_TYPE_STACK, G4Stack));
			stack = _tmp12_;
			_tmp13_ = stack;
			g4_stack_set_animate_transitions (_tmp13_, FALSE);
			artist = NULL;
			album = NULL;
			_tmp14_ = ar;
			if (_tmp14_ != NULL) {
				G4MusicLibrary* _tmp15_;
				const gchar* _tmp16_;
				G4Artist* _tmp17_;
				G4Artist* _tmp18_;
				_tmp15_ = self->priv->_library;
				_tmp16_ = ar;
				_tmp17_ = g4_music_library_get_artist (_tmp15_, (const gchar*) _tmp16_);
				_g_object_unref0 (artist);
				artist = _tmp17_;
				_tmp18_ = artist;
				if (_tmp18_ != NULL) {
					G4Stack* _tmp19_;
					G4Artist* _tmp20_;
					const gchar* _tmp21_;
					GtkWidget* _tmp22_;
					GtkWidget* _tmp23_;
					gboolean _tmp24_;
					const gchar* _tmp26_;
					_tmp19_ = stack;
					_tmp20_ = artist;
					_tmp21_ = ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, G4_TYPE_ARTIST, G4Artist))->artist;
					_tmp22_ = g4_stack_get_child_by_name (_tmp19_, _tmp21_);
					_tmp23_ = _tmp22_;
					_tmp24_ = _tmp23_ == NULL;
					_g_object_unref0 (_tmp23_);
					if (_tmp24_) {
						G4Artist* _tmp25_;
						_tmp25_ = artist;
						g4_store_panel_create_stack_page (self, _tmp25_, NULL);
					}
					_tmp26_ = al;
					if (_tmp26_ != NULL) {
						const gchar* _tmp27_;
						gint _tmp28_;
						gint _tmp29_;
						_tmp27_ = al;
						_tmp28_ = strlen ((const gchar*) _tmp27_);
						_tmp29_ = _tmp28_;
						if (_tmp29_ > 0) {
							G4Artist* _tmp30_;
							const gchar* _tmp31_;
							G4Album* _tmp32_;
							_tmp30_ = artist;
							_tmp31_ = al;
							_tmp32_ = g4_artist_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, G4_TYPE_ARTIST, G4Artist), (const gchar*) _tmp31_);
							_g_object_unref0 (album);
							album = _tmp32_;
						} else {
							G4Artist* _tmp33_;
							G4Playlist* _tmp34_;
							_tmp33_ = artist;
							_tmp34_ = g4_artist_to_playlist (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, G4_TYPE_ARTIST, G4Artist));
							_g_object_unref0 (album);
							album = (G4Album*) _tmp34_;
						}
					}
				}
			} else {
				const gchar* _tmp35_;
				_tmp35_ = al;
				if (_tmp35_ != NULL) {
					G4MusicLibrary* _tmp36_;
					const gchar* _tmp37_;
					G4Album* _tmp38_;
					_tmp36_ = self->priv->_library;
					_tmp37_ = al;
					_tmp38_ = g4_music_library_get_album (_tmp36_, (const gchar*) _tmp37_);
					_g_object_unref0 (album);
					album = _tmp38_;
				} else {
					const gchar* _tmp39_;
					_tmp39_ = pl;
					if (_tmp39_ != NULL) {
						G4MusicLibrary* _tmp40_;
						const gchar* _tmp41_;
						G4Playlist* _tmp42_;
						_tmp40_ = self->priv->_library;
						_tmp41_ = pl;
						_tmp42_ = g4_music_library_get_playlist (_tmp40_, (const gchar*) _tmp41_);
						_g_object_unref0 (album);
						album = (G4Album*) _tmp42_;
					}
				}
			}
			_tmp44_ = album;
			if (_tmp44_ != NULL) {
				G4Stack* _tmp45_;
				G4Album* _tmp46_;
				const gchar* _tmp47_;
				const gchar* _tmp48_;
				GtkWidget* _tmp49_;
				GtkWidget* _tmp50_;
				_tmp45_ = stack;
				_tmp46_ = album;
				_tmp47_ = g4_music_get_album_key ((G4Music*) G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, G4_TYPE_ALBUM, G4Album));
				_tmp48_ = _tmp47_;
				_tmp49_ = g4_stack_get_child_by_name (_tmp45_, _tmp48_);
				_tmp50_ = _tmp49_;
				_tmp43_ = _tmp50_ == NULL;
				_g_object_unref0 (_tmp50_);
			} else {
				_tmp43_ = FALSE;
			}
			if (_tmp43_) {
				G4MusicList* _tmp51_ = NULL;
				G4Stack* _tmp52_;
				GtkWidget* _tmp53_;
				GtkWidget* _tmp54_;
				gboolean* _tmp55_ = NULL;
				gboolean* _tmp59_ = NULL;
				gboolean* _tmp60_;
				G4Artist* _tmp64_;
				G4Album* _tmp65_;
				_tmp52_ = stack;
				_tmp53_ = g4_stack_get_visible_child (_tmp52_);
				_tmp54_ = _tmp53_;
				_tmp51_ = G4_IS_MUSIC_LIST (_tmp54_) ? ((G4MusicList*) _tmp54_) : NULL;
				_tmp55_ = NULL;
				if (_tmp51_ != NULL) {
					gboolean _tmp56_;
					gboolean _tmp57_;
					gboolean* _tmp58_;
					_tmp56_ = g4_music_list_get_playable (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, G4_TYPE_MUSIC_LIST, G4MusicList));
					_tmp57_ = _tmp56_;
					_tmp58_ = __bool_dup0 (&_tmp57_);
					_g_free0 (_tmp55_);
					_tmp55_ = _tmp58_;
				}
				_tmp60_ = __bool_dup0 (_tmp55_);
				_tmp59_ = _tmp60_;
				if (_tmp59_ == NULL) {
					gboolean _tmp61_;
					gboolean* _tmp62_;
					_tmp61_ = FALSE;
					_tmp62_ = __bool_dup0 (&_tmp61_);
					_g_free0 (_tmp59_);
					_tmp59_ = _tmp62_;
				}
				if ((gboolean) (*_tmp59_)) {
					G4Stack* _tmp63_;
					_tmp63_ = stack;
					g4_stack_pop (_tmp63_);
				}
				_tmp64_ = artist;
				_tmp65_ = album;
				g4_store_panel_create_stack_page (self, _tmp64_, _tmp65_);
				_g_free0 (_tmp59_);
				_g_free0 (_tmp55_);
			}
			_tmp66_ = stack;
			g4_stack_set_animate_transitions (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, G4_TYPE_STACK, G4Stack), TRUE);
			_tmp67_ = album;
			if (_tmp67_ != NULL) {
				if (shuffle) {
					G4MusicList* _tmp68_;
					GListStore* _tmp69_;
					GListStore* _tmp70_;
					_tmp68_ = self->priv->_current_list;
					_tmp69_ = g4_music_list_get_data_store (_tmp68_);
					_tmp70_ = _tmp69_;
					g4_sort_music_store (_tmp70_, G4_SORT_MODE_SHUFFLE);
				} else {
					G4Album* _tmp71_;
					G4MusicList* _tmp72_;
					GListStore* _tmp73_;
					GListStore* _tmp74_;
					_tmp71_ = album;
					_tmp72_ = self->priv->_current_list;
					_tmp73_ = g4_music_list_get_data_store (_tmp72_);
					_tmp74_ = _tmp73_;
					g4_album_overwrite_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, G4_TYPE_ALBUM, G4Album), _tmp74_);
				}
				if (play_now) {
					g4_store_panel_play_current_list (self, 0);
				}
			}
			result = TRUE;
			_g_object_unref0 (album);
			_g_object_unref0 (artist);
			_g_object_unref0 (stack);
			_g_object_unref0 (stk);
			_g_free0 (page);
			_g_free0 (pl);
			_g_free0 (al);
			_g_free0 (ar);
			return result;
		}
		_g_object_unref0 (stk);
	}
	result = FALSE;
	_g_free0 (page);
	_g_free0 (pl);
	_g_free0 (al);
	_g_free0 (ar);
	return result;
}

gint
g4_store_panel_open_next_playable_page (G4StorePanel* self)
{
	G4Stack* stk = NULL;
	G4Stack* _tmp0_;
	gboolean _tmp1_ = FALSE;
	G4Stack* _tmp2_;
	gint index = 0;
	G4Application* _tmp43_;
	gint _tmp44_;
	gint _tmp45_;
	gint _tmp46_ = 0;
	G4Application* _tmp47_;
	GtkFilterListModel* _tmp48_;
	GtkFilterListModel* _tmp49_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = g4_store_panel_get_current_stack (self);
	stk = _tmp0_;
	_tmp2_ = stk;
	if (_tmp2_ != NULL) {
		_tmp1_ = !self->priv->_updating_store;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		G4Stack* stack = NULL;
		G4Stack* _tmp3_;
		G4Stack* _tmp4_;
		G4MusicList* _tmp5_;
		G4Music* _tmp6_;
		G4Music* _tmp7_;
		G4MusicList* _tmp23_;
		gboolean _tmp24_;
		gboolean _tmp25_;
		G4MusicList* _tmp36_;
		gboolean _tmp37_;
		gboolean _tmp38_;
		_tmp3_ = stk;
		_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, G4_TYPE_STACK, G4Stack));
		stack = _tmp4_;
		_tmp5_ = self->priv->_current_list;
		_tmp6_ = g4_music_list_get_music_node (_tmp5_);
		_tmp7_ = _tmp6_;
		if (G4_IS_PLAYLIST (_tmp7_)) {
			G4Stack* _tmp8_;
			G4MusicList* _tmp9_;
			G4Music* _tmp10_;
			G4Music* _tmp11_;
			_tmp8_ = stack;
			g4_store_panel_pop_page_without_animation (self, _tmp8_);
			_tmp9_ = self->priv->_current_list;
			_tmp10_ = g4_music_list_get_music_node (_tmp9_);
			_tmp11_ = _tmp10_;
			if (G4_IS_ARTIST (_tmp11_)) {
				G4Stack* _tmp12_;
				_tmp12_ = stack;
				g4_store_panel_pop_page_without_animation (self, _tmp12_);
			}
		} else {
			G4MusicList* _tmp13_;
			G4MusicList* _tmp14_;
			guint _tmp15_;
			guint _tmp16_;
			_tmp13_ = self->priv->_current_list;
			_tmp14_ = self->priv->_current_list;
			_tmp15_ = g4_music_list_get_visible_count (_tmp14_);
			_tmp16_ = _tmp15_;
			if (g4_music_list_set_to_current_item (_tmp13_, FALSE) >= (((gint) _tmp16_) - 1)) {
				G4Stack* _tmp17_;
				G4MusicList* _tmp18_;
				G4MusicList* _tmp19_;
				guint _tmp20_;
				guint _tmp21_;
				_tmp17_ = stack;
				g4_store_panel_pop_page_without_animation (self, _tmp17_);
				_tmp18_ = self->priv->_current_list;
				_tmp19_ = self->priv->_current_list;
				_tmp20_ = g4_music_list_get_visible_count (_tmp19_);
				_tmp21_ = _tmp20_;
				if (g4_music_list_set_to_current_item (_tmp18_, FALSE) >= (((gint) _tmp21_) - 1)) {
					G4Stack* _tmp22_;
					_tmp22_ = stack;
					g4_store_panel_pop_page_without_animation (self, _tmp22_);
				}
			}
		}
		_tmp23_ = self->priv->_current_list;
		_tmp24_ = g4_music_list_get_playable (_tmp23_);
		_tmp25_ = _tmp24_;
		if (!_tmp25_) {
			gint index = 0;
			G4MusicList* _tmp26_;
			gint _tmp27_ = 0;
			G4MusicList* _tmp28_;
			guint _tmp29_;
			guint _tmp30_;
			G4MusicList* _tmp31_;
			G4MusicList* _tmp32_;
			gboolean _tmp33_;
			gboolean _tmp34_;
			_tmp26_ = self->priv->_current_list;
			index = g4_music_list_set_to_current_item (_tmp26_, TRUE);
			_tmp28_ = self->priv->_current_list;
			_tmp29_ = g4_music_list_get_visible_count (_tmp28_);
			_tmp30_ = _tmp29_;
			if (index < (((gint) _tmp30_) - 1)) {
				_tmp27_ = index + 1;
			} else {
				_tmp27_ = 0;
			}
			_tmp31_ = self->priv->_current_list;
			g4_music_list_activate_item (_tmp31_, _tmp27_);
			_tmp32_ = self->priv->_current_list;
			_tmp33_ = g4_music_list_get_playable (_tmp32_);
			_tmp34_ = _tmp33_;
			if (!_tmp34_) {
				G4MusicList* _tmp35_;
				_tmp35_ = self->priv->_current_list;
				g4_music_list_activate_item (_tmp35_, 0);
			}
		}
		_tmp36_ = self->priv->_current_list;
		_tmp37_ = g4_music_list_get_playable (_tmp36_);
		_tmp38_ = _tmp37_;
		if (_tmp38_) {
			G4Playlist* playlist = NULL;
			G4MusicList* _tmp39_;
			G4Playlist* _tmp40_;
			G4Application* _tmp41_;
			G4Playlist* _tmp42_;
			_tmp39_ = self->priv->_current_list;
			_tmp40_ = g4_music_list_get_as_playlist (_tmp39_);
			playlist = _tmp40_;
			_tmp41_ = self->priv->_app;
			_tmp42_ = playlist;
			g4_application_insert_to_queue (_tmp41_, _tmp42_, (guint) -1, FALSE);
			_g_object_unref0 (playlist);
		}
		_g_object_unref0 (stack);
	}
	_tmp43_ = self->priv->_app;
	_tmp44_ = g4_application_get_current_item (_tmp43_);
	_tmp45_ = _tmp44_;
	index = _tmp45_ + 1;
	_tmp47_ = self->priv->_app;
	_tmp48_ = g4_application_get_current_list (_tmp47_);
	_tmp49_ = _tmp48_;
	if (index < ((gint) g_list_model_get_n_items ((GListModel*) _tmp49_))) {
		_tmp46_ = index;
	} else {
		_tmp46_ = 0;
	}
	result = _tmp46_;
	_g_object_unref0 (stk);
	return result;
}

void
g4_store_panel_open_playing_page (G4StorePanel* self)
{
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	G4MainMusicList* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stack_view;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_main_list;
	if (_tmp2_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)) {
		GtkStack* _tmp4_;
		G4MainMusicList* _tmp5_;
		_tmp4_ = self->priv->stack_view;
		_tmp5_ = self->priv->_main_list;
		gtk_stack_set_visible_child (_tmp4_, (GtkWidget*) _tmp5_);
	} else {
		g4_store_panel_set_to_current_music (self, TRUE);
	}
}

static void
g4_store_panel_on_music_changed (G4StorePanel* self,
                                 G4Music* music)
{
	G4MusicList* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	G4Music* _tmp49_ = NULL;
	const gchar* _tmp50_ = NULL;
	const gchar* _tmp52_ = NULL;
	G4MiniBar* _tmp53_;
	gboolean _tmp54_ = FALSE;
	G4MusicList* _tmp55_;
	gint _tmp56_;
	gint _tmp57_;
	gboolean scroll = FALSE;
	G4MusicList* _tmp61_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_list;
	_tmp1_ = g4_music_list_get_playable (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		G4MusicList* _tmp3_;
		_tmp3_ = self->priv->_current_list;
		g4_music_list_set_current_node (_tmp3_, music);
	} else {
		G4MusicList* _tmp4_;
		GType _tmp5_;
		GType _tmp6_;
		_tmp4_ = self->priv->_current_list;
		_tmp5_ = g4_music_list_get_item_type (_tmp4_);
		_tmp6_ = _tmp5_;
		if (_tmp6_ == G4_TYPE_ARTIST) {
			G4Music* _tmp7_ = NULL;
			const gchar* _tmp8_ = NULL;
			const gchar* _tmp11_ = NULL;
			gchar* artist_name = NULL;
			gchar* _tmp12_;
			G4MusicList* _tmp13_;
			G4MusicLibrary* _tmp14_;
			const gchar* _tmp15_;
			G4Artist* _tmp16_;
			G4Artist* _tmp17_;
			_tmp7_ = music;
			_tmp8_ = NULL;
			if (_tmp7_ != NULL) {
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				_tmp9_ = g4_music_get_artist_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, G4_TYPE_MUSIC, G4Music));
				_tmp10_ = _tmp9_;
				_tmp8_ = _tmp10_;
			}
			_tmp11_ = _tmp8_;
			if (_tmp11_ == NULL) {
				_tmp11_ = "";
			}
			_tmp12_ = g_strdup ((const gchar*) _tmp11_);
			artist_name = _tmp12_;
			_tmp13_ = self->priv->_current_list;
			_tmp14_ = self->priv->_library;
			_tmp15_ = artist_name;
			_tmp16_ = g4_music_library_get_artist (_tmp14_, _tmp15_);
			_tmp17_ = _tmp16_;
			g4_music_list_set_current_node (_tmp13_, (G4Music*) _tmp17_);
			_g_object_unref0 (_tmp17_);
			_g_free0 (artist_name);
		} else {
			G4MusicList* _tmp18_;
			GType _tmp19_;
			GType _tmp20_;
			_tmp18_ = self->priv->_current_list;
			_tmp19_ = g4_music_list_get_item_type (_tmp18_);
			_tmp20_ = _tmp19_;
			if (_tmp20_ == G4_TYPE_ALBUM) {
				G4Music* _tmp21_ = NULL;
				const gchar* _tmp22_ = NULL;
				const gchar* _tmp25_ = NULL;
				gchar* album = NULL;
				gchar* _tmp26_;
				G4Artist* artist = NULL;
				G4MusicList* _tmp27_;
				G4Music* _tmp28_;
				G4Music* _tmp29_;
				G4Artist* _tmp30_;
				G4Album* _tmp31_ = NULL;
				G4Artist* _tmp32_;
				G4MusicList* _tmp39_;
				_tmp21_ = music;
				_tmp22_ = NULL;
				if (_tmp21_ != NULL) {
					const gchar* _tmp23_;
					const gchar* _tmp24_;
					_tmp23_ = g4_music_get_album_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, G4_TYPE_MUSIC, G4Music));
					_tmp24_ = _tmp23_;
					_tmp22_ = _tmp24_;
				}
				_tmp25_ = _tmp22_;
				if (_tmp25_ == NULL) {
					_tmp25_ = "";
				}
				_tmp26_ = g_strdup ((const gchar*) _tmp25_);
				album = _tmp26_;
				_tmp27_ = self->priv->_current_list;
				_tmp28_ = g4_music_list_get_music_node (_tmp27_);
				_tmp29_ = _tmp28_;
				_tmp30_ = _g_object_ref0 (G4_IS_ARTIST (_tmp29_) ? ((G4Artist*) _tmp29_) : NULL);
				artist = _tmp30_;
				_tmp32_ = artist;
				if (_tmp32_ != NULL) {
					G4Artist* _tmp33_;
					const gchar* _tmp34_;
					G4Album* _tmp35_;
					_tmp33_ = artist;
					_tmp34_ = album;
					_tmp35_ = g4_artist_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, G4_TYPE_ARTIST, G4Artist), _tmp34_);
					_g_object_unref0 (_tmp31_);
					_tmp31_ = _tmp35_;
				} else {
					G4MusicLibrary* _tmp36_;
					const gchar* _tmp37_;
					G4Album* _tmp38_;
					_tmp36_ = self->priv->_library;
					_tmp37_ = album;
					_tmp38_ = g4_music_library_get_album (_tmp36_, _tmp37_);
					_g_object_unref0 (_tmp31_);
					_tmp31_ = _tmp38_;
				}
				_tmp39_ = self->priv->_current_list;
				g4_music_list_set_current_node (_tmp39_, (G4Music*) _tmp31_);
				_g_object_unref0 (_tmp31_);
				_g_object_unref0 (artist);
				_g_free0 (album);
			} else {
				G4MusicList* _tmp40_;
				GType _tmp41_;
				GType _tmp42_;
				_tmp40_ = self->priv->_current_list;
				_tmp41_ = g4_music_list_get_item_type (_tmp40_);
				_tmp42_ = _tmp41_;
				if (_tmp42_ == G4_TYPE_PLAYLIST) {
					const gchar* _tmp43_;
					_tmp43_ = self->priv->_album_key_of_list;
					if (_tmp43_ != NULL) {
						G4MusicList* _tmp44_;
						G4MusicLibrary* _tmp45_;
						const gchar* _tmp46_;
						G4Playlist* _tmp47_;
						G4Playlist* _tmp48_;
						_tmp44_ = self->priv->_current_list;
						_tmp45_ = self->priv->_library;
						_tmp46_ = self->priv->_album_key_of_list;
						_tmp47_ = g4_music_library_get_playlist (_tmp45_, (const gchar*) _tmp46_);
						_tmp48_ = _tmp47_;
						g4_music_list_set_current_node (_tmp44_, (G4Music*) _tmp48_);
						_g_object_unref0 (_tmp48_);
					}
				}
			}
		}
	}
	_tmp49_ = music;
	_tmp50_ = NULL;
	if (_tmp49_ != NULL) {
		const gchar* _tmp51_;
		_tmp51_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, G4_TYPE_MUSIC, G4Music)->title;
		_tmp50_ = _tmp51_;
	}
	_tmp52_ = _tmp50_;
	if (_tmp52_ == NULL) {
		_tmp52_ = "";
	}
	_tmp53_ = self->priv->_mini_bar;
	g4_mini_bar_set_title (_tmp53_, (const gchar*) _tmp52_);
	_tmp55_ = self->priv->_current_list;
	_tmp56_ = g4_music_list_get_dropping_item (_tmp55_);
	_tmp57_ = _tmp56_;
	if (_tmp57_ == -1) {
		G4MusicList* _tmp58_;
		gboolean _tmp59_;
		gboolean _tmp60_;
		_tmp58_ = self->priv->_current_list;
		_tmp59_ = g4_music_list_get_multi_selection (_tmp58_);
		_tmp60_ = _tmp59_;
		_tmp54_ = !_tmp60_;
	} else {
		_tmp54_ = FALSE;
	}
	scroll = _tmp54_;
	_tmp61_ = self->priv->_current_list;
	g4_music_list_set_to_current_item (_tmp61_, scroll);
}

static void
g4_store_panel_on_music_library_changed (G4StorePanel* self,
                                         gboolean external)
{
	G4MainMusicList* _tmp0_;
	G4MainMusicList* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	G4Application* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_main_list;
	_tmp1_ = self->priv->_main_list;
	_tmp2_ = g4_music_list_get_modified ((G4MusicList*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->_app;
	_tmp5_ = g4_application_get_list_modified (_tmp4_);
	_tmp6_ = _tmp5_;
	g4_music_list_set_modified ((G4MusicList*) _tmp1_, _tmp3_ | _tmp6_);
	if (external) {
		GtkBitset* _tmp7_;
		_tmp7_ = self->priv->_changing_stacks;
		gtk_bitset_add_range (_tmp7_, G4_STACK_FLAGS_FIRST, G4_STACK_FLAGS_LAST - G4_STACK_FLAGS_FIRST);
		if (self->priv->_size_allocated) {
			g4_store_panel_update_visible_stack (self);
			g4_store_panel_initialize_library_page (self);
		}
	}
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static void
g4_store_panel_on_playlist_added (G4StorePanel* self,
                                  G4Playlist* playlist)
{
	G4MusicList* list = NULL;
	G4Stack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	G4MusicList* _tmp3_;
	G4MusicList* _tmp4_ = NULL;
	G4MusicList* _tmp5_;
	G4Music* _tmp6_ = NULL;
	G4Music* node = NULL;
	G4Music* _tmp9_;
	G4Playlist* _tmp10_ = NULL;
	G4Music* _tmp11_;
	const gchar* _tmp12_ = NULL;
	GCompareFunc _tmp14_;
	const gchar* _tmp15_;
	GPtrArray* arr = NULL;
	GPtrArray* _tmp19_;
	G4Music* _tmp20_;
	guint position = 0U;
	G4MusicList* _tmp21_;
	GListStore* _tmp22_;
	GListStore* _tmp23_;
	G4MusicList* _tmp24_;
	GListStore* _tmp25_;
	GListStore* _tmp26_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (playlist != NULL);
	_tmp0_ = self->priv->_playlist_stack;
	_tmp1_ = g4_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (G4_IS_MUSIC_LIST (_tmp2_) ? ((G4MusicList*) _tmp2_) : NULL);
	list = _tmp3_;
	_tmp5_ = list;
	_tmp4_ = _tmp5_;
	_tmp6_ = NULL;
	if (_tmp4_ != NULL) {
		G4Music* _tmp7_;
		G4Music* _tmp8_;
		_tmp7_ = g4_music_list_get_music_node (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_MUSIC_LIST, G4MusicList));
		_tmp8_ = _tmp7_;
		_tmp6_ = _tmp8_;
	}
	_tmp9_ = _g_object_ref0 (_tmp6_);
	node = _tmp9_;
	_tmp11_ = node;
	_tmp10_ = G4_IS_PLAYLIST (_tmp11_) ? ((G4Playlist*) _tmp11_) : NULL;
	_tmp12_ = NULL;
	if (_tmp10_ != NULL) {
		const gchar* _tmp13_;
		_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G4_TYPE_PLAYLIST, G4Playlist)->list_uri;
		_tmp12_ = _tmp13_;
	}
	_tmp14_ = ((GCompareFunc) g_strcmp0);
	_tmp15_ = playlist->list_uri;
	if (_tmp14_ (_tmp15_, _tmp12_) == 0) {
		G4MusicList* _tmp16_;
		GListStore* _tmp17_;
		GListStore* _tmp18_;
		_tmp16_ = list;
		_tmp17_ = g4_music_list_get_data_store (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, G4_TYPE_MUSIC_LIST, G4MusicList));
		_tmp18_ = _tmp17_;
		g4_album_overwrite_to ((G4Album*) playlist, _tmp18_);
	}
	_tmp19_ = g_ptr_array_new_full ((guint) 1, _g_object_unref0_);
	arr = _tmp19_;
	_tmp20_ = _g_object_ref0 ((G4Music*) playlist);
	g_ptr_array_add (arr, _tmp20_);
	position = (guint) -1;
	_tmp21_ = self->priv->_playlist_list;
	_tmp22_ = g4_music_list_get_data_store (_tmp21_);
	_tmp23_ = _tmp22_;
	g4_merge_items_to_store (_tmp23_, arr, &position);
	_tmp24_ = self->priv->_playlist_list;
	_tmp25_ = g4_music_list_get_data_store (_tmp24_);
	_tmp26_ = _tmp25_;
	g4_sort_music_store (_tmp26_, G4_SORT_MODE_TITLE);
	_g_ptr_array_unref0 (arr);
	_g_object_unref0 (node);
	_g_object_unref0 (list);
}

static void
g4_store_panel_on_search_btn_toggled (G4StorePanel* self)
{
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->search_btn;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkSearchEntry* _tmp3_;
		_tmp3_ = self->priv->search_entry;
		gtk_widget_grab_focus ((GtkWidget*) _tmp3_);
	}
	g4_store_panel_on_search_text_changed (self);
}

static gboolean
g4_store_panel_on_search_match (G4StorePanel* self,
                                GObject* obj)
{
	G4Music* music = NULL;
	const gchar* text = NULL;
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (obj != NULL, FALSE);
	music = G_TYPE_CHECK_INSTANCE_CAST (obj, G4_TYPE_MUSIC, G4Music);
	_tmp0_ = self->priv->_search_text;
	text = _tmp0_;
	switch (self->priv->_search_mode) {
		case G4_SEARCH_MODE_ALBUM:
		{
			const gchar* _tmp1_;
			G4Music* _tmp2_;
			const gchar* _tmp3_;
			_tmp1_ = text;
			_tmp2_ = music;
			_tmp3_ = _tmp2_->album;
			result = g_str_match_string (_tmp1_, _tmp3_, TRUE);
			return result;
		}
		case G4_SEARCH_MODE_ARTIST:
		{
			gboolean _tmp4_ = FALSE;
			gboolean _tmp5_ = FALSE;
			const gchar* _tmp6_;
			G4Music* _tmp7_;
			const gchar* _tmp8_;
			_tmp6_ = text;
			_tmp7_ = music;
			_tmp8_ = _tmp7_->artist;
			if (g_str_match_string (_tmp6_, _tmp8_, TRUE)) {
				_tmp5_ = TRUE;
			} else {
				const gchar* _tmp9_;
				G4Music* _tmp10_;
				const gchar* _tmp11_;
				_tmp9_ = text;
				_tmp10_ = music;
				_tmp11_ = _tmp10_->album_artist;
				_tmp5_ = g_str_match_string (_tmp9_, _tmp11_, TRUE);
			}
			if (_tmp5_) {
				_tmp4_ = TRUE;
			} else {
				G4Artist* _tmp12_ = NULL;
				G4Music* _tmp13_;
				G4Album* _tmp14_ = NULL;
				_tmp13_ = music;
				_tmp12_ = G4_IS_ARTIST (_tmp13_) ? ((G4Artist*) _tmp13_) : NULL;
				_tmp14_ = NULL;
				if (_tmp12_ != NULL) {
					const gchar* _tmp15_;
					G4Album* _tmp16_;
					_tmp15_ = text;
					_tmp16_ = g4_artist_find_by_partial_artist (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, G4_TYPE_ARTIST, G4Artist), _tmp15_);
					_g_object_unref0 (_tmp14_);
					_tmp14_ = _tmp16_;
				}
				_tmp4_ = _tmp14_ != NULL;
				_g_object_unref0 (_tmp14_);
			}
			result = _tmp4_;
			return result;
		}
		case G4_SEARCH_MODE_TITLE:
		{
			const gchar* _tmp17_;
			G4Music* _tmp18_;
			const gchar* _tmp19_;
			_tmp17_ = text;
			_tmp18_ = music;
			_tmp19_ = _tmp18_->title;
			result = g_str_match_string (_tmp17_, _tmp19_, TRUE);
			return result;
		}
		default:
		{
			gboolean _tmp20_ = FALSE;
			gboolean _tmp21_ = FALSE;
			gboolean _tmp22_ = FALSE;
			const gchar* _tmp23_;
			G4Music* _tmp24_;
			const gchar* _tmp25_;
			_tmp23_ = text;
			_tmp24_ = music;
			_tmp25_ = _tmp24_->album;
			if (g_str_match_string (_tmp23_, _tmp25_, TRUE)) {
				_tmp22_ = TRUE;
			} else {
				const gchar* _tmp26_;
				G4Music* _tmp27_;
				const gchar* _tmp28_;
				_tmp26_ = text;
				_tmp27_ = music;
				_tmp28_ = _tmp27_->album_artist;
				_tmp22_ = g_str_match_string (_tmp26_, _tmp28_, TRUE);
			}
			if (_tmp22_) {
				_tmp21_ = TRUE;
			} else {
				const gchar* _tmp29_;
				G4Music* _tmp30_;
				const gchar* _tmp31_;
				_tmp29_ = text;
				_tmp30_ = music;
				_tmp31_ = _tmp30_->artist;
				_tmp21_ = g_str_match_string (_tmp29_, _tmp31_, TRUE);
			}
			if (_tmp21_) {
				_tmp20_ = TRUE;
			} else {
				const gchar* _tmp32_;
				G4Music* _tmp33_;
				const gchar* _tmp34_;
				_tmp32_ = text;
				_tmp33_ = music;
				_tmp34_ = _tmp33_->title;
				_tmp20_ = g_str_match_string (_tmp32_, _tmp34_, TRUE);
			}
			result = _tmp20_;
			return result;
		}
	}
}

static gboolean
_g4_store_panel_on_search_match_gtk_custom_filter_func (GObject* item,
                                                        gpointer self)
{
	gboolean result;
	result = g4_store_panel_on_search_match ((G4StorePanel*) self, item);
	return result;
}

static void
g4_store_panel_on_search_text_changed (G4StorePanel* self)
{
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	G4MusicList* _tmp4_;
	G4MusicList* _tmp5_;
	GtkFilterListModel* model = NULL;
	G4MusicList* _tmp8_;
	GtkFilterListModel* _tmp9_;
	GtkFilterListModel* _tmp10_;
	GtkFilterListModel* _tmp11_;
	gboolean _tmp12_ = FALSE;
	GtkToggleButton* _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	GtkFilter* _tmp28_ = NULL;
	GtkFilterListModel* _tmp29_;
	GtkFilter* _tmp30_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->search_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->priv->_search_text);
	self->priv->_search_text = _tmp3_;
	g4_parse_search_mode (&self->priv->_search_text, &self->priv->_search_mode);
	_tmp4_ = self->priv->_current_list;
	_tmp5_ = self->priv->_album_list;
	if (_tmp4_ == _tmp5_) {
		self->priv->_search_mode = G4_SEARCH_MODE_ALBUM;
	} else {
		G4MusicList* _tmp6_;
		G4MusicList* _tmp7_;
		_tmp6_ = self->priv->_current_list;
		_tmp7_ = self->priv->_artist_list;
		if (_tmp6_ == _tmp7_) {
			self->priv->_search_mode = G4_SEARCH_MODE_ARTIST;
		}
	}
	_tmp8_ = self->priv->_current_list;
	_tmp9_ = g4_music_list_get_filter_model (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = _g_object_ref0 (_tmp10_);
	model = _tmp11_;
	_tmp13_ = self->priv->search_btn;
	_tmp14_ = gtk_toggle_button_get_active (_tmp13_);
	_tmp15_ = _tmp14_;
	if (_tmp15_) {
		GtkFilterListModel* _tmp16_;
		GtkFilter* _tmp17_;
		_tmp16_ = model;
		_tmp17_ = gtk_filter_list_model_get_filter (_tmp16_);
		_tmp12_ = _tmp17_ == NULL;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		GtkFilterListModel* _tmp18_;
		GtkCustomFilter* _tmp19_;
		GtkCustomFilter* _tmp20_;
		_tmp18_ = model;
		_tmp19_ = gtk_custom_filter_new (_g4_store_panel_on_search_match_gtk_custom_filter_func, g_object_ref (self), g_object_unref);
		_tmp20_ = _tmp19_;
		gtk_filter_list_model_set_filter (_tmp18_, (GtkFilter*) _tmp20_);
		_g_object_unref0 (_tmp20_);
	} else {
		gboolean _tmp21_ = FALSE;
		GtkToggleButton* _tmp22_;
		gboolean _tmp23_;
		gboolean _tmp24_;
		_tmp22_ = self->priv->search_btn;
		_tmp23_ = gtk_toggle_button_get_active (_tmp22_);
		_tmp24_ = _tmp23_;
		if (!_tmp24_) {
			GtkFilterListModel* _tmp25_;
			GtkFilter* _tmp26_;
			_tmp25_ = model;
			_tmp26_ = gtk_filter_list_model_get_filter (_tmp25_);
			_tmp21_ = _tmp26_ != NULL;
		} else {
			_tmp21_ = FALSE;
		}
		if (_tmp21_) {
			GtkFilterListModel* _tmp27_;
			_tmp27_ = model;
			gtk_filter_list_model_set_filter (_tmp27_, NULL);
		}
	}
	_tmp29_ = model;
	_tmp30_ = gtk_filter_list_model_get_filter (_tmp29_);
	_tmp28_ = _tmp30_;
	if (_tmp28_ != NULL) {
		gtk_filter_changed (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_filter_get_type (), GtkFilter), GTK_FILTER_CHANGE_DIFFERENT);
	}
	_g_object_unref0 (model);
}

static void
g4_store_panel_on_thumbnail_changed (G4StorePanel* self,
                                     G4Music* music,
                                     GdkPaintable* paintable)
{
	G4MusicList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (music != NULL);
	g_return_if_fail (paintable != NULL);
	_tmp0_ = self->priv->_current_list;
	g4_music_list_update_item_cover (_tmp0_, music, paintable);
}

static void
g4_store_panel_play_current_list (G4StorePanel* self,
                                  gint index)
{
	G4Application* _tmp0_;
	GtkFilterListModel* _tmp1_;
	GtkFilterListModel* _tmp2_;
	G4MusicList* _tmp3_;
	GtkFilterListModel* _tmp4_;
	GtkFilterListModel* _tmp5_;
	G4Application* _tmp15_;
	G4GstPlayer* _tmp16_;
	G4GstPlayer* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	G4Music* _tmp23_ = NULL;
	G4MusicList* _tmp24_;
	G4Music* _tmp25_;
	G4Music* _tmp26_;
	const gchar* _tmp27_ = NULL;
	gchar* _tmp30_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_current_list (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_current_list;
	_tmp4_ = g4_music_list_get_filter_model (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp2_ == _tmp5_) {
		G4Application* _tmp6_;
		_tmp6_ = self->priv->_app;
		g4_application_set_current_item (_tmp6_, index);
	} else {
		G4MusicList* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp7_ = self->priv->_current_list;
		_tmp8_ = g4_music_list_get_playable (_tmp7_);
		_tmp9_ = _tmp8_;
		if (_tmp9_) {
			G4Playlist* playlist = NULL;
			G4MusicList* _tmp10_;
			G4Playlist* _tmp11_;
			G4Application* _tmp12_;
			G4Application* _tmp13_;
			G4Playlist* _tmp14_;
			_tmp10_ = self->priv->_current_list;
			_tmp11_ = g4_music_list_get_as_playlist (_tmp10_);
			playlist = _tmp11_;
			_tmp12_ = self->priv->_app;
			_tmp13_ = self->priv->_app;
			_tmp14_ = playlist;
			g4_application_set_current_item (_tmp12_, g4_application_insert_after_current (_tmp13_, _tmp14_) + index);
			_g_object_unref0 (playlist);
		}
	}
	_tmp15_ = self->priv->_app;
	_tmp16_ = g4_application_get_player (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = g4_gst_player_get_playing (_tmp17_);
	_tmp19_ = _tmp18_;
	if (!_tmp19_) {
		G4Application* _tmp20_;
		G4GstPlayer* _tmp21_;
		G4GstPlayer* _tmp22_;
		_tmp20_ = self->priv->_app;
		_tmp21_ = g4_application_get_player (_tmp20_);
		_tmp22_ = _tmp21_;
		g4_gst_player_play (_tmp22_);
	}
	_tmp24_ = self->priv->_current_list;
	_tmp25_ = g4_music_list_get_music_node (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp23_ = _tmp26_;
	_tmp27_ = NULL;
	if (_tmp23_ != NULL) {
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		_tmp28_ = g4_music_get_album_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, G4_TYPE_MUSIC, G4Music));
		_tmp29_ = _tmp28_;
		_tmp27_ = _tmp29_;
	}
	_tmp30_ = g_strdup (_tmp27_);
	_g_free0 (self->priv->_album_key_of_list);
	self->priv->_album_key_of_list = _tmp30_;
}

static void
g4_store_panel_pop_page_without_animation (G4StorePanel* self,
                                           G4Stack* stack)
{
	gboolean animate = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stack != NULL);
	_tmp0_ = g4_stack_get_animate_transitions (stack);
	_tmp1_ = _tmp0_;
	animate = _tmp1_;
	g4_stack_set_animate_transitions (stack, FALSE);
	g4_stack_pop (stack);
	g4_stack_set_animate_transitions (stack, animate);
}

static void
g4_store_panel_set_to_current_music (G4StorePanel* self,
                                     gboolean scroll)
{
	G4Application* _tmp0_;
	G4Music* _tmp1_;
	G4Music* _tmp2_;
	G4MusicList* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_current_music (_tmp0_);
	_tmp2_ = _tmp1_;
	g4_store_panel_on_music_changed (self, _tmp2_);
	_tmp3_ = self->priv->_current_list;
	g4_music_list_set_to_current_item (_tmp3_, scroll);
}

static gint
vala_g_ptr_array_get_length (GPtrArray* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = (gint) self->len;
	return result;
}

static void
g4_store_panel_update_stack_pages (G4StorePanel* self,
                                   G4Stack* stack)
{
	GPtrArray* children = NULL;
	GPtrArray* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stack != NULL);
	_tmp0_ = g4_stack_get_children (stack);
	children = _tmp0_;
	{
		gint i = 0;
		GPtrArray* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		_tmp1_ = children;
		_tmp2_ = vala_g_ptr_array_get_length (_tmp1_);
		_tmp3_ = _tmp2_;
		i = _tmp3_ - 1;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				G4MusicList* mlist = NULL;
				GPtrArray* _tmp6_;
				gconstpointer _tmp7_;
				G4MusicList* _tmp8_;
				gboolean _tmp9_ = FALSE;
				G4MusicList* _tmp10_;
				G4Music* _tmp11_;
				G4Music* _tmp12_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ - 1;
				}
				_tmp4_ = FALSE;
				if (!(i >= 0)) {
					break;
				}
				_tmp6_ = children;
				_tmp7_ = g_ptr_array_index (_tmp6_, (guint) i);
				_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((GtkWidget*) _tmp7_, G4_TYPE_MUSIC_LIST, G4MusicList));
				mlist = _tmp8_;
				_tmp10_ = mlist;
				_tmp11_ = g4_music_list_get_music_node (_tmp10_);
				_tmp12_ = _tmp11_;
				if (_tmp12_ != NULL) {
					G4MusicList* _tmp13_;
					_tmp13_ = mlist;
					_tmp9_ = g4_music_list_update_store (_tmp13_) == ((guint) 0);
				} else {
					_tmp9_ = FALSE;
				}
				if (_tmp9_) {
					g4_store_panel_pop_page_without_animation (self, stack);
				}
				_g_object_unref0 (mlist);
			}
		}
	}
	_g_ptr_array_unref0 (children);
}

static void
g4_store_panel_update_visible_stack (G4StorePanel* self)
{
	GtkWidget* child = NULL;
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	gboolean _tmp4_ = FALSE;
	GtkWidget* _tmp5_;
	G4Stack* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* _tmp8_;
	g_return_if_fail (self != NULL);
	self->priv->_updating_store = TRUE;
	_tmp0_ = self->priv->stack_view;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	child = _tmp3_;
	_tmp5_ = child;
	_tmp6_ = self->priv->_album_stack;
	_tmp7_ = g4_stack_get_widget (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp5_ == _tmp8_) {
		GtkBitset* _tmp9_;
		_tmp9_ = self->priv->_changing_stacks;
		_tmp4_ = gtk_bitset_remove (_tmp9_, G4_STACK_FLAGS_ALBUMS);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		G4Stack* _tmp10_;
		G4MusicLibrary* _tmp11_;
		G4MusicList* _tmp12_;
		GListStore* _tmp13_;
		GListStore* _tmp14_;
		_tmp10_ = self->priv->_album_stack;
		g4_store_panel_update_stack_pages (self, _tmp10_);
		_tmp11_ = self->priv->_library;
		_tmp12_ = self->priv->_album_list;
		_tmp13_ = g4_music_list_get_data_store (_tmp12_);
		_tmp14_ = _tmp13_;
		g4_music_library_overwrite_albums_to (_tmp11_, _tmp14_);
	} else {
		gboolean _tmp15_ = FALSE;
		GtkWidget* _tmp16_;
		G4Stack* _tmp17_;
		GtkWidget* _tmp18_;
		GtkWidget* _tmp19_;
		_tmp16_ = child;
		_tmp17_ = self->priv->_artist_stack;
		_tmp18_ = g4_stack_get_widget (_tmp17_);
		_tmp19_ = _tmp18_;
		if (_tmp16_ == _tmp19_) {
			GtkBitset* _tmp20_;
			_tmp20_ = self->priv->_changing_stacks;
			_tmp15_ = gtk_bitset_remove (_tmp20_, G4_STACK_FLAGS_ARTISTS);
		} else {
			_tmp15_ = FALSE;
		}
		if (_tmp15_) {
			G4Stack* _tmp21_;
			G4MusicLibrary* _tmp22_;
			G4MusicList* _tmp23_;
			GListStore* _tmp24_;
			GListStore* _tmp25_;
			_tmp21_ = self->priv->_artist_stack;
			g4_store_panel_update_stack_pages (self, _tmp21_);
			_tmp22_ = self->priv->_library;
			_tmp23_ = self->priv->_artist_list;
			_tmp24_ = g4_music_list_get_data_store (_tmp23_);
			_tmp25_ = _tmp24_;
			g4_music_library_overwrite_artists_to (_tmp22_, _tmp25_);
		} else {
			gboolean _tmp26_ = FALSE;
			GtkWidget* _tmp27_;
			G4Stack* _tmp28_;
			GtkWidget* _tmp29_;
			GtkWidget* _tmp30_;
			_tmp27_ = child;
			_tmp28_ = self->priv->_playlist_stack;
			_tmp29_ = g4_stack_get_widget (_tmp28_);
			_tmp30_ = _tmp29_;
			if (_tmp27_ == _tmp30_) {
				GtkBitset* _tmp31_;
				_tmp31_ = self->priv->_changing_stacks;
				_tmp26_ = gtk_bitset_remove (_tmp31_, G4_STACK_FLAGS_PLAYLISTS);
			} else {
				_tmp26_ = FALSE;
			}
			if (_tmp26_) {
				G4Stack* _tmp32_;
				gchar* text = NULL;
				G4Application* _tmp33_;
				const gchar* _tmp34_;
				const gchar* _tmp35_;
				gchar* _tmp36_;
				gchar* _tmp37_;
				gchar* _tmp38_;
				gchar* _tmp39_;
				G4MusicLibrary* _tmp40_;
				G4MusicList* _tmp41_;
				GListStore* _tmp42_;
				GListStore* _tmp43_;
				G4MusicList* _tmp44_;
				const gchar* _tmp45_;
				_tmp32_ = self->priv->_playlist_stack;
				g4_store_panel_update_stack_pages (self, _tmp32_);
				_tmp33_ = self->priv->_app;
				_tmp34_ = g4_application_get_music_folder (_tmp33_);
				_tmp35_ = _tmp34_;
				_tmp36_ = g4_get_display_name (_tmp35_);
				_tmp37_ = _tmp36_;
				_tmp38_ = g_strdup_printf (_ ("No playlist found in %s"), _tmp37_);
				_tmp39_ = _tmp38_;
				_g_free0 (_tmp37_);
				text = _tmp39_;
				_tmp40_ = self->priv->_library;
				_tmp41_ = self->priv->_playlist_list;
				_tmp42_ = g4_music_list_get_data_store (_tmp41_);
				_tmp43_ = _tmp42_;
				g4_music_library_overwrite_playlists_to (_tmp40_, _tmp43_);
				_tmp44_ = self->priv->_playlist_list;
				_tmp45_ = text;
				g4_music_list_set_empty_text (_tmp44_, _tmp45_);
				_g_free0 (text);
			}
		}
	}
	self->priv->_updating_store = FALSE;
	_g_object_unref0 (child);
}

G4MusicList*
g4_store_panel_get_current_list (G4StorePanel* self)
{
	G4MusicList* result;
	G4MusicList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_current_list;
	result = _tmp0_;
	return result;
}

gboolean
g4_store_panel_get_modified (G4StorePanel* self)
{
	gboolean result;
	G4MusicList* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_current_list;
	_tmp1_ = g4_music_list_get_modified (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
g4_store_panel_set_modified (G4StorePanel* self,
                             gboolean value)
{
	GtkLabel* _tmp0_;
	G4MusicList* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkRoot* _tmp4_;
	GtkRoot* _tmp5_;
	G4MusicList* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->indicator;
	_tmp1_ = self->priv->_current_list;
	_tmp2_ = g4_music_list_get_modified (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp3_);
	_tmp4_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->_current_list;
	_tmp7_ = g4_music_list_get_modified (_tmp6_);
	_tmp8_ = _tmp7_;
	gtk_widget_action_set_enabled ((GtkWidget*) _tmp5_, G4_ACTION_WIN G4_ACTION_SAVE_LIST, _tmp8_);
	g_object_notify_by_pspec ((GObject *) self, g4_store_panel_properties[G4_STORE_PANEL_MODIFIED_PROPERTY]);
}

guint
g4_store_panel_get_sort_mode (G4StorePanel* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_sort_mode;
	return result;
}

void
g4_store_panel_set_sort_mode (G4StorePanel* self,
                              guint value)
{
	G4MainMusicList* _tmp2_;
	g_return_if_fail (self != NULL);
	self->priv->_sort_mode = value;
	if (value < ((guint) G_N_ELEMENTS (G4_SORT_MODE_ICONS))) {
		GtkMenuButton* _tmp0_;
		const gchar* _tmp1_;
		_tmp0_ = self->priv->sort_btn;
		_tmp1_ = G4_SORT_MODE_ICONS[value];
		gtk_menu_button_set_icon_name (_tmp0_, _tmp1_);
	}
	_tmp2_ = self->priv->_main_list;
	if (gtk_widget_get_height ((GtkWidget*) _tmp2_) > 0) {
		G4MainMusicList* _tmp3_;
		_tmp3_ = self->priv->_main_list;
		g4_music_list_create_factory ((G4MusicList*) _tmp3_);
	}
	g_object_notify_by_pspec ((GObject *) self, g4_store_panel_properties[G4_STORE_PANEL_SORT_MODE_PROPERTY]);
}

void
g4_store_panel_set_visible_child (G4StorePanel* self,
                                  GtkWidget* value)
{
	GtkStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	if (self->priv->_size_allocated) {
		g4_store_panel_update_visible_stack (self);
	}
	g4_store_panel_save_if_modified (self, TRUE, NULL, NULL);
	_tmp0_ = self->priv->stack_view;
	_tmp1_ = gtk_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (value == _tmp2_) {
		G4Stack* stack = NULL;
		G4Stack* _tmp3_;
		G4Stack* _tmp4_;
		_tmp3_ = g4_store_panel_get_current_stack (self);
		stack = _tmp3_;
		_tmp4_ = stack;
		if (_tmp4_ != NULL) {
			G4Stack* _tmp5_;
			GtkWidget* _tmp6_;
			GtkWidget* _tmp7_;
			_tmp5_ = stack;
			_tmp6_ = g4_stack_get_visible_child (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G4_TYPE_STACK, G4Stack));
			_tmp7_ = _tmp6_;
			value = _tmp7_;
		}
		_g_object_unref0 (stack);
	}
	if (G4_IS_MUSIC_LIST (value)) {
		G4MusicList* list = NULL;
		G4MusicList* _tmp8_;
		G4MusicList* _tmp9_;
		G4MusicList* _tmp10_;
		GtkLabel* _tmp11_;
		G4MusicList* _tmp12_;
		gboolean _tmp13_;
		gboolean _tmp14_;
		GtkMenuButton* _tmp15_;
		G4MusicList* _tmp16_;
		G4MainMusicList* _tmp17_;
		gboolean scroll = FALSE;
		GHashTable* _tmp18_;
		G4MusicList* _tmp19_;
		_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (value, G4_TYPE_MUSIC_LIST, G4MusicList));
		_g_object_unref0 (self->priv->_current_list);
		self->priv->_current_list = _tmp8_;
		_tmp9_ = self->priv->_current_list;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		list = _tmp10_;
		_tmp11_ = self->indicator;
		_tmp12_ = self->priv->_current_list;
		_tmp13_ = g4_music_list_get_modified (_tmp12_);
		_tmp14_ = _tmp13_;
		gtk_widget_set_visible ((GtkWidget*) _tmp11_, _tmp14_);
		_tmp15_ = self->priv->sort_btn;
		_tmp16_ = self->priv->_current_list;
		_tmp17_ = self->priv->_main_list;
		gtk_widget_set_visible ((GtkWidget*) _tmp15_, _tmp16_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, G4_TYPE_MUSIC_LIST, G4MusicList));
		self->priv->_search_mode = G4_SEARCH_MODE_ANY;
		g4_store_panel_on_search_btn_toggled (self);
		_tmp18_ = self->priv->_overlayed_lists;
		_tmp19_ = list;
		scroll = !g_hash_table_remove (_tmp18_, _tmp19_);
		g4_store_panel_set_to_current_music (self, scroll);
		_g_object_unref0 (list);
	}
	g4_store_panel_save_current_page (self);
	g_object_notify_by_pspec ((GObject *) self, g4_store_panel_properties[G4_STORE_PANEL_VISIBLE_CHILD_PROPERTY]);
}

static void
g4_store_panel_class_init (G4StorePanelClass * klass,
                           gpointer klass_data)
{
	g4_store_panel_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &G4StorePanel_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_g4_store_panel_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_g4_store_panel_set_property;
	G_OBJECT_CLASS (klass)->finalize = g4_store_panel_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_STORE_PANEL_CURRENT_LIST_PROPERTY, g4_store_panel_properties[G4_STORE_PANEL_CURRENT_LIST_PROPERTY] = g_param_spec_object ("current-list", "current-list", "current-list", G4_TYPE_MUSIC_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_STORE_PANEL_MODIFIED_PROPERTY, g4_store_panel_properties[G4_STORE_PANEL_MODIFIED_PROPERTY] = g_param_spec_boolean ("modified", "modified", "modified", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_STORE_PANEL_SORT_MODE_PROPERTY, g4_store_panel_properties[G4_STORE_PANEL_SORT_MODE_PROPERTY] = g_param_spec_uint ("sort-mode", "sort-mode", "sort-mode", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_STORE_PANEL_VISIBLE_CHILD_PROPERTY, g4_store_panel_properties[G4_STORE_PANEL_VISIBLE_CHILD_PROPERTY] = g_param_spec_object ("visible-child", "visible-child", "visible-child", gtk_widget_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/neithern/g4music/gtk/store-panel.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header_bar", FALSE, G_STRUCT_OFFSET (G4StorePanel, header_bar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "indicator", FALSE, G_STRUCT_OFFSET (G4StorePanel, indicator));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sort_btn", FALSE, G4StorePanel_private_offset + G_STRUCT_OFFSET (G4StorePanelPrivate, sort_btn));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_btn", FALSE, G4StorePanel_private_offset + G_STRUCT_OFFSET (G4StorePanelPrivate, search_btn));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_bar", FALSE, G4StorePanel_private_offset + G_STRUCT_OFFSET (G4StorePanelPrivate, search_bar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_entry", FALSE, G4StorePanel_private_offset + G_STRUCT_OFFSET (G4StorePanelPrivate, search_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack_view", FALSE, G4StorePanel_private_offset + G_STRUCT_OFFSET (G4StorePanelPrivate, stack_view));
}

static void
g4_store_panel_g4_size_watcher_interface_init (G4SizeWatcherIface * iface,
                                               gpointer iface_data)
{
	g4_store_panel_g4_size_watcher_parent_iface = g_type_interface_peek_parent (iface);
	iface->first_allocated = (void (*) (G4SizeWatcher*)) g4_store_panel_real_first_allocated;
	iface->size_to_change = (void (*) (G4SizeWatcher*, gint, gint)) g4_store_panel_real_size_to_change;
}

static void
g4_store_panel_instance_init (G4StorePanel * self,
                              gpointer klass)
{
	G4Stack* _tmp0_;
	G4Stack* _tmp1_;
	G4Stack* _tmp2_;
	G4MiniBar* _tmp3_;
	GtkStackSwitcher* _tmp4_;
	GtkStackSwitcher* _tmp5_;
	gchar* _tmp6_;
	GHashFunc _tmp7_;
	GEqualFunc _tmp8_;
	GHashTable* _tmp9_;
	GtkBitset* _tmp10_;
	self->priv = g4_store_panel_get_instance_private (self);
	_tmp0_ = g4_stack_new (FALSE);
	self->priv->_album_stack = _tmp0_;
	_tmp1_ = g4_stack_new (FALSE);
	self->priv->_artist_stack = _tmp1_;
	_tmp2_ = g4_stack_new (FALSE);
	self->priv->_playlist_stack = _tmp2_;
	_tmp3_ = g4_mini_bar_new ();
	g_object_ref_sink (_tmp3_);
	self->priv->_mini_bar = _tmp3_;
	_tmp4_ = (GtkStackSwitcher*) gtk_stack_switcher_new ();
	g_object_ref_sink (_tmp4_);
	self->priv->_switcher_top = _tmp4_;
	_tmp5_ = (GtkStackSwitcher*) gtk_stack_switcher_new ();
	g_object_ref_sink (_tmp5_);
	self->priv->_switcher_btm = _tmp5_;
	self->priv->_library_uri = NULL;
	self->priv->_search_mode = G4_SEARCH_MODE_ANY;
	_tmp6_ = g_strdup ("");
	self->priv->_search_text = _tmp6_;
	self->priv->_size_allocated = FALSE;
	self->priv->_sort_mode = (guint) -1;
	self->priv->_updating_store = FALSE;
	_tmp7_ = g_direct_hash;
	_tmp8_ = g_direct_equal;
	_tmp9_ = g_hash_table_new_full (_tmp7_, _tmp8_, NULL, NULL);
	self->priv->_overlayed_lists = _tmp9_;
	_tmp10_ = gtk_bitset_new_empty ();
	self->priv->_changing_stacks = _tmp10_;
	self->priv->_album_key_of_list = NULL;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
g4_store_panel_finalize (GObject * obj)
{
	G4StorePanel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, G4_TYPE_STORE_PANEL, G4StorePanel);
	_g_object_unref0 (self->priv->_album_stack);
	_g_object_unref0 (self->priv->_artist_stack);
	_g_object_unref0 (self->priv->_playlist_stack);
	_g_object_unref0 (self->priv->_mini_bar);
	_g_object_unref0 (self->priv->_switcher_top);
	_g_object_unref0 (self->priv->_switcher_btm);
	_g_object_unref0 (self->priv->_app);
	_g_object_unref0 (self->priv->_album_list);
	_g_object_unref0 (self->priv->_artist_list);
	_g_object_unref0 (self->priv->_current_list);
	_g_object_unref0 (self->priv->_main_list);
	_g_object_unref0 (self->priv->_playlist_list);
	_g_object_unref0 (self->priv->_library);
	_g_free0 (self->priv->_library_uri);
	_g_object_unref0 (self->priv->_loading_paintable);
	_g_free0 (self->priv->_search_text);
	_g_hash_table_unref0 (self->priv->_overlayed_lists);
	_gtk_bitset_unref0 (self->priv->_changing_stacks);
	_g_free0 (self->priv->_album_key_of_list);
	G_OBJECT_CLASS (g4_store_panel_parent_class)->finalize (obj);
}

static GType
g4_store_panel_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (G4StorePanelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) g4_store_panel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (G4StorePanel), 0, (GInstanceInitFunc) g4_store_panel_instance_init, NULL };
	static const GInterfaceInfo g4_size_watcher_info = { (GInterfaceInitFunc) g4_store_panel_g4_size_watcher_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType g4_store_panel_type_id;
	g4_store_panel_type_id = g_type_register_static (gtk_box_get_type (), "G4StorePanel", &g_define_type_info, 0);
	g_type_add_interface_static (g4_store_panel_type_id, G4_TYPE_SIZE_WATCHER, &g4_size_watcher_info);
	G4StorePanel_private_offset = g_type_add_instance_private (g4_store_panel_type_id, sizeof (G4StorePanelPrivate));
	return g4_store_panel_type_id;
}

GType
g4_store_panel_get_type (void)
{
	static volatile gsize g4_store_panel_type_id__once = 0;
	if (g_once_init_enter (&g4_store_panel_type_id__once)) {
		GType g4_store_panel_type_id;
		g4_store_panel_type_id = g4_store_panel_get_type_once ();
		g_once_init_leave (&g4_store_panel_type_id__once, g4_store_panel_type_id);
	}
	return g4_store_panel_type_id__once;
}

static void
_vala_g4_store_panel_get_property (GObject * object,
                                   guint property_id,
                                   GValue * value,
                                   GParamSpec * pspec)
{
	G4StorePanel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, G4_TYPE_STORE_PANEL, G4StorePanel);
	switch (property_id) {
		case G4_STORE_PANEL_CURRENT_LIST_PROPERTY:
		g_value_set_object (value, g4_store_panel_get_current_list (self));
		break;
		case G4_STORE_PANEL_MODIFIED_PROPERTY:
		g_value_set_boolean (value, g4_store_panel_get_modified (self));
		break;
		case G4_STORE_PANEL_SORT_MODE_PROPERTY:
		g_value_set_uint (value, g4_store_panel_get_sort_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_g4_store_panel_set_property (GObject * object,
                                   guint property_id,
                                   const GValue * value,
                                   GParamSpec * pspec)
{
	G4StorePanel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, G4_TYPE_STORE_PANEL, G4StorePanel);
	switch (property_id) {
		case G4_STORE_PANEL_MODIFIED_PROPERTY:
		g4_store_panel_set_modified (self, g_value_get_boolean (value));
		break;
		case G4_STORE_PANEL_SORT_MODE_PROPERTY:
		g4_store_panel_set_sort_mode (self, g_value_get_uint (value));
		break;
		case G4_STORE_PANEL_VISIBLE_CHILD_PROPERTY:
		g4_store_panel_set_visible_child (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
g4_fix_switcher_style (GtkStackSwitcher* switcher)
{
	GtkBoxLayout* layout = NULL;
	GtkLayoutManager* _tmp0_;
	GtkBoxLayout* _tmp1_;
	GtkBoxLayout* _tmp2_ = NULL;
	GtkBoxLayout* _tmp3_;
	g_return_if_fail (switcher != NULL);
	_tmp0_ = gtk_widget_get_layout_manager ((GtkWidget*) switcher);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_box_layout_get_type ()) ? ((GtkBoxLayout*) _tmp0_) : NULL);
	layout = _tmp1_;
	_tmp3_ = layout;
	_tmp2_ = _tmp3_;
	if (_tmp2_ != NULL) {
		gtk_box_layout_set_spacing (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_box_layout_get_type (), GtkBoxLayout), (guint) 4);
	}
	gtk_widget_remove_css_class ((GtkWidget*) switcher, "linked");
	{
		GtkWidget* child = NULL;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp4_ = gtk_widget_get_first_child ((GtkWidget*) switcher);
		_tmp5_ = _g_object_ref0 (_tmp4_);
		child = _tmp5_;
		{
			gboolean _tmp6_ = FALSE;
			_tmp6_ = TRUE;
			while (TRUE) {
				GtkWidget* _tmp12_;
				GtkWidget* _tmp13_ = NULL;
				GtkWidget* _tmp14_;
				GtkWidget* _tmp15_;
				if (!_tmp6_) {
					GtkWidget* _tmp7_ = NULL;
					GtkWidget* _tmp8_;
					GtkWidget* _tmp9_ = NULL;
					GtkWidget* _tmp11_;
					_tmp8_ = child;
					_tmp7_ = _tmp8_;
					_tmp9_ = NULL;
					if (_tmp7_ != NULL) {
						GtkWidget* _tmp10_;
						_tmp10_ = gtk_widget_get_next_sibling (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
						_tmp9_ = _tmp10_;
					}
					_tmp11_ = _g_object_ref0 (_tmp9_);
					_g_object_unref0 (child);
					child = _tmp11_;
				}
				_tmp6_ = FALSE;
				_tmp12_ = child;
				if (!(_tmp12_ != NULL)) {
					break;
				}
				_tmp14_ = child;
				_tmp13_ = _tmp14_;
				if (_tmp13_ != NULL) {
					gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget), "flat");
				}
				_tmp15_ = child;
				g_object_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget), "width-request", 48, NULL);
			}
		}
		_g_object_unref0 (child);
	}
	_g_object_unref0 (layout);
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

void
g4_parse_search_mode (gchar** text,
                      guint* mode)
{
	g_return_if_fail (*text != NULL);
	if (g_ascii_strncasecmp (*text, "album:", (gsize) 6) == 0) {
		gchar* _tmp0_;
		*mode = G4_SEARCH_MODE_ALBUM;
		_tmp0_ = string_substring (*text, (glong) 6, (glong) -1);
		_g_free0 (*text);
		*text = _tmp0_;
	} else {
		if (g_ascii_strncasecmp (*text, "artist:", (gsize) 7) == 0) {
			gchar* _tmp1_;
			*mode = G4_SEARCH_MODE_ARTIST;
			_tmp1_ = string_substring (*text, (glong) 7, (glong) -1);
			_g_free0 (*text);
			*text = _tmp1_;
		} else {
			if (g_ascii_strncasecmp (*text, "title:", (gsize) 6) == 0) {
				gchar* _tmp2_;
				*mode = G4_SEARCH_MODE_TITLE;
				_tmp2_ = string_substring (*text, (glong) 6, (glong) -1);
				_g_free0 (*text);
				*text = _tmp2_;
			}
		}
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

