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

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <adwaita.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <gst/gst.h>
#include <glib/gi18n-lib.h>
#include <errno.h>

#define G4_ACTION_APP "app."
#define G4_ACTION_ABOUT "about"
#define G4_ACTION_PREFS "preferences"
#define G4_ACTION_ADD_TO_PLAYLIST "add-to-playlist"
#define G4_ACTION_ADD_TO_QUEUE "add-to-queue"
#define G4_ACTION_EXPORT_COVER "export-cover"
#define G4_ACTION_PLAY "play"
#define G4_ACTION_PLAY_AT_NEXT "play-at-next"
#define G4_ACTION_PLAY_PAUSE "play-pause"
#define G4_ACTION_PREV "prev"
#define G4_ACTION_NEXT "next"
#define G4_ACTION_RANDOM_PLAY "random-play"
#define G4_ACTION_RELOAD "reload"
#define G4_ACTION_REMOVE "remove"
#define G4_ACTION_SAVE_LIST "save-list"
#define G4_ACTION_SCHEME "scheme"
#define G4_ACTION_SHOW_FILE "show-file"
#define G4_ACTION_SHOW_TAGS "show-tags"
#define G4_ACTION_SHOW_TAGS_CURRENT "show-cur-tags"
#define G4_ACTION_SORT "sort"
#define G4_ACTION_TOGGLE_SORT "toggle-sort"
#define G4_ACTION_TRASH_FILE "trash-file"
#define G4_ACTION_QUIT "quit"
#define G4_ACTION_WIN "win."
#define G4_ACTION_BUTTON "button"
#define G4_ACTION_SEARCH "search"
#define G4_ACTION_SELECT "select"
#define G4_ACTION_TOGGLE_SEARCH "toggle-search"
#define G4_LIBRARY_SCHEME "library://"
#define G4_SORT_MODE_MAX ((guint) 5)
#define G4_SORT_MODE_ALBUM ((guint) 0)
#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_ACTION_SHORT_KEY (g4_action_short_key_get_type ())
typedef struct _G4ActionShortKey G4ActionShortKey;

#define G4_TYPE_ACTION_HANDLES (g4_action_handles_get_type ())
#define G4_ACTION_HANDLES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_ACTION_HANDLES, G4ActionHandles))
#define G4_ACTION_HANDLES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_ACTION_HANDLES, G4ActionHandlesClass))
#define G4_IS_ACTION_HANDLES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_ACTION_HANDLES))
#define G4_IS_ACTION_HANDLES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_ACTION_HANDLES))
#define G4_ACTION_HANDLES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_ACTION_HANDLES, G4ActionHandlesClass))

typedef struct _G4ActionHandles G4ActionHandles;
typedef struct _G4ActionHandlesClass G4ActionHandlesClass;
typedef struct _G4ActionHandlesPrivate G4ActionHandlesPrivate;

#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_PORTAL (g4_portal_get_type ())
#define G4_PORTAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_PORTAL, G4Portal))
#define G4_PORTAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_PORTAL, G4PortalClass))
#define G4_IS_PORTAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_PORTAL))
#define G4_IS_PORTAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_PORTAL))
#define G4_PORTAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_PORTAL, G4PortalClass))

typedef struct _G4Portal G4Portal;
typedef struct _G4PortalClass G4PortalClass;

#define G4_TYPE_PREFERENCES_WINDOW (g4_preferences_window_get_type ())
#define G4_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_PREFERENCES_WINDOW, G4PreferencesWindow))
#define G4_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_PREFERENCES_WINDOW, G4PreferencesWindowClass))
#define G4_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_PREFERENCES_WINDOW))
#define G4_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_PREFERENCES_WINDOW))
#define G4_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_PREFERENCES_WINDOW, G4PreferencesWindowClass))

typedef struct _G4PreferencesWindow G4PreferencesWindow;
typedef struct _G4PreferencesWindowClass G4PreferencesWindowClass;
enum  {
	G4_ACTION_HANDLES_0_PROPERTY,
	G4_ACTION_HANDLES_PORTAL_PROPERTY,
	G4_ACTION_HANDLES_NUM_PROPERTIES
};
static GParamSpec* g4_action_handles_properties[G4_ACTION_HANDLES_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g4_portal_unref0(var) ((var == NULL) ? NULL : (var = (g4_portal_unref (var), NULL)))
typedef void (*GSimpleActionActivateCallback) (GSimpleAction* action, GVariant* parameter, gpointer user_data);
#define _g_free0(var) (var = (g_free (var), NULL))

#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;
typedef struct _Block1Data Block1Data;
typedef struct _G4MusicPrivate G4MusicPrivate;
typedef gpointer (*G4TaskFunc) (gpointer user_data);
#define _gst_sample_unref0(var) ((var == NULL) ? NULL : (var = (gst_sample_unref (var), NULL)))
#define _gst_tag_list_unref0(var) ((var == NULL) ? NULL : (var = (gst_tag_list_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_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;
typedef struct _G4ActionHandlesExportCoverAsyncData G4ActionHandlesExportCoverAsyncData;

#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;

#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_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;

#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 _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (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;

#define G4_TYPE_DIALOG (g4_dialog_get_type ())
#define G4_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_DIALOG, G4Dialog))
#define G4_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_DIALOG, G4DialogClass))
#define G4_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_DIALOG))
#define G4_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_DIALOG))
#define G4_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_DIALOG, G4DialogClass))

typedef struct _G4Dialog G4Dialog;
typedef struct _G4DialogClass G4DialogClass;

#define G4_TYPE_TAG_LIST_DIALOG (g4_tag_list_dialog_get_type ())
#define G4_TAG_LIST_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G4_TYPE_TAG_LIST_DIALOG, G4TagListDialog))
#define G4_TAG_LIST_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G4_TYPE_TAG_LIST_DIALOG, G4TagListDialogClass))
#define G4_IS_TAG_LIST_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G4_TYPE_TAG_LIST_DIALOG))
#define G4_IS_TAG_LIST_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G4_TYPE_TAG_LIST_DIALOG))
#define G4_TAG_LIST_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G4_TYPE_TAG_LIST_DIALOG, G4TagListDialogClass))

typedef struct _G4TagListDialog G4TagListDialog;
typedef struct _G4TagListDialogClass G4TagListDialogClass;
typedef struct _Block2Data Block2Data;

struct _G4ActionShortKey {
	const gchar* name;
	const gchar* key;
};

struct _G4ActionHandles {
	GObject parent_instance;
	G4ActionHandlesPrivate * priv;
};

struct _G4ActionHandlesClass {
	GObjectClass parent_class;
};

struct _G4ActionHandlesPrivate {
	G4Application* _app;
	G4Portal* _portal;
	G4PreferencesWindow* _pref_window;
};

struct _Block1Data {
	int _ref_count_;
	G4ActionHandles* self;
	GFile* file;
};

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 _G4ActionHandlesExportCoverAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	G4ActionHandles* self;
	G4Music* music;
	GstSample* cover;
	G4Application* _tmp0_;
	GstSample* _tmp1_;
	GstSample* _tmp2_;
	GstSample* _tmp3_;
	gboolean _tmp4_;
	GstSample* _tmp5_;
	G4Application* _tmp6_;
	G4Music* _tmp7_;
	G4Music* _tmp8_;
	Block1Data* _data1_;
	const gchar* _tmp9_;
	GFile* _tmp10_;
	gpointer _tmp11_;
	GstSample* _tmp12_;
	GstSample* sample;
	GstSample* _tmp13_;
	GstSample* _tmp14_;
	GstCaps* _tmp15_;
	GstSample* _tmp16_;
	GstCaps* _tmp17_;
	GstStructure* _tmp18_;
	GstStructure* _tmp19_;
	GstStructure* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* itype;
	gchar* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gint* _tmp26_;
	gint _tmp27_;
	gint* _tmp28_;
	gint* _tmp29_;
	gint* _tmp30_;
	gint _tmp31_;
	gint* _tmp32_;
	gint pos;
	gint* _tmp33_;
	gint _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* ext;
	gchar* _tmp42_;
	gchar* name;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	const gchar* _tmp49_;
	gchar* _tmp50_;
	gchar* _tmp51_;
	GtkFileFilter* filter;
	GtkFileFilter* _tmp52_;
	GtkFileFilter* _tmp53_;
	GtkFileFilter* _tmp54_;
	GFile* initial;
	const gchar* _tmp55_;
	GFile* _tmp56_;
	GFile* file;
	G4Application* _tmp57_;
	GtkWindow* _tmp58_;
	GtkWindow* _tmp59_;
	GFile* _tmp60_;
	GtkFileFilter* _tmp61_;
	GtkFileFilter* _tmp62_;
	GtkFileFilter** _tmp63_;
	GtkFileFilter** _tmp64_;
	gint _tmp64__length1;
	GFile* _tmp65_;
	GFile* _tmp66_;
	GFile* _tmp67_;
	gboolean saved;
	GFile* _tmp68_;
	GstSample* _tmp69_;
	G4Window* _tmp70_;
	G4Application* _tmp71_;
	GtkWindow* _tmp72_;
	GtkWindow* _tmp73_;
	const gchar* _tmp74_;
	gchar* _tmp75_;
	GFile* _tmp76_;
	GFile* _tmp77_;
	gchar* _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
};

struct _Block2Data {
	int _ref_count_;
	G4ActionHandles* self;
	gchar* uri;
};

static gint G4ActionHandles_private_offset;
static gpointer g4_action_handles_parent_class = NULL;

VALA_EXTERN GType g4_action_short_key_get_type (void) G_GNUC_CONST ;
VALA_EXTERN G4ActionShortKey* g4_action_short_key_dup (const G4ActionShortKey* self);
VALA_EXTERN void g4_action_short_key_free (G4ActionShortKey* self);
VALA_EXTERN GType g4_action_handles_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4ActionHandles, 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 gpointer g4_portal_ref (gpointer instance);
VALA_EXTERN void g4_portal_unref (gpointer instance);
VALA_EXTERN GParamSpec* g4_param_spec_portal (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void g4_value_set_portal (GValue* value,
                          gpointer v_object);
VALA_EXTERN void g4_value_take_portal (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer g4_value_get_portal (const GValue* value);
VALA_EXTERN GType g4_portal_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Portal, g4_portal_unref)
VALA_EXTERN GType g4_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4PreferencesWindow, g_object_unref)
VALA_EXTERN G4Portal* g4_portal_new (const gchar* parent);
VALA_EXTERN G4Portal* g4_portal_construct (GType object_type,
                               const gchar* parent);
VALA_EXTERN G4ActionHandles* g4_action_handles_new (G4Application* app);
VALA_EXTERN G4ActionHandles* g4_action_handles_construct (GType object_type,
                                              G4Application* app);
static void __lambda145_ (G4ActionHandles* self);
VALA_EXTERN void g4_show_about_dialog (G4Application* app);
static void ___lambda145__gsimple_action_activate_callback (GSimpleAction* action,
                                                     GVariant* parameter,
                                                     gpointer self);
static void g4_action_handles_add_to_playlist (G4ActionHandles* self,
                                        GSimpleAction* action,
                                        GVariant* parameter);
static void _g4_action_handles_add_to_playlist_gsimple_action_activate_callback (GSimpleAction* action,
                                                                          GVariant* parameter,
                                                                          gpointer self);
static void g4_action_handles_play_or_queue (G4ActionHandles* self,
                                      GSimpleAction* action,
                                      GVariant* parameter);
static void _g4_action_handles_play_or_queue_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self);
static void g4_action_handles_export_cover (G4ActionHandles* self,
                                     GSimpleAction* action,
                                     GVariant* parameter);
static void _g4_action_handles_export_cover_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self);
static void __lambda150_ (G4ActionHandles* self);
VALA_EXTERN void g4_application_play_next (G4Application* self);
static void ___lambda150__gsimple_action_activate_callback (GSimpleAction* action,
                                                     GVariant* parameter,
                                                     gpointer self);
static void g4_action_handles_play_at_next (G4ActionHandles* self,
                                     GSimpleAction* action,
                                     GVariant* parameter);
static void _g4_action_handles_play_at_next_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self);
static void __lambda151_ (G4ActionHandles* self);
VALA_EXTERN void g4_application_play_pause (G4Application* self);
static void ___lambda151__gsimple_action_activate_callback (GSimpleAction* action,
                                                     GVariant* parameter,
                                                     gpointer self);
static void __lambda152_ (G4ActionHandles* self);
VALA_EXTERN void g4_application_play_previous (G4Application* self);
static void ___lambda152__gsimple_action_activate_callback (GSimpleAction* action,
                                                     GVariant* parameter,
                                                     gpointer self);
static void g4_action_handles_show_preferences (G4ActionHandles* self);
static void _g4_action_handles_show_preferences_gsimple_action_activate_callback (GSimpleAction* action,
                                                                           GVariant* parameter,
                                                                           gpointer self);
static void __lambda154_ (G4ActionHandles* self);
VALA_EXTERN void g4_application_reload_library (G4Application* self);
static void ___lambda154__gsimple_action_activate_callback (GSimpleAction* action,
                                                     GVariant* parameter,
                                                     gpointer self);
static void g4_action_handles_scheme (G4ActionHandles* self,
                               GSimpleAction* action,
                               GVariant* state);
static void _g4_action_handles_scheme_gsimple_action_activate_callback (GSimpleAction* action,
                                                                 GVariant* parameter,
                                                                 gpointer self);
static void g4_action_handles_show_file (G4ActionHandles* self,
                                  GSimpleAction* action,
                                  GVariant* parameter);
static void _g4_action_handles_show_file_gsimple_action_activate_callback (GSimpleAction* action,
                                                                    GVariant* parameter,
                                                                    gpointer self);
static void g4_action_handles_show_tags (G4ActionHandles* self,
                                  GSimpleAction* action,
                                  GVariant* parameter);
static void _g4_action_handles_show_tags_gsimple_action_activate_callback (GSimpleAction* action,
                                                                    GVariant* parameter,
                                                                    gpointer self);
static void g4_action_handles_sort_by (G4ActionHandles* self,
                                GSimpleAction* action,
                                GVariant* state);
static void _g4_action_handles_sort_by_gsimple_action_activate_callback (GSimpleAction* action,
                                                                  GVariant* parameter,
                                                                  gpointer self);
static void g4_action_handles_toggle_sort (G4ActionHandles* self);
static void _g4_action_handles_toggle_sort_gsimple_action_activate_callback (GSimpleAction* action,
                                                                      GVariant* parameter,
                                                                      gpointer self);
static void g4_action_handles_trash_file (G4ActionHandles* self,
                                   GSimpleAction* action,
                                   GVariant* parameter);
static void _g4_action_handles_trash_file_gsimple_action_activate_callback (GSimpleAction* action,
                                                                     GVariant* parameter,
                                                                     gpointer self);
static void __lambda160_ (G4ActionHandles* self);
static void ___lambda160__gsimple_action_activate_callback (GSimpleAction* action,
                                                     GVariant* parameter,
                                                     gpointer self);
static void _g4_action_handles_export_cover_async_data_free (gpointer _data);
VALA_EXTERN GType g4_music_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Music, g_object_unref)
static void _g4_action_handles_export_cover_async (G4ActionHandles* self,
                                            G4Music* music,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static void _g4_action_handles_export_cover_finish (G4ActionHandles* self,
                                             GAsyncResult* _res_);
static gboolean _g4_action_handles_export_cover_async_co (G4ActionHandlesExportCoverAsyncData* _data_);
VALA_EXTERN GstSample* g4_application_get_current_cover (G4Application* self);
VALA_EXTERN G4Music* g4_application_get_current_music (G4Application* self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
VALA_EXTERN void g4_run_async (GType v_type,
                   GBoxedCopyFunc v_dup_func,
                   GDestroyNotify v_destroy_func,
                   G4TaskFunc task,
                   gpointer task_target,
                   gboolean front,
                   gboolean in_single_pool,
                   GAsyncReadyCallback _callback_,
                   gpointer _user_data_);
VALA_EXTERN gpointer g4_run_finish (GAsyncResult* _res_);
static GstSample* ___lambda148_ (Block1Data* _data1_);
VALA_EXTERN GstTagList* g4_parse_gst_tags (GFile* file);
VALA_EXTERN GstSample* g4_parse_image_from_tag_list (GstTagList* tags);
static gpointer ____lambda148__g4_task_func (gpointer self);
static void _g4_action_handles_export_cover_async_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
static gint* _int_dup (gint* self);
VALA_EXTERN gchar* g4_music_get_artist_and_title (G4Music* self);
VALA_EXTERN void g4_show_save_file_dialog (GtkWindow* parent,
                               GFile* initial,
                               GtkFileFilter** filters,
                               gint filters_length1,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_);
VALA_EXTERN GFile* g4_show_save_file_dialog_finish (GAsyncResult* _res_);
VALA_EXTERN void g4_save_sample_to_file_async (GFile* file,
                                   GstSample* sample,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
VALA_EXTERN gboolean g4_save_sample_to_file_finish (GAsyncResult* _res_);
VALA_EXTERN GType g4_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Window, g_object_unref)
VALA_EXTERN void g4_window_show_toast (G4Window* self,
                           const gchar* message,
                           const gchar* uri);
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 G4Playlist* g4_action_handles_parse_playlist_from_music_uri (G4ActionHandles* self,
                                                             const gchar* uri);
VALA_EXTERN void g4_application_show_add_playlist_dialog (G4Application* self,
                                              G4Playlist* playlist,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
VALA_EXTERN void g4_application_show_add_playlist_dialog_finish (G4Application* self,
                                                     GAsyncResult* _res_);
static void ___lambda147_ (G4ActionHandles* self,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda147__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
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 G4Music* g4_music_loader_find_cache (G4MusicLoader* self,
                                     const gchar* uri);
static void ___lambda149_ (G4ActionHandles* self,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda149__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
VALA_EXTERN gboolean g4_parse_library_uri (const gchar* uri_str,
                               gchar** artist,
                               gchar** album,
                               gchar** playlist,
                               gchar** host);
VALA_EXTERN GType g4_music_library_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4MusicLibrary, g_object_unref)
VALA_EXTERN G4MusicLibrary* g4_music_loader_get_library (G4MusicLoader* self);
VALA_EXTERN GType g4_artist_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Artist, g_object_unref)
VALA_EXTERN G4Artist* g4_music_library_get_artist (G4MusicLibrary* self,
                                       const gchar* key);
VALA_EXTERN G4Album* g4_artist_get (G4Artist* self,
                        const gchar* name);
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);
VALA_EXTERN G4Playlist* g4_to_playlist (G4Music** musics,
                            gint musics_length1,
                            const gchar* title);
VALA_EXTERN gboolean g4_application_insert_to_queue (G4Application* self,
                                         G4Playlist* playlist,
                                         guint position,
                                         gboolean play_now);
VALA_EXTERN G4Window* g4_window_get_default (void);
VALA_EXTERN void g4_window_open_page (G4Window* self,
                          const gchar* uri,
                          gboolean play_now,
                          gboolean shuffle);
VALA_EXTERN gint g4_application_insert_after_current (G4Application* self,
                                          G4Playlist* playlist);
VALA_EXTERN GSettings* g4_application_get_settings (G4Application* self);
VALA_EXTERN void g4_portal_open_directory_async (G4Portal* self,
                                     const gchar* uri,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
VALA_EXTERN gboolean g4_portal_open_directory_finish (G4Portal* self,
                                          GAsyncResult* _res_,
                                          GError** error);
static void ____lambda155_ (G4ActionHandles* self,
                     GObject* obj,
                     GAsyncResult* res);
static void _____lambda155__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
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 GstTagList* g4_gst_player_get_tag_list (G4GstPlayer* self);
VALA_EXTERN GType g4_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4Dialog, g_object_unref)
VALA_EXTERN GType g4_tag_list_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (G4TagListDialog, g_object_unref)
VALA_EXTERN G4TagListDialog* g4_tag_list_dialog_new (const gchar* uri,
                                         GstTagList* tags);
VALA_EXTERN G4TagListDialog* g4_tag_list_dialog_construct (GType object_type,
                                               const gchar* uri,
                                               GstTagList* tags);
VALA_EXTERN void g4_dialog_present (G4Dialog* self,
                        GtkWidget* parent);
VALA_EXTERN G4PreferencesWindow* g4_preferences_window_new (G4Application* app);
VALA_EXTERN G4PreferencesWindow* g4_preferences_window_construct (GType object_type,
                                                      G4Application* app);
static gboolean __lambda153_ (G4ActionHandles* self);
static gboolean ___lambda153__gtk_window_close_request (GtkWindow* _sender,
                                                 gpointer self);
VALA_EXTERN void g4_application_set_sort_mode (G4Application* self,
                                   guint value);
VALA_EXTERN guint g4_application_get_sort_mode (G4Application* self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
VALA_EXTERN void g4_portal_trash_file_async (G4Portal* self,
                                 const gchar* uri,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_);
VALA_EXTERN gboolean g4_portal_trash_file_finish (G4Portal* self,
                                      GAsyncResult* _res_,
                                      GError** error);
static void ___lambda158_ (Block2Data* _data2_,
                    GObject* obj,
                    GAsyncResult* res);
VALA_EXTERN void g4_music_loader_on_file_removed (G4MusicLoader* self,
                                      GFile* file,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN void g4_music_loader_on_file_removed_finish (G4MusicLoader* self,
                                             GAsyncResult* _res_);
static void ____lambda159_ (G4ActionHandles* self,
                     GObject* obj,
                     GAsyncResult* res);
static void _____lambda159__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static void ____lambda158__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
VALA_EXTERN G4Portal* g4_action_handles_get_portal (G4ActionHandles* self);
static void g4_action_handles_finalize (GObject * obj);
static GType g4_action_handles_get_type_once (void);
static void _vala_g4_action_handles_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

G4ActionShortKey*
g4_action_short_key_dup (const G4ActionShortKey* self)
{
	G4ActionShortKey* dup;
	dup = g_new0 (G4ActionShortKey, 1);
	memcpy (dup, self, sizeof (G4ActionShortKey));
	return dup;
}

void
g4_action_short_key_free (G4ActionShortKey* self)
{
	g_free (self);
}

static GType
g4_action_short_key_get_type_once (void)
{
	GType g4_action_short_key_type_id;
	g4_action_short_key_type_id = g_boxed_type_register_static ("G4ActionShortKey", (GBoxedCopyFunc) g4_action_short_key_dup, (GBoxedFreeFunc) g4_action_short_key_free);
	return g4_action_short_key_type_id;
}

GType
g4_action_short_key_get_type (void)
{
	static volatile gsize g4_action_short_key_type_id__once = 0;
	if (g_once_init_enter (&g4_action_short_key_type_id__once)) {
		GType g4_action_short_key_type_id;
		g4_action_short_key_type_id = g4_action_short_key_get_type_once ();
		g_once_init_leave (&g4_action_short_key_type_id__once, g4_action_short_key_type_id);
	}
	return g4_action_short_key_type_id__once;
}

static inline gpointer
g4_action_handles_get_instance_private (G4ActionHandles* self)
{
	return G_STRUCT_MEMBER_P (self, G4ActionHandles_private_offset);
}

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

static void
__lambda145_ (G4ActionHandles* self)
{
	G4Application* _tmp0_;
	_tmp0_ = self->priv->_app;
	g4_show_about_dialog (_tmp0_);
}

static void
___lambda145__gsimple_action_activate_callback (GSimpleAction* action,
                                                GVariant* parameter,
                                                gpointer self)
{
	__lambda145_ ((G4ActionHandles*) self);
}

static void
_g4_action_handles_add_to_playlist_gsimple_action_activate_callback (GSimpleAction* action,
                                                                     GVariant* parameter,
                                                                     gpointer self)
{
	g4_action_handles_add_to_playlist ((G4ActionHandles*) self, action, parameter);
}

static void
_g4_action_handles_play_or_queue_gsimple_action_activate_callback (GSimpleAction* action,
                                                                   GVariant* parameter,
                                                                   gpointer self)
{
	g4_action_handles_play_or_queue ((G4ActionHandles*) self, action, parameter);
}

static void
_g4_action_handles_export_cover_gsimple_action_activate_callback (GSimpleAction* action,
                                                                  GVariant* parameter,
                                                                  gpointer self)
{
	g4_action_handles_export_cover ((G4ActionHandles*) self, action, parameter);
}

static void
__lambda150_ (G4ActionHandles* self)
{
	G4Application* _tmp0_;
	_tmp0_ = self->priv->_app;
	g4_application_play_next (_tmp0_);
}

static void
___lambda150__gsimple_action_activate_callback (GSimpleAction* action,
                                                GVariant* parameter,
                                                gpointer self)
{
	__lambda150_ ((G4ActionHandles*) self);
}

static void
_g4_action_handles_play_at_next_gsimple_action_activate_callback (GSimpleAction* action,
                                                                  GVariant* parameter,
                                                                  gpointer self)
{
	g4_action_handles_play_at_next ((G4ActionHandles*) self, action, parameter);
}

static void
__lambda151_ (G4ActionHandles* self)
{
	G4Application* _tmp0_;
	_tmp0_ = self->priv->_app;
	g4_application_play_pause (_tmp0_);
}

static void
___lambda151__gsimple_action_activate_callback (GSimpleAction* action,
                                                GVariant* parameter,
                                                gpointer self)
{
	__lambda151_ ((G4ActionHandles*) self);
}

static void
__lambda152_ (G4ActionHandles* self)
{
	G4Application* _tmp0_;
	_tmp0_ = self->priv->_app;
	g4_application_play_previous (_tmp0_);
}

static void
___lambda152__gsimple_action_activate_callback (GSimpleAction* action,
                                                GVariant* parameter,
                                                gpointer self)
{
	__lambda152_ ((G4ActionHandles*) self);
}

static void
_g4_action_handles_show_preferences_gsimple_action_activate_callback (GSimpleAction* action,
                                                                      GVariant* parameter,
                                                                      gpointer self)
{
	g4_action_handles_show_preferences ((G4ActionHandles*) self);
}

static void
__lambda154_ (G4ActionHandles* self)
{
	G4Application* _tmp0_;
	_tmp0_ = self->priv->_app;
	g4_application_reload_library (_tmp0_);
}

static void
___lambda154__gsimple_action_activate_callback (GSimpleAction* action,
                                                GVariant* parameter,
                                                gpointer self)
{
	__lambda154_ ((G4ActionHandles*) self);
}

static void
_g4_action_handles_scheme_gsimple_action_activate_callback (GSimpleAction* action,
                                                            GVariant* parameter,
                                                            gpointer self)
{
	g4_action_handles_scheme ((G4ActionHandles*) self, action, parameter);
}

static void
_g4_action_handles_show_file_gsimple_action_activate_callback (GSimpleAction* action,
                                                               GVariant* parameter,
                                                               gpointer self)
{
	g4_action_handles_show_file ((G4ActionHandles*) self, action, parameter);
}

static void
_g4_action_handles_show_tags_gsimple_action_activate_callback (GSimpleAction* action,
                                                               GVariant* parameter,
                                                               gpointer self)
{
	g4_action_handles_show_tags ((G4ActionHandles*) self, action, parameter);
}

static void
_g4_action_handles_sort_by_gsimple_action_activate_callback (GSimpleAction* action,
                                                             GVariant* parameter,
                                                             gpointer self)
{
	g4_action_handles_sort_by ((G4ActionHandles*) self, action, parameter);
}

static void
_g4_action_handles_toggle_sort_gsimple_action_activate_callback (GSimpleAction* action,
                                                                 GVariant* parameter,
                                                                 gpointer self)
{
	g4_action_handles_toggle_sort ((G4ActionHandles*) self);
}

static void
_g4_action_handles_trash_file_gsimple_action_activate_callback (GSimpleAction* action,
                                                                GVariant* parameter,
                                                                gpointer self)
{
	g4_action_handles_trash_file ((G4ActionHandles*) self, action, parameter);
}

static void
__lambda160_ (G4ActionHandles* self)
{
	G4Application* _tmp0_;
	_tmp0_ = self->priv->_app;
	g_application_quit ((GApplication*) _tmp0_);
}

static void
___lambda160__gsimple_action_activate_callback (GSimpleAction* action,
                                                GVariant* parameter,
                                                gpointer self)
{
	__lambda160_ ((G4ActionHandles*) self);
}

G4ActionHandles*
g4_action_handles_construct (GType object_type,
                             G4Application* app)
{
	G4ActionHandles * self = NULL;
	G4Application* _tmp0_;
	GActionEntry* action_entries = NULL;
	GActionEntry _tmp1_ = {0};
	GActionEntry _tmp2_ = {0};
	GActionEntry _tmp3_ = {0};
	GActionEntry _tmp4_ = {0};
	GActionEntry _tmp5_ = {0};
	GActionEntry _tmp6_ = {0};
	GActionEntry _tmp7_ = {0};
	GActionEntry _tmp8_ = {0};
	GActionEntry _tmp9_ = {0};
	GActionEntry _tmp10_ = {0};
	GActionEntry _tmp11_ = {0};
	GActionEntry _tmp12_ = {0};
	GActionEntry _tmp13_ = {0};
	GActionEntry _tmp14_ = {0};
	GActionEntry _tmp15_ = {0};
	GActionEntry _tmp16_ = {0};
	GActionEntry _tmp17_ = {0};
	GActionEntry _tmp18_ = {0};
	GActionEntry _tmp19_ = {0};
	GActionEntry _tmp20_ = {0};
	GActionEntry* _tmp21_;
	gint action_entries_length1;
	gint _action_entries_size_;
	GActionEntry* _tmp22_;
	gint _tmp22__length1;
	G4ActionShortKey* app_keys = NULL;
	G4ActionShortKey _tmp23_ = {0};
	G4ActionShortKey _tmp24_ = {0};
	G4ActionShortKey _tmp25_ = {0};
	G4ActionShortKey _tmp26_ = {0};
	G4ActionShortKey _tmp27_ = {0};
	G4ActionShortKey _tmp28_ = {0};
	G4ActionShortKey _tmp29_ = {0};
	G4ActionShortKey _tmp30_ = {0};
	G4ActionShortKey* _tmp31_;
	gint app_keys_length1;
	gint _app_keys_size_;
	G4ActionShortKey* _tmp32_;
	gint _tmp32__length1;
	G4ActionShortKey* win_keys = NULL;
	G4ActionShortKey _tmp42_ = {0};
	G4ActionShortKey _tmp43_ = {0};
	G4ActionShortKey* _tmp44_;
	gint win_keys_length1;
	gint _win_keys_size_;
	G4ActionShortKey* _tmp45_;
	gint _tmp45__length1;
	g_return_val_if_fail (app != NULL, NULL);
	self = (G4ActionHandles*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (app);
	_g_object_unref0 (self->priv->_app);
	self->priv->_app = _tmp0_;
	memset (&_tmp1_, 0, sizeof (GActionEntry));
	_tmp1_.name = G4_ACTION_ABOUT;
	_tmp1_.activate = ___lambda145__gsimple_action_activate_callback;
	memset (&_tmp2_, 0, sizeof (GActionEntry));
	_tmp2_.name = G4_ACTION_ADD_TO_PLAYLIST;
	_tmp2_.activate = _g4_action_handles_add_to_playlist_gsimple_action_activate_callback;
	_tmp2_.parameter_type = "s";
	memset (&_tmp3_, 0, sizeof (GActionEntry));
	_tmp3_.name = G4_ACTION_ADD_TO_QUEUE;
	_tmp3_.activate = _g4_action_handles_play_or_queue_gsimple_action_activate_callback;
	_tmp3_.parameter_type = "s";
	memset (&_tmp4_, 0, sizeof (GActionEntry));
	_tmp4_.name = G4_ACTION_EXPORT_COVER;
	_tmp4_.activate = _g4_action_handles_export_cover_gsimple_action_activate_callback;
	_tmp4_.parameter_type = "s";
	memset (&_tmp5_, 0, sizeof (GActionEntry));
	_tmp5_.name = G4_ACTION_NEXT;
	_tmp5_.activate = ___lambda150__gsimple_action_activate_callback;
	memset (&_tmp6_, 0, sizeof (GActionEntry));
	_tmp6_.name = G4_ACTION_PLAY;
	_tmp6_.activate = _g4_action_handles_play_or_queue_gsimple_action_activate_callback;
	_tmp6_.parameter_type = "s";
	memset (&_tmp7_, 0, sizeof (GActionEntry));
	_tmp7_.name = G4_ACTION_PLAY_AT_NEXT;
	_tmp7_.activate = _g4_action_handles_play_at_next_gsimple_action_activate_callback;
	_tmp7_.parameter_type = "s";
	memset (&_tmp8_, 0, sizeof (GActionEntry));
	_tmp8_.name = G4_ACTION_PLAY_PAUSE;
	_tmp8_.activate = ___lambda151__gsimple_action_activate_callback;
	memset (&_tmp9_, 0, sizeof (GActionEntry));
	_tmp9_.name = G4_ACTION_PREV;
	_tmp9_.activate = ___lambda152__gsimple_action_activate_callback;
	memset (&_tmp10_, 0, sizeof (GActionEntry));
	_tmp10_.name = G4_ACTION_PREFS;
	_tmp10_.activate = _g4_action_handles_show_preferences_gsimple_action_activate_callback;
	memset (&_tmp11_, 0, sizeof (GActionEntry));
	_tmp11_.name = G4_ACTION_RANDOM_PLAY;
	_tmp11_.activate = _g4_action_handles_play_or_queue_gsimple_action_activate_callback;
	_tmp11_.parameter_type = "s";
	memset (&_tmp12_, 0, sizeof (GActionEntry));
	_tmp12_.name = G4_ACTION_RELOAD;
	_tmp12_.activate = ___lambda154__gsimple_action_activate_callback;
	memset (&_tmp13_, 0, sizeof (GActionEntry));
	_tmp13_.name = G4_ACTION_SCHEME;
	_tmp13_.activate = _g4_action_handles_scheme_gsimple_action_activate_callback;
	_tmp13_.parameter_type = "s";
	_tmp13_.state = "'0'";
	memset (&_tmp14_, 0, sizeof (GActionEntry));
	_tmp14_.name = G4_ACTION_SHOW_FILE;
	_tmp14_.activate = _g4_action_handles_show_file_gsimple_action_activate_callback;
	_tmp14_.parameter_type = "s";
	memset (&_tmp15_, 0, sizeof (GActionEntry));
	_tmp15_.name = G4_ACTION_SHOW_TAGS;
	_tmp15_.activate = _g4_action_handles_show_tags_gsimple_action_activate_callback;
	_tmp15_.parameter_type = "s";
	memset (&_tmp16_, 0, sizeof (GActionEntry));
	_tmp16_.name = G4_ACTION_SHOW_TAGS_CURRENT;
	_tmp16_.activate = _g4_action_handles_show_tags_gsimple_action_activate_callback;
	memset (&_tmp17_, 0, sizeof (GActionEntry));
	_tmp17_.name = G4_ACTION_SORT;
	_tmp17_.activate = _g4_action_handles_sort_by_gsimple_action_activate_callback;
	_tmp17_.parameter_type = "s";
	_tmp17_.state = "'2'";
	memset (&_tmp18_, 0, sizeof (GActionEntry));
	_tmp18_.name = G4_ACTION_TOGGLE_SORT;
	_tmp18_.activate = _g4_action_handles_toggle_sort_gsimple_action_activate_callback;
	memset (&_tmp19_, 0, sizeof (GActionEntry));
	_tmp19_.name = G4_ACTION_TRASH_FILE;
	_tmp19_.activate = _g4_action_handles_trash_file_gsimple_action_activate_callback;
	_tmp19_.parameter_type = "s";
	memset (&_tmp20_, 0, sizeof (GActionEntry));
	_tmp20_.name = G4_ACTION_QUIT;
	_tmp20_.activate = ___lambda160__gsimple_action_activate_callback;
	_tmp21_ = g_new0 (GActionEntry, 20);
	_tmp21_[0] = _tmp1_;
	_tmp21_[1] = _tmp2_;
	_tmp21_[2] = _tmp3_;
	_tmp21_[3] = _tmp4_;
	_tmp21_[4] = _tmp5_;
	_tmp21_[5] = _tmp6_;
	_tmp21_[6] = _tmp7_;
	_tmp21_[7] = _tmp8_;
	_tmp21_[8] = _tmp9_;
	_tmp21_[9] = _tmp10_;
	_tmp21_[10] = _tmp11_;
	_tmp21_[11] = _tmp12_;
	_tmp21_[12] = _tmp13_;
	_tmp21_[13] = _tmp14_;
	_tmp21_[14] = _tmp15_;
	_tmp21_[15] = _tmp16_;
	_tmp21_[16] = _tmp17_;
	_tmp21_[17] = _tmp18_;
	_tmp21_[18] = _tmp19_;
	_tmp21_[19] = _tmp20_;
	action_entries = _tmp21_;
	action_entries_length1 = 20;
	_action_entries_size_ = action_entries_length1;
	_tmp22_ = action_entries;
	_tmp22__length1 = action_entries_length1;
	g_action_map_add_action_entries ((GActionMap*) app, _tmp22_, (gint) _tmp22__length1, self);
	memset (&_tmp23_, 0, sizeof (G4ActionShortKey));
	_tmp23_.name = G4_ACTION_PREFS;
	_tmp23_.key = "<primary>comma";
	memset (&_tmp24_, 0, sizeof (G4ActionShortKey));
	_tmp24_.name = G4_ACTION_PLAY_PAUSE;
	_tmp24_.key = "<primary>p";
	memset (&_tmp25_, 0, sizeof (G4ActionShortKey));
	_tmp25_.name = G4_ACTION_PREV;
	_tmp25_.key = "<primary>Left";
	memset (&_tmp26_, 0, sizeof (G4ActionShortKey));
	_tmp26_.name = G4_ACTION_NEXT;
	_tmp26_.key = "<primary>Right";
	memset (&_tmp27_, 0, sizeof (G4ActionShortKey));
	_tmp27_.name = G4_ACTION_RELOAD;
	_tmp27_.key = "<primary>r";
	memset (&_tmp28_, 0, sizeof (G4ActionShortKey));
	_tmp28_.name = G4_ACTION_SHOW_TAGS_CURRENT;
	_tmp28_.key = "<primary>t";
	memset (&_tmp29_, 0, sizeof (G4ActionShortKey));
	_tmp29_.name = G4_ACTION_TOGGLE_SORT;
	_tmp29_.key = "<primary>m";
	memset (&_tmp30_, 0, sizeof (G4ActionShortKey));
	_tmp30_.name = G4_ACTION_QUIT;
	_tmp30_.key = "<primary>q";
	_tmp31_ = g_new0 (G4ActionShortKey, 8);
	_tmp31_[0] = _tmp23_;
	_tmp31_[1] = _tmp24_;
	_tmp31_[2] = _tmp25_;
	_tmp31_[3] = _tmp26_;
	_tmp31_[4] = _tmp27_;
	_tmp31_[5] = _tmp28_;
	_tmp31_[6] = _tmp29_;
	_tmp31_[7] = _tmp30_;
	app_keys = _tmp31_;
	app_keys_length1 = 8;
	_app_keys_size_ = app_keys_length1;
	_tmp32_ = app_keys;
	_tmp32__length1 = app_keys_length1;
	{
		G4ActionShortKey* item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp32_;
		item_collection_length1 = _tmp32__length1;
		for (item_it = 0; item_it < item_collection_length1; item_it = item_it + 1) {
			G4ActionShortKey item = {0};
			item = item_collection[item_it];
			{
				G4ActionShortKey _tmp33_;
				const gchar* _tmp34_;
				gchar* _tmp35_;
				gchar* _tmp36_;
				G4ActionShortKey _tmp37_;
				const gchar* _tmp38_;
				gchar* _tmp39_;
				gchar** _tmp40_;
				gchar** _tmp41_;
				gint _tmp41__length1;
				_tmp33_ = item;
				_tmp34_ = _tmp33_.name;
				_tmp35_ = g_strconcat (G4_ACTION_APP, _tmp34_, NULL);
				_tmp36_ = _tmp35_;
				_tmp37_ = item;
				_tmp38_ = _tmp37_.key;
				_tmp39_ = g_strdup (_tmp38_);
				_tmp40_ = g_new0 (gchar*, 1 + 1);
				_tmp40_[0] = _tmp39_;
				_tmp41_ = _tmp40_;
				_tmp41__length1 = 1;
				gtk_application_set_accels_for_action ((GtkApplication*) app, _tmp36_, _tmp41_);
				_tmp41_ = (_vala_array_free (_tmp41_, _tmp41__length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (_tmp36_);
			}
		}
	}
	memset (&_tmp42_, 0, sizeof (G4ActionShortKey));
	_tmp42_.name = G4_ACTION_SAVE_LIST;
	_tmp42_.key = "<primary>s";
	memset (&_tmp43_, 0, sizeof (G4ActionShortKey));
	_tmp43_.name = G4_ACTION_TOGGLE_SEARCH;
	_tmp43_.key = "<primary>f";
	_tmp44_ = g_new0 (G4ActionShortKey, 2);
	_tmp44_[0] = _tmp42_;
	_tmp44_[1] = _tmp43_;
	win_keys = _tmp44_;
	win_keys_length1 = 2;
	_win_keys_size_ = win_keys_length1;
	_tmp45_ = win_keys;
	_tmp45__length1 = win_keys_length1;
	{
		G4ActionShortKey* item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp45_;
		item_collection_length1 = _tmp45__length1;
		for (item_it = 0; item_it < item_collection_length1; item_it = item_it + 1) {
			G4ActionShortKey item = {0};
			item = item_collection[item_it];
			{
				G4ActionShortKey _tmp46_;
				const gchar* _tmp47_;
				gchar* _tmp48_;
				gchar* _tmp49_;
				G4ActionShortKey _tmp50_;
				const gchar* _tmp51_;
				gchar* _tmp52_;
				gchar** _tmp53_;
				gchar** _tmp54_;
				gint _tmp54__length1;
				_tmp46_ = item;
				_tmp47_ = _tmp46_.name;
				_tmp48_ = g_strconcat (G4_ACTION_WIN, _tmp47_, NULL);
				_tmp49_ = _tmp48_;
				_tmp50_ = item;
				_tmp51_ = _tmp50_.key;
				_tmp52_ = g_strdup (_tmp51_);
				_tmp53_ = g_new0 (gchar*, 1 + 1);
				_tmp53_[0] = _tmp52_;
				_tmp54_ = _tmp53_;
				_tmp54__length1 = 1;
				gtk_application_set_accels_for_action ((GtkApplication*) app, _tmp49_, _tmp54_);
				_tmp54_ = (_vala_array_free (_tmp54_, _tmp54__length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (_tmp49_);
			}
		}
	}
	win_keys = (g_free (win_keys), NULL);
	app_keys = (g_free (app_keys), NULL);
	action_entries = (g_free (action_entries), NULL);
	return self;
}

G4ActionHandles*
g4_action_handles_new (G4Application* app)
{
	return g4_action_handles_construct (G4_TYPE_ACTION_HANDLES, app);
}

static void
_g4_action_handles_export_cover_async_data_free (gpointer _data)
{
	G4ActionHandlesExportCoverAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->music);
	_g_object_unref0 (_data_->self);
	g_slice_free (G4ActionHandlesExportCoverAsyncData, _data_);
}

static void
_g4_action_handles_export_cover_async (G4ActionHandles* self,
                                       G4Music* music,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	G4ActionHandlesExportCoverAsyncData* _data_;
	G4ActionHandles* _tmp0_;
	G4Music* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (music != NULL);
	_data_ = g_slice_new0 (G4ActionHandlesExportCoverAsyncData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, _g4_action_handles_export_cover_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (music);
	_g_object_unref0 (_data_->music);
	_data_->music = _tmp1_;
	_g4_action_handles_export_cover_async_co (_data_);
}

static void
_g4_action_handles_export_cover_finish (G4ActionHandles* self,
                                        GAsyncResult* _res_)
{
	G4ActionHandlesExportCoverAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gpointer
_gst_sample_ref0 (gpointer self)
{
	return self ? gst_sample_ref (self) : NULL;
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		G4ActionHandles* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->file);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static GstSample*
___lambda148_ (Block1Data* _data1_)
{
	G4ActionHandles* self;
	GstTagList* tags = NULL;
	GFile* _tmp0_;
	GstTagList* _tmp1_;
	GstSample* _tmp2_ = NULL;
	GstTagList* _tmp3_;
	GstSample* _tmp6_;
	GstSample* result;
	self = _data1_->self;
	_tmp0_ = _data1_->file;
	_tmp1_ = g4_parse_gst_tags (_tmp0_);
	tags = _tmp1_;
	_tmp3_ = tags;
	if (_tmp3_ != NULL) {
		GstTagList* _tmp4_;
		GstSample* _tmp5_;
		_tmp4_ = tags;
		_tmp5_ = g4_parse_image_from_tag_list ((GstTagList*) _tmp4_);
		_gst_sample_unref0 (_tmp2_);
		_tmp2_ = _tmp5_;
	} else {
		_gst_sample_unref0 (_tmp2_);
		_tmp2_ = NULL;
	}
	_tmp6_ = _tmp2_;
	_tmp2_ = NULL;
	result = _tmp6_;
	_gst_sample_unref0 (_tmp2_);
	_gst_tag_list_unref0 (tags);
	return result;
}

static gpointer
____lambda148__g4_task_func (gpointer self)
{
	gpointer result;
	result = ___lambda148_ (self);
	return result;
}

static void
_g4_action_handles_export_cover_async_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	G4ActionHandlesExportCoverAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_g4_action_handles_export_cover_async_co (_data_);
}

static gint
string_index_of_char (const gchar* self,
                      gunichar c,
                      gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = g_utf8_strchr (((gchar*) self) + start_index, (gssize) -1, c);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

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 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;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gboolean
_g4_action_handles_export_cover_async_co (G4ActionHandlesExportCoverAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_app;
	_data_->_tmp1_ = g4_application_get_current_cover (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _gst_sample_ref0 (_data_->_tmp2_);
	_data_->cover = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->cover;
	if (_data_->_tmp5_ == NULL) {
		_data_->_tmp4_ = TRUE;
	} else {
		_data_->_tmp6_ = _data_->self->priv->_app;
		_data_->_tmp7_ = g4_application_get_current_music (_data_->_tmp6_);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp4_ = _data_->music != _data_->_tmp8_;
	}
	if (_data_->_tmp4_) {
		_data_->_data1_ = g_slice_new0 (Block1Data);
		_data_->_data1_->_ref_count_ = 1;
		_data_->_data1_->self = g_object_ref (_data_->self);
		_data_->_tmp9_ = _data_->music->uri;
		_data_->_tmp10_ = g_file_new_for_uri (_data_->_tmp9_);
		_data_->_data1_->file = _data_->_tmp10_;
		_data_->_state_ = 1;
		g4_run_async (gst_sample_get_type (), (GBoxedCopyFunc) gst_sample_ref, (GDestroyNotify) gst_sample_unref, ____lambda148__g4_task_func, _data_->_data1_, FALSE, FALSE, _g4_action_handles_export_cover_async_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp11_ = g4_run_finish (_data_->_res_);
		_gst_sample_unref0 (_data_->cover);
		_data_->cover = (GstSample*) _data_->_tmp11_;
		block1_data_unref (_data_->_data1_);
		_data_->_data1_ = NULL;
	}
	_data_->_tmp12_ = _data_->cover;
	if (_data_->_tmp12_ != NULL) {
		_data_->_tmp13_ = _data_->cover;
		_data_->_tmp14_ = _gst_sample_ref0 ((GstSample*) _data_->_tmp13_);
		_data_->sample = _data_->_tmp14_;
		_data_->_tmp16_ = _data_->sample;
		_data_->_tmp17_ = gst_sample_get_caps (_data_->_tmp16_);
		_data_->_tmp15_ = _data_->_tmp17_;
		_data_->_tmp18_ = NULL;
		if (_data_->_tmp15_ != NULL) {
			_data_->_tmp19_ = gst_caps_get_structure ((GstCaps*) _data_->_tmp15_, (guint) 0);
			_data_->_tmp18_ = _data_->_tmp19_;
		}
		_data_->_tmp20_ = _data_->_tmp18_;
		_data_->_tmp21_ = NULL;
		if (_data_->_tmp20_ != NULL) {
			_data_->_tmp22_ = gst_structure_get_name ((GstStructure*) _data_->_tmp20_);
			_data_->_tmp21_ = _data_->_tmp22_;
		}
		_data_->_tmp23_ = g_strdup (_data_->_tmp21_);
		_data_->itype = _data_->_tmp23_;
		_data_->_tmp25_ = _data_->itype;
		_data_->_tmp24_ = _data_->_tmp25_;
		_data_->_tmp26_ = NULL;
		if (_data_->_tmp24_ != NULL) {
			_data_->_tmp27_ = string_index_of_char ((const gchar*) _data_->_tmp24_, (gunichar) '/', 0);
			_data_->_tmp28_ = __int_dup0 (&_data_->_tmp27_);
			_g_free0 (_data_->_tmp26_);
			_data_->_tmp26_ = _data_->_tmp28_;
		}
		_data_->_tmp30_ = _data_->_tmp26_;
		_data_->_tmp26_ = NULL;
		_data_->_tmp29_ = _data_->_tmp30_;
		if (_data_->_tmp29_ == NULL) {
			_data_->_tmp31_ = -1;
			_data_->_tmp32_ = __int_dup0 (&_data_->_tmp31_);
			_g_free0 (_data_->_tmp29_);
			_data_->_tmp29_ = _data_->_tmp32_;
		}
		_data_->_tmp33_ = _data_->_tmp29_;
		_data_->_tmp29_ = NULL;
		_data_->_tmp34_ = (gint) (*_data_->_tmp33_);
		_g_free0 (_data_->_tmp33_);
		_data_->pos = _data_->_tmp34_;
		_data_->_tmp36_ = _data_->itype;
		_data_->_tmp35_ = _data_->_tmp36_;
		_data_->_tmp37_ = NULL;
		if (_data_->_tmp35_ != NULL) {
			_data_->_tmp38_ = string_substring ((const gchar*) _data_->_tmp35_, (glong) (_data_->pos + 1), (glong) -1);
			_g_free0 (_data_->_tmp37_);
			_data_->_tmp37_ = _data_->_tmp38_;
		}
		_data_->_tmp40_ = _data_->_tmp37_;
		_data_->_tmp37_ = NULL;
		_data_->_tmp39_ = _data_->_tmp40_;
		if (_data_->_tmp39_ == NULL) {
			_data_->_tmp41_ = g_strdup ("");
			_g_free0 (_data_->_tmp39_);
			_data_->_tmp39_ = _data_->_tmp41_;
		}
		_data_->_tmp42_ = _data_->_tmp39_;
		_data_->_tmp39_ = NULL;
		_data_->ext = (gchar*) _data_->_tmp42_;
		_data_->_tmp43_ = g4_music_get_artist_and_title (_data_->music);
		_data_->_tmp44_ = _data_->_tmp43_;
		_data_->_tmp45_ = string_replace (_data_->_tmp44_, "/", "&");
		_data_->_tmp46_ = _data_->_tmp45_;
		_data_->_tmp47_ = g_strconcat (_data_->_tmp46_, ".", NULL);
		_data_->_tmp48_ = _data_->_tmp47_;
		_data_->_tmp49_ = _data_->ext;
		_data_->_tmp50_ = g_strconcat (_data_->_tmp48_, _data_->_tmp49_, NULL);
		_data_->_tmp51_ = _data_->_tmp50_;
		_g_free0 (_data_->_tmp48_);
		_g_free0 (_data_->_tmp46_);
		_g_free0 (_data_->_tmp44_);
		_data_->name = _data_->_tmp51_;
		_data_->_tmp52_ = gtk_file_filter_new ();
		_data_->filter = _data_->_tmp52_;
		_data_->_tmp53_ = _data_->filter;
		g_object_set (_data_->_tmp53_, "name", _ ("Image Files"), NULL);
		_data_->_tmp54_ = _data_->filter;
		gtk_file_filter_add_mime_type (_data_->_tmp54_, "image/*");
		_data_->_tmp55_ = _data_->name;
		_data_->_tmp56_ = g_file_new_build_filename (_data_->_tmp55_, NULL);
		_data_->initial = _data_->_tmp56_;
		_data_->_tmp57_ = _data_->self->priv->_app;
		_data_->_tmp58_ = gtk_application_get_active_window ((GtkApplication*) _data_->_tmp57_);
		_data_->_tmp59_ = _data_->_tmp58_;
		_data_->_tmp60_ = _data_->initial;
		_data_->_tmp61_ = _data_->filter;
		_data_->_tmp62_ = _g_object_ref0 (_data_->_tmp61_);
		_data_->_tmp63_ = g_new0 (GtkFileFilter*, 1 + 1);
		_data_->_tmp63_[0] = _data_->_tmp62_;
		_data_->_tmp64_ = _data_->_tmp63_;
		_data_->_tmp64__length1 = 1;
		_data_->_state_ = 2;
		g4_show_save_file_dialog (_data_->_tmp59_, _data_->_tmp60_, _data_->_tmp64_, (gint) 1, _g4_action_handles_export_cover_async_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp65_ = g4_show_save_file_dialog_finish (_data_->_res_);
		_data_->_tmp66_ = _data_->_tmp65_;
		_data_->_tmp64_ = (_vala_array_free (_data_->_tmp64_, _data_->_tmp64__length1, (GDestroyNotify) g_object_unref), NULL);
		_data_->file = _data_->_tmp66_;
		_data_->_tmp67_ = _data_->file;
		if (_data_->_tmp67_ != NULL) {
			_data_->_tmp68_ = _data_->file;
			_data_->_tmp69_ = _data_->sample;
			_data_->_state_ = 3;
			g4_save_sample_to_file_async (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp68_, g_file_get_type (), GFile), _data_->_tmp69_, _g4_action_handles_export_cover_async_ready, _data_);
			return FALSE;
			_state_3:
			_data_->saved = g4_save_sample_to_file_finish (_data_->_res_);
			_data_->_tmp71_ = _data_->self->priv->_app;
			_data_->_tmp72_ = gtk_application_get_active_window ((GtkApplication*) _data_->_tmp71_);
			_data_->_tmp73_ = _data_->_tmp72_;
			_data_->_tmp70_ = G4_IS_WINDOW (_data_->_tmp73_) ? ((G4Window*) _data_->_tmp73_) : NULL;
			if (_data_->_tmp70_ != NULL) {
				if (_data_->saved) {
					_data_->_tmp74_ = _ ("Export cover successfully");
				} else {
					_data_->_tmp74_ = _ ("Export cover failed");
				}
				if (_data_->saved) {
					_data_->_tmp77_ = _data_->file;
					_data_->_tmp76_ = _data_->_tmp77_;
					_data_->_tmp78_ = NULL;
					if (_data_->_tmp76_ != NULL) {
						_data_->_tmp79_ = g_file_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp76_, g_file_get_type (), GFile));
						_g_free0 (_data_->_tmp78_);
						_data_->_tmp78_ = _data_->_tmp79_;
					}
					_data_->_tmp80_ = _data_->_tmp78_;
					_data_->_tmp78_ = NULL;
					_g_free0 (_data_->_tmp75_);
					_data_->_tmp75_ = _data_->_tmp80_;
					_g_free0 (_data_->_tmp78_);
				} else {
					_data_->_tmp81_ = g_strdup ((const gchar*) NULL);
					_g_free0 (_data_->_tmp75_);
					_data_->_tmp75_ = _data_->_tmp81_;
				}
				g4_window_show_toast (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp70_, G4_TYPE_WINDOW, G4Window), _data_->_tmp74_, _data_->_tmp75_);
				_g_free0 (_data_->_tmp75_);
			}
		}
		_g_object_unref0 (_data_->file);
		_g_object_unref0 (_data_->initial);
		_g_object_unref0 (_data_->filter);
		_g_free0 (_data_->name);
		_g_free0 (_data_->ext);
		_g_free0 (_data_->_tmp39_);
		_g_free0 (_data_->_tmp37_);
		_g_free0 (_data_->_tmp29_);
		_g_free0 (_data_->_tmp26_);
		_g_free0 (_data_->itype);
		_gst_sample_unref0 (_data_->sample);
	}
	_gst_sample_unref0 (_data_->cover);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
___lambda147_ (G4ActionHandles* self,
               GObject* obj,
               GAsyncResult* res)
{
	G4Application* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_app;
	g4_application_show_add_playlist_dialog_finish (_tmp0_, res);
}

static void
____lambda147__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda147_ ((G4ActionHandles*) self, source_object, res);
	g_object_unref (self);
}

static void
g4_action_handles_add_to_playlist (G4ActionHandles* self,
                                   GSimpleAction* action,
                                   GVariant* parameter)
{
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* uri = NULL;
	gchar* _tmp3_;
	G4Playlist* playlist = NULL;
	const gchar* _tmp4_;
	G4Playlist* _tmp5_;
	G4Playlist* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = parameter;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = g_strdup (_tmp1_);
	uri = _tmp3_;
	_tmp4_ = uri;
	_tmp5_ = g4_action_handles_parse_playlist_from_music_uri (self, _tmp4_);
	playlist = _tmp5_;
	_tmp6_ = playlist;
	if (_tmp6_ != NULL) {
		G4Application* _tmp7_;
		G4Playlist* _tmp8_;
		_tmp7_ = self->priv->_app;
		_tmp8_ = playlist;
		g4_application_show_add_playlist_dialog (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G4_TYPE_PLAYLIST, G4Playlist), ____lambda147__gasync_ready_callback, g_object_ref (self));
	}
	_g_object_unref0 (playlist);
	_g_free0 (uri);
}

static void
___lambda149_ (G4ActionHandles* self,
               GObject* obj,
               GAsyncResult* res)
{
	g_return_if_fail (res != NULL);
	_g4_action_handles_export_cover_finish (self, res);
}

static void
____lambda149__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda149_ ((G4ActionHandles*) self, source_object, res);
	g_object_unref (self);
}

static void
g4_action_handles_export_cover (G4ActionHandles* self,
                                GSimpleAction* action,
                                GVariant* parameter)
{
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* uri = NULL;
	gchar* _tmp3_;
	G4Music* _tmp4_ = NULL;
	const gchar* _tmp5_;
	G4Music* music = NULL;
	G4Music* _tmp11_;
	G4Music* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = parameter;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = g_strdup (_tmp1_);
	uri = _tmp3_;
	_tmp5_ = uri;
	if (_tmp5_ != NULL) {
		G4Application* _tmp6_;
		G4MusicLoader* _tmp7_;
		G4MusicLoader* _tmp8_;
		const gchar* _tmp9_;
		G4Music* _tmp10_;
		_tmp6_ = self->priv->_app;
		_tmp7_ = g4_application_get_loader (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = uri;
		_tmp10_ = g4_music_loader_find_cache (_tmp8_, (const gchar*) _tmp9_);
		_g_object_unref0 (_tmp4_);
		_tmp4_ = _tmp10_;
	} else {
		_g_object_unref0 (_tmp4_);
		_tmp4_ = NULL;
	}
	_tmp11_ = _tmp4_;
	_tmp4_ = NULL;
	music = _tmp11_;
	_tmp12_ = music;
	if (_tmp12_ != NULL) {
		G4Music* _tmp13_;
		_tmp13_ = music;
		_g4_action_handles_export_cover_async (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, G4_TYPE_MUSIC, G4Music), ____lambda149__gasync_ready_callback, g_object_ref (self));
	}
	_g_object_unref0 (music);
	_g_object_unref0 (_tmp4_);
	_g_free0 (uri);
}

static G4Playlist*
g4_action_handles_parse_playlist_from_music_uri (G4ActionHandles* self,
                                                 const gchar* uri)
{
	G4Music* node = NULL;
	G4Playlist* _tmp37_ = NULL;
	G4Music* _tmp38_;
	G4Playlist* _tmp45_;
	G4Playlist* result;
	g_return_val_if_fail (self != NULL, NULL);
	node = NULL;
	if (uri != NULL) {
		gchar* ar = NULL;
		gchar* al = NULL;
		gchar* pl = NULL;
		gchar* _tmp0_ = NULL;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		G4MusicLoader* loader = NULL;
		G4Application* _tmp3_;
		G4MusicLoader* _tmp4_;
		G4MusicLoader* _tmp5_;
		G4MusicLoader* _tmp6_;
		G4MusicLibrary* library = NULL;
		G4MusicLoader* _tmp7_;
		G4MusicLibrary* _tmp8_;
		G4MusicLibrary* _tmp9_;
		G4MusicLibrary* _tmp10_;
		const gchar* _tmp11_;
		ar = NULL;
		al = NULL;
		pl = NULL;
		g4_parse_library_uri ((const gchar*) uri, &_tmp0_, &_tmp1_, &_tmp2_, NULL);
		_g_free0 (ar);
		ar = _tmp0_;
		_g_free0 (al);
		al = _tmp1_;
		_g_free0 (pl);
		pl = _tmp2_;
		_tmp3_ = self->priv->_app;
		_tmp4_ = g4_application_get_loader (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		loader = _tmp6_;
		_tmp7_ = loader;
		_tmp8_ = g4_music_loader_get_library (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		library = _tmp10_;
		_tmp11_ = ar;
		if (_tmp11_ != NULL) {
			G4Artist* artist = NULL;
			G4MusicLibrary* _tmp12_;
			const gchar* _tmp13_;
			G4Artist* _tmp14_;
			gboolean _tmp15_ = FALSE;
			gboolean _tmp16_ = FALSE;
			G4Artist* _tmp17_;
			_tmp12_ = library;
			_tmp13_ = ar;
			_tmp14_ = g4_music_library_get_artist (_tmp12_, (const gchar*) _tmp13_);
			artist = _tmp14_;
			_tmp17_ = artist;
			if (_tmp17_ != NULL) {
				const gchar* _tmp18_;
				_tmp18_ = al;
				_tmp16_ = _tmp18_ != NULL;
			} else {
				_tmp16_ = FALSE;
			}
			if (_tmp16_) {
				const gchar* _tmp19_;
				gint _tmp20_;
				gint _tmp21_;
				_tmp19_ = al;
				_tmp20_ = strlen ((const gchar*) _tmp19_);
				_tmp21_ = _tmp20_;
				_tmp15_ = _tmp21_ > 0;
			} else {
				_tmp15_ = FALSE;
			}
			if (_tmp15_) {
				G4Artist* _tmp22_;
				const gchar* _tmp23_;
				G4Album* _tmp24_;
				_tmp22_ = artist;
				_tmp23_ = al;
				_tmp24_ = g4_artist_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, G4_TYPE_ARTIST, G4Artist), (const gchar*) _tmp23_);
				_g_object_unref0 (node);
				node = (G4Music*) _tmp24_;
			} else {
				G4Artist* _tmp25_;
				G4Music* _tmp26_;
				_tmp25_ = artist;
				_tmp26_ = _g_object_ref0 ((G4Music*) _tmp25_);
				_g_object_unref0 (node);
				node = _tmp26_;
			}
			_g_object_unref0 (artist);
		} else {
			const gchar* _tmp27_;
			_tmp27_ = al;
			if (_tmp27_ != NULL) {
				G4MusicLibrary* _tmp28_;
				const gchar* _tmp29_;
				G4Album* _tmp30_;
				_tmp28_ = library;
				_tmp29_ = al;
				_tmp30_ = g4_music_library_get_album (_tmp28_, (const gchar*) _tmp29_);
				_g_object_unref0 (node);
				node = (G4Music*) _tmp30_;
			} else {
				const gchar* _tmp31_;
				_tmp31_ = pl;
				if (_tmp31_ != NULL) {
					G4MusicLibrary* _tmp32_;
					const gchar* _tmp33_;
					G4Playlist* _tmp34_;
					_tmp32_ = library;
					_tmp33_ = pl;
					_tmp34_ = g4_music_library_get_playlist (_tmp32_, (const gchar*) _tmp33_);
					_g_object_unref0 (node);
					node = (G4Music*) _tmp34_;
				} else {
					G4MusicLoader* _tmp35_;
					G4Music* _tmp36_;
					_tmp35_ = loader;
					_tmp36_ = g4_music_loader_find_cache (_tmp35_, (const gchar*) uri);
					_g_object_unref0 (node);
					node = _tmp36_;
				}
			}
		}
		_g_object_unref0 (library);
		_g_object_unref0 (loader);
		_g_free0 (pl);
		_g_free0 (al);
		_g_free0 (ar);
	}
	_tmp38_ = node;
	if (_tmp38_ != NULL) {
		G4Music* _tmp39_;
		G4Music* _tmp40_;
		G4Music** _tmp41_;
		G4Music** _tmp42_;
		gint _tmp42__length1;
		G4Playlist* _tmp43_;
		_tmp39_ = node;
		_tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, G4_TYPE_MUSIC, G4Music));
		_tmp41_ = g_new0 (G4Music*, 1 + 1);
		_tmp41_[0] = _tmp40_;
		_tmp42_ = _tmp41_;
		_tmp42__length1 = 1;
		_tmp43_ = g4_to_playlist (_tmp42_, (gint) 1, NULL);
		_g_object_unref0 (_tmp37_);
		_tmp37_ = _tmp43_;
		_tmp42_ = (_vala_array_free (_tmp42_, _tmp42__length1, (GDestroyNotify) g_object_unref), NULL);
	} else {
		G4Playlist* _tmp44_;
		_tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (NULL, G4_TYPE_PLAYLIST, G4Playlist));
		_g_object_unref0 (_tmp37_);
		_tmp37_ = _tmp44_;
	}
	_tmp45_ = _tmp37_;
	_tmp37_ = NULL;
	result = _tmp45_;
	_g_object_unref0 (_tmp37_);
	_g_object_unref0 (node);
	return result;
}

static void
g4_action_handles_play_or_queue (G4ActionHandles* self,
                                 GSimpleAction* action,
                                 GVariant* parameter)
{
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* uri = NULL;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = parameter;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = g_strdup (_tmp1_);
	uri = _tmp3_;
	_tmp4_ = g_action_get_name ((GAction*) action);
	_tmp5_ = _tmp4_;
	if (g_str_has_suffix (_tmp5_, G4_ACTION_ADD_TO_QUEUE)) {
		G4Playlist* playlist = NULL;
		const gchar* _tmp6_;
		G4Playlist* _tmp7_;
		G4Playlist* _tmp8_;
		_tmp6_ = uri;
		_tmp7_ = g4_action_handles_parse_playlist_from_music_uri (self, _tmp6_);
		playlist = _tmp7_;
		_tmp8_ = playlist;
		if (_tmp8_ != NULL) {
			G4Application* _tmp9_;
			G4Playlist* _tmp10_;
			_tmp9_ = self->priv->_app;
			_tmp10_ = playlist;
			g4_application_insert_to_queue (_tmp9_, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G4_TYPE_PLAYLIST, G4Playlist), (guint) -1, FALSE);
		}
		_g_object_unref0 (playlist);
	} else {
		const gchar* _tmp11_;
		_tmp11_ = uri;
		if (_tmp11_ != NULL) {
			G4Window* _tmp12_ = NULL;
			G4Window* _tmp13_;
			_tmp13_ = g4_window_get_default ();
			_tmp12_ = _tmp13_;
			if (_tmp12_ != NULL) {
				const gchar* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
				_tmp14_ = uri;
				_tmp15_ = g_action_get_name ((GAction*) action);
				_tmp16_ = _tmp15_;
				g4_window_open_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, G4_TYPE_WINDOW, G4Window), (const gchar*) _tmp14_, TRUE, g_str_has_suffix (_tmp16_, G4_ACTION_RANDOM_PLAY));
			}
			_g_object_unref0 (_tmp12_);
		}
	}
	_g_free0 (uri);
}

static void
g4_action_handles_play_at_next (G4ActionHandles* self,
                                GSimpleAction* action,
                                GVariant* parameter)
{
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* uri = NULL;
	gchar* _tmp3_;
	G4Playlist* playlist = NULL;
	const gchar* _tmp4_;
	G4Playlist* _tmp5_;
	G4Playlist* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = parameter;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = g_strdup (_tmp1_);
	uri = _tmp3_;
	_tmp4_ = uri;
	_tmp5_ = g4_action_handles_parse_playlist_from_music_uri (self, _tmp4_);
	playlist = _tmp5_;
	_tmp6_ = playlist;
	if (_tmp6_ != NULL) {
		G4Application* _tmp7_;
		G4Playlist* _tmp8_;
		_tmp7_ = self->priv->_app;
		_tmp8_ = playlist;
		g4_application_insert_after_current (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G4_TYPE_PLAYLIST, G4Playlist));
	}
	_g_object_unref0 (playlist);
	_g_free0 (uri);
}

static gboolean
uint_try_parse (const gchar* str,
                guint* _result_,
                const gchar** unparsed,
                guint _base)
{
	guint _vala__result_ = 0U;
	const gchar* _vala_unparsed = NULL;
	gchar* endptr = NULL;
	gulong ulong_result = 0UL;
	gchar* _tmp0_ = NULL;
	gulong _tmp1_;
	gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gulong _tmp6_;
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	errno = 0;
	_tmp1_ = strtoul (str, &_tmp0_, (gint) _base);
	endptr = _tmp0_;
	ulong_result = _tmp1_;
	_tmp2_ = endptr;
	_tmp3_ = strlen (str);
	_tmp4_ = _tmp3_;
	if (_tmp2_ == (((gchar*) str) + _tmp4_)) {
		_vala_unparsed = "";
	} else {
		gchar* _tmp5_;
		_tmp5_ = endptr;
		_vala_unparsed = (const gchar*) _tmp5_;
	}
	_tmp6_ = ulong_result;
	if ((((gulong) 0) <= _tmp6_) && (_tmp6_ <= ((gulong) G_MAXUINT))) {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		_vala__result_ = (guint) ulong_result;
		if (errno != ERANGE) {
			_tmp8_ = errno != EINVAL;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = _vala_unparsed;
			_tmp10_ = endptr;
			_tmp7_ = _tmp9_ != _tmp10_;
		} else {
			_tmp7_ = FALSE;
		}
		result = _tmp7_;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	} else {
		_vala__result_ = G_MAXUINT;
		result = FALSE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	}
}

static void
g4_action_handles_scheme (G4ActionHandles* self,
                          GSimpleAction* action,
                          GVariant* state)
{
	guint scheme = 0U;
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	scheme = (guint) 0;
	_tmp0_ = state;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = _tmp1_;
	if (_tmp3_ == NULL) {
		_tmp3_ = "";
	}
	_tmp5_ = uint_try_parse ((const gchar*) _tmp3_, &_tmp4_, NULL, (guint) 0);
	scheme = _tmp4_;
	if (_tmp5_) {
		G4Application* _tmp6_;
		GSettings* _tmp7_;
		GSettings* _tmp8_;
		_tmp6_ = self->priv->_app;
		_tmp7_ = g4_application_get_settings (_tmp6_);
		_tmp8_ = _tmp7_;
		g_settings_set_uint (_tmp8_, "color-scheme", scheme);
	}
}

static void
____lambda155_ (G4ActionHandles* self,
                GObject* obj,
                GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		G4Portal* _tmp0_;
		_tmp0_ = self->priv->_portal;
		g4_portal_open_directory_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		G4Window* _tmp1_ = NULL;
		G4Window* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = g4_window_get_default ();
		_tmp1_ = _tmp2_;
		if (_tmp1_ != NULL) {
			GError* _tmp3_;
			const gchar* _tmp4_;
			_tmp3_ = e;
			_tmp4_ = _tmp3_->message;
			g4_window_show_toast (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G4_TYPE_WINDOW, G4Window), _tmp4_, NULL);
		}
		_g_object_unref0 (_tmp1_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
_____lambda155__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	____lambda155_ ((G4ActionHandles*) self, source_object, res);
	g_object_unref (self);
}

static void
g4_action_handles_show_file (G4ActionHandles* self,
                             GSimpleAction* action,
                             GVariant* parameter)
{
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* uri = NULL;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = parameter;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = g_strdup (_tmp1_);
	uri = _tmp3_;
	_tmp4_ = uri;
	if (_tmp4_ != NULL) {
		const gchar* _tmp5_;
		_tmp5_ = uri;
		if (g_str_has_prefix ((const gchar*) _tmp5_, G4_LIBRARY_SCHEME)) {
			G4Window* _tmp6_ = NULL;
			G4Window* _tmp7_;
			_tmp7_ = g4_window_get_default ();
			_tmp6_ = _tmp7_;
			if (_tmp6_ != NULL) {
				const gchar* _tmp8_;
				_tmp8_ = uri;
				g4_window_open_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, G4_TYPE_WINDOW, G4Window), (const gchar*) _tmp8_, FALSE, FALSE);
			}
			_g_object_unref0 (_tmp6_);
		} else {
			G4Portal* _tmp9_;
			const gchar* _tmp10_;
			_tmp9_ = self->priv->_portal;
			_tmp10_ = uri;
			g4_portal_open_directory_async (_tmp9_, (const gchar*) _tmp10_, _____lambda155__gasync_ready_callback, g_object_ref (self));
		}
	}
	_g_free0 (uri);
}

static gpointer
_gst_tag_list_ref0 (gpointer self)
{
	return self ? gst_tag_list_ref (self) : NULL;
}

static void
g4_action_handles_show_tags (G4ActionHandles* self,
                             GSimpleAction* action,
                             GVariant* parameter)
{
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* uri = NULL;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = parameter;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = _tmp1_;
	if (_tmp3_ == NULL) {
		G4Music* _tmp4_ = NULL;
		G4Application* _tmp5_;
		G4Music* _tmp6_;
		G4Music* _tmp7_;
		const gchar* _tmp8_ = NULL;
		_tmp5_ = self->priv->_app;
		_tmp6_ = g4_application_get_current_music (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp4_ = _tmp7_;
		_tmp8_ = NULL;
		if (_tmp4_ != NULL) {
			const gchar* _tmp9_;
			_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G4_TYPE_MUSIC, G4Music)->uri;
			_tmp8_ = _tmp9_;
		}
		_tmp3_ = _tmp8_;
	}
	_tmp10_ = g_strdup (_tmp3_);
	uri = _tmp10_;
	_tmp11_ = uri;
	if (_tmp11_ != NULL) {
		GstTagList* _tmp12_ = NULL;
		G4Music* _tmp13_ = NULL;
		G4Application* _tmp14_;
		G4Music* _tmp15_;
		G4Music* _tmp16_;
		const gchar* _tmp17_ = NULL;
		GCompareFunc _tmp19_;
		const gchar* _tmp20_;
		GstTagList* tags = NULL;
		GstTagList* _tmp26_;
		G4TagListDialog* dialog = NULL;
		const gchar* _tmp27_;
		GstTagList* _tmp28_;
		G4TagListDialog* _tmp29_;
		G4TagListDialog* _tmp30_;
		G4Window* _tmp31_;
		G4Window* _tmp32_;
		_tmp14_ = self->priv->_app;
		_tmp15_ = g4_application_get_current_music (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp13_ = _tmp16_;
		_tmp17_ = NULL;
		if (_tmp13_ != NULL) {
			const gchar* _tmp18_;
			_tmp18_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, G4_TYPE_MUSIC, G4Music)->uri;
			_tmp17_ = _tmp18_;
		}
		_tmp19_ = ((GCompareFunc) g_strcmp0);
		_tmp20_ = uri;
		if (_tmp19_ (_tmp17_, _tmp20_) == 0) {
			G4Application* _tmp21_;
			G4GstPlayer* _tmp22_;
			G4GstPlayer* _tmp23_;
			GstTagList* _tmp24_;
			GstTagList* _tmp25_;
			_tmp21_ = self->priv->_app;
			_tmp22_ = g4_application_get_player (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = g4_gst_player_get_tag_list (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp12_ = _tmp25_;
		} else {
			_tmp12_ = (GstTagList*) NULL;
		}
		_tmp26_ = _gst_tag_list_ref0 (_tmp12_);
		tags = _tmp26_;
		_tmp27_ = uri;
		_tmp28_ = tags;
		_tmp29_ = g4_tag_list_dialog_new ((const gchar*) _tmp27_, _tmp28_);
		g_object_ref_sink (_tmp29_);
		dialog = _tmp29_;
		_tmp30_ = dialog;
		_tmp31_ = g4_window_get_default ();
		_tmp32_ = _tmp31_;
		g4_dialog_present ((G4Dialog*) _tmp30_, (GtkWidget*) _tmp32_);
		_g_object_unref0 (_tmp32_);
		_g_object_unref0 (dialog);
		_gst_tag_list_unref0 (tags);
	}
	_g_free0 (uri);
}

static gboolean
__lambda153_ (G4ActionHandles* self)
{
	gboolean result;
	_g_object_unref0 (self->priv->_pref_window);
	self->priv->_pref_window = NULL;
	result = FALSE;
	return result;
}

static gboolean
___lambda153__gtk_window_close_request (GtkWindow* _sender,
                                        gpointer self)
{
	gboolean result;
	result = __lambda153_ ((G4ActionHandles*) self);
	return result;
}

static void
g4_action_handles_show_preferences (G4ActionHandles* self)
{
	G4PreferencesWindow* _tmp0_ = NULL;
	G4PreferencesWindow* _tmp1_;
	G4PreferencesWindow* _tmp2_;
	G4PreferencesWindow* win = NULL;
	G4PreferencesWindow* _tmp5_;
	G4PreferencesWindow* _tmp6_;
	G4Application* _tmp7_;
	GtkWindow* _tmp8_;
	GtkWindow* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_pref_window;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_tmp0_ = _tmp2_;
	if (_tmp0_ == NULL) {
		G4Application* _tmp3_;
		G4PreferencesWindow* _tmp4_;
		_tmp3_ = self->priv->_app;
		_tmp4_ = g4_preferences_window_new (_tmp3_);
		g_object_ref_sink (_tmp4_);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp4_;
	}
	_tmp5_ = _tmp0_;
	_tmp0_ = NULL;
	win = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G4_TYPE_PREFERENCES_WINDOW, G4PreferencesWindow);
	_tmp6_ = _g_object_ref0 (win);
	_g_object_unref0 (self->priv->_pref_window);
	self->priv->_pref_window = _tmp6_;
	gtk_window_set_destroy_with_parent ((GtkWindow*) win, TRUE);
	gtk_window_set_modal ((GtkWindow*) win, FALSE);
	_tmp7_ = self->priv->_app;
	_tmp8_ = gtk_application_get_active_window ((GtkApplication*) _tmp7_);
	_tmp9_ = _tmp8_;
	gtk_window_set_transient_for ((GtkWindow*) win, _tmp9_);
	g_signal_connect_object ((GtkWindow*) win, "close-request", (GCallback) ___lambda153__gtk_window_close_request, self, 0);
	gtk_window_present ((GtkWindow*) win);
	_g_object_unref0 (win);
	_g_object_unref0 (_tmp0_);
}

static gboolean
int_try_parse (const gchar* str,
               gint* _result_,
               const gchar** unparsed,
               guint _base)
{
	gint _vala__result_ = 0;
	const gchar* _vala_unparsed = NULL;
	gchar* endptr = NULL;
	glong long_result = 0L;
	gchar* _tmp0_ = NULL;
	glong _tmp1_;
	gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	glong _tmp6_;
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	errno = 0;
	_tmp1_ = strtol (str, &_tmp0_, (gint) _base);
	endptr = _tmp0_;
	long_result = _tmp1_;
	_tmp2_ = endptr;
	_tmp3_ = strlen (str);
	_tmp4_ = _tmp3_;
	if (_tmp2_ == (((gchar*) str) + _tmp4_)) {
		_vala_unparsed = "";
	} else {
		gchar* _tmp5_;
		_tmp5_ = endptr;
		_vala_unparsed = (const gchar*) _tmp5_;
	}
	_tmp6_ = long_result;
	if ((((glong) G_MININT) <= _tmp6_) && (_tmp6_ <= ((glong) G_MAXINT))) {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		_vala__result_ = (gint) long_result;
		if (errno != ERANGE) {
			_tmp8_ = errno != EINVAL;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = _vala_unparsed;
			_tmp10_ = endptr;
			_tmp7_ = _tmp9_ != _tmp10_;
		} else {
			_tmp7_ = FALSE;
		}
		result = _tmp7_;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	} else {
		_vala__result_ = G_MAXINT;
		result = FALSE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	}
}

static void
g4_action_handles_sort_by (G4ActionHandles* self,
                           GSimpleAction* action,
                           GVariant* state)
{
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp3_ = NULL;
	const gchar* value = NULL;
	gint mode = 0;
	const gchar* _tmp4_;
	gint _tmp5_ = 0;
	gboolean _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = state;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = _tmp1_;
	if (_tmp3_ == NULL) {
		_tmp3_ = "";
	}
	value = (const gchar*) _tmp3_;
	mode = 2;
	_tmp4_ = value;
	_tmp6_ = int_try_parse (_tmp4_, &_tmp5_, NULL, (guint) 0);
	mode = _tmp5_;
	if (_tmp6_) {
		G4Application* _tmp7_;
		_tmp7_ = self->priv->_app;
		g4_application_set_sort_mode (_tmp7_, (guint) mode);
	}
}

static void
g4_action_handles_toggle_sort (G4ActionHandles* self)
{
	G4Application* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_sort_mode (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ >= G4_SORT_MODE_MAX) {
		G4Application* _tmp3_;
		_tmp3_ = self->priv->_app;
		g4_application_set_sort_mode (_tmp3_, G4_SORT_MODE_ALBUM);
	} else {
		G4Application* _tmp4_;
		G4Application* _tmp5_;
		guint _tmp6_;
		guint _tmp7_;
		_tmp4_ = self->priv->_app;
		_tmp5_ = self->priv->_app;
		_tmp6_ = g4_application_get_sort_mode (_tmp5_);
		_tmp7_ = _tmp6_;
		g4_application_set_sort_mode (_tmp4_, _tmp7_ + 1);
	}
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		G4ActionHandles* self;
		self = _data2_->self;
		_g_free0 (_data2_->uri);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static void
____lambda159_ (G4ActionHandles* self,
                GObject* obj,
                GAsyncResult* res)
{
	G4Application* _tmp0_;
	G4MusicLoader* _tmp1_;
	G4MusicLoader* _tmp2_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_app;
	_tmp1_ = g4_application_get_loader (_tmp0_);
	_tmp2_ = _tmp1_;
	g4_music_loader_on_file_removed_finish (_tmp2_, res);
}

static void
_____lambda159__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	____lambda159_ ((G4ActionHandles*) self, source_object, res);
	g_object_unref (self);
}

static void
___lambda158_ (Block2Data* _data2_,
               GObject* obj,
               GAsyncResult* res)
{
	G4ActionHandles* self;
	GError* _inner_error0_ = NULL;
	self = _data2_->self;
	g_return_if_fail (res != NULL);
	{
		gboolean _tmp0_ = FALSE;
		G4Portal* _tmp1_;
		_tmp1_ = self->priv->_portal;
		_tmp0_ = g4_portal_trash_file_finish (_tmp1_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		if (_tmp0_) {
			G4Application* _tmp2_;
			G4MusicLoader* _tmp3_;
			G4MusicLoader* _tmp4_;
			const gchar* _tmp5_;
			GFile* _tmp6_;
			GFile* _tmp7_;
			_tmp2_ = self->priv->_app;
			_tmp3_ = g4_application_get_loader (_tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = _data2_->uri;
			_tmp6_ = g_file_new_for_uri ((const gchar*) _tmp5_);
			_tmp7_ = _tmp6_;
			g4_music_loader_on_file_removed (_tmp4_, _tmp7_, _____lambda159__gasync_ready_callback, g_object_ref (self));
			_g_object_unref0 (_tmp7_);
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		G4Window* _tmp8_ = NULL;
		G4Window* _tmp9_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp9_ = g4_window_get_default ();
		_tmp8_ = _tmp9_;
		if (_tmp8_ != NULL) {
			GError* _tmp10_;
			const gchar* _tmp11_;
			_tmp10_ = e;
			_tmp11_ = _tmp10_->message;
			g4_window_show_toast (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G4_TYPE_WINDOW, G4Window), _tmp11_, NULL);
		}
		_g_object_unref0 (_tmp8_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda158__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda158_ (self, source_object, res);
	block2_data_unref (self);
}

static void
g4_action_handles_trash_file (G4ActionHandles* self,
                              GSimpleAction* action,
                              GVariant* parameter)
{
	Block2Data* _data2_;
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = parameter;
	_tmp1_ = NULL;
	if (_tmp0_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = g_variant_get_string ((GVariant*) _tmp0_, NULL);
		_tmp1_ = _tmp2_;
	}
	_tmp3_ = g_strdup (_tmp1_);
	_data2_->uri = _tmp3_;
	_tmp4_ = _data2_->uri;
	if (_tmp4_ != NULL) {
		G4Portal* _tmp5_;
		const gchar* _tmp6_;
		_tmp5_ = self->priv->_portal;
		_tmp6_ = _data2_->uri;
		g4_portal_trash_file_async (_tmp5_, (const gchar*) _tmp6_, ____lambda158__gasync_ready_callback, block2_data_ref (_data2_));
	}
	block2_data_unref (_data2_);
	_data2_ = NULL;
}

G4Portal*
g4_action_handles_get_portal (G4ActionHandles* self)
{
	G4Portal* result;
	G4Portal* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_portal;
	result = _tmp0_;
	return result;
}

static void
g4_action_handles_class_init (G4ActionHandlesClass * klass,
                              gpointer klass_data)
{
	g4_action_handles_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &G4ActionHandles_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_g4_action_handles_get_property;
	G_OBJECT_CLASS (klass)->finalize = g4_action_handles_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), G4_ACTION_HANDLES_PORTAL_PROPERTY, g4_action_handles_properties[G4_ACTION_HANDLES_PORTAL_PROPERTY] = g4_param_spec_portal ("portal", "portal", "portal", G4_TYPE_PORTAL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
g4_action_handles_instance_init (G4ActionHandles * self,
                                 gpointer klass)
{
	G4Portal* _tmp0_;
	self->priv = g4_action_handles_get_instance_private (self);
	_tmp0_ = g4_portal_new (NULL);
	self->priv->_portal = _tmp0_;
	self->priv->_pref_window = NULL;
}

static void
g4_action_handles_finalize (GObject * obj)
{
	G4ActionHandles * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, G4_TYPE_ACTION_HANDLES, G4ActionHandles);
	_g_object_unref0 (self->priv->_app);
	_g4_portal_unref0 (self->priv->_portal);
	_g_object_unref0 (self->priv->_pref_window);
	G_OBJECT_CLASS (g4_action_handles_parent_class)->finalize (obj);
}

static GType
g4_action_handles_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (G4ActionHandlesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) g4_action_handles_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (G4ActionHandles), 0, (GInstanceInitFunc) g4_action_handles_instance_init, NULL };
	GType g4_action_handles_type_id;
	g4_action_handles_type_id = g_type_register_static (G_TYPE_OBJECT, "G4ActionHandles", &g_define_type_info, 0);
	G4ActionHandles_private_offset = g_type_add_instance_private (g4_action_handles_type_id, sizeof (G4ActionHandlesPrivate));
	return g4_action_handles_type_id;
}

GType
g4_action_handles_get_type (void)
{
	static volatile gsize g4_action_handles_type_id__once = 0;
	if (g_once_init_enter (&g4_action_handles_type_id__once)) {
		GType g4_action_handles_type_id;
		g4_action_handles_type_id = g4_action_handles_get_type_once ();
		g_once_init_leave (&g4_action_handles_type_id__once, g4_action_handles_type_id);
	}
	return g4_action_handles_type_id__once;
}

static void
_vala_g4_action_handles_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	G4ActionHandles * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, G4_TYPE_ACTION_HANDLES, G4ActionHandles);
	switch (property_id) {
		case G4_ACTION_HANDLES_PORTAL_PROPERTY:
		g4_value_set_portal (value, g4_action_handles_get_portal (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

