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

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

#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 TUBA_VIEWS_TYPE_BASE (tuba_views_base_get_type ())
#define TUBA_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBase))
#define TUBA_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))
#define TUBA_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))

typedef struct _TubaViewsBase TubaViewsBase;
typedef struct _TubaViewsBaseClass TubaViewsBaseClass;
typedef struct _TubaViewsBasePrivate TubaViewsBasePrivate;

#define TUBA_VIEWS_TYPE_DRIVE (tuba_views_drive_get_type ())
#define TUBA_VIEWS_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_DRIVE, TubaViewsDrive))
#define TUBA_VIEWS_DRIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_DRIVE, TubaViewsDriveClass))
#define TUBA_VIEWS_IS_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_DRIVE))
#define TUBA_VIEWS_IS_DRIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_DRIVE))
#define TUBA_VIEWS_DRIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_DRIVE, TubaViewsDriveClass))

typedef struct _TubaViewsDrive TubaViewsDrive;
typedef struct _TubaViewsDriveClass TubaViewsDriveClass;
typedef struct _TubaViewsDrivePrivate TubaViewsDrivePrivate;

#define TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER (tuba_views_drive_entry_popover_get_type ())
#define TUBA_VIEWS_DRIVE_ENTRY_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, TubaViewsDriveEntryPopover))
#define TUBA_VIEWS_DRIVE_ENTRY_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, TubaViewsDriveEntryPopoverClass))
#define TUBA_VIEWS_DRIVE_IS_ENTRY_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER))
#define TUBA_VIEWS_DRIVE_IS_ENTRY_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER))
#define TUBA_VIEWS_DRIVE_ENTRY_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, TubaViewsDriveEntryPopoverClass))

typedef struct _TubaViewsDriveEntryPopover TubaViewsDriveEntryPopover;
typedef struct _TubaViewsDriveEntryPopoverClass TubaViewsDriveEntryPopoverClass;

#define TUBA_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_ICESHRIMP_TYPE_FOLDER (tuba_api_iceshrimp_folder_get_type ())
#define TUBA_API_ICESHRIMP_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_ICESHRIMP_TYPE_FOLDER, TubaAPIIceshrimpFolder))
#define TUBA_API_ICESHRIMP_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_ICESHRIMP_TYPE_FOLDER, TubaAPIIceshrimpFolderClass))
#define TUBA_API_ICESHRIMP_IS_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_ICESHRIMP_TYPE_FOLDER))
#define TUBA_API_ICESHRIMP_IS_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_ICESHRIMP_TYPE_FOLDER))
#define TUBA_API_ICESHRIMP_FOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_ICESHRIMP_TYPE_FOLDER, TubaAPIIceshrimpFolderClass))

typedef struct _TubaAPIIceshrimpFolder TubaAPIIceshrimpFolder;
typedef struct _TubaAPIIceshrimpFolderClass TubaAPIIceshrimpFolderClass;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY (tuba_dialogs_composer_components_drop_overlay_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_DROP_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY, TubaDialogsComposerComponentsDropOverlay))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_DROP_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY, TubaDialogsComposerComponentsDropOverlayClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_DROP_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_DROP_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_DROP_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY, TubaDialogsComposerComponentsDropOverlayClass))

typedef struct _TubaDialogsComposerComponentsDropOverlay TubaDialogsComposerComponentsDropOverlay;
typedef struct _TubaDialogsComposerComponentsDropOverlayClass TubaDialogsComposerComponentsDropOverlayClass;
enum  {
	TUBA_VIEWS_DRIVE_0_PROPERTY,
	TUBA_VIEWS_DRIVE_NUM_PROPERTIES
};
static GParamSpec* tuba_views_drive_properties[TUBA_VIEWS_DRIVE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_VIEWS_DRIVE_TYPE_ITEM (tuba_views_drive_item_get_type ())
#define TUBA_VIEWS_DRIVE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem))
#define TUBA_VIEWS_DRIVE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItemClass))
#define TUBA_VIEWS_DRIVE_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM))
#define TUBA_VIEWS_DRIVE_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_DRIVE_TYPE_ITEM))
#define TUBA_VIEWS_DRIVE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItemClass))

typedef struct _TubaViewsDriveItem TubaViewsDriveItem;
typedef struct _TubaViewsDriveItemClass TubaViewsDriveItemClass;
typedef struct _Block64Data Block64Data;

#define TUBA_TYPE_REQUEST_V2 (tuba_request_v2_get_type ())
#define TUBA_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2))
#define TUBA_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))
#define TUBA_IS_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST_V2))
#define TUBA_IS_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST_V2))
#define TUBA_REQUEST_V2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))

typedef struct _TubaRequestV2 TubaRequestV2;
typedef struct _TubaRequestV2Class TubaRequestV2Class;
typedef enum  {
	TUBA_REQUEST_V2_METHOD_GET,
	TUBA_REQUEST_V2_METHOD_POST,
	TUBA_REQUEST_V2_METHOD_PUT,
	TUBA_REQUEST_V2_METHOD_DELETE,
	TUBA_REQUEST_V2_METHOD_PATCH
} TubaRequestV2Method;

#define TUBA_REQUEST_V2_TYPE_METHOD (tuba_request_v2_method_get_type ())

#define TUBA_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

#define TUBA_API_TYPE_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_TYPE_OOPSIE (tuba_oopsie_get_type ())

#define TUBA_TYPE_NETWORK (tuba_network_get_type ())
#define TUBA_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_NETWORK, TubaNetwork))
#define TUBA_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_NETWORK, TubaNetworkClass))
#define TUBA_IS_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_NETWORK))
#define TUBA_IS_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_NETWORK))
#define TUBA_NETWORK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_NETWORK, TubaNetworkClass))

typedef struct _TubaNetwork TubaNetwork;
typedef struct _TubaNetworkClass TubaNetworkClass;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))

#define TUBA_TYPE_APPLICATION (tuba_application_get_type ())
#define TUBA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_APPLICATION, TubaApplication))
#define TUBA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_APPLICATION, TubaApplicationClass))
#define TUBA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_APPLICATION))
#define TUBA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_APPLICATION))
#define TUBA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_APPLICATION, TubaApplicationClass))

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaViewsDriveCreateFolderRealData TubaViewsDriveCreateFolderRealData;
typedef struct _TubaViewsDriveAuthorizeIceshrimpData TubaViewsDriveAuthorizeIceshrimpData;
#define __vala_GdkFileList_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkFileList_free (var), NULL)))

#define TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET (tuba_views_drive_item_widget_get_type ())
#define TUBA_VIEWS_DRIVE_ITEM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidget))
#define TUBA_VIEWS_DRIVE_ITEM_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidgetClass))
#define TUBA_VIEWS_DRIVE_IS_ITEM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET))
#define TUBA_VIEWS_DRIVE_IS_ITEM_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET))
#define TUBA_VIEWS_DRIVE_ITEM_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidgetClass))

typedef struct _TubaViewsDriveItemWidget TubaViewsDriveItemWidget;
typedef struct _TubaViewsDriveItemWidgetClass TubaViewsDriveItemWidgetClass;

#define TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE (tuba_views_base_status_message_get_type ())
#define TUBA_VIEWS_BASE_STATUS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessage))
#define TUBA_VIEWS_BASE_STATUS_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessageClass))
#define TUBA_VIEWS_BASE_IS_STATUS_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE))
#define TUBA_VIEWS_BASE_IS_STATUS_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE))
#define TUBA_VIEWS_BASE_STATUS_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_BASE_TYPE_STATUS_MESSAGE, TubaViewsBaseStatusMessageClass))

typedef struct _TubaViewsBaseStatusMessage TubaViewsBaseStatusMessage;
typedef struct _TubaViewsBaseStatusMessageClass TubaViewsBaseStatusMessageClass;
typedef struct _TubaViewsBaseStatusMessagePrivate TubaViewsBaseStatusMessagePrivate;
typedef struct _TubaViewsDriveLoadFolderData TubaViewsDriveLoadFolderData;

#define TUBA_API_ICESHRIMP_TYPE_FILE (tuba_api_iceshrimp_file_get_type ())
#define TUBA_API_ICESHRIMP_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_ICESHRIMP_TYPE_FILE, TubaAPIIceshrimpFile))
#define TUBA_API_ICESHRIMP_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_ICESHRIMP_TYPE_FILE, TubaAPIIceshrimpFileClass))
#define TUBA_API_ICESHRIMP_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_ICESHRIMP_TYPE_FILE))
#define TUBA_API_ICESHRIMP_IS_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_ICESHRIMP_TYPE_FILE))
#define TUBA_API_ICESHRIMP_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_ICESHRIMP_TYPE_FILE, TubaAPIIceshrimpFileClass))

typedef struct _TubaAPIIceshrimpFile TubaAPIIceshrimpFile;
typedef struct _TubaAPIIceshrimpFileClass TubaAPIIceshrimpFileClass;
#define _gtk_bitset_unref0(var) ((var == NULL) ? NULL : (var = (gtk_bitset_unref (var), NULL)))

#define TUBA_DIALOGS_TYPE_MAIN_WINDOW (tuba_dialogs_main_window_get_type ())
#define TUBA_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindow))
#define TUBA_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))
#define TUBA_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))

typedef struct _TubaDialogsMainWindow TubaDialogsMainWindow;
typedef struct _TubaDialogsMainWindowClass TubaDialogsMainWindowClass;
typedef enum  {
	TUBA_ATTACHMENT_MEDIA_TYPE_IMAGE,
	TUBA_ATTACHMENT_MEDIA_TYPE_VIDEO,
	TUBA_ATTACHMENT_MEDIA_TYPE_GIFV,
	TUBA_ATTACHMENT_MEDIA_TYPE_AUDIO,
	TUBA_ATTACHMENT_MEDIA_TYPE_UNKNOWN
} TubaAttachmentMediaType;

#define TUBA_ATTACHMENT_TYPE_MEDIA_TYPE (tuba_attachment_media_type_get_type ())

#define TUBA_VIEWS_DRIVE_TYPE_ITEM_DATA (tuba_views_drive_item_data_get_type ())
typedef struct _TubaViewsDriveItemData TubaViewsDriveItemData;

#define TUBA_VIEWS_DRIVE_TYPE_REQ_DATA (tuba_views_drive_req_data_get_type ())
typedef struct _TubaViewsDriveReqData TubaViewsDriveReqData;
typedef struct _TubaViewsDriveMoveItemsRealData TubaViewsDriveMoveItemsRealData;
typedef enum  {
	TUBA_APPLICATION_QUESTION_ANSWER_YES,
	TUBA_APPLICATION_QUESTION_ANSWER_NO,
	TUBA_APPLICATION_QUESTION_ANSWER_CLOSE
} TubaApplicationQuestionAnswer;

#define TUBA_APPLICATION_TYPE_QUESTION_ANSWER (tuba_application_question_answer_get_type ())

#define TUBA_APPLICATION_TYPE_QUESTION_TEXT (tuba_application_question_text_get_type ())
typedef struct _TubaApplicationQuestionText TubaApplicationQuestionText;

#define TUBA_APPLICATION_TYPE_QUESTION_BUTTONS (tuba_application_question_buttons_get_type ())
typedef struct _TubaApplicationQuestionButtons TubaApplicationQuestionButtons;

#define TUBA_APPLICATION_TYPE_QUESTION_BUTTON (tuba_application_question_button_get_type ())
typedef struct _TubaApplicationQuestionButton TubaApplicationQuestionButton;
typedef struct _TubaViewsDriveAskDeleteSingleRealData TubaViewsDriveAskDeleteSingleRealData;
typedef struct _Block65Data Block65Data;
typedef struct _TubaViewsDriveDeleteRealManyData TubaViewsDriveDeleteRealManyData;
typedef struct _Block66Data Block66Data;
typedef struct _TubaViewsDriveUploadFilesData TubaViewsDriveUploadFilesData;
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#define TUBA_TYPE_SETTINGS (tuba_settings_get_type ())
#define TUBA_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_SETTINGS, TubaSettings))
#define TUBA_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_SETTINGS, TubaSettingsClass))
#define TUBA_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_SETTINGS))
#define TUBA_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_SETTINGS))
#define TUBA_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_SETTINGS, TubaSettingsClass))

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;

#define TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR (tuba_views_drive_item_alt_extractor_get_type ())
#define TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR, TubaViewsDriveItemAltExtractor))
#define TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR, TubaViewsDriveItemAltExtractorClass))
#define TUBA_VIEWS_DRIVE_IS_ITEM_ALT_EXTRACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR))
#define TUBA_VIEWS_DRIVE_IS_ITEM_ALT_EXTRACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR))
#define TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR, TubaViewsDriveItemAltExtractorClass))

typedef struct _TubaViewsDriveItemAltExtractor TubaViewsDriveItemAltExtractor;
typedef struct _TubaViewsDriveItemAltExtractorClass TubaViewsDriveItemAltExtractorClass;
#define _g_thread_unref0(var) ((var == NULL) ? NULL : (var = (g_thread_unref (var), NULL)))
typedef struct _TubaViewsDriveUploadFileRealData TubaViewsDriveUploadFileRealData;
typedef struct _TubaViewsDriveApplyAltTextData TubaViewsDriveApplyAltTextData;
typedef struct _TubaViewsDriveItemPrivate TubaViewsDriveItemPrivate;
enum  {
	TUBA_VIEWS_DRIVE_ITEM_0_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_FOLDER_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_FILE_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_NUM_PROPERTIES
};
static GParamSpec* tuba_views_drive_item_properties[TUBA_VIEWS_DRIVE_ITEM_NUM_PROPERTIES];
typedef struct _TubaViewsDriveItemWidgetPrivate TubaViewsDriveItemWidgetPrivate;
enum  {
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_0_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_WORKING_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_FOLDER_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILENAME_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_ID_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_NUM_PROPERTIES
};
static GParamSpec* tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_NUM_PROPERTIES];
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _TubaViewsDriveItemWidgetOnMsChangeRealData TubaViewsDriveItemWidgetOnMsChangeRealData;
typedef struct _TubaViewsDriveItemWidgetOnAltRealData TubaViewsDriveItemWidgetOnAltRealData;
typedef struct _TubaViewsDriveItemWidgetOnRenameRealData TubaViewsDriveItemWidgetOnRenameRealData;
typedef void (*TubaHelperImageOnItemChangedFn) (GdkPaintable* data, gpointer user_data);
enum  {
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_REFRESH_SIGNAL,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_DELETE_ME_SIGNAL,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_OPEN_ME_SIGNAL,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILL_RESERVED_NAMES_SIGNAL,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_PRESSED_SIGNAL,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_MOVE_SIGNAL,
	TUBA_VIEWS_DRIVE_ITEM_WIDGET_NUM_SIGNALS
};
static guint tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_NUM_SIGNALS] = {0};
typedef struct _TubaViewsDriveEntryPopoverPrivate TubaViewsDriveEntryPopoverPrivate;
enum  {
	TUBA_VIEWS_DRIVE_ENTRY_POPOVER_0_PROPERTY,
	TUBA_VIEWS_DRIVE_ENTRY_POPOVER_TEXT_PROPERTY,
	TUBA_VIEWS_DRIVE_ENTRY_POPOVER_NUM_PROPERTIES
};
static GParamSpec* tuba_views_drive_entry_popover_properties[TUBA_VIEWS_DRIVE_ENTRY_POPOVER_NUM_PROPERTIES];
enum  {
	TUBA_VIEWS_DRIVE_ENTRY_POPOVER_DONE_SIGNAL,
	TUBA_VIEWS_DRIVE_ENTRY_POPOVER_NUM_SIGNALS
};
static guint tuba_views_drive_entry_popover_signals[TUBA_VIEWS_DRIVE_ENTRY_POPOVER_NUM_SIGNALS] = {0};
typedef struct _TubaViewsDriveItemAltExtractorPrivate TubaViewsDriveItemAltExtractorPrivate;
enum  {
	TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_0_PROPERTY,
	TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_NUM_PROPERTIES
};
static GParamSpec* tuba_views_drive_item_alt_extractor_properties[TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_NUM_PROPERTIES];
enum  {
	TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_EXTRACTED_ALT_SIGNAL,
	TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_NUM_SIGNALS
};
static guint tuba_views_drive_item_alt_extractor_signals[TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_NUM_SIGNALS] = {0};

struct _TubaViewsBase {
	AdwBreakpointBin parent_instance;
	TubaViewsBasePrivate * priv;
	AdwHeaderBar* header;
	AdwToolbarView* toolbar_view;
	GtkScrolledWindow* scrolled;
	GtkOverlay* scrolled_overlay;
	GtkRevealer* scroll_to_top_rev;
	GtkButton* scroll_to_top;
	GtkStack* states;
	AdwClamp* content_box;
	GtkButton* status_button;
};

struct _TubaViewsBaseClass {
	AdwBreakpointBinClass parent_class;
	void (*scroll_page) (TubaViewsBase* self, gboolean up);
	void (*unbind_listboxes) (TubaViewsBase* self);
	void (*build_actions) (TubaViewsBase* self);
	void (*build_header) (TubaViewsBase* self);
	void (*clear) (TubaViewsBase* self);
	void (*on_shown) (TubaViewsBase* self);
	void (*on_hidden) (TubaViewsBase* self);
	void (*on_content_changed) (TubaViewsBase* self);
	void (*on_error) (TubaViewsBase* self, gint32 code, const gchar* reason);
};

struct _TubaViewsDrive {
	TubaViewsBase parent_instance;
	TubaViewsDrivePrivate * priv;
};

struct _TubaViewsDriveClass {
	TubaViewsBaseClass parent_class;
};

struct _TubaViewsDrivePrivate {
	gboolean _working;
	GtkButton* go_back_btn;
	GtkMenuButton* create_folder_btn;
	GtkButton* upload_file_btn;
	TubaViewsDriveEntryPopover* create_folder_btn_popover;
	GtkButton* cancel_btn;
	GtkDropTarget* back_drop_target_controller;
	GCancellable* main_cancellable;
	TubaAPIIceshrimpFolder* _current_folder;
	GtkGridView* grid;
	GtkMultiSelection* selection;
	GListStore* store;
	TubaDialogsComposerComponentsDropOverlay* drop_overlay;
	GtkProgressBar* osd_bar;
	guint bytes_written;
	gsize total_bytes;
};

struct _Block64Data {
	int _ref_count_;
	TubaViewsDrive* self;
	TubaViewsDriveEntryPopover* popover;
};

typedef enum  {
	TUBA_OOPSIE_USER,
	TUBA_OOPSIE_PARSING,
	TUBA_OOPSIE_INSTANCE,
	TUBA_OOPSIE_INTERNAL,
	TUBA_OOPSIE_HTTP_401 = 401,
	TUBA_OOPSIE_HTTP_403 = 403,
	TUBA_OOPSIE_HTTP_404 = 404,
	TUBA_OOPSIE_HTTP_410 = 410,
	TUBA_OOPSIE_HTTP_422 = 422,
	TUBA_OOPSIE_HTTP_429 = 429,
	TUBA_OOPSIE_HTTP_500 = 500,
	TUBA_OOPSIE_HTTP_503 = 503
} TubaOopsie;
#define TUBA_OOPSIE tuba_oopsie_quark ()

struct _TubaViewsDriveCreateFolderRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	gchar* name;
	gboolean result;
	JsonBuilder* builder;
	JsonBuilder* _tmp0_;
	JsonBuilder* _tmp1_;
	JsonBuilder* _tmp2_;
	JsonBuilder* _tmp3_;
	JsonBuilder* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	TubaAPIIceshrimpFolder* _tmp7_;
	TubaAPIIceshrimpFolder* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	TubaAPIIceshrimpFolder* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	JsonBuilder* _tmp14_;
	JsonBuilder* _tmp15_;
	TubaAPIIceshrimpFolder* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	JsonBuilder* _tmp19_;
	TubaRequestV2* req;
	TubaAccountStore* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	TubaAccountStore* _tmp24_;
	TubaInstanceAccount* _tmp25_;
	TubaInstanceAccount* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	TubaRequestV2* _tmp30_;
	TubaRequestV2* _tmp31_;
	JsonBuilder* _tmp32_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp33_;
	GInputStream* _tmp34_;
	JsonParser* parser;
	GInputStream* _tmp35_;
	JsonParser* _tmp36_;
	JsonNode* node;
	TubaNetwork* _tmp37_;
	JsonParser* _tmp38_;
	JsonNode* _tmp39_;
	TubaEntity* entity;
	JsonNode* _tmp40_;
	JsonNode* _tmp41_;
	TubaEntity* _tmp42_;
	TubaEntity* _tmp43_;
	TubaAPIIceshrimpFolder* _tmp44_;
	GeeArrayList* _tmp45_;
	GeeArrayList* _tmp46_;
	TubaAPIIceshrimpFolder* _tmp47_;
	GeeArrayList* _tmp48_;
	GeeArrayList* _tmp49_;
	TubaAPIIceshrimpFolder* _tmp50_;
	GeeArrayList* _tmp51_;
	GeeArrayList* _tmp52_;
	TubaEntity* _tmp53_;
	GListStore* _tmp54_;
	TubaEntity* _tmp55_;
	TubaViewsDriveItem* _tmp56_;
	GObject** _tmp57_;
	GObject** _tmp58_;
	gint _tmp58__length1;
	GError* e;
	TubaApplication* _tmp59_;
	GError* _tmp60_;
	const gchar* _tmp61_;
	gchar* _tmp62_;
	gchar* _tmp63_;
	GError* _tmp64_;
	gchar* _tmp65_;
	gchar* _tmp66_;
	GError* _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	gchar* _tmp70_;
	gchar* _tmp71_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveAuthorizeIceshrimpData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	TubaRequestV2* req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp5_;
	GInputStream* _tmp6_;
	JsonParser* parser;
	GInputStream* _tmp7_;
	JsonParser* _tmp8_;
	JsonNode* node;
	TubaNetwork* _tmp9_;
	JsonParser* _tmp10_;
	JsonNode* _tmp11_;
	JsonNode* _tmp12_;
	GError* _tmp13_;
	gchar* key;
	JsonNode* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gboolean _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	GError* _tmp20_;
	TubaAccountStore* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	const gchar* _tmp24_;
	GError* e;
	GError* _tmp25_;
	GError* _tmp26_;
	const gchar* _tmp27_;
	GError* _inner_error0_;
};

struct _TubaViewsBaseStatusMessage {
	GObject parent_instance;
	TubaViewsBaseStatusMessagePrivate * priv;
	gchar* title;
	gchar* message;
	gboolean loading;
};

struct _TubaViewsBaseStatusMessageClass {
	GObjectClass parent_class;
};

struct _TubaViewsDriveLoadFolderData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	gchar* id;
	TubaViewsBaseStatusMessage* _tmp0_;
	TubaViewsBaseStatusMessage* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* folder_id;
	gchar* _tmp6_;
	TubaRequestV2* req;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	TubaAccountStore* _tmp11_;
	TubaInstanceAccount* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaAccountStore* _tmp15_;
	TubaInstanceAccount* _tmp16_;
	TubaInstanceAccount* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	TubaRequestV2* _tmp21_;
	TubaRequestV2* _tmp22_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp23_;
	GInputStream* _tmp24_;
	JsonParser* parser;
	GInputStream* _tmp25_;
	JsonParser* _tmp26_;
	JsonNode* node;
	TubaNetwork* _tmp27_;
	JsonParser* _tmp28_;
	JsonNode* _tmp29_;
	TubaAPIIceshrimpFolder* _tmp30_;
	JsonNode* _tmp31_;
	TubaAPIIceshrimpFolder* _tmp32_;
	const gchar* _tmp33_;
	TubaAPIIceshrimpFolder* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	TubaAPIIceshrimpFolder* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	TubaAPIIceshrimpFolder* _tmp40_;
	TubaViewsDriveEntryPopover* _tmp41_;
	TubaViewsDriveEntryPopover* _tmp42_;
	GError* e;
	GError* _tmp43_;
	GError* _tmp44_;
	const gchar* _tmp45_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveItemData {
	gchar* id;
	gchar* name;
	gboolean folder;
	TubaViewsDriveItem* item;
};

struct _TubaViewsDriveReqData {
	TubaRequestV2* req;
	TubaViewsDriveItemData item_data;
};

struct _TubaViewsDriveMoveItemsRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	gchar* to_folder;
	TubaViewsDriveItemData* items;
	gint items_length1;
	gboolean requires_refresh;
	GtkButton* _tmp0_;
	JsonBuilder* builder;
	JsonBuilder* _tmp1_;
	JsonBuilder* _tmp2_;
	JsonBuilder* _tmp3_;
	JsonBuilder* _tmp4_;
	JsonBuilder* _tmp5_;
	JsonBuilder* _tmp6_;
	TubaViewsDriveReqData* rqs;
	TubaViewsDriveReqData* _tmp7_;
	gint rqs_length1;
	gint _rqs_size_;
	TubaViewsDriveItemData* item_data_collection;
	gint item_data_collection_length1;
	gint _item_data_collection_size_;
	gint item_data_it;
	TubaViewsDriveItemData _tmp8_;
	TubaViewsDriveItemData _tmp9_;
	TubaViewsDriveItemData item_data;
	const gchar* _tmp10_;
	TubaViewsDriveItemData _tmp11_;
	TubaRequestV2* req;
	const gchar* _tmp12_;
	TubaViewsDriveItemData _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	TubaAccountStore* _tmp18_;
	TubaInstanceAccount* _tmp19_;
	TubaInstanceAccount* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	TubaAccountStore* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	TubaInstanceAccount* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	TubaRequestV2* _tmp28_;
	TubaRequestV2* _tmp29_;
	TubaRequestV2* _tmp30_;
	JsonBuilder* _tmp31_;
	TubaRequestV2* _tmp32_;
	TubaRequestV2* _tmp33_;
	TubaViewsDriveItemData _tmp34_;
	TubaViewsDriveItemData _tmp35_;
	TubaViewsDriveItemData _tmp36_;
	TubaViewsDriveReqData _tmp37_;
	gdouble step;
	TubaViewsDriveReqData* _tmp38_;
	gint _tmp38__length1;
	TubaViewsDriveReqData* _tmp39_;
	gint _tmp39__length1;
	TubaViewsDriveReqData* rq_collection;
	gint rq_collection_length1;
	gint _rq_collection_size_;
	gint rq_it;
	TubaViewsDriveReqData _tmp40_;
	TubaViewsDriveReqData _tmp41_;
	TubaViewsDriveReqData rq;
	GCancellable* _tmp42_;
	gdouble _tmp43_;
	gdouble _tmp44_;
	TubaViewsDriveReqData _tmp45_;
	TubaRequestV2* _tmp46_;
	GInputStream* _tmp47_;
	GInputStream* _tmp48_;
	guint pos;
	GListStore* _tmp49_;
	TubaViewsDriveReqData _tmp50_;
	TubaViewsDriveItemData _tmp51_;
	TubaViewsDriveItem* _tmp52_;
	guint _tmp53_;
	gboolean _tmp54_;
	GListStore* _tmp55_;
	GError* e;
	TubaApplication* _tmp56_;
	TubaViewsDriveReqData _tmp57_;
	TubaViewsDriveItemData _tmp58_;
	const gchar* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	GError* _tmp62_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	TubaViewsDriveReqData _tmp66_;
	TubaViewsDriveItemData _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	GError* _tmp70_;
	gchar* _tmp71_;
	gchar* _tmp72_;
	GError* _tmp73_;
	const gchar* _tmp74_;
	const gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	GError* _inner_error0_;
};

struct _TubaApplicationQuestionText {
	gchar* text;
	gboolean use_markup;
};

struct _TubaApplicationQuestionButton {
	gchar* label;
	AdwResponseAppearance appearance;
};

struct _TubaApplicationQuestionButtons {
	TubaApplicationQuestionButton yes;
	TubaApplicationQuestionButton no;
};

struct _TubaViewsDriveAskDeleteSingleRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	TubaViewsDriveItemWidget* item;
	TubaApplicationQuestionAnswer qs;
	TubaApplication* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	TubaApplicationQuestionText _tmp5_;
	TubaApplicationQuestionText _tmp6_;
	TubaApplication* _tmp7_;
	TubaDialogsMainWindow* _tmp8_;
	TubaDialogsMainWindow* _tmp9_;
	TubaApplicationQuestionButtons _tmp10_;
	TubaApplicationQuestionAnswer _tmp11_;
	const gchar* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	TubaRequestV2* req;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	TubaAccountStore* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	TubaInstanceAccount* _tmp24_;
	TubaAccountStore* _tmp25_;
	TubaInstanceAccount* _tmp26_;
	TubaInstanceAccount* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	TubaRequestV2* _tmp31_;
	TubaRequestV2* _tmp32_;
	TubaRequestV2* _tmp33_;
	GInputStream* _tmp34_;
	GInputStream* _tmp35_;
	guint pos;
	GListStore* _tmp36_;
	TubaViewsDriveItem* _tmp37_;
	TubaViewsDriveItem* _tmp38_;
	guint _tmp39_;
	gboolean _tmp40_;
	GListStore* _tmp41_;
	GError* e;
	TubaApplication* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	GError* _tmp47_;
	const gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	const gchar* _tmp51_;
	gboolean _tmp52_;
	gboolean _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	GError* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	GError* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	GError* _inner_error0_;
};

struct _Block65Data {
	int _ref_count_;
	TubaViewsDrive* self;
	TubaViewsDriveItemData* items;
	gint items_length1;
	gint _items_size_;
	gchar** undeletable_messages;
	gint undeletable_messages_length1;
	gint _undeletable_messages_size_;
};

struct _TubaViewsDriveDeleteRealManyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	TubaViewsDriveItemData* items;
	gint items_length1;
	gboolean requires_refresh;
	GtkButton* _tmp0_;
	TubaViewsDriveReqData* rqs;
	TubaViewsDriveReqData* _tmp1_;
	gint rqs_length1;
	gint _rqs_size_;
	TubaViewsDriveItemData* item_data_collection;
	gint item_data_collection_length1;
	gint _item_data_collection_size_;
	gint item_data_it;
	TubaViewsDriveItemData _tmp2_;
	TubaViewsDriveItemData _tmp3_;
	TubaViewsDriveItemData item_data;
	const gchar* _tmp4_;
	TubaViewsDriveItemData _tmp5_;
	const gchar* _tmp6_;
	TubaViewsDriveItemData _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaAccountStore* _tmp16_;
	TubaInstanceAccount* _tmp17_;
	TubaInstanceAccount* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	TubaRequestV2* _tmp22_;
	TubaViewsDriveItemData _tmp23_;
	TubaViewsDriveItemData _tmp24_;
	TubaViewsDriveItemData _tmp25_;
	TubaViewsDriveReqData _tmp26_;
	gdouble step;
	TubaViewsDriveReqData* _tmp27_;
	gint _tmp27__length1;
	TubaViewsDriveReqData* _tmp28_;
	gint _tmp28__length1;
	TubaViewsDriveReqData* rq_collection;
	gint rq_collection_length1;
	gint _rq_collection_size_;
	gint rq_it;
	TubaViewsDriveReqData _tmp29_;
	TubaViewsDriveReqData _tmp30_;
	TubaViewsDriveReqData rq;
	GCancellable* _tmp31_;
	gdouble _tmp32_;
	gdouble _tmp33_;
	TubaViewsDriveReqData _tmp34_;
	TubaRequestV2* _tmp35_;
	GInputStream* _tmp36_;
	GInputStream* _tmp37_;
	guint pos;
	GListStore* _tmp38_;
	TubaViewsDriveReqData _tmp39_;
	TubaViewsDriveItemData _tmp40_;
	TubaViewsDriveItem* _tmp41_;
	guint _tmp42_;
	gboolean _tmp43_;
	GListStore* _tmp44_;
	GError* e;
	TubaApplication* _tmp45_;
	TubaViewsDriveReqData _tmp46_;
	TubaViewsDriveItemData _tmp47_;
	const gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	GError* _tmp51_;
	const gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	TubaViewsDriveReqData _tmp55_;
	TubaViewsDriveItemData _tmp56_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	GError* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	GError* _tmp62_;
	const gchar* _tmp63_;
	const gchar* _tmp64_;
	gchar* _tmp65_;
	gchar* _tmp66_;
	GError* _inner_error0_;
};

struct _Block66Data {
	int _ref_count_;
	TubaViewsDrive* self;
	GtkFileDialog* chooser;
};

struct _TubaViewsDriveUploadFilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	GFile** files_to_upload;
	gint files_to_upload_length1;
	GtkButton* _tmp0_;
	TubaAPIIceshrimpFolder* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	TubaAPIIceshrimpFolder* _tmp4_;
	GeeArrayList* _tmp5_;
	GeeArrayList* _tmp6_;
	gchar** reserved;
	gchar** _tmp7_;
	gint reserved_length1;
	gint _reserved_size_;
	GeeArrayList* _file_list;
	TubaAPIIceshrimpFolder* _tmp8_;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	gint _file_size;
	GeeArrayList* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	gint _file_index;
	gint _tmp14_;
	gint _tmp15_;
	TubaAPIIceshrimpFile* file;
	GeeArrayList* _tmp16_;
	gpointer _tmp17_;
	TubaAPIIceshrimpFile* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gdouble step;
	gint _tmp22_;
	TubaAPIIceshrimpFolder* _tmp23_;
	GeeArrayList* _tmp24_;
	GeeArrayList* _tmp25_;
	TubaAPIIceshrimpFolder* _tmp26_;
	GeeArrayList* _tmp27_;
	GeeArrayList* _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	gint folders_start_pos;
	gchar* to_folder;
	TubaAPIIceshrimpFolder* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	GFile** file_collection;
	gint file_collection_length1;
	gint _file_collection_size_;
	gint file_it;
	GFile* _tmp35_;
	GFile* _vala1_file;
	GCancellable* _tmp36_;
	gdouble _tmp37_;
	gdouble _tmp38_;
	gdouble progress_before;
	gdouble _tmp39_;
	gdouble _tmp40_;
	TubaAPIIceshrimpFile* is_file;
	const gchar* _tmp41_;
	GFile* _tmp42_;
	TubaAPIIceshrimpFile* _tmp43_;
	TubaAPIIceshrimpFile* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar** _tmp47_;
	gint _tmp47__length1;
	TubaApplication* _tmp48_;
	TubaAPIIceshrimpFile* _tmp49_;
	const gchar* _tmp50_;
	const gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* _tmp53_;
	TubaAPIIceshrimpFolder* _tmp54_;
	GeeArrayList* _tmp55_;
	GeeArrayList* _tmp56_;
	TubaAPIIceshrimpFile* _tmp57_;
	GListStore* _tmp58_;
	TubaAPIIceshrimpFile* _tmp59_;
	TubaViewsDriveItem* _tmp60_;
	GObject** _tmp61_;
	GObject** _tmp62_;
	gint _tmp62__length1;
	TubaAPIIceshrimpFile* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	GError* e;
	GError* _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	GError* _tmp70_;
	gchar* _tmp71_;
	gchar* _tmp72_;
	gchar* _tmp73_;
	gchar* _tmp74_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveUploadFileRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	gchar* to_folder;
	GFile* file;
	TubaAPIIceshrimpFile* result;
	GBytes* buffer;
	gchar* mime;
	gchar* uri;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	guint8* contents;
	gint contents_length1;
	gint _contents_size_;
	guint8* _tmp5_;
	gsize _tmp6_;
	GFileInfo* type;
	GFileInfo* _tmp7_;
	GFileInfo* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	GError* e;
	const gchar* _tmp11_;
	GError* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GError* _tmp16_;
	GError* _tmp17_;
	guint8* _tmp18_;
	gint _tmp18__length1;
	guint8* _tmp19_;
	gint _tmp19__length1;
	GBytes* _tmp20_;
	GBytes* _tmp21_;
	gchar* filename;
	gchar* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* folder_id;
	gchar* _tmp30_;
	TubaRequestV2* msg;
	TubaAccountStore* _tmp31_;
	TubaInstanceAccount* _tmp32_;
	TubaInstanceAccount* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	TubaAccountStore* _tmp41_;
	TubaInstanceAccount* _tmp42_;
	TubaInstanceAccount* _tmp43_;
	TubaInstanceAccount* _tmp44_;
	TubaAccountStore* _tmp45_;
	TubaInstanceAccount* _tmp46_;
	TubaInstanceAccount* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	gchar* _tmp50_;
	TubaRequestV2* _tmp51_;
	TubaRequestV2* _tmp52_;
	TubaRequestV2* _tmp53_;
	const gchar* _tmp54_;
	GBytes* _tmp55_;
	TubaRequestV2* _tmp56_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp57_;
	GInputStream* _tmp58_;
	GInputStream* _tmp59_;
	GError* _tmp60_;
	GCancellable* _tmp61_;
	GError* _tmp62_;
	JsonParser* parser;
	GInputStream* _tmp63_;
	JsonParser* _tmp64_;
	JsonNode* node;
	TubaNetwork* _tmp65_;
	JsonParser* _tmp66_;
	JsonNode* _tmp67_;
	TubaAPIIceshrimpFile* entity;
	JsonNode* _tmp68_;
	JsonNode* _tmp69_;
	TubaEntity* _tmp70_;
	gboolean _tmp71_;
	TubaAPIIceshrimpFile* _tmp72_;
	const gchar* _tmp73_;
	const gchar* _tmp74_;
	TubaSettings* _tmp75_;
	gboolean _tmp76_;
	gboolean _tmp77_;
	TubaViewsDriveItemAltExtractor* working_loader;
	const gchar* _tmp78_;
	TubaAPIIceshrimpFile* _tmp79_;
	TubaViewsDriveItemAltExtractor* _tmp80_;
	TubaViewsDriveItemAltExtractor* _tmp81_;
	const gchar* _tmp82_;
	const gchar* _tmp83_;
	gchar* _tmp84_;
	gchar* _tmp85_;
	TubaViewsDriveItemAltExtractor* _tmp86_;
	GThread* _tmp87_;
	GThread* _tmp88_;
	GError* _vala1_e;
	const gchar* _tmp89_;
	GError* _tmp90_;
	const gchar* _tmp91_;
	const gchar* _tmp92_;
	gchar* _tmp93_;
	gchar* _tmp94_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveApplyAltTextData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDrive* self;
	gchar* new_alt_text;
	TubaAPIIceshrimpFile* is_file;
	JsonBuilder* builder;
	JsonBuilder* _tmp0_;
	TubaRequestV2* req;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TubaAccountStore* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaAccountStore* _tmp10_;
	TubaInstanceAccount* _tmp11_;
	TubaInstanceAccount* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	TubaRequestV2* _tmp16_;
	TubaRequestV2* _tmp17_;
	GInputStream* _tmp18_;
	GInputStream* _tmp19_;
	GError* e;
	const gchar* _tmp20_;
	GError* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	GError* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveItem {
	GObject parent_instance;
	TubaViewsDriveItemPrivate * priv;
};

struct _TubaViewsDriveItemClass {
	GObjectClass parent_class;
};

struct _TubaViewsDriveItemPrivate {
	TubaAPIIceshrimpFolder* _folder;
	TubaAPIIceshrimpFile* _file;
};

struct _TubaViewsDriveItemWidget {
	GtkBox parent_instance;
	TubaViewsDriveItemWidgetPrivate * priv;
};

struct _TubaViewsDriveItemWidgetClass {
	GtkBoxClass parent_class;
};

struct _TubaViewsDriveItemWidgetPrivate {
	gboolean _working;
	gulong last_style_manager_notify;
	TubaViewsDriveItem* _item;
	GtkImage* image;
	GtkLabel* label;
	GtkPopoverMenu* context_menu;
	GtkGestureClick* gesture_click_controller_grab;
	GtkGestureClick* gesture_click_controller;
	GtkGestureLongPress* gesture_lp_controller;
	TubaViewsDriveEntryPopover* rename_popover;
	TubaViewsDriveEntryPopover* alt_popover;
	GSimpleAction** file_only_actions;
	gint file_only_actions_length1;
	gint _file_only_actions_size_;
	GSimpleAction* ms_action;
	GSimpleAction* delete_action;
	GtkImage* indicator_alt;
	GtkImage* indicator_avi;
	GtkImage* indicator_sensitive;
	GtkBox* indicator_box;
	GtkDropTarget* drop_target_controller;
	gdouble drag_x;
	gdouble drag_y;
};

struct _TubaViewsDriveItemWidgetOnMsChangeRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDriveItemWidget* self;
	JsonBuilder* builder;
	JsonBuilder* _tmp0_;
	TubaViewsDriveItem* _tmp1_;
	TubaViewsDriveItem* _tmp2_;
	TubaAPIIceshrimpFile* _tmp3_;
	TubaAPIIceshrimpFile* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	TubaRequestV2* req;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaAccountStore* _tmp16_;
	TubaInstanceAccount* _tmp17_;
	TubaInstanceAccount* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	TubaRequestV2* _tmp22_;
	TubaRequestV2* _tmp23_;
	GInputStream* _tmp24_;
	GInputStream* _tmp25_;
	GSimpleAction* _tmp26_;
	TubaViewsDriveItem* _tmp27_;
	TubaViewsDriveItem* _tmp28_;
	TubaAPIIceshrimpFile* _tmp29_;
	TubaAPIIceshrimpFile* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	GVariant* _tmp33_;
	TubaViewsDriveItem* _tmp34_;
	TubaViewsDriveItem* _tmp35_;
	TubaAPIIceshrimpFile* _tmp36_;
	TubaAPIIceshrimpFile* _tmp37_;
	TubaViewsDriveItem* _tmp38_;
	TubaViewsDriveItem* _tmp39_;
	TubaAPIIceshrimpFile* _tmp40_;
	TubaAPIIceshrimpFile* _tmp41_;
	gboolean _tmp42_;
	gboolean _tmp43_;
	GError* e;
	TubaApplication* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	GError* _tmp49_;
	const gchar* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	const gchar* _tmp53_;
	gboolean _tmp54_;
	gboolean _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	GError* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	GError* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveItemWidgetOnAltRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDriveItemWidget* self;
	gchar* new_alt;
	JsonBuilder* builder;
	JsonBuilder* _tmp0_;
	TubaRequestV2* req;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TubaAccountStore* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaAccountStore* _tmp10_;
	TubaInstanceAccount* _tmp11_;
	TubaInstanceAccount* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	TubaRequestV2* _tmp16_;
	TubaRequestV2* _tmp17_;
	GInputStream* _tmp18_;
	GInputStream* _tmp19_;
	TubaViewsDriveItem* _tmp20_;
	TubaViewsDriveItem* _tmp21_;
	TubaAPIIceshrimpFile* _tmp22_;
	TubaAPIIceshrimpFile* _tmp23_;
	GError* e;
	TubaApplication* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	GError* _tmp29_;
	const gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	GError* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	GError* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveItemWidgetOnRenameRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsDriveItemWidget* self;
	gchar* new_name;
	TubaRequestV2* req;
	gboolean _tmp0_;
	gboolean _tmp1_;
	JsonNode* node;
	JsonNode* _tmp2_;
	JsonNode* _tmp3_;
	JsonGenerator* gen;
	JsonGenerator* _tmp4_;
	JsonGenerator* _tmp5_;
	JsonNode* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	TubaRequestV2* _tmp12_;
	TubaRequestV2* _tmp13_;
	JsonGenerator* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	guint8* _tmp17_;
	gint _tmp17__length1;
	gint _tmp18_;
	guint8* _tmp19_;
	gint _tmp19__length1;
	guint8* _tmp20_;
	gint _tmp20__length1;
	GBytes* _tmp21_;
	GBytes* _tmp22_;
	JsonBuilder* builder;
	JsonBuilder* _tmp23_;
	JsonBuilder* _tmp24_;
	JsonBuilder* _tmp25_;
	JsonBuilder* _tmp26_;
	JsonBuilder* _tmp27_;
	JsonBuilder* _tmp28_;
	JsonBuilder* _tmp29_;
	JsonBuilder* _tmp30_;
	JsonBuilder* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	TubaRequestV2* _tmp37_;
	TubaRequestV2* _tmp38_;
	JsonBuilder* _tmp39_;
	TubaRequestV2* _tmp40_;
	TubaAccountStore* _tmp41_;
	TubaInstanceAccount* _tmp42_;
	TubaInstanceAccount* _tmp43_;
	TubaRequestV2* _tmp44_;
	TubaAccountStore* _tmp45_;
	TubaInstanceAccount* _tmp46_;
	TubaInstanceAccount* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	TubaRequestV2* _tmp50_;
	GInputStream* _tmp51_;
	GInputStream* _tmp52_;
	gboolean _tmp53_;
	gboolean _tmp54_;
	TubaViewsDriveItem* _tmp55_;
	TubaViewsDriveItem* _tmp56_;
	TubaAPIIceshrimpFolder* _tmp57_;
	TubaAPIIceshrimpFolder* _tmp58_;
	TubaViewsDriveItem* _tmp59_;
	TubaViewsDriveItem* _tmp60_;
	TubaAPIIceshrimpFile* _tmp61_;
	TubaAPIIceshrimpFile* _tmp62_;
	GError* e;
	TubaApplication* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	GError* _tmp68_;
	const gchar* _tmp69_;
	gchar* _tmp70_;
	gchar* _tmp71_;
	const gchar* _tmp72_;
	gboolean _tmp73_;
	gboolean _tmp74_;
	const gchar* _tmp75_;
	const gchar* _tmp76_;
	const gchar* _tmp77_;
	const gchar* _tmp78_;
	const gchar* _tmp79_;
	GError* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	GError* _tmp83_;
	const gchar* _tmp84_;
	const gchar* _tmp85_;
	gchar* _tmp86_;
	gchar* _tmp87_;
	GError* _inner_error0_;
};

struct _TubaViewsDriveEntryPopover {
	GtkPopover parent_instance;
	TubaViewsDriveEntryPopoverPrivate * priv;
};

struct _TubaViewsDriveEntryPopoverClass {
	GtkPopoverClass parent_class;
};

struct _TubaViewsDriveEntryPopoverPrivate {
	GtkLabel* title;
	GtkEntry* entry;
	GtkButton* action;
	gchar** taken_names;
	gint taken_names_length1;
	gint _taken_names_size_;
	gboolean can_be_empty;
};

struct _TubaViewsDriveItemAltExtractor {
	GObject parent_instance;
	TubaViewsDriveItemAltExtractorPrivate * priv;
};

struct _TubaViewsDriveItemAltExtractorClass {
	GObjectClass parent_class;
};

struct _TubaViewsDriveItemAltExtractorPrivate {
	GFile* file;
	TubaAPIIceshrimpFile* is_file;
};

static gint TubaViewsDrive_private_offset;
static gpointer tuba_views_drive_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaNetwork* tuba_network;
VALA_EXTERN TubaApplication* tuba_app;
VALA_EXTERN TubaSettings* tuba_settings;
static gint TubaViewsDriveItem_private_offset;
static gpointer tuba_views_drive_item_parent_class = NULL;
static gint TubaViewsDriveItemWidget_private_offset;
static gpointer tuba_views_drive_item_widget_parent_class = NULL;
static gint TubaViewsDriveEntryPopover_private_offset;
static gpointer tuba_views_drive_entry_popover_parent_class = NULL;
static gint TubaViewsDriveItemAltExtractor_private_offset;
static gpointer tuba_views_drive_item_alt_extractor_parent_class = NULL;

VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN GType tuba_views_drive_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsDrive, g_object_unref)
VALA_EXTERN GType tuba_views_drive_entry_popover_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsDriveEntryPopover, g_object_unref)
VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_iceshrimp_folder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIIceshrimpFolder, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_drop_overlay_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsDropOverlay, g_object_unref)
VALA_EXTERN void tuba_views_base_build_header (TubaViewsBase* self);
VALA_EXTERN void tuba_views_drive_cleanup (TubaViewsDrive* self);
static void tuba_views_drive_real_build_header (TubaViewsBase* base);
static void tuba_views_drive_on_cancel (TubaViewsDrive* self);
static void _tuba_views_drive_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                     gpointer self);
static void tuba_views_drive_on_go_back (TubaViewsDrive* self);
static void _tuba_views_drive_on_go_back_gtk_button_clicked (GtkButton* _sender,
                                                      gpointer self);
VALA_EXTERN GType tuba_views_drive_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsDriveItem, g_object_unref)
static gboolean tuba_views_drive_on_back_drop (TubaViewsDrive* self,
                                        GtkDropTarget* dt_controller,
                                        GValue* value,
                                        gdouble x,
                                        gdouble y);
static gboolean _tuba_views_drive_on_back_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                              GValue* value,
                                                              gdouble x,
                                                              gdouble y,
                                                              gpointer self);
VALA_EXTERN TubaViewsDriveEntryPopover* tuba_views_drive_entry_popover_new (const gchar* title_label,
                                                                const gchar* placeholder,
                                                                const gchar* button_label,
                                                                gchar** taken_names,
                                                                gint taken_names_length1,
                                                                gboolean empty_allowed);
VALA_EXTERN TubaViewsDriveEntryPopover* tuba_views_drive_entry_popover_construct (GType object_type,
                                                                      const gchar* title_label,
                                                                      const gchar* placeholder,
                                                                      const gchar* button_label,
                                                                      gchar** taken_names,
                                                                      gint taken_names_length1,
                                                                      gboolean empty_allowed);
static void tuba_views_drive_on_create_folder_done (TubaViewsDrive* self,
                                             TubaViewsDriveEntryPopover* popover,
                                             const gchar* name);
static void _tuba_views_drive_on_create_folder_done_tuba_views_drive_entry_popover_done (TubaViewsDriveEntryPopover* _sender,
                                                                                  const gchar* _result_,
                                                                                  gpointer self);
static void tuba_views_drive_upload_pick (TubaViewsDrive* self);
static void _tuba_views_drive_upload_pick_gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self);
static TubaAPIIceshrimpFolder* tuba_views_drive_get_current_folder (TubaViewsDrive* self);
static void tuba_views_drive_move_items (TubaViewsDrive* self,
                                  const gchar* to_folder,
                                  TubaViewsDriveItem* sample_item);
VALA_EXTERN const gchar* tuba_api_iceshrimp_folder_get_parentId (TubaAPIIceshrimpFolder* self);
static gboolean tuba_views_drive_get_working (TubaViewsDrive* self);
static Block64Data* block64_data_ref (Block64Data* _data64_);
static void block64_data_unref (void * _userdata_);
static void tuba_views_drive_create_folder_real (TubaViewsDrive* self,
                                          const gchar* name,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean tuba_views_drive_create_folder_real_finish (TubaViewsDrive* self,
                                                     GAsyncResult* _res_);
static void __lambda193_ (Block64Data* _data64_,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN void tuba_views_drive_entry_popover_clear (TubaViewsDriveEntryPopover* self);
static void ___lambda193__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void tuba_views_drive_create_folder_real_data_free (gpointer _data);
static gboolean tuba_views_drive_create_folder_real_co (TubaViewsDriveCreateFolderRealData* _data_);
VALA_EXTERN const gchar* tuba_api_iceshrimp_folder_get_id (TubaAPIIceshrimpFolder* self);
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN const gchar* tuba_instance_account_get_tuba_iceshrimp_api_key (TubaInstanceAccount* self);
VALA_EXTERN TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_set_force_token (TubaRequestV2* self,
                                      const gchar* value);
VALA_EXTERN void tuba_request_v2_set_body_from_json (TubaRequestV2* self,
                                         JsonBuilder* json_builder);
static void tuba_views_drive_set_working (TubaViewsDrive* self,
                                   gboolean value);
VALA_EXTERN void tuba_request_v2_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_views_drive_create_folder_real_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
VALA_EXTERN void tuba_network_get_parser_from_inputstream_async (GInputStream* in_stream,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream_finish (GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN GType tuba_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaNetwork, g_object_unref)
VALA_EXTERN JsonNode* tuba_network_parse_node (TubaNetwork* self,
                                   JsonParser* parser);
VALA_EXTERN TubaEntity* tuba_helper_entity_from_json (JsonNode* node,
                                          GType type,
                                          gboolean force);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
VALA_EXTERN GeeArrayList* tuba_api_iceshrimp_folder_get_folders (TubaAPIIceshrimpFolder* self);
VALA_EXTERN void tuba_api_iceshrimp_folder_set_folders (TubaAPIIceshrimpFolder* self,
                                            GeeArrayList* value);
VALA_EXTERN TubaViewsDriveItem* tuba_views_drive_item_new_from_folder (TubaAPIIceshrimpFolder* folder);
VALA_EXTERN TubaViewsDriveItem* tuba_views_drive_item_construct_from_folder (GType object_type,
                                                                 TubaAPIIceshrimpFolder* folder);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
static void tuba_views_drive_load_folder (TubaViewsDrive* self,
                                   const gchar* id,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
static void tuba_views_drive_load_folder_finish (TubaViewsDrive* self,
                                          GAsyncResult* _res_);
static void tuba_views_drive_authorize_iceshrimp_data_free (gpointer _data);
static void tuba_views_drive_authorize_iceshrimp (TubaViewsDrive* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static void tuba_views_drive_authorize_iceshrimp_finish (TubaViewsDrive* self,
                                                  GAsyncResult* _res_);
static gboolean tuba_views_drive_authorize_iceshrimp_co (TubaViewsDriveAuthorizeIceshrimpData* _data_);
static void tuba_views_drive_authorize_iceshrimp_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_);
VALA_EXTERN void tuba_instance_account_tuba_update_iceshrimp_api_key (TubaInstanceAccount* self,
                                                          const gchar* new_key);
VALA_EXTERN void tuba_views_base_on_error (TubaViewsBase* self,
                               gint32 code,
                               const gchar* reason);
static GdkDragAction tuba_views_drive_on_drag_enter (TubaViewsDrive* self,
                                              gdouble x,
                                              gdouble y);
VALA_EXTERN void tuba_dialogs_composer_components_drop_overlay_set_dropping (TubaDialogsComposerComponentsDropOverlay* self,
                                                                 gboolean value);
static void tuba_views_drive_on_drag_leave (TubaViewsDrive* self);
static gboolean tuba_views_drive_on_drag_drop (TubaViewsDrive* self,
                                        GValue* val,
                                        gdouble x,
                                        gdouble y);
static GdkFileList* _vala_GdkFileList_copy (GdkFileList* self);
static void _vala_GdkFileList_free (GdkFileList* self);
static void _vala_array_add65 (GFile** * array,
                        gint* length,
                        gint* size,
                        GFile* value);
static void tuba_views_drive_upload_files (TubaViewsDrive* self,
                                    GFile** files_to_upload,
                                    gint files_to_upload_length1,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
static void tuba_views_drive_upload_files_finish (TubaViewsDrive* self,
                                           GAsyncResult* _res_);
static GFile** _vala_array_dup41 (GFile** self,
                           gssize length);
static void tuba_views_drive_on_delete_action (TubaViewsDrive* self);
VALA_EXTERN GType tuba_views_drive_item_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsDriveItemWidget, g_object_unref)
static void tuba_views_drive_on_delete_request (TubaViewsDrive* self,
                                         TubaViewsDriveItemWidget* item);
static void tuba_views_drive_on_primary_click (TubaViewsDrive* self,
                                        GtkGestureClick* gesture,
                                        gint n_press,
                                        gdouble x,
                                        gdouble y);
static void tuba_views_drive_load_folder_data_free (gpointer _data);
static gboolean tuba_views_drive_load_folder_co (TubaViewsDriveLoadFolderData* _data_);
VALA_EXTERN GType tuba_views_base_status_message_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBaseStatusMessage, g_object_unref)
VALA_EXTERN TubaViewsBaseStatusMessage* tuba_views_base_status_message_new (void);
VALA_EXTERN TubaViewsBaseStatusMessage* tuba_views_base_status_message_construct (GType object_type);
VALA_EXTERN void tuba_views_base_set_base_status (TubaViewsBase* self,
                                      TubaViewsBaseStatusMessage* value);
static void tuba_views_drive_load_folder_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_);
VALA_EXTERN TubaAPIIceshrimpFolder* tuba_api_iceshrimp_folder_from (JsonNode* node,
                                                        GError** error);
static void tuba_views_drive_set_current_folder (TubaViewsDrive* self,
                                          TubaAPIIceshrimpFolder* value);
VALA_EXTERN const gchar* tuba_api_iceshrimp_folder_get_name (TubaAPIIceshrimpFolder* self);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
static void tuba_views_drive_open_folder (TubaViewsDrive* self,
                                   TubaAPIIceshrimpFolder* folder);
static void tuba_views_drive_on_store_changed (TubaViewsDrive* self);
VALA_EXTERN void tuba_views_drive_entry_popover_update_taken_names (TubaViewsDriveEntryPopover* self,
                                                        gchar** taken_names,
                                                        gint taken_names_length1);
static gchar** tuba_views_drive_reserved_names (TubaViewsDrive* self,
                                         gint* result_length1);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static void _vala_array_add66 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN GType tuba_api_iceshrimp_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIIceshrimpFile, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_iceshrimp_folder_get_files (TubaAPIIceshrimpFolder* self);
VALA_EXTERN const gchar* tuba_api_iceshrimp_file_get_filename (TubaAPIIceshrimpFile* self);
static void _vala_array_add67 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add68 (TubaViewsDriveItem** * array,
                        gint* length,
                        gint* size,
                        TubaViewsDriveItem* value);
VALA_EXTERN TubaViewsDriveItem* tuba_views_drive_item_new_from_file (TubaAPIIceshrimpFile* file);
VALA_EXTERN TubaViewsDriveItem* tuba_views_drive_item_construct_from_file (GType object_type,
                                                               TubaAPIIceshrimpFile* file);
static void _vala_array_add69 (TubaViewsDriveItem** * array,
                        gint* length,
                        gint* size,
                        TubaViewsDriveItem* value);
static void tuba_views_drive_setup_listitem_cb (TubaViewsDrive* self,
                                         GObject* obj);
VALA_EXTERN TubaViewsDriveItemWidget* tuba_views_drive_item_widget_new (void);
VALA_EXTERN TubaViewsDriveItemWidget* tuba_views_drive_item_widget_construct (GType object_type);
static void tuba_views_drive_fill_reserved_names (TubaViewsDrive* self,
                                           TubaViewsDriveEntryPopover* popover);
static void _tuba_views_drive_fill_reserved_names_tuba_views_drive_item_widget_fill_reserved_names (TubaViewsDriveItemWidget* _sender,
                                                                                             TubaViewsDriveEntryPopover* popover,
                                                                                             gpointer self);
static void tuba_views_drive_on_open_request (TubaViewsDrive* self,
                                       TubaViewsDriveItem* item);
static void _tuba_views_drive_on_open_request_tuba_views_drive_item_widget_open_me (TubaViewsDriveItemWidget* _sender,
                                                                             TubaViewsDriveItem* item,
                                                                             gpointer self);
static void _tuba_views_drive_on_delete_request_tuba_views_drive_item_widget_delete_me (TubaViewsDriveItemWidget* _sender,
                                                                                 gpointer self);
static void tuba_views_drive_on_refresh (TubaViewsDrive* self);
static void _tuba_views_drive_on_refresh_tuba_views_drive_item_widget_refresh (TubaViewsDriveItemWidget* _sender,
                                                                        gpointer self);
static void tuba_views_drive_update_rubberband (TubaViewsDrive* self,
                                         gboolean enable);
static void _tuba_views_drive_update_rubberband_tuba_views_drive_item_widget_pressed (TubaViewsDriveItemWidget* _sender,
                                                                               gboolean not_pressing,
                                                                               gpointer self);
static void _tuba_views_drive_move_items_tuba_views_drive_item_widget_move (TubaViewsDriveItemWidget* _sender,
                                                                     const gchar* to_folder,
                                                                     TubaViewsDriveItem* grabbed_item,
                                                                     gpointer self);
static void tuba_views_drive_bind_listitem_cb (TubaViewsDrive* self,
                                        GObject* item);
VALA_EXTERN void tuba_views_drive_item_widget_populate (TubaViewsDriveItemWidget* self,
                                            TubaViewsDriveItem* item);
static void tuba_views_drive_on_item_activated (TubaViewsDrive* self,
                                         guint pos);
static void tuba_views_drive_open_item_real (TubaViewsDrive* self,
                                      TubaViewsDriveItem* item);
VALA_EXTERN TubaAPIIceshrimpFolder* tuba_views_drive_item_get_folder (TubaViewsDriveItem* self);
VALA_EXTERN TubaAPIIceshrimpFile* tuba_views_drive_item_get_file (TubaViewsDriveItem* self);
VALA_EXTERN const gchar* tuba_api_iceshrimp_file_get_contentType (TubaAPIIceshrimpFile* self);
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaDialogsMainWindow* tuba_application_get_main_window (TubaApplication* self);
VALA_EXTERN GType tuba_attachment_media_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void tuba_dialogs_main_window_show_media_viewer (TubaDialogsMainWindow* self,
                                                 const gchar* url,
                                                 TubaAttachmentMediaType media_type,
                                                 GdkPaintable* preview,
                                                 GtkWidget* source_widget,
                                                 gboolean as_is,
                                                 const gchar* alt_text,
                                                 const gchar* user_friendly_url,
                                                 const gchar* blurhash,
                                                 gboolean stream,
                                                 gboolean* load_and_scroll,
                                                 gboolean reveal_media_viewer);
VALA_EXTERN const gchar* tuba_api_iceshrimp_file_get_url (TubaAPIIceshrimpFile* self);
VALA_EXTERN void tuba_utils_host_open_url (const gchar* _uri,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_);
VALA_EXTERN gboolean tuba_utils_host_open_url_finish (GAsyncResult* _res_);
static GType tuba_views_drive_item_data_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static TubaViewsDriveItemData* tuba_views_drive_item_data_dup (const TubaViewsDriveItemData* self);
static void tuba_views_drive_item_data_free (TubaViewsDriveItemData* self);
static void tuba_views_drive_item_data_copy (const TubaViewsDriveItemData* self,
                                      TubaViewsDriveItemData* dest);
static void tuba_views_drive_item_data_destroy (TubaViewsDriveItemData* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaViewsDriveItemData, tuba_views_drive_item_data_destroy)
static void _vala_array_add70 (guint* * array,
                        gint* length,
                        gint* size,
                        guint value);
static void _vala_array_add71 (guint* * array,
                        gint* length,
                        gint* size,
                        guint value);
VALA_EXTERN const gchar* tuba_api_iceshrimp_file_get_id (TubaAPIIceshrimpFile* self);
static gboolean _vala_uint_array_contains (guint * stack,
                                    gssize stack_length,
                                    const guint needle);
static void _vala_array_add72 (guint* * array,
                        gint* length,
                        gint* size,
                        guint value);
static void _vala_array_add73 (TubaViewsDriveItemData* * array,
                        gint* length,
                        gint* size,
                        const TubaViewsDriveItemData* value);
static void _vala_array_add74 (TubaViewsDriveItemData* * array,
                        gint* length,
                        gint* size,
                        const TubaViewsDriveItemData* value);
static void tuba_views_drive_move_items_real (TubaViewsDrive* self,
                                       const gchar* to_folder,
                                       TubaViewsDriveItemData* items,
                                       gint items_length1,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
static void tuba_views_drive_move_items_real_finish (TubaViewsDrive* self,
                                              GAsyncResult* _res_);
static void _vala_TubaViewsDriveItemData_array_free (TubaViewsDriveItemData * array,
                                              gssize array_length);
static void tuba_views_drive_move_items_real_data_free (gpointer _data);
static gboolean tuba_views_drive_move_items_real_co (TubaViewsDriveMoveItemsRealData* _data_);
static GType tuba_views_drive_req_data_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static TubaViewsDriveReqData* tuba_views_drive_req_data_dup (const TubaViewsDriveReqData* self);
static void tuba_views_drive_req_data_free (TubaViewsDriveReqData* self);
static void tuba_views_drive_req_data_copy (const TubaViewsDriveReqData* self,
                                     TubaViewsDriveReqData* dest);
static void tuba_views_drive_req_data_destroy (TubaViewsDriveReqData* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaViewsDriveReqData, tuba_views_drive_req_data_destroy)
static void _vala_array_add75 (TubaViewsDriveReqData* * array,
                        gint* length,
                        gint* size,
                        const TubaViewsDriveReqData* value);
static gdouble tuba_views_drive_get_progress (TubaViewsDrive* self);
static void tuba_views_drive_set_progress (TubaViewsDrive* self,
                                    gdouble value);
static void tuba_views_drive_move_items_real_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
static void _vala_TubaViewsDriveReqData_array_free (TubaViewsDriveReqData * array,
                                             gssize array_length);
static void tuba_views_drive_ask_delete_single_real_data_free (gpointer _data);
static void tuba_views_drive_ask_delete_single_real (TubaViewsDrive* self,
                                              TubaViewsDriveItemWidget* item,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static void tuba_views_drive_ask_delete_single_real_finish (TubaViewsDrive* self,
                                                     GAsyncResult* _res_);
static gboolean tuba_views_drive_ask_delete_single_real_co (TubaViewsDriveAskDeleteSingleRealData* _data_);
VALA_EXTERN GType tuba_application_question_answer_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_text_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionText* tuba_application_question_text_dup (const TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_free (TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_copy (const TubaApplicationQuestionText* self,
                                          TubaApplicationQuestionText* dest);
VALA_EXTERN void tuba_application_question_text_destroy (TubaApplicationQuestionText* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionText, tuba_application_question_text_destroy)
VALA_EXTERN GType tuba_application_question_buttons_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_button_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionButton* tuba_application_question_button_dup (const TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_free (TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_copy (const TubaApplicationQuestionButton* self,
                                            TubaApplicationQuestionButton* dest);
VALA_EXTERN void tuba_application_question_button_destroy (TubaApplicationQuestionButton* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButton, tuba_application_question_button_destroy)
VALA_EXTERN TubaApplicationQuestionButtons* tuba_application_question_buttons_dup (const TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_free (TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_copy (const TubaApplicationQuestionButtons* self,
                                             TubaApplicationQuestionButtons* dest);
VALA_EXTERN void tuba_application_question_buttons_destroy (TubaApplicationQuestionButtons* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButtons, tuba_application_question_buttons_destroy)
VALA_EXTERN void tuba_application_question (TubaApplication* self,
                                TubaApplicationQuestionText* title,
                                TubaApplicationQuestionText* msg,
                                GtkWidget* win,
                                TubaApplicationQuestionButtons* buttons,
                                GtkWidget* child,
                                gboolean skip,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN TubaApplicationQuestionAnswer tuba_application_question_finish (TubaApplication* self,
                                                                GAsyncResult* _res_);
VALA_EXTERN const gchar* tuba_views_drive_item_widget_get_filename (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_ask_delete_single_real_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean tuba_application_question_answer_truthy (TubaApplicationQuestionAnswer self);
VALA_EXTERN gboolean tuba_views_drive_item_widget_get_folder (TubaViewsDriveItemWidget* self);
VALA_EXTERN const gchar* tuba_views_drive_item_widget_get_item_id (TubaViewsDriveItemWidget* self);
VALA_EXTERN TubaViewsDriveItem* tuba_views_drive_item_widget_get_item (TubaViewsDriveItemWidget* self);
VALA_EXTERN gboolean tuba_views_drive_item_can_delete (TubaViewsDriveItem* self,
                                           gchar** reason);
static Block65Data* block65_data_ref (Block65Data* _data65_);
static void block65_data_unref (void * _userdata_);
static void _vala_array_add76 (guint* * array,
                        gint* length,
                        gint* size,
                        guint value);
static void _vala_array_add77 (guint* * array,
                        gint* length,
                        gint* size,
                        guint value);
static void _vala_array_add78 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add79 (TubaViewsDriveItemData* * array,
                        gint* length,
                        gint* size,
                        const TubaViewsDriveItemData* value);
static void _vala_array_add80 (TubaViewsDriveItemData* * array,
                        gint* length,
                        gint* size,
                        const TubaViewsDriveItemData* value);
static void ____lambda195_ (Block65Data* _data65_,
                     GObject* obj,
                     GAsyncResult* res);
static void tuba_views_drive_delete_real_many (TubaViewsDrive* self,
                                        TubaViewsDriveItemData* items,
                                        gint items_length1,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static void tuba_views_drive_delete_real_many_finish (TubaViewsDrive* self,
                                               GAsyncResult* _res_);
static void _____lambda195__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static void tuba_views_drive_delete_real_many_data_free (gpointer _data);
static gboolean tuba_views_drive_delete_real_many_co (TubaViewsDriveDeleteRealManyData* _data_);
static void _vala_array_add81 (TubaViewsDriveReqData* * array,
                        gint* length,
                        gint* size,
                        const TubaViewsDriveReqData* value);
static void tuba_views_drive_delete_real_many_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static Block66Data* block66_data_ref (Block66Data* _data66_);
static void block66_data_unref (void * _userdata_);
static void __lambda194_ (Block66Data* _data66_,
                   GObject* obj,
                   GAsyncResult* res);
static void _vala_array_add82 (GFile** * array,
                        gint* length,
                        gint* size,
                        GFile* value);
static GFile** _vala_array_dup42 (GFile** self,
                           gssize length);
static void ___lambda194__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void tuba_views_drive_upload_files_data_free (gpointer _data);
static gboolean tuba_views_drive_upload_files_co (TubaViewsDriveUploadFilesData* _data_);
VALA_EXTERN void tuba_api_iceshrimp_folder_set_files (TubaAPIIceshrimpFolder* self,
                                          GeeArrayList* value);
static void _vala_array_add83 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void tuba_views_drive_upload_file_real (TubaViewsDrive* self,
                                        const gchar* to_folder,
                                        GFile* file,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static TubaAPIIceshrimpFile* tuba_views_drive_upload_file_real_finish (TubaViewsDrive* self,
                                                                GAsyncResult* _res_,
                                                                GError** error);
static void tuba_views_drive_upload_files_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_);
static void _vala_array_add84 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void tuba_views_drive_upload_file_real_data_free (gpointer _data);
static gboolean tuba_views_drive_upload_file_real_co (TubaViewsDriveUploadFileRealData* _data_);
static guint8* _vala_array_dup43 (guint8* self,
                           gssize length);
VALA_EXTERN const gchar* tuba_instance_account_get_instance (TubaInstanceAccount* self);
VALA_EXTERN void tuba_request_v2_set_track_written_body_data (TubaRequestV2* self,
                                                  gboolean value);
VALA_EXTERN void tuba_request_v2_add_form_data_file (TubaRequestV2* self,
                                         const gchar* name,
                                         const gchar* mime,
                                         GBytes* buffer);
static void tuba_views_drive_on_upload_bytes_written (TubaViewsDrive* self,
                                               guint chunk);
static void _tuba_views_drive_on_upload_bytes_written_tuba_request_v2_wrote_body_data (TubaRequestV2* _sender,
                                                                                guint chunk_size,
                                                                                gpointer self);
static void tuba_views_drive_upload_file_real_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN gboolean tuba_settings_get_extract_alt_from_metadata (TubaSettings* self);
static GType tuba_views_drive_item_alt_extractor_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsDriveItemAltExtractor, g_object_unref)
static TubaViewsDriveItemAltExtractor* tuba_views_drive_item_alt_extractor_new (const gchar* file_uri,
                                                                         TubaAPIIceshrimpFile* is_file);
static TubaViewsDriveItemAltExtractor* tuba_views_drive_item_alt_extractor_construct (GType object_type,
                                                                               const gchar* file_uri,
                                                                               TubaAPIIceshrimpFile* is_file);
static void tuba_views_drive_on_extracted_alt_text (TubaViewsDrive* self,
                                             const gchar* new_alt_text,
                                             TubaAPIIceshrimpFile* is_file);
static void _tuba_views_drive_on_extracted_alt_text_tuba_views_drive_item_alt_extractor_extracted_alt (TubaViewsDriveItemAltExtractor* _sender,
                                                                                                const gchar* extracted_alt_text,
                                                                                                TubaAPIIceshrimpFile* is_file,
                                                                                                gpointer self);
static void tuba_views_drive_item_alt_extractor_fetch (TubaViewsDriveItemAltExtractor* self);
static gpointer _tuba_views_drive_item_alt_extractor_fetch_gthread_func (gpointer self);
VALA_EXTERN const gchar* tuba_api_iceshrimp_file_get_description (TubaAPIIceshrimpFile* self);
static void tuba_views_drive_apply_alt_text (TubaViewsDrive* self,
                                      const gchar* new_alt_text,
                                      TubaAPIIceshrimpFile* is_file,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
static void tuba_views_drive_apply_alt_text_finish (TubaViewsDrive* self,
                                             GAsyncResult* _res_);
static void tuba_views_drive_apply_alt_text_data_free (gpointer _data);
static gboolean tuba_views_drive_apply_alt_text_co (TubaViewsDriveApplyAltTextData* _data_);
static void tuba_views_drive_apply_alt_text_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
VALA_EXTERN void tuba_api_iceshrimp_file_set_description (TubaAPIIceshrimpFile* self,
                                              const gchar* value);
VALA_EXTERN TubaViewsDrive* tuba_views_drive_new (void);
VALA_EXTERN TubaViewsDrive* tuba_views_drive_construct (GType object_type);
VALA_EXTERN TubaViewsBase* tuba_views_base_new (void);
VALA_EXTERN TubaViewsBase* tuba_views_base_construct (GType object_type);
VALA_EXTERN gboolean tuba_api_iceshrimp_file_get_isAvatar (TubaAPIIceshrimpFile* self);
VALA_EXTERN gboolean tuba_api_iceshrimp_file_get_isBanner (TubaAPIIceshrimpFile* self);
VALA_EXTERN void tuba_views_drive_item_set_folder (TubaViewsDriveItem* self,
                                       TubaAPIIceshrimpFolder* value);
VALA_EXTERN void tuba_views_drive_item_set_file (TubaViewsDriveItem* self,
                                     TubaAPIIceshrimpFile* value);
VALA_EXTERN TubaViewsDriveItem* tuba_views_drive_item_new (void);
VALA_EXTERN TubaViewsDriveItem* tuba_views_drive_item_construct (GType object_type);
static void tuba_views_drive_item_finalize (GObject * obj);
static GType tuba_views_drive_item_get_type_once (void);
static void _vala_tuba_views_drive_item_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_tuba_views_drive_item_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);
VALA_EXTERN void tuba_views_drive_item_widget_cleanup (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_item_widget_update_indicators (TubaViewsDriveItemWidget* self);
VALA_EXTERN gboolean tuba_api_iceshrimp_file_get_sensitive (TubaAPIIceshrimpFile* self);
static void tuba_views_drive_item_widget_update_drop_target (TubaViewsDriveItemWidget* self,
                                                      gboolean dragging);
static gboolean tuba_views_drive_item_widget_on_drop (TubaViewsDriveItemWidget* self,
                                               GtkDropTarget* dt_controller,
                                               GValue* value,
                                               gdouble x,
                                               gdouble y);
VALA_EXTERN gboolean tuba_views_drive_item_widget_get_working (TubaViewsDriveItemWidget* self);
static GdkContentProvider* tuba_views_drive_item_widget_on_drag_prepare (TubaViewsDriveItemWidget* self,
                                                                  gdouble x,
                                                                  gdouble y);
static void tuba_views_drive_item_widget_on_drag_begin (TubaViewsDriveItemWidget* self,
                                                 GtkDragSource* ds_controller,
                                                 GdkDrag* drag);
static void tuba_views_drive_item_widget_on_drag_end (TubaViewsDriveItemWidget* self,
                                               GdkDrag* drag,
                                               gboolean delete_data);
static gboolean tuba_views_drive_item_widget_on_drag_cancel (TubaViewsDriveItemWidget* self,
                                                      GdkDrag* drag,
                                                      GdkDragCancelReason reason);
static void tuba_views_drive_item_widget_update_actions (TubaViewsDriveItemWidget* self);
static GVariant* _variant_new13 (gboolean value);
static void tuba_views_drive_item_widget_on_ms_change (TubaViewsDriveItemWidget* self,
                                                GVariant* variant);
VALA_EXTERN void tuba_views_drive_item_widget_set_working (TubaViewsDriveItemWidget* self,
                                               gboolean value);
static void tuba_views_drive_item_widget_on_ms_change_real (TubaViewsDriveItemWidget* self,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static void tuba_views_drive_item_widget_on_ms_change_real_finish (TubaViewsDriveItemWidget* self,
                                                            GAsyncResult* _res_);
static void tuba_views_drive_item_widget_on_ms_change_real_data_free (gpointer _data);
static gboolean tuba_views_drive_item_widget_on_ms_change_real_co (TubaViewsDriveItemWidgetOnMsChangeRealData* _data_);
static void tuba_views_drive_item_widget_on_ms_change_real_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_);
static GVariant* _variant_new14 (gboolean value);
VALA_EXTERN void tuba_api_iceshrimp_file_set_sensitive (TubaAPIIceshrimpFile* self,
                                            gboolean value);
static void tuba_views_drive_item_widget_on_copy (TubaViewsDriveItemWidget* self);
VALA_EXTERN void tuba_utils_host_copy (const gchar* str);
static void tuba_views_drive_item_widget_on_open (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_item_widget_on_delete (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_item_widget_on_rename (TubaViewsDriveItemWidget* self);
VALA_EXTERN void tuba_views_drive_entry_popover_set_text (TubaViewsDriveEntryPopover* self,
                                              const gchar* value);
static void tuba_views_drive_item_widget_on_rename_done (TubaViewsDriveItemWidget* self,
                                                  const gchar* new_name);
static void _tuba_views_drive_item_widget_on_rename_done_tuba_views_drive_entry_popover_done (TubaViewsDriveEntryPopover* _sender,
                                                                                       const gchar* _result_,
                                                                                       gpointer self);
static void tuba_views_drive_item_widget_on_alt_text (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_item_widget_on_alt_done (TubaViewsDriveItemWidget* self,
                                               const gchar* new_alt);
static void _tuba_views_drive_item_widget_on_alt_done_tuba_views_drive_entry_popover_done (TubaViewsDriveEntryPopover* _sender,
                                                                                    const gchar* _result_,
                                                                                    gpointer self);
static void tuba_views_drive_item_widget_on_alt_real (TubaViewsDriveItemWidget* self,
                                               const gchar* new_alt,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static void tuba_views_drive_item_widget_on_alt_real_finish (TubaViewsDriveItemWidget* self,
                                                      GAsyncResult* _res_);
static void tuba_views_drive_item_widget_on_alt_real_data_free (gpointer _data);
static gboolean tuba_views_drive_item_widget_on_alt_real_co (TubaViewsDriveItemWidgetOnAltRealData* _data_);
static void tuba_views_drive_item_widget_on_alt_real_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
static void tuba_views_drive_item_widget_on_rename_real (TubaViewsDriveItemWidget* self,
                                                  const gchar* new_name,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void tuba_views_drive_item_widget_on_rename_real_finish (TubaViewsDriveItemWidget* self,
                                                         GAsyncResult* _res_);
static void tuba_views_drive_item_widget_on_rename_real_data_free (gpointer _data);
static gboolean tuba_views_drive_item_widget_on_rename_real_co (TubaViewsDriveItemWidgetOnRenameRealData* _data_);
VALA_EXTERN void tuba_request_v2_set_body (TubaRequestV2* self,
                               const gchar* content_type,
                               GBytes* bytes);
static guint8* _vala_array_dup44 (guint8* self,
                           gssize length);
static void tuba_views_drive_item_widget_on_rename_real_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
VALA_EXTERN void tuba_views_drive_item_widget_set_filename (TubaViewsDriveItemWidget* self,
                                                const gchar* value);
VALA_EXTERN void tuba_api_iceshrimp_folder_set_name (TubaAPIIceshrimpFolder* self,
                                         const gchar* value);
VALA_EXTERN void tuba_api_iceshrimp_file_set_filename (TubaAPIIceshrimpFile* self,
                                           const gchar* value);
static void tuba_views_drive_item_widget_on_long_press (TubaViewsDriveItemWidget* self,
                                                 gdouble x,
                                                 gdouble y);
static void tuba_views_drive_item_widget_on_secondary_click (TubaViewsDriveItemWidget* self,
                                                      gint n_press,
                                                      gdouble x,
                                                      gdouble y);
VALA_EXTERN gboolean tuba_dialogs_main_window_get_is_media_viewer_visible (TubaDialogsMainWindow* self);
static void tuba_views_drive_item_widget_on_primary_click_pressed (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_item_widget_on_primary_click_released (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_item_widget_set_item (TubaViewsDriveItemWidget* self,
                                            TubaViewsDriveItem* value);
VALA_EXTERN void tuba_views_drive_item_widget_update_folder_color (TubaViewsDriveItemWidget* self);
static void tuba_views_drive_item_widget_on_thumbnail_loaded (TubaViewsDriveItemWidget* self,
                                                       GdkPaintable* data);
static void _tuba_views_drive_item_widget_update_folder_color_g_object_notify (GObject* _sender,
                                                                        GParamSpec* pspec,
                                                                        gpointer self);
VALA_EXTERN void tuba_helper_image_request_paintable (const gchar* url,
                                          const gchar* blurhash,
                                          gboolean disable_cache,
                                          TubaHelperImageOnItemChangedFn cb,
                                          gpointer cb_target,
                                          GDestroyNotify cb_target_destroy_notify,
                                          GCancellable* cancellable);
VALA_EXTERN const gchar* tuba_api_iceshrimp_file_get_thumbnailUrl (TubaAPIIceshrimpFile* self);
static void _tuba_views_drive_item_widget_on_thumbnail_loaded_tuba_helper_image_on_item_changed_fn (GdkPaintable* data,
                                                                                             gpointer self);
static void g_cclosure_user_marshal_VOID__STRING_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static GObject * tuba_views_drive_item_widget_constructor (GType type,
                                                    guint n_construct_properties,
                                                    GObjectConstructParam * construct_properties);
static GVariant* _variant_new15 (gboolean value);
static void _tuba_views_drive_item_widget_on_open_g_simple_action_activate (GSimpleAction* _sender,
                                                                     GVariant* parameter,
                                                                     gpointer self);
static void _tuba_views_drive_item_widget_on_copy_g_simple_action_activate (GSimpleAction* _sender,
                                                                     GVariant* parameter,
                                                                     gpointer self);
static void _tuba_views_drive_item_widget_on_ms_change_g_simple_action_change_state (GSimpleAction* _sender,
                                                                              GVariant* value,
                                                                              gpointer self);
static void _tuba_views_drive_item_widget_on_alt_text_g_simple_action_activate (GSimpleAction* _sender,
                                                                         GVariant* parameter,
                                                                         gpointer self);
static void _tuba_views_drive_item_widget_on_rename_g_simple_action_activate (GSimpleAction* _sender,
                                                                       GVariant* parameter,
                                                                       gpointer self);
static void _tuba_views_drive_item_widget_on_delete_g_simple_action_activate (GSimpleAction* _sender,
                                                                       GVariant* parameter,
                                                                       gpointer self);
static GVariant* _variant_new16 (const gchar* value);
static GVariant* _variant_new17 (const gchar* value);
static GVariant* _variant_new18 (const gchar* value);
static void _tuba_views_drive_item_widget_on_primary_click_pressed_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                       gint n_press,
                                                                                       gdouble x,
                                                                                       gdouble y,
                                                                                       gpointer self);
static void _tuba_views_drive_item_widget_on_primary_click_released_gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                                         gint n_press,
                                                                                         gdouble x,
                                                                                         gdouble y,
                                                                                         gpointer self);
static void _tuba_views_drive_item_widget_on_primary_click_released_gtk_gesture_click_stopped (GtkGestureClick* _sender,
                                                                                        gpointer self);
static void _tuba_views_drive_item_widget_on_secondary_click_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                 gint n_press,
                                                                                 gdouble x,
                                                                                 gdouble y,
                                                                                 gpointer self);
static void _tuba_views_drive_item_widget_on_long_press_gtk_gesture_long_press_pressed (GtkGestureLongPress* _sender,
                                                                                 gdouble x,
                                                                                 gdouble y,
                                                                                 gpointer self);
static GdkContentProvider* _tuba_views_drive_item_widget_on_drag_prepare_gtk_drag_source_prepare (GtkDragSource* _sender,
                                                                                           gdouble x,
                                                                                           gdouble y,
                                                                                           gpointer self);
static void _tuba_views_drive_item_widget_on_drag_begin_gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                                                             GdkDrag* drag,
                                                                             gpointer self);
static void _tuba_views_drive_item_widget_on_drag_end_gtk_drag_source_drag_end (GtkDragSource* _sender,
                                                                         GdkDrag* drag,
                                                                         gboolean delete_data,
                                                                         gpointer self);
static gboolean _tuba_views_drive_item_widget_on_drag_cancel_gtk_drag_source_drag_cancel (GtkDragSource* _sender,
                                                                                   GdkDrag* drag,
                                                                                   GdkDragCancelReason reason,
                                                                                   gpointer self);
static gboolean _tuba_views_drive_item_widget_on_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                                     GValue* value,
                                                                     gdouble x,
                                                                     gdouble y,
                                                                     gpointer self);
static void tuba_views_drive_item_widget_finalize (GObject * obj);
static GType tuba_views_drive_item_widget_get_type_once (void);
static void _vala_tuba_views_drive_item_widget_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_tuba_views_drive_item_widget_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec);
static gchar** _vala_array_dup45 (gchar** self,
                           gssize length);
static gchar** _vala_array_dup46 (gchar** self,
                           gssize length);
static void tuba_views_drive_entry_popover_on_action (TubaViewsDriveEntryPopover* self);
static void tuba_views_drive_entry_popover_validate (TubaViewsDriveEntryPopover* self);
VALA_EXTERN const gchar* tuba_views_drive_entry_popover_get_text (TubaViewsDriveEntryPopover* self);
static GObject * tuba_views_drive_entry_popover_constructor (GType type,
                                                      guint n_construct_properties,
                                                      GObjectConstructParam * construct_properties);
static void _tuba_views_drive_entry_popover_on_action_gtk_entry_activate (GtkEntry* _sender,
                                                                   gpointer self);
static void _tuba_views_drive_entry_popover_validate_g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self);
static void _tuba_views_drive_entry_popover_on_action_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self);
static void tuba_views_drive_entry_popover_finalize (GObject * obj);
static GType tuba_views_drive_entry_popover_get_type_once (void);
static void _vala_tuba_views_drive_entry_popover_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static void _vala_tuba_views_drive_entry_popover_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec);
VALA_EXTERN gchar* tuba_utils_exif_extract_alt_text (const gchar* path);
static void tuba_views_drive_item_alt_extractor_finalize (GObject * obj);
static GType tuba_views_drive_item_alt_extractor_get_type_once (void);
static GObject * tuba_views_drive_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_base_set_icon (TubaViewsBase* self,
                               const gchar* value);
static void _tuba_views_drive_setup_listitem_cb_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                             GObject* object,
                                                                             gpointer self);
static void _tuba_views_drive_bind_listitem_cb_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                           GObject* object,
                                                                           gpointer self);
static void _tuba_views_drive_on_store_changed_g_list_model_items_changed (GListModel* _sender,
                                                                    guint position,
                                                                    guint removed,
                                                                    guint added,
                                                                    gpointer self);
static void _tuba_views_drive_on_item_activated_gtk_grid_view_activate (GtkGridView* _sender,
                                                                 guint position,
                                                                 gpointer self);
VALA_EXTERN TubaDialogsComposerComponentsDropOverlay* tuba_dialogs_composer_components_drop_overlay_new (void);
VALA_EXTERN TubaDialogsComposerComponentsDropOverlay* tuba_dialogs_composer_components_drop_overlay_construct (GType object_type);
VALA_EXTERN void tuba_dialogs_composer_components_drop_overlay_set_title (TubaDialogsComposerComponentsDropOverlay* self,
                                                              const gchar* value);
VALA_EXTERN void tuba_dialogs_composer_components_drop_overlay_set_overlay_child (TubaDialogsComposerComponentsDropOverlay* self,
                                                                      GtkWidget* value);
static void _tuba_views_drive_on_primary_click_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                   gint n_press,
                                                                   gdouble x,
                                                                   gdouble y,
                                                                   gpointer self);
static void _tuba_views_drive_on_delete_action_g_simple_action_activate (GSimpleAction* _sender,
                                                                  GVariant* parameter,
                                                                  gpointer self);
static GdkDragAction _tuba_views_drive_on_drag_enter_gtk_drop_target_enter (GtkDropTarget* _sender,
                                                                     gdouble x,
                                                                     gdouble y,
                                                                     gpointer self);
static void _tuba_views_drive_on_drag_leave_gtk_drop_target_leave (GtkDropTarget* _sender,
                                                            gpointer self);
static gboolean _tuba_views_drive_on_drag_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                              GValue* value,
                                                              gdouble x,
                                                              gdouble y,
                                                              gpointer self);
static void _tuba_views_drive_on_refresh_tuba_application_refresh (TubaApplication* _sender,
                                                            gpointer self);
static void tuba_views_drive_finalize (GObject * obj);
static GType tuba_views_drive_get_type_once (void);
static void _vala_tuba_views_drive_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_tuba_views_drive_set_property (GObject * object,
                                          guint property_id,
                                          const 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);

static inline gpointer
tuba_views_drive_get_instance_private (TubaViewsDrive* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsDrive_private_offset);
}

void
tuba_views_drive_cleanup (TubaViewsDrive* self)
{
	GtkDropTarget* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->back_drop_target_controller;
	if (((gpointer) gtk_drop_target_get_value (_tmp0_)) != NULL) {
		GtkDropTarget* _tmp1_;
		GValue _tmp2_;
		_tmp1_ = self->priv->back_drop_target_controller;
		_tmp2_ = *gtk_drop_target_get_value (_tmp1_);
		g_value_set_object (&_tmp2_, NULL);
	}
}

static void
_tuba_views_drive_on_cancel_gtk_button_clicked (GtkButton* _sender,
                                                gpointer self)
{
	tuba_views_drive_on_cancel ((TubaViewsDrive*) self);
}

static void
_tuba_views_drive_on_go_back_gtk_button_clicked (GtkButton* _sender,
                                                 gpointer self)
{
	tuba_views_drive_on_go_back ((TubaViewsDrive*) self);
}

static gboolean
_tuba_views_drive_on_back_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                     GValue* value,
                                                     gdouble x,
                                                     gdouble y,
                                                     gpointer self)
{
	gboolean result;
	result = tuba_views_drive_on_back_drop ((TubaViewsDrive*) self, _sender, value, x, y);
	return result;
}

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

static void
_tuba_views_drive_on_create_folder_done_tuba_views_drive_entry_popover_done (TubaViewsDriveEntryPopover* _sender,
                                                                             const gchar* _result_,
                                                                             gpointer self)
{
	tuba_views_drive_on_create_folder_done ((TubaViewsDrive*) self, _sender, _result_);
}

static void
_tuba_views_drive_upload_pick_gtk_button_clicked (GtkButton* _sender,
                                                  gpointer self)
{
	tuba_views_drive_upload_pick ((TubaViewsDrive*) self);
}

static void
tuba_views_drive_real_build_header (TubaViewsBase* base)
{
	TubaViewsDrive * self;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gchar* _tmp2_;
	GtkButton* _tmp3_ = NULL;
	GtkButton* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gchar* _tmp8_;
	GtkButton* _tmp9_ = NULL;
	GtkButton* _tmp10_;
	AdwHeaderBar* _tmp11_;
	GtkButton* _tmp12_;
	GtkDropTarget* _tmp13_;
	GtkDropTarget* _tmp14_;
	GtkButton* _tmp15_;
	GtkDropTarget* _tmp16_;
	GtkEventController* _tmp17_;
	TubaViewsDriveEntryPopover* _tmp18_;
	TubaViewsDriveEntryPopover* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar** _tmp22_;
	gchar* _tmp23_;
	TubaViewsDriveEntryPopover* _tmp24_;
	GtkPopover* _tmp25_;
	GtkMenuButton* _tmp26_ = NULL;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar** _tmp29_;
	gchar* _tmp30_;
	GtkButton* _tmp31_ = NULL;
	GtkButton* _tmp32_;
	AdwHeaderBar* _tmp33_;
	GtkButton* _tmp34_;
	AdwHeaderBar* _tmp35_;
	GtkMenuButton* _tmp36_;
	AdwHeaderBar* _tmp37_;
	GtkButton* _tmp38_;
	self = (TubaViewsDrive*) base;
	TUBA_VIEWS_BASE_CLASS (tuba_views_drive_parent_class)->build_header (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_BASE, TubaViewsBase));
	_tmp0_ = g_strdup ("error");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = g_strdup (_ ("Cancel"));
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("tuba-cross-large-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp3_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	gtk_widget_set_visible ((GtkWidget*) _tmp3_, FALSE);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->cancel_btn);
	self->priv->cancel_btn = _tmp3_;
	_tmp4_ = self->priv->cancel_btn;
	g_signal_connect_object (_tmp4_, "clicked", (GCallback) _tuba_views_drive_on_cancel_gtk_button_clicked, self, 0);
	_tmp5_ = g_strdup ("go-previous-symbolic");
	_tmp6_ = g_strdup ("flat");
	_tmp7_ = g_new0 (gchar*, 1 + 1);
	_tmp7_[0] = _tmp6_;
	_tmp8_ = g_strdup (_ ("Go Back"));
	_tmp9_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_icon_name (_tmp9_, _tmp5_);
	_g_free0 (_tmp5_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp9_, _tmp7_);
	_tmp7_ = (_vala_array_free (_tmp7_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp9_, _tmp8_);
	_g_free0 (_tmp8_);
	gtk_widget_set_visible ((GtkWidget*) _tmp9_, FALSE);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->go_back_btn);
	self->priv->go_back_btn = _tmp9_;
	_tmp10_ = self->priv->go_back_btn;
	g_signal_connect_object (_tmp10_, "clicked", (GCallback) _tuba_views_drive_on_go_back_gtk_button_clicked, self, 0);
	_tmp11_ = ((TubaViewsBase*) self)->header;
	_tmp12_ = self->priv->go_back_btn;
	adw_header_bar_pack_start (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = gtk_drop_target_new (TUBA_VIEWS_DRIVE_TYPE_ITEM, GDK_ACTION_MOVE);
	_g_object_unref0 (self->priv->back_drop_target_controller);
	self->priv->back_drop_target_controller = _tmp13_;
	_tmp14_ = self->priv->back_drop_target_controller;
	g_signal_connect_object (_tmp14_, "drop", (GCallback) _tuba_views_drive_on_back_drop_gtk_drop_target_drop, self, 0);
	_tmp15_ = self->priv->go_back_btn;
	_tmp16_ = self->priv->back_drop_target_controller;
	_tmp17_ = _g_object_ref0 ((GtkEventController*) _tmp16_);
	gtk_widget_add_controller ((GtkWidget*) _tmp15_, _tmp17_);
	_tmp18_ = tuba_views_drive_entry_popover_new (_ ("New Folder"), _ ("Folder Name"), _ ("Create"), NULL, 0, FALSE);
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->create_folder_btn_popover);
	self->priv->create_folder_btn_popover = _tmp18_;
	_tmp19_ = self->priv->create_folder_btn_popover;
	g_signal_connect_object (_tmp19_, "done", (GCallback) _tuba_views_drive_on_create_folder_done_tuba_views_drive_entry_popover_done, self, 0);
	_tmp20_ = g_strdup ("tuba-folder-new-symbolic");
	_tmp21_ = g_strdup ("flat");
	_tmp22_ = g_new0 (gchar*, 1 + 1);
	_tmp22_[0] = _tmp21_;
	_tmp23_ = g_strdup (_ ("Create Folder"));
	_tmp24_ = self->priv->create_folder_btn_popover;
	_tmp25_ = _g_object_ref0 ((GtkPopover*) _tmp24_);
	_tmp26_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_menu_button_set_icon_name (_tmp26_, _tmp20_);
	_g_free0 (_tmp20_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp26_, _tmp22_);
	_tmp22_ = (_vala_array_free (_tmp22_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp26_, _tmp23_);
	_g_free0 (_tmp23_);
	gtk_menu_button_set_always_show_arrow (_tmp26_, FALSE);
	gtk_menu_button_set_popover (_tmp26_, _tmp25_);
	_g_object_unref0 (_tmp25_);
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->create_folder_btn);
	self->priv->create_folder_btn = _tmp26_;
	_tmp27_ = g_strdup ("tuba-plus-large-symbolic");
	_tmp28_ = g_strdup ("flat");
	_tmp29_ = g_new0 (gchar*, 1 + 1);
	_tmp29_[0] = _tmp28_;
	_tmp30_ = g_strdup (_ ("Upload File"));
	_tmp31_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_icon_name (_tmp31_, _tmp27_);
	_g_free0 (_tmp27_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp31_, _tmp29_);
	_tmp29_ = (_vala_array_free (_tmp29_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp31_, _tmp30_);
	_g_free0 (_tmp30_);
	g_object_ref_sink (_tmp31_);
	_g_object_unref0 (self->priv->upload_file_btn);
	self->priv->upload_file_btn = _tmp31_;
	_tmp32_ = self->priv->upload_file_btn;
	g_signal_connect_object (_tmp32_, "clicked", (GCallback) _tuba_views_drive_upload_pick_gtk_button_clicked, self, 0);
	_tmp33_ = ((TubaViewsBase*) self)->header;
	_tmp34_ = self->priv->upload_file_btn;
	adw_header_bar_pack_end (_tmp33_, (GtkWidget*) _tmp34_);
	_tmp35_ = ((TubaViewsBase*) self)->header;
	_tmp36_ = self->priv->create_folder_btn;
	adw_header_bar_pack_end (_tmp35_, (GtkWidget*) _tmp36_);
	_tmp37_ = ((TubaViewsBase*) self)->header;
	_tmp38_ = self->priv->cancel_btn;
	adw_header_bar_pack_end (_tmp37_, (GtkWidget*) _tmp38_);
}

static gboolean
tuba_views_drive_on_back_drop (TubaViewsDrive* self,
                               GtkDropTarget* dt_controller,
                               GValue* value,
                               gdouble x,
                               gdouble y)
{
	gboolean _tmp0_ = FALSE;
	TubaAPIIceshrimpFolder* _tmp1_;
	TubaAPIIceshrimpFolder* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (dt_controller != NULL, FALSE);
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp1_ = self->priv->_current_folder;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = ((gpointer) gtk_drop_target_get_value (dt_controller)) == NULL;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp2_ = self->priv->_current_folder;
	_tmp3_ = tuba_api_iceshrimp_folder_get_parentId (_tmp2_);
	_tmp4_ = _tmp3_;
	tuba_views_drive_move_items (self, _tmp4_, g_value_get_object (gtk_drop_target_get_value (dt_controller)));
	result = TRUE;
	return result;
}

static void
tuba_views_drive_on_cancel (TubaViewsDrive* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_views_drive_get_working (self);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = self->priv->main_cancellable;
	g_cancellable_cancel (_tmp2_);
}

static Block64Data*
block64_data_ref (Block64Data* _data64_)
{
	g_atomic_int_inc (&_data64_->_ref_count_);
	return _data64_;
}

static void
block64_data_unref (void * _userdata_)
{
	Block64Data* _data64_;
	_data64_ = (Block64Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data64_->_ref_count_)) {
		TubaViewsDrive* self;
		self = _data64_->self;
		_g_object_unref0 (_data64_->popover);
		_g_object_unref0 (self);
		g_slice_free (Block64Data, _data64_);
	}
}

static void
__lambda193_ (Block64Data* _data64_,
              GObject* obj,
              GAsyncResult* res)
{
	TubaViewsDrive* self;
	self = _data64_->self;
	g_return_if_fail (res != NULL);
	if (tuba_views_drive_create_folder_real_finish (self, res)) {
		tuba_views_drive_entry_popover_clear (_data64_->popover);
	}
}

static void
___lambda193__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda193_ (self, source_object, res);
	block64_data_unref (self);
}

static void
tuba_views_drive_on_create_folder_done (TubaViewsDrive* self,
                                        TubaViewsDriveEntryPopover* popover,
                                        const gchar* name)
{
	Block64Data* _data64_;
	TubaViewsDriveEntryPopover* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (popover != NULL);
	g_return_if_fail (name != NULL);
	_data64_ = g_slice_new0 (Block64Data);
	_data64_->_ref_count_ = 1;
	_data64_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (popover);
	_g_object_unref0 (_data64_->popover);
	_data64_->popover = _tmp0_;
	tuba_views_drive_create_folder_real (self, name, ___lambda193__gasync_ready_callback, block64_data_ref (_data64_));
	block64_data_unref (_data64_);
	_data64_ = NULL;
}

static void
tuba_views_drive_create_folder_real_data_free (gpointer _data)
{
	TubaViewsDriveCreateFolderRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->name);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveCreateFolderRealData, _data_);
}

static void
tuba_views_drive_create_folder_real (TubaViewsDrive* self,
                                     const gchar* name,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	TubaViewsDriveCreateFolderRealData* _data_;
	TubaViewsDrive* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveCreateFolderRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_create_folder_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (name);
	_g_free0 (_data_->name);
	_data_->name = _tmp1_;
	tuba_views_drive_create_folder_real_co (_data_);
}

static gboolean
tuba_views_drive_create_folder_real_finish (TubaViewsDrive* self,
                                            GAsyncResult* _res_)
{
	gboolean result;
	TubaViewsDriveCreateFolderRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
tuba_views_drive_create_folder_real_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	TubaViewsDriveCreateFolderRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_create_folder_real_co (_data_);
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static gboolean
tuba_views_drive_create_folder_real_co (TubaViewsDriveCreateFolderRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = json_builder_new ();
	_data_->builder = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->builder;
	json_builder_begin_object (_data_->_tmp1_);
	_data_->_tmp2_ = _data_->builder;
	json_builder_set_member_name (_data_->_tmp2_, "name");
	_data_->_tmp3_ = _data_->builder;
	json_builder_add_string_value (_data_->_tmp3_, _data_->name);
	_data_->_tmp4_ = _data_->builder;
	json_builder_set_member_name (_data_->_tmp4_, "parentId");
	_data_->_tmp7_ = _data_->self->priv->_current_folder;
	if (_data_->_tmp7_ == NULL) {
		_data_->_tmp6_ = TRUE;
	} else {
		_data_->_tmp8_ = _data_->self->priv->_current_folder;
		_data_->_tmp9_ = tuba_api_iceshrimp_folder_get_id (_data_->_tmp8_);
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp6_ = _data_->_tmp10_ == NULL;
	}
	if (_data_->_tmp6_) {
		_data_->_tmp5_ = TRUE;
	} else {
		_data_->_tmp11_ = _data_->self->priv->_current_folder;
		_data_->_tmp12_ = tuba_api_iceshrimp_folder_get_id (_data_->_tmp11_);
		_data_->_tmp13_ = _data_->_tmp12_;
		_data_->_tmp5_ = g_strcmp0 (_data_->_tmp13_, "") == 0;
	}
	if (_data_->_tmp5_) {
		_data_->_tmp14_ = _data_->builder;
		json_builder_add_null_value (_data_->_tmp14_);
	} else {
		_data_->_tmp15_ = _data_->builder;
		_data_->_tmp16_ = _data_->self->priv->_current_folder;
		_data_->_tmp17_ = tuba_api_iceshrimp_folder_get_id (_data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		json_builder_add_string_value (_data_->_tmp15_, _data_->_tmp18_);
	}
	_data_->_tmp19_ = _data_->builder;
	json_builder_end_object (_data_->_tmp19_);
	_data_->_tmp20_ = tuba_accounts;
	_data_->_tmp21_ = tuba_account_store_get_active (_data_->_tmp20_);
	_data_->_tmp22_ = _data_->_tmp21_;
	_data_->_tmp23_ = _g_object_ref0 (_data_->_tmp22_);
	_data_->_tmp24_ = tuba_accounts;
	_data_->_tmp25_ = tuba_account_store_get_active (_data_->_tmp24_);
	_data_->_tmp26_ = _data_->_tmp25_;
	_data_->_tmp27_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp26_);
	_data_->_tmp28_ = _data_->_tmp27_;
	_data_->_tmp29_ = g_strdup (_data_->_tmp28_);
	_data_->_tmp30_ = NULL;
	_data_->_tmp30_ = tuba_request_v2_new ("/api/iceshrimp/drive/folder", TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp30_, _data_->_tmp23_);
	_g_object_unref0 (_data_->_tmp23_);
	tuba_request_v2_set_force_token (_data_->_tmp30_, _data_->_tmp29_);
	_g_free0 (_data_->_tmp29_);
	_data_->req = _data_->_tmp30_;
	_data_->_tmp31_ = _data_->req;
	_data_->_tmp32_ = _data_->builder;
	tuba_request_v2_set_body_from_json (_data_->_tmp31_, _data_->_tmp32_);
	{
		tuba_views_drive_set_working (_data_->self, TRUE);
		_data_->_tmp33_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp33_, tuba_views_drive_create_folder_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp34_ = tuba_request_v2_exec_finish (_data_->_tmp33_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp34_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp35_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp35_, NULL, tuba_views_drive_create_folder_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp36_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp36_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp37_ = tuba_network;
		_data_->_tmp38_ = _data_->parser;
		_data_->_tmp39_ = tuba_network_parse_node (_data_->_tmp37_, _data_->_tmp38_);
		_data_->node = _data_->_tmp39_;
		_data_->_tmp40_ = _data_->node;
		_data_->_tmp41_ = __vala_JsonNode_copy0 (_data_->_tmp40_);
		_data_->_tmp42_ = tuba_helper_entity_from_json (_data_->_tmp41_, TUBA_API_ICESHRIMP_TYPE_FOLDER, FALSE);
		_data_->entity = _data_->_tmp42_;
		_data_->_tmp43_ = _data_->entity;
		if (TUBA_API_ICESHRIMP_IS_FOLDER (_data_->_tmp43_)) {
			_data_->_tmp44_ = _data_->self->priv->_current_folder;
			_data_->_tmp45_ = tuba_api_iceshrimp_folder_get_folders (_data_->_tmp44_);
			_data_->_tmp46_ = _data_->_tmp45_;
			if (_data_->_tmp46_ == NULL) {
				_data_->_tmp47_ = _data_->self->priv->_current_folder;
				_data_->_tmp48_ = gee_array_list_new (TUBA_API_ICESHRIMP_TYPE_FOLDER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
				_data_->_tmp49_ = _data_->_tmp48_;
				tuba_api_iceshrimp_folder_set_folders (_data_->_tmp47_, _data_->_tmp49_);
				_g_object_unref0 (_data_->_tmp49_);
			}
			_data_->_tmp50_ = _data_->self->priv->_current_folder;
			_data_->_tmp51_ = tuba_api_iceshrimp_folder_get_folders (_data_->_tmp50_);
			_data_->_tmp52_ = _data_->_tmp51_;
			_data_->_tmp53_ = _data_->entity;
			gee_abstract_list_insert ((GeeAbstractList*) _data_->_tmp52_, 0, G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp53_, TUBA_API_ICESHRIMP_TYPE_FOLDER, TubaAPIIceshrimpFolder));
			_data_->_tmp54_ = _data_->self->priv->store;
			_data_->_tmp55_ = _data_->entity;
			_data_->_tmp56_ = tuba_views_drive_item_new_from_folder (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp55_, TUBA_API_ICESHRIMP_TYPE_FOLDER, TubaAPIIceshrimpFolder));
			_data_->_tmp57_ = g_new0 (GObject*, 1 + 1);
			_data_->_tmp57_[0] = (GObject*) _data_->_tmp56_;
			_data_->_tmp58_ = _data_->_tmp57_;
			_data_->_tmp58__length1 = 1;
			g_list_store_splice (_data_->_tmp54_, (guint) 0, (guint) 0, _data_->_tmp58_, (guint) 1);
			_data_->_tmp58_ = (_vala_array_free (_data_->_tmp58_, _data_->_tmp58__length1, (GDestroyNotify) g_object_unref), NULL);
		}
		_g_object_unref0 (_data_->entity);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		tuba_views_drive_set_working (_data_->self, FALSE);
		_data_->_tmp59_ = tuba_app;
		_data_->_tmp60_ = _data_->e;
		_data_->_tmp61_ = _data_->_tmp60_->message;
		_data_->_tmp62_ = g_strdup_printf (_ ("Couldn't create folder: %s"), _data_->_tmp61_);
		_data_->_tmp63_ = _data_->_tmp62_;
		g_signal_emit_by_name (_data_->_tmp59_, "toast", _data_->_tmp63_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp63_);
		_data_->_tmp64_ = _data_->e;
		_data_->_tmp65_ = g_strdup_printf ("%i", _data_->_tmp64_->code);
		_data_->_tmp66_ = _data_->_tmp65_;
		_data_->_tmp67_ = _data_->e;
		_data_->_tmp68_ = _data_->_tmp67_->message;
		_data_->_tmp69_ = string_to_string (_data_->_tmp68_);
		_data_->_tmp70_ = g_strconcat ("Couldn't create folder: ", _data_->_tmp66_, " ", _data_->_tmp69_, NULL);
		_data_->_tmp71_ = _data_->_tmp70_;
		g_warning ("Drive.vala:831: %s", _data_->_tmp71_);
		_g_free0 (_data_->_tmp71_);
		_g_free0 (_data_->_tmp66_);
		_data_->result = FALSE;
		_g_error_free0 (_data_->e);
		_g_object_unref0 (_data_->req);
		_g_object_unref0 (_data_->builder);
		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;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_object_unref0 (_data_->builder);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	tuba_views_drive_set_working (_data_->self, FALSE);
	_data_->result = TRUE;
	_g_object_unref0 (_data_->req);
	_g_object_unref0 (_data_->builder);
	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
tuba_views_drive_on_go_back (TubaViewsDrive* self)
{
	const gchar* _tmp0_ = NULL;
	TubaAPIIceshrimpFolder* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_current_folder;
	if (_tmp1_ == NULL) {
		_tmp0_ = NULL;
	} else {
		TubaAPIIceshrimpFolder* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp2_ = self->priv->_current_folder;
		_tmp3_ = tuba_api_iceshrimp_folder_get_parentId (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	}
	tuba_views_drive_load_folder (self, _tmp0_, NULL, NULL);
}

static void
tuba_views_drive_authorize_iceshrimp_data_free (gpointer _data)
{
	TubaViewsDriveAuthorizeIceshrimpData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveAuthorizeIceshrimpData, _data_);
}

static void
tuba_views_drive_authorize_iceshrimp (TubaViewsDrive* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	TubaViewsDriveAuthorizeIceshrimpData* _data_;
	TubaViewsDrive* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveAuthorizeIceshrimpData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_authorize_iceshrimp_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_drive_authorize_iceshrimp_co (_data_);
}

static void
tuba_views_drive_authorize_iceshrimp_finish (TubaViewsDrive* self,
                                             GAsyncResult* _res_)
{
	TubaViewsDriveAuthorizeIceshrimpData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_drive_authorize_iceshrimp_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_)
{
	TubaViewsDriveAuthorizeIceshrimpData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_authorize_iceshrimp_co (_data_);
}

static gboolean
tuba_views_drive_authorize_iceshrimp_co (TubaViewsDriveAuthorizeIceshrimpData* _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_ = tuba_accounts;
	_data_->_tmp1_ = tuba_account_store_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = tuba_request_v2_new ("/api/v1/accounts/authorize_iceshrimp", TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp4_;
	{
		_data_->_tmp5_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp5_, tuba_views_drive_authorize_iceshrimp_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp6_ = tuba_request_v2_exec_finish (_data_->_tmp5_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp7_, NULL, tuba_views_drive_authorize_iceshrimp_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp8_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp9_ = tuba_network;
		_data_->_tmp10_ = _data_->parser;
		_data_->_tmp11_ = tuba_network_parse_node (_data_->_tmp9_, _data_->_tmp10_);
		_data_->node = _data_->_tmp11_;
		_data_->_tmp12_ = _data_->node;
		if (_data_->_tmp12_ == NULL) {
			_data_->_tmp13_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_PARSING, "Instance didn't return key");
			_data_->_inner_error0_ = _data_->_tmp13_;
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp14_ = _data_->node;
		_data_->_tmp15_ = json_node_get_string (_data_->_tmp14_);
		_data_->_tmp16_ = g_strdup (_data_->_tmp15_);
		_data_->key = _data_->_tmp16_;
		_data_->_tmp18_ = _data_->key;
		if (_data_->_tmp18_ == NULL) {
			_data_->_tmp17_ = TRUE;
		} else {
			_data_->_tmp19_ = _data_->key;
			_data_->_tmp17_ = g_strcmp0 (_data_->_tmp19_, "") == 0;
		}
		if (_data_->_tmp17_) {
			_data_->_tmp20_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_PARSING, "Instance key is missing");
			_data_->_inner_error0_ = _data_->_tmp20_;
			_g_free0 (_data_->key);
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp21_ = tuba_accounts;
		_data_->_tmp22_ = tuba_account_store_get_active (_data_->_tmp21_);
		_data_->_tmp23_ = _data_->_tmp22_;
		_data_->_tmp24_ = _data_->key;
		tuba_instance_account_tuba_update_iceshrimp_api_key (_data_->_tmp23_, _data_->_tmp24_);
		_data_->_state_ = 3;
		tuba_views_drive_load_folder (_data_->self, NULL, tuba_views_drive_authorize_iceshrimp_ready, _data_);
		return FALSE;
		_state_3:
		tuba_views_drive_load_folder_finish (_data_->self, _data_->_res_);
		_g_free0 (_data_->key);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp25_ = _data_->e;
		_data_->_tmp26_ = _data_->e;
		_data_->_tmp27_ = _data_->_tmp26_->message;
		tuba_views_base_on_error ((TubaViewsBase*) _data_->self, (gint32) _data_->_tmp25_->code, _data_->_tmp27_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	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 GdkDragAction
tuba_views_drive_on_drag_enter (TubaViewsDrive* self,
                                gdouble x,
                                gdouble y)
{
	TubaDialogsComposerComponentsDropOverlay* _tmp0_;
	GdkDragAction result;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->drop_overlay;
	tuba_dialogs_composer_components_drop_overlay_set_dropping (_tmp0_, TRUE);
	result = GDK_ACTION_COPY;
	return result;
}

static void
tuba_views_drive_on_drag_leave (TubaViewsDrive* self)
{
	TubaDialogsComposerComponentsDropOverlay* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->drop_overlay;
	tuba_dialogs_composer_components_drop_overlay_set_dropping (_tmp0_, FALSE);
}

static GdkFileList*
_vala_GdkFileList_copy (GdkFileList* self)
{
	return g_boxed_copy (gdk_file_list_get_type (), self);
}

static gpointer
__vala_GdkFileList_copy0 (gpointer self)
{
	return self ? _vala_GdkFileList_copy (self) : NULL;
}

static void
_vala_GdkFileList_free (GdkFileList* self)
{
	g_boxed_free (gdk_file_list_get_type (), self);
}

static void
_vala_array_add65 (GFile** * array,
                   gint* length,
                   gint* size,
                   GFile* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GFile*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static GFile**
_vala_array_dup41 (GFile** self,
                   gssize length)
{
	if (length >= 0) {
		GFile** result;
		gssize i;
		result = g_new0 (GFile*, length + 1);
		for (i = 0; i < length; i++) {
			GFile* _tmp0_;
			_tmp0_ = _g_object_ref0 (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gboolean
tuba_views_drive_on_drag_drop (TubaViewsDrive* self,
                               GValue* val,
                               gdouble x,
                               gdouble y)
{
	TubaDialogsComposerComponentsDropOverlay* _tmp0_;
	GdkFileList* file_list = NULL;
	GValue _tmp1_;
	GdkFileList* _tmp2_;
	GdkFileList* _tmp3_;
	GSList* files = NULL;
	GdkFileList* _tmp4_;
	GSList* _tmp5_;
	GSList* _tmp6_;
	GFile** files_to_upload = NULL;
	GFile** _tmp7_;
	gint files_to_upload_length1;
	gint _files_to_upload_size_;
	GSList* _tmp8_;
	GFile** _tmp11_;
	gint _tmp11__length1;
	GFile** _tmp12_;
	gint _tmp12__length1;
	GFile** _tmp13_;
	gint _tmp13__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (val != NULL, FALSE);
	_tmp0_ = self->priv->drop_overlay;
	tuba_dialogs_composer_components_drop_overlay_set_dropping (_tmp0_, FALSE);
	_tmp1_ = *val;
	_tmp2_ = __vala_GdkFileList_copy0 (g_value_get_boxed (&_tmp1_));
	file_list = _tmp2_;
	_tmp3_ = file_list;
	if (_tmp3_ == NULL) {
		result = FALSE;
		__vala_GdkFileList_free0 (file_list);
		return result;
	}
	_tmp4_ = file_list;
	_tmp5_ = gdk_file_list_get_files (_tmp4_);
	files = _tmp5_;
	_tmp6_ = files;
	if (g_slist_length (_tmp6_) == ((guint) 0)) {
		result = FALSE;
		(files == NULL) ? NULL : (files = (g_slist_free (files), NULL));
		__vala_GdkFileList_free0 (file_list);
		return result;
	}
	_tmp7_ = g_new0 (GFile*, 0 + 1);
	files_to_upload = _tmp7_;
	files_to_upload_length1 = 0;
	_files_to_upload_size_ = files_to_upload_length1;
	_tmp8_ = files;
	{
		GSList* file_collection = NULL;
		GSList* file_it = NULL;
		file_collection = _tmp8_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			GFile* file = NULL;
			file = (GFile*) file_it->data;
			{
				GFile* _tmp9_;
				GFile* _tmp10_;
				_tmp9_ = file;
				_tmp10_ = _g_object_ref0 (_tmp9_);
				_vala_array_add65 (&files_to_upload, &files_to_upload_length1, &_files_to_upload_size_, _tmp10_);
			}
		}
	}
	_tmp11_ = files_to_upload;
	_tmp11__length1 = files_to_upload_length1;
	if (_tmp11__length1 == 0) {
		result = FALSE;
		files_to_upload = (_vala_array_free (files_to_upload, files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
		(files == NULL) ? NULL : (files = (g_slist_free (files), NULL));
		__vala_GdkFileList_free0 (file_list);
		return result;
	}
	_tmp12_ = files_to_upload;
	_tmp12__length1 = files_to_upload_length1;
	_tmp13_ = (_tmp12_ != NULL) ? _vala_array_dup41 (_tmp12_, _tmp12__length1) : _tmp12_;
	_tmp13__length1 = _tmp12__length1;
	tuba_views_drive_upload_files (self, _tmp13_, (gint) _tmp13__length1, NULL, NULL);
	result = TRUE;
	files_to_upload = (_vala_array_free (files_to_upload, files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
	(files == NULL) ? NULL : (files = (g_slist_free (files), NULL));
	__vala_GdkFileList_free0 (file_list);
	return result;
}

static void
tuba_views_drive_on_delete_action (TubaViewsDrive* self)
{
	g_return_if_fail (self != NULL);
	tuba_views_drive_on_delete_request (self, NULL);
}

static void
tuba_views_drive_on_primary_click (TubaViewsDrive* self,
                                   GtkGestureClick* gesture,
                                   gint n_press,
                                   gdouble x,
                                   gdouble y)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (gesture != NULL);
	if (n_press == 1) {
		GtkGridView* _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp1_ = self->priv->grid;
		_tmp2_ = gtk_grid_view_get_enable_rubberband (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp0_ = _tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkGridView* _tmp4_;
		GdkModifierType modifier = 0U;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		_tmp4_ = self->priv->grid;
		gtk_widget_grab_focus ((GtkWidget*) _tmp4_);
		modifier = gtk_event_controller_get_current_event_state ((GtkEventController*) gesture) & GDK_MODIFIER_MASK;
		if (modifier != GDK_CONTROL_MASK) {
			_tmp6_ = modifier != GDK_SHIFT_MASK;
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GtkMultiSelection* _tmp7_;
			_tmp7_ = self->priv->selection;
			_tmp5_ = g_list_model_get_n_items ((GListModel*) _tmp7_) > ((guint) 0);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkMultiSelection* _tmp8_;
			_tmp8_ = self->priv->selection;
			gtk_selection_model_unselect_all ((GtkSelectionModel*) _tmp8_);
		}
	}
}

static void
tuba_views_drive_load_folder_data_free (gpointer _data)
{
	TubaViewsDriveLoadFolderData* _data_;
	_data_ = _data;
	_g_free0 (_data_->id);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveLoadFolderData, _data_);
}

static void
tuba_views_drive_load_folder (TubaViewsDrive* self,
                              const gchar* id,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	TubaViewsDriveLoadFolderData* _data_;
	TubaViewsDrive* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveLoadFolderData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_load_folder_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (id);
	_g_free0 (_data_->id);
	_data_->id = _tmp1_;
	tuba_views_drive_load_folder_co (_data_);
}

static void
tuba_views_drive_load_folder_finish (TubaViewsDrive* self,
                                     GAsyncResult* _res_)
{
	TubaViewsDriveLoadFolderData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_drive_load_folder_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_)
{
	TubaViewsDriveLoadFolderData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_load_folder_co (_data_);
}

static gboolean
tuba_views_drive_load_folder_co (TubaViewsDriveLoadFolderData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = tuba_views_base_status_message_new ();
	_data_->_tmp0_->loading = TRUE;
	_data_->_tmp1_ = _data_->_tmp0_;
	tuba_views_base_set_base_status ((TubaViewsBase*) _data_->self, _data_->_tmp1_);
	_g_object_unref0 (_data_->_tmp1_);
	if (_data_->id == NULL) {
		_data_->_tmp3_ = g_strdup ("");
		_g_free0 (_data_->_tmp2_);
		_data_->_tmp2_ = _data_->_tmp3_;
	} else {
		_data_->_tmp4_ = string_to_string (_data_->id);
		_data_->_tmp5_ = g_strconcat ("/", _data_->_tmp4_, NULL);
		_g_free0 (_data_->_tmp2_);
		_data_->_tmp2_ = _data_->_tmp5_;
	}
	_data_->_tmp6_ = _data_->_tmp2_;
	_data_->_tmp2_ = NULL;
	_data_->folder_id = _data_->_tmp6_;
	_data_->_tmp7_ = _data_->folder_id;
	_data_->_tmp8_ = string_to_string (_data_->_tmp7_);
	_data_->_tmp9_ = g_strconcat ("/api/iceshrimp/drive/folder", _data_->_tmp8_, NULL);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = tuba_accounts;
	_data_->_tmp12_ = tuba_account_store_get_active (_data_->_tmp11_);
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = _g_object_ref0 (_data_->_tmp13_);
	_data_->_tmp15_ = tuba_accounts;
	_data_->_tmp16_ = tuba_account_store_get_active (_data_->_tmp15_);
	_data_->_tmp17_ = _data_->_tmp16_;
	_data_->_tmp18_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp17_);
	_data_->_tmp19_ = _data_->_tmp18_;
	_data_->_tmp20_ = g_strdup (_data_->_tmp19_);
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = tuba_request_v2_new (_data_->_tmp10_, TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp21_, _data_->_tmp14_);
	_g_object_unref0 (_data_->_tmp14_);
	tuba_request_v2_set_force_token (_data_->_tmp21_, _data_->_tmp20_);
	_g_free0 (_data_->_tmp20_);
	_data_->_tmp22_ = _data_->_tmp21_;
	_g_free0 (_data_->_tmp10_);
	_data_->req = _data_->_tmp22_;
	{
		_data_->_tmp23_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp23_, tuba_views_drive_load_folder_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp24_ = tuba_request_v2_exec_finish (_data_->_tmp23_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp24_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp25_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp25_, NULL, tuba_views_drive_load_folder_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp26_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp26_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp27_ = tuba_network;
		_data_->_tmp28_ = _data_->parser;
		_data_->_tmp29_ = tuba_network_parse_node (_data_->_tmp27_, _data_->_tmp28_);
		_data_->node = _data_->_tmp29_;
		_data_->_tmp31_ = _data_->node;
		_data_->_tmp32_ = tuba_api_iceshrimp_folder_from (_data_->_tmp31_, &_data_->_inner_error0_);
		_data_->_tmp30_ = _data_->_tmp32_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		tuba_views_drive_set_current_folder (_data_->self, _data_->_tmp30_);
		_data_->_tmp34_ = _data_->self->priv->_current_folder;
		_data_->_tmp35_ = tuba_api_iceshrimp_folder_get_name (_data_->_tmp34_);
		_data_->_tmp36_ = _data_->_tmp35_;
		if (_data_->_tmp36_ != NULL) {
			_data_->_tmp37_ = _data_->self->priv->_current_folder;
			_data_->_tmp38_ = tuba_api_iceshrimp_folder_get_name (_data_->_tmp37_);
			_data_->_tmp39_ = _data_->_tmp38_;
			_data_->_tmp33_ = _data_->_tmp39_;
		} else {
			_data_->_tmp33_ = _ ("Drive");
		}
		tuba_views_base_set_label ((TubaViewsBase*) _data_->self, _data_->_tmp33_);
		_data_->_tmp40_ = _data_->self->priv->_current_folder;
		tuba_views_drive_open_folder (_data_->self, _data_->_tmp40_);
		_data_->_tmp41_ = _data_->self->priv->create_folder_btn_popover;
		if (_data_->_tmp41_ != NULL) {
			_data_->_tmp42_ = _data_->self->priv->create_folder_btn_popover;
			tuba_views_drive_entry_popover_clear (_data_->_tmp42_);
		}
		_g_object_unref0 (_data_->_tmp30_);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp43_ = _data_->e;
		_data_->_tmp44_ = _data_->e;
		_data_->_tmp45_ = _data_->_tmp44_->message;
		tuba_views_base_on_error ((TubaViewsBase*) _data_->self, (gint32) _data_->_tmp43_->code, _data_->_tmp45_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_free0 (_data_->folder_id);
		_g_free0 (_data_->_tmp2_);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	_g_free0 (_data_->folder_id);
	_g_free0 (_data_->_tmp2_);
	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
tuba_views_drive_on_store_changed (TubaViewsDrive* self)
{
	TubaViewsDriveEntryPopover* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->create_folder_btn_popover;
	if (_tmp0_ != NULL) {
		TubaViewsDriveEntryPopover* _tmp1_;
		gint _tmp2_ = 0;
		gchar** _tmp3_;
		gchar** _tmp4_;
		gint _tmp4__length1;
		_tmp1_ = self->priv->create_folder_btn_popover;
		_tmp3_ = tuba_views_drive_reserved_names (self, &_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp4__length1 = _tmp2_;
		tuba_views_drive_entry_popover_update_taken_names (_tmp1_, _tmp4_, (gint) _tmp2_);
		_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	}
}

static gboolean
_vala_string_array_contains (gchar* * stack,
                             gssize stack_length,
                             const gchar* needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

static void
_vala_array_add66 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add67 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gchar**
tuba_views_drive_reserved_names (TubaViewsDrive* self,
                                 gint* result_length1)
{
	gchar** _result_ = NULL;
	gchar** _tmp0_;
	gint _result__length1;
	gint __result__size_;
	TubaAPIIceshrimpFolder* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	TubaAPIIceshrimpFolder* _tmp22_;
	GeeArrayList* _tmp23_;
	GeeArrayList* _tmp24_;
	gchar** _tmp43_;
	gint _tmp43__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	_result_ = _tmp0_;
	_result__length1 = 0;
	__result__size_ = _result__length1;
	_tmp1_ = self->priv->_current_folder;
	_tmp2_ = tuba_api_iceshrimp_folder_get_folders (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		{
			GeeArrayList* _folder_list = NULL;
			TubaAPIIceshrimpFolder* _tmp4_;
			GeeArrayList* _tmp5_;
			GeeArrayList* _tmp6_;
			gint _folder_size = 0;
			GeeArrayList* _tmp7_;
			gint _tmp8_;
			gint _tmp9_;
			gint _folder_index = 0;
			_tmp4_ = self->priv->_current_folder;
			_tmp5_ = tuba_api_iceshrimp_folder_get_folders (_tmp4_);
			_tmp6_ = _tmp5_;
			_folder_list = _tmp6_;
			_tmp7_ = _folder_list;
			_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
			_tmp9_ = _tmp8_;
			_folder_size = _tmp9_;
			_folder_index = -1;
			while (TRUE) {
				gint _tmp10_;
				gint _tmp11_;
				TubaAPIIceshrimpFolder* folder = NULL;
				GeeArrayList* _tmp12_;
				gpointer _tmp13_;
				gchar* folder_name_down = NULL;
				TubaAPIIceshrimpFolder* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_;
				gchar* _tmp17_;
				const gchar* _tmp18_;
				gchar** _tmp19_;
				gint _tmp19__length1;
				_folder_index = _folder_index + 1;
				_tmp10_ = _folder_index;
				_tmp11_ = _folder_size;
				if (!(_tmp10_ < _tmp11_)) {
					break;
				}
				_tmp12_ = _folder_list;
				_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _folder_index);
				folder = (TubaAPIIceshrimpFolder*) _tmp13_;
				_tmp14_ = folder;
				_tmp15_ = tuba_api_iceshrimp_folder_get_name (_tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = g_utf8_strdown (_tmp16_, (gssize) -1);
				folder_name_down = _tmp17_;
				_tmp18_ = folder_name_down;
				_tmp19_ = _result_;
				_tmp19__length1 = _result__length1;
				if (!_vala_string_array_contains (_tmp19_, _tmp19__length1, _tmp18_)) {
					const gchar* _tmp20_;
					gchar* _tmp21_;
					_tmp20_ = folder_name_down;
					_tmp21_ = g_strdup (_tmp20_);
					_vala_array_add66 (&_result_, &_result__length1, &__result__size_, _tmp21_);
				}
				_g_free0 (folder_name_down);
				_g_object_unref0 (folder);
			}
		}
	}
	_tmp22_ = self->priv->_current_folder;
	_tmp23_ = tuba_api_iceshrimp_folder_get_files (_tmp22_);
	_tmp24_ = _tmp23_;
	if (_tmp24_ != NULL) {
		{
			GeeArrayList* _file_list = NULL;
			TubaAPIIceshrimpFolder* _tmp25_;
			GeeArrayList* _tmp26_;
			GeeArrayList* _tmp27_;
			gint _file_size = 0;
			GeeArrayList* _tmp28_;
			gint _tmp29_;
			gint _tmp30_;
			gint _file_index = 0;
			_tmp25_ = self->priv->_current_folder;
			_tmp26_ = tuba_api_iceshrimp_folder_get_files (_tmp25_);
			_tmp27_ = _tmp26_;
			_file_list = _tmp27_;
			_tmp28_ = _file_list;
			_tmp29_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp28_);
			_tmp30_ = _tmp29_;
			_file_size = _tmp30_;
			_file_index = -1;
			while (TRUE) {
				gint _tmp31_;
				gint _tmp32_;
				TubaAPIIceshrimpFile* file = NULL;
				GeeArrayList* _tmp33_;
				gpointer _tmp34_;
				gchar* file_name_down = NULL;
				TubaAPIIceshrimpFile* _tmp35_;
				const gchar* _tmp36_;
				const gchar* _tmp37_;
				gchar* _tmp38_;
				const gchar* _tmp39_;
				gchar** _tmp40_;
				gint _tmp40__length1;
				_file_index = _file_index + 1;
				_tmp31_ = _file_index;
				_tmp32_ = _file_size;
				if (!(_tmp31_ < _tmp32_)) {
					break;
				}
				_tmp33_ = _file_list;
				_tmp34_ = gee_abstract_list_get ((GeeAbstractList*) _tmp33_, _file_index);
				file = (TubaAPIIceshrimpFile*) _tmp34_;
				_tmp35_ = file;
				_tmp36_ = tuba_api_iceshrimp_file_get_filename (_tmp35_);
				_tmp37_ = _tmp36_;
				_tmp38_ = g_utf8_strdown (_tmp37_, (gssize) -1);
				file_name_down = _tmp38_;
				_tmp39_ = file_name_down;
				_tmp40_ = _result_;
				_tmp40__length1 = _result__length1;
				if (!_vala_string_array_contains (_tmp40_, _tmp40__length1, _tmp39_)) {
					const gchar* _tmp41_;
					gchar* _tmp42_;
					_tmp41_ = file_name_down;
					_tmp42_ = g_strdup (_tmp41_);
					_vala_array_add67 (&_result_, &_result__length1, &__result__size_, _tmp42_);
				}
				_g_free0 (file_name_down);
				_g_object_unref0 (file);
			}
		}
	}
	_tmp43_ = _result_;
	_tmp43__length1 = _result__length1;
	if (result_length1) {
		*result_length1 = _tmp43__length1;
	}
	result = _tmp43_;
	return result;
}

static void
_vala_array_add68 (TubaViewsDriveItem** * array,
                   gint* length,
                   gint* size,
                   TubaViewsDriveItem* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveItem*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add69 (TubaViewsDriveItem** * array,
                   gint* length,
                   gint* size,
                   TubaViewsDriveItem* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveItem*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
tuba_views_drive_open_folder (TubaViewsDrive* self,
                              TubaAPIIceshrimpFolder* folder)
{
	TubaViewsDriveItem** items = NULL;
	TubaViewsDriveItem** _tmp0_;
	gint items_length1;
	gint _items_size_;
	GListStore* _tmp23_;
	GListStore* _tmp24_;
	guint _tmp25_;
	guint _tmp26_;
	TubaViewsDriveItem** _tmp27_;
	gint _tmp27__length1;
	GtkButton* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (folder != NULL);
	tuba_views_base_set_base_status ((TubaViewsBase*) self, NULL);
	_tmp0_ = g_new0 (TubaViewsDriveItem*, 0 + 1);
	items = _tmp0_;
	items_length1 = 0;
	_items_size_ = items_length1;
	{
		GeeArrayList* _subfold_list = NULL;
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _subfold_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _subfold_index = 0;
		_tmp1_ = tuba_api_iceshrimp_folder_get_folders (folder);
		_tmp2_ = _tmp1_;
		_subfold_list = _tmp2_;
		_tmp3_ = _subfold_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_subfold_size = _tmp5_;
		_subfold_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			TubaAPIIceshrimpFolder* subfold = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			TubaAPIIceshrimpFolder* _tmp10_;
			TubaViewsDriveItem* _tmp11_;
			_subfold_index = _subfold_index + 1;
			_tmp6_ = _subfold_index;
			_tmp7_ = _subfold_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _subfold_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _subfold_index);
			subfold = (TubaAPIIceshrimpFolder*) _tmp9_;
			_tmp10_ = subfold;
			_tmp11_ = tuba_views_drive_item_new_from_folder (_tmp10_);
			_vala_array_add68 (&items, &items_length1, &_items_size_, _tmp11_);
			_g_object_unref0 (subfold);
		}
	}
	{
		GeeArrayList* _subfile_list = NULL;
		GeeArrayList* _tmp12_;
		GeeArrayList* _tmp13_;
		gint _subfile_size = 0;
		GeeArrayList* _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		gint _subfile_index = 0;
		_tmp12_ = tuba_api_iceshrimp_folder_get_files (folder);
		_tmp13_ = _tmp12_;
		_subfile_list = _tmp13_;
		_tmp14_ = _subfile_list;
		_tmp15_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp14_);
		_tmp16_ = _tmp15_;
		_subfile_size = _tmp16_;
		_subfile_index = -1;
		while (TRUE) {
			gint _tmp17_;
			gint _tmp18_;
			TubaAPIIceshrimpFile* subfile = NULL;
			GeeArrayList* _tmp19_;
			gpointer _tmp20_;
			TubaAPIIceshrimpFile* _tmp21_;
			TubaViewsDriveItem* _tmp22_;
			_subfile_index = _subfile_index + 1;
			_tmp17_ = _subfile_index;
			_tmp18_ = _subfile_size;
			if (!(_tmp17_ < _tmp18_)) {
				break;
			}
			_tmp19_ = _subfile_list;
			_tmp20_ = gee_abstract_list_get ((GeeAbstractList*) _tmp19_, _subfile_index);
			subfile = (TubaAPIIceshrimpFile*) _tmp20_;
			_tmp21_ = subfile;
			_tmp22_ = tuba_views_drive_item_new_from_file (_tmp21_);
			_vala_array_add69 (&items, &items_length1, &_items_size_, _tmp22_);
			_g_object_unref0 (subfile);
		}
	}
	_tmp23_ = self->priv->store;
	_tmp24_ = self->priv->store;
	g_object_get (_tmp24_, "n-items", &_tmp25_, NULL);
	_tmp26_ = _tmp25_;
	_tmp27_ = items;
	_tmp27__length1 = items_length1;
	g_list_store_splice (_tmp23_, (guint) 0, _tmp26_, _tmp27_, (guint) _tmp27__length1);
	_tmp28_ = self->priv->go_back_btn;
	_tmp29_ = tuba_api_iceshrimp_folder_get_id (folder);
	_tmp30_ = _tmp29_;
	gtk_widget_set_visible ((GtkWidget*) _tmp28_, _tmp30_ != NULL);
	items = (_vala_array_free (items, items_length1, (GDestroyNotify) g_object_unref), NULL);
}

static void
_tuba_views_drive_fill_reserved_names_tuba_views_drive_item_widget_fill_reserved_names (TubaViewsDriveItemWidget* _sender,
                                                                                        TubaViewsDriveEntryPopover* popover,
                                                                                        gpointer self)
{
	tuba_views_drive_fill_reserved_names ((TubaViewsDrive*) self, popover);
}

static void
_tuba_views_drive_on_open_request_tuba_views_drive_item_widget_open_me (TubaViewsDriveItemWidget* _sender,
                                                                        TubaViewsDriveItem* item,
                                                                        gpointer self)
{
	tuba_views_drive_on_open_request ((TubaViewsDrive*) self, item);
}

static void
_tuba_views_drive_on_delete_request_tuba_views_drive_item_widget_delete_me (TubaViewsDriveItemWidget* _sender,
                                                                            gpointer self)
{
	tuba_views_drive_on_delete_request ((TubaViewsDrive*) self, _sender);
}

static void
_tuba_views_drive_on_refresh_tuba_views_drive_item_widget_refresh (TubaViewsDriveItemWidget* _sender,
                                                                   gpointer self)
{
	tuba_views_drive_on_refresh ((TubaViewsDrive*) self);
}

static void
_tuba_views_drive_update_rubberband_tuba_views_drive_item_widget_pressed (TubaViewsDriveItemWidget* _sender,
                                                                          gboolean not_pressing,
                                                                          gpointer self)
{
	tuba_views_drive_update_rubberband ((TubaViewsDrive*) self, not_pressing);
}

static void
_tuba_views_drive_move_items_tuba_views_drive_item_widget_move (TubaViewsDriveItemWidget* _sender,
                                                                const gchar* to_folder,
                                                                TubaViewsDriveItem* grabbed_item,
                                                                gpointer self)
{
	tuba_views_drive_move_items ((TubaViewsDrive*) self, to_folder, grabbed_item);
}

static void
tuba_views_drive_setup_listitem_cb (TubaViewsDrive* self,
                                    GObject* obj)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	TubaViewsDriveItemWidget* item_widget = NULL;
	TubaViewsDriveItemWidget* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_list_item_get_type (), GtkListItem));
	list_item = _tmp0_;
	_tmp1_ = tuba_views_drive_item_widget_new ();
	g_object_ref_sink (_tmp1_);
	item_widget = _tmp1_;
	g_signal_connect_object (item_widget, "fill-reserved-names", (GCallback) _tuba_views_drive_fill_reserved_names_tuba_views_drive_item_widget_fill_reserved_names, self, 0);
	g_signal_connect_object (item_widget, "open-me", (GCallback) _tuba_views_drive_on_open_request_tuba_views_drive_item_widget_open_me, self, 0);
	g_signal_connect_object (item_widget, "delete-me", (GCallback) _tuba_views_drive_on_delete_request_tuba_views_drive_item_widget_delete_me, self, 0);
	g_signal_connect_object (item_widget, "refresh", (GCallback) _tuba_views_drive_on_refresh_tuba_views_drive_item_widget_refresh, self, 0);
	g_signal_connect_object (item_widget, "pressed", (GCallback) _tuba_views_drive_update_rubberband_tuba_views_drive_item_widget_pressed, self, 0);
	g_signal_connect_object (item_widget, "move", (GCallback) _tuba_views_drive_move_items_tuba_views_drive_item_widget_move, self, 0);
	gtk_list_item_set_child (list_item, (GtkWidget*) item_widget);
	_g_object_unref0 (item_widget);
	_g_object_unref0 (list_item);
}

static void
tuba_views_drive_on_refresh (TubaViewsDrive* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	TubaAPIIceshrimpFolder* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_views_drive_get_working (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !gtk_widget_get_mapped ((GtkWidget*) self);
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->_current_folder;
	_tmp4_ = tuba_api_iceshrimp_folder_get_id (_tmp3_);
	_tmp5_ = _tmp4_;
	tuba_views_drive_load_folder (self, _tmp5_, NULL, NULL);
	tuba_views_drive_set_working (self, FALSE);
}

static void
tuba_views_drive_bind_listitem_cb (TubaViewsDrive* self,
                                   GObject* item)
{
	TubaViewsDriveItem* drive_item = NULL;
	GObject* _tmp0_;
	GObject* _tmp1_;
	TubaViewsDriveItem* _tmp2_;
	TubaViewsDriveItemWidget* widget = NULL;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	TubaViewsDriveItemWidget* _tmp5_;
	TubaViewsDriveItemWidget* _tmp6_;
	TubaViewsDriveItem* _tmp7_;
	GtkWidget* gtklistitemwidget = NULL;
	TubaViewsDriveItemWidget* _tmp8_;
	GtkWidget* _tmp9_;
	GtkWidget* _tmp10_;
	GtkWidget* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = gtk_list_item_get_item (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem));
	drive_item = _tmp2_;
	_tmp3_ = gtk_list_item_get_child (G_TYPE_CHECK_INSTANCE_CAST (item, gtk_list_item_get_type (), GtkListItem));
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidget));
	widget = _tmp5_;
	_tmp6_ = widget;
	_tmp7_ = drive_item;
	tuba_views_drive_item_widget_populate (_tmp6_, _tmp7_);
	_tmp8_ = widget;
	_tmp9_ = gtk_widget_get_parent ((GtkWidget*) _tmp8_);
	_tmp10_ = _g_object_ref0 (_tmp9_);
	gtklistitemwidget = _tmp10_;
	_tmp11_ = gtklistitemwidget;
	if (_tmp11_ != NULL) {
		GtkWidget* _tmp12_;
		GtkWidget* _tmp13_;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp15_;
		_tmp12_ = gtklistitemwidget;
		_tmp13_ = gtklistitemwidget;
		_tmp14_ = gtklistitemwidget;
		_tmp15_ = gtklistitemwidget;
		gtk_widget_set_margin_bottom (_tmp15_, 3);
		gtk_widget_set_margin_top (_tmp14_, 3);
		gtk_widget_set_margin_end (_tmp13_, 3);
		gtk_widget_set_margin_start (_tmp12_, 3);
	}
	_g_object_unref0 (gtklistitemwidget);
	_g_object_unref0 (widget);
	_g_object_unref0 (drive_item);
}

static void
tuba_views_drive_on_item_activated (TubaViewsDrive* self,
                                    guint pos)
{
	GtkMultiSelection* _tmp0_;
	GtkBitset* _tmp1_;
	GtkBitset* _tmp2_;
	gboolean _tmp3_;
	TubaViewsDriveItem* item = NULL;
	GListStore* _tmp4_;
	GObject* _tmp5_;
	TubaViewsDriveItem* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selection;
	_tmp1_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_bitset_get_size (_tmp2_) != ((guint64) 1);
	_gtk_bitset_unref0 (_tmp2_);
	if (_tmp3_) {
		return;
	}
	_tmp4_ = self->priv->store;
	_tmp5_ = g_list_model_get_item ((GListModel*) _tmp4_, pos);
	item = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem);
	_tmp6_ = item;
	tuba_views_drive_open_item_real (self, _tmp6_);
	_g_object_unref0 (item);
}

static void
tuba_views_drive_open_item_real (TubaViewsDrive* self,
                                 TubaViewsDriveItem* item)
{
	TubaAPIIceshrimpFolder* _tmp0_;
	TubaAPIIceshrimpFolder* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = tuba_views_drive_item_get_folder (item);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		TubaAPIIceshrimpFolder* _tmp2_;
		TubaAPIIceshrimpFolder* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp2_ = tuba_views_drive_item_get_folder (item);
		_tmp3_ = _tmp2_;
		_tmp4_ = tuba_api_iceshrimp_folder_get_id (_tmp3_);
		_tmp5_ = _tmp4_;
		tuba_views_drive_load_folder (self, _tmp5_, NULL, NULL);
	} else {
		TubaAPIIceshrimpFile* _tmp6_;
		TubaAPIIceshrimpFile* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp6_ = tuba_views_drive_item_get_file (item);
		_tmp7_ = _tmp6_;
		_tmp8_ = tuba_api_iceshrimp_file_get_contentType (_tmp7_);
		_tmp9_ = _tmp8_;
		if (g_str_has_prefix (_tmp9_, "image/")) {
			TubaApplication* _tmp10_;
			TubaDialogsMainWindow* _tmp11_;
			TubaDialogsMainWindow* _tmp12_;
			TubaAPIIceshrimpFile* _tmp13_;
			TubaAPIIceshrimpFile* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			_tmp10_ = tuba_app;
			_tmp11_ = tuba_application_get_main_window (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = tuba_views_drive_item_get_file (item);
			_tmp14_ = _tmp13_;
			_tmp15_ = tuba_api_iceshrimp_file_get_url (_tmp14_);
			_tmp16_ = _tmp15_;
			tuba_dialogs_main_window_show_media_viewer (_tmp12_, _tmp16_, TUBA_ATTACHMENT_MEDIA_TYPE_IMAGE, NULL, NULL, FALSE, NULL, NULL, NULL, FALSE, NULL, TRUE);
		} else {
			TubaAPIIceshrimpFile* _tmp17_;
			TubaAPIIceshrimpFile* _tmp18_;
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			_tmp17_ = tuba_views_drive_item_get_file (item);
			_tmp18_ = _tmp17_;
			_tmp19_ = tuba_api_iceshrimp_file_get_contentType (_tmp18_);
			_tmp20_ = _tmp19_;
			if (g_str_has_prefix (_tmp20_, "audio/")) {
				TubaApplication* _tmp21_;
				TubaDialogsMainWindow* _tmp22_;
				TubaDialogsMainWindow* _tmp23_;
				TubaAPIIceshrimpFile* _tmp24_;
				TubaAPIIceshrimpFile* _tmp25_;
				const gchar* _tmp26_;
				const gchar* _tmp27_;
				_tmp21_ = tuba_app;
				_tmp22_ = tuba_application_get_main_window (_tmp21_);
				_tmp23_ = _tmp22_;
				_tmp24_ = tuba_views_drive_item_get_file (item);
				_tmp25_ = _tmp24_;
				_tmp26_ = tuba_api_iceshrimp_file_get_url (_tmp25_);
				_tmp27_ = _tmp26_;
				tuba_dialogs_main_window_show_media_viewer (_tmp23_, _tmp27_, TUBA_ATTACHMENT_MEDIA_TYPE_AUDIO, NULL, NULL, FALSE, NULL, NULL, NULL, TRUE, NULL, TRUE);
			} else {
				TubaAPIIceshrimpFile* _tmp28_;
				TubaAPIIceshrimpFile* _tmp29_;
				const gchar* _tmp30_;
				const gchar* _tmp31_;
				_tmp28_ = tuba_views_drive_item_get_file (item);
				_tmp29_ = _tmp28_;
				_tmp30_ = tuba_api_iceshrimp_file_get_url (_tmp29_);
				_tmp31_ = _tmp30_;
				tuba_utils_host_open_url (_tmp31_, NULL, NULL);
			}
		}
	}
}

static void
tuba_views_drive_fill_reserved_names (TubaViewsDrive* self,
                                      TubaViewsDriveEntryPopover* popover)
{
	gint _tmp0_ = 0;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (popover != NULL);
	_tmp1_ = tuba_views_drive_reserved_names (self, &_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp0_;
	tuba_views_drive_entry_popover_update_taken_names (popover, _tmp2_, (gint) _tmp0_);
	_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_free), NULL);
}

static void
tuba_views_drive_on_open_request (TubaViewsDrive* self,
                                  TubaViewsDriveItem* item)
{
	g_return_if_fail (self != NULL);
	if (item != NULL) {
		tuba_views_drive_open_item_real (self, item);
	}
}

static void
tuba_views_drive_update_rubberband (TubaViewsDrive* self,
                                    gboolean enable)
{
	GtkGridView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->grid;
	gtk_grid_view_set_enable_rubberband (_tmp0_, enable);
}

static void
_vala_array_add70 (guint* * array,
                   gint* length,
                   gint* size,
                   guint value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (guint, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
_vala_array_add71 (guint* * array,
                   gint* length,
                   gint* size,
                   guint value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (guint, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static gboolean
_vala_uint_array_contains (guint * stack,
                           gssize stack_length,
                           const guint needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (needle == stack[i]) {
			return TRUE;
		}
	}
	return FALSE;
}

static void
_vala_array_add72 (guint* * array,
                   gint* length,
                   gint* size,
                   guint value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (guint, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
_vala_array_add73 (TubaViewsDriveItemData* * array,
                   gint* length,
                   gint* size,
                   const TubaViewsDriveItemData* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveItemData, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
_vala_array_add74 (TubaViewsDriveItemData* * array,
                   gint* length,
                   gint* size,
                   const TubaViewsDriveItemData* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveItemData, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
_vala_TubaViewsDriveItemData_array_free (TubaViewsDriveItemData * array,
                                         gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			tuba_views_drive_item_data_destroy (&array[i]);
		}
	}
	g_free (array);
}

static void
tuba_views_drive_move_items (TubaViewsDrive* self,
                             const gchar* to_folder,
                             TubaViewsDriveItem* sample_item)
{
	GtkBitset* bitset = NULL;
	GtkMultiSelection* _tmp0_;
	GtkBitset* _tmp1_;
	TubaViewsDriveItemData* items = NULL;
	TubaViewsDriveItemData* _tmp2_;
	gint items_length1;
	gint _items_size_;
	guint* positions = NULL;
	guint* _tmp3_;
	gint positions_length1;
	gint _positions_size_;
	guint val = 0U;
	GtkBitsetIter iter = {0};
	GtkBitset* _tmp4_;
	guint _tmp5_ = 0U;
	gboolean _tmp6_;
	gboolean _tmp9_ = FALSE;
	guint* _tmp26_;
	gint _tmp26__length1;
	TubaViewsDriveItemData* _tmp91_;
	gint _tmp91__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selection;
	_tmp1_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp0_);
	bitset = _tmp1_;
	_tmp2_ = g_new0 (TubaViewsDriveItemData, 0);
	items = _tmp2_;
	items_length1 = 0;
	_items_size_ = items_length1;
	_tmp3_ = g_new0 (guint, 0);
	positions = _tmp3_;
	positions_length1 = 0;
	_positions_size_ = positions_length1;
	memset (&iter, 0, sizeof (GtkBitsetIter));
	_tmp4_ = bitset;
	_tmp6_ = gtk_bitset_iter_init_first (&iter, _tmp4_, &_tmp5_);
	val = _tmp5_;
	if (_tmp6_) {
		_vala_array_add70 (&positions, &positions_length1, &_positions_size_, val);
		while (TRUE) {
			guint _tmp7_ = 0U;
			gboolean _tmp8_;
			_tmp8_ = gtk_bitset_iter_next (&iter, &_tmp7_);
			val = _tmp7_;
			if (!_tmp8_) {
				break;
			}
			_vala_array_add71 (&positions, &positions_length1, &_positions_size_, val);
		}
	}
	if (sample_item != NULL) {
		gboolean _tmp10_ = FALSE;
		if (to_folder == NULL) {
			_tmp10_ = TRUE;
		} else {
			const gchar* _tmp11_ = NULL;
			TubaAPIIceshrimpFolder* _tmp12_;
			TubaAPIIceshrimpFolder* _tmp13_;
			_tmp12_ = tuba_views_drive_item_get_folder (sample_item);
			_tmp13_ = _tmp12_;
			if (_tmp13_ != NULL) {
				TubaAPIIceshrimpFolder* _tmp14_;
				TubaAPIIceshrimpFolder* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				_tmp14_ = tuba_views_drive_item_get_folder (sample_item);
				_tmp15_ = _tmp14_;
				_tmp16_ = tuba_api_iceshrimp_folder_get_id (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp11_ = _tmp17_;
			} else {
				TubaAPIIceshrimpFile* _tmp18_;
				TubaAPIIceshrimpFile* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				_tmp18_ = tuba_views_drive_item_get_file (sample_item);
				_tmp19_ = _tmp18_;
				_tmp20_ = tuba_api_iceshrimp_file_get_id (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp11_ = _tmp21_;
			}
			_tmp10_ = g_strcmp0 (_tmp11_, to_folder) != 0;
		}
		_tmp9_ = _tmp10_;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		guint pos = 0U;
		GListStore* _tmp22_;
		guint _tmp23_ = 0U;
		gboolean _tmp24_;
		_tmp22_ = self->priv->store;
		_tmp24_ = g_list_store_find (_tmp22_, (GObject*) sample_item, &_tmp23_);
		pos = _tmp23_;
		if (_tmp24_) {
			guint* _tmp25_;
			gint _tmp25__length1;
			_tmp25_ = positions;
			_tmp25__length1 = positions_length1;
			if (!_vala_uint_array_contains (_tmp25_, _tmp25__length1, pos)) {
				_vala_array_add72 (&positions, &positions_length1, &_positions_size_, pos);
			}
		}
	}
	_tmp26_ = positions;
	_tmp26__length1 = positions_length1;
	{
		guint* pos_collection = NULL;
		gint pos_collection_length1 = 0;
		gint _pos_collection_size_ = 0;
		gint pos_it = 0;
		pos_collection = _tmp26_;
		pos_collection_length1 = _tmp26__length1;
		for (pos_it = 0; pos_it < pos_collection_length1; pos_it = pos_it + 1) {
			guint pos = 0U;
			pos = pos_collection[pos_it];
			{
				TubaViewsDriveItem* sub_item = NULL;
				GListStore* _tmp27_;
				GObject* _tmp28_;
				TubaViewsDriveItem* _tmp29_;
				TubaAPIIceshrimpFolder* _tmp30_;
				TubaAPIIceshrimpFolder* _tmp31_;
				_tmp27_ = self->priv->store;
				_tmp28_ = g_list_model_get_item ((GListModel*) _tmp27_, pos);
				sub_item = G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem);
				_tmp29_ = sub_item;
				_tmp30_ = tuba_views_drive_item_get_folder (_tmp29_);
				_tmp31_ = _tmp30_;
				if (_tmp31_ != NULL) {
					gboolean _tmp32_ = FALSE;
					gboolean _tmp33_ = FALSE;
					TubaViewsDriveItem* _tmp34_;
					TubaAPIIceshrimpFolder* _tmp35_;
					TubaAPIIceshrimpFolder* _tmp36_;
					const gchar* _tmp37_;
					const gchar* _tmp38_;
					_tmp34_ = sub_item;
					_tmp35_ = tuba_views_drive_item_get_folder (_tmp34_);
					_tmp36_ = _tmp35_;
					_tmp37_ = tuba_api_iceshrimp_folder_get_id (_tmp36_);
					_tmp38_ = _tmp37_;
					if (_tmp38_ != NULL) {
						TubaViewsDriveItem* _tmp39_;
						TubaAPIIceshrimpFolder* _tmp40_;
						TubaAPIIceshrimpFolder* _tmp41_;
						const gchar* _tmp42_;
						const gchar* _tmp43_;
						_tmp39_ = sub_item;
						_tmp40_ = tuba_views_drive_item_get_folder (_tmp39_);
						_tmp41_ = _tmp40_;
						_tmp42_ = tuba_api_iceshrimp_folder_get_id (_tmp41_);
						_tmp43_ = _tmp42_;
						_tmp33_ = g_strcmp0 (_tmp43_, "") != 0;
					} else {
						_tmp33_ = FALSE;
					}
					if (_tmp33_) {
						gboolean _tmp44_ = FALSE;
						if (to_folder == NULL) {
							_tmp44_ = TRUE;
						} else {
							TubaViewsDriveItem* _tmp45_;
							TubaAPIIceshrimpFolder* _tmp46_;
							TubaAPIIceshrimpFolder* _tmp47_;
							const gchar* _tmp48_;
							const gchar* _tmp49_;
							_tmp45_ = sub_item;
							_tmp46_ = tuba_views_drive_item_get_folder (_tmp45_);
							_tmp47_ = _tmp46_;
							_tmp48_ = tuba_api_iceshrimp_folder_get_id (_tmp47_);
							_tmp49_ = _tmp48_;
							_tmp44_ = g_strcmp0 (_tmp49_, to_folder) != 0;
						}
						_tmp32_ = _tmp44_;
					} else {
						_tmp32_ = FALSE;
					}
					if (_tmp32_) {
						TubaViewsDriveItem* _tmp50_;
						TubaAPIIceshrimpFolder* _tmp51_;
						TubaAPIIceshrimpFolder* _tmp52_;
						const gchar* _tmp53_;
						const gchar* _tmp54_;
						gchar* _tmp55_;
						TubaViewsDriveItem* _tmp56_;
						TubaAPIIceshrimpFolder* _tmp57_;
						TubaAPIIceshrimpFolder* _tmp58_;
						const gchar* _tmp59_;
						const gchar* _tmp60_;
						gchar* _tmp61_;
						TubaViewsDriveItem* _tmp62_;
						TubaViewsDriveItem* _tmp63_;
						TubaViewsDriveItemData _tmp64_ = {0};
						_tmp50_ = sub_item;
						_tmp51_ = tuba_views_drive_item_get_folder (_tmp50_);
						_tmp52_ = _tmp51_;
						_tmp53_ = tuba_api_iceshrimp_folder_get_id (_tmp52_);
						_tmp54_ = _tmp53_;
						_tmp55_ = g_strdup (_tmp54_);
						_tmp56_ = sub_item;
						_tmp57_ = tuba_views_drive_item_get_folder (_tmp56_);
						_tmp58_ = _tmp57_;
						_tmp59_ = tuba_api_iceshrimp_folder_get_name (_tmp58_);
						_tmp60_ = _tmp59_;
						_tmp61_ = g_strdup (_tmp60_);
						_tmp62_ = sub_item;
						_tmp63_ = _g_object_ref0 (_tmp62_);
						memset (&_tmp64_, 0, sizeof (TubaViewsDriveItemData));
						_g_free0 (_tmp64_.id);
						_tmp64_.id = _tmp55_;
						_g_free0 (_tmp64_.name);
						_tmp64_.name = _tmp61_;
						_tmp64_.folder = TRUE;
						_g_object_unref0 (_tmp64_.item);
						_tmp64_.item = _tmp63_;
						_vala_array_add73 (&items, &items_length1, &_items_size_, &_tmp64_);
					}
				} else {
					gboolean _tmp65_ = FALSE;
					TubaViewsDriveItem* _tmp66_;
					TubaAPIIceshrimpFile* _tmp67_;
					TubaAPIIceshrimpFile* _tmp68_;
					const gchar* _tmp69_;
					const gchar* _tmp70_;
					_tmp66_ = sub_item;
					_tmp67_ = tuba_views_drive_item_get_file (_tmp66_);
					_tmp68_ = _tmp67_;
					_tmp69_ = tuba_api_iceshrimp_file_get_id (_tmp68_);
					_tmp70_ = _tmp69_;
					if (_tmp70_ != NULL) {
						TubaViewsDriveItem* _tmp71_;
						TubaAPIIceshrimpFile* _tmp72_;
						TubaAPIIceshrimpFile* _tmp73_;
						const gchar* _tmp74_;
						const gchar* _tmp75_;
						_tmp71_ = sub_item;
						_tmp72_ = tuba_views_drive_item_get_file (_tmp71_);
						_tmp73_ = _tmp72_;
						_tmp74_ = tuba_api_iceshrimp_file_get_id (_tmp73_);
						_tmp75_ = _tmp74_;
						_tmp65_ = g_strcmp0 (_tmp75_, "") != 0;
					} else {
						_tmp65_ = FALSE;
					}
					if (_tmp65_) {
						TubaViewsDriveItem* _tmp76_;
						TubaAPIIceshrimpFile* _tmp77_;
						TubaAPIIceshrimpFile* _tmp78_;
						const gchar* _tmp79_;
						const gchar* _tmp80_;
						gchar* _tmp81_;
						TubaViewsDriveItem* _tmp82_;
						TubaAPIIceshrimpFile* _tmp83_;
						TubaAPIIceshrimpFile* _tmp84_;
						const gchar* _tmp85_;
						const gchar* _tmp86_;
						gchar* _tmp87_;
						TubaViewsDriveItem* _tmp88_;
						TubaViewsDriveItem* _tmp89_;
						TubaViewsDriveItemData _tmp90_ = {0};
						_tmp76_ = sub_item;
						_tmp77_ = tuba_views_drive_item_get_file (_tmp76_);
						_tmp78_ = _tmp77_;
						_tmp79_ = tuba_api_iceshrimp_file_get_id (_tmp78_);
						_tmp80_ = _tmp79_;
						_tmp81_ = g_strdup (_tmp80_);
						_tmp82_ = sub_item;
						_tmp83_ = tuba_views_drive_item_get_file (_tmp82_);
						_tmp84_ = _tmp83_;
						_tmp85_ = tuba_api_iceshrimp_file_get_filename (_tmp84_);
						_tmp86_ = _tmp85_;
						_tmp87_ = g_strdup (_tmp86_);
						_tmp88_ = sub_item;
						_tmp89_ = _g_object_ref0 (_tmp88_);
						memset (&_tmp90_, 0, sizeof (TubaViewsDriveItemData));
						_g_free0 (_tmp90_.id);
						_tmp90_.id = _tmp81_;
						_g_free0 (_tmp90_.name);
						_tmp90_.name = _tmp87_;
						_tmp90_.folder = FALSE;
						_g_object_unref0 (_tmp90_.item);
						_tmp90_.item = _tmp89_;
						_vala_array_add74 (&items, &items_length1, &_items_size_, &_tmp90_);
					}
				}
				_g_object_unref0 (sub_item);
			}
		}
	}
	_tmp91_ = items;
	_tmp91__length1 = items_length1;
	tuba_views_drive_move_items_real (self, to_folder, _tmp91_, (gint) _tmp91__length1, NULL, NULL);
	positions = (g_free (positions), NULL);
	items = (_vala_TubaViewsDriveItemData_array_free (items, items_length1), NULL);
	_gtk_bitset_unref0 (bitset);
}

static void
tuba_views_drive_move_items_real_data_free (gpointer _data)
{
	TubaViewsDriveMoveItemsRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->to_folder);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveMoveItemsRealData, _data_);
}

static void
tuba_views_drive_move_items_real (TubaViewsDrive* self,
                                  const gchar* to_folder,
                                  TubaViewsDriveItemData* items,
                                  gint items_length1,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	TubaViewsDriveMoveItemsRealData* _data_;
	TubaViewsDrive* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveMoveItemsRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_move_items_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (to_folder);
	_g_free0 (_data_->to_folder);
	_data_->to_folder = _tmp1_;
	_data_->items = items;
	_data_->items_length1 = items_length1;
	tuba_views_drive_move_items_real_co (_data_);
}

static void
tuba_views_drive_move_items_real_finish (TubaViewsDrive* self,
                                         GAsyncResult* _res_)
{
	TubaViewsDriveMoveItemsRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
_vala_array_add75 (TubaViewsDriveReqData* * array,
                   gint* length,
                   gint* size,
                   const TubaViewsDriveReqData* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveReqData, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
tuba_views_drive_move_items_real_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	TubaViewsDriveMoveItemsRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_move_items_real_co (_data_);
}

static void
_vala_TubaViewsDriveReqData_array_free (TubaViewsDriveReqData * array,
                                        gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			tuba_views_drive_req_data_destroy (&array[i]);
		}
	}
	g_free (array);
}

static gboolean
tuba_views_drive_move_items_real_co (TubaViewsDriveMoveItemsRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->requires_refresh = FALSE;
	tuba_views_drive_set_working (_data_->self, TRUE);
	_data_->_tmp0_ = _data_->self->priv->cancel_btn;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp0_, TRUE);
	_data_->_tmp1_ = json_builder_new ();
	_data_->builder = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->builder;
	json_builder_begin_object (_data_->_tmp2_);
	_data_->_tmp3_ = _data_->builder;
	json_builder_set_member_name (_data_->_tmp3_, "folderId");
	if (_data_->to_folder == NULL) {
		_data_->_tmp4_ = _data_->builder;
		json_builder_add_null_value (_data_->_tmp4_);
	} else {
		_data_->_tmp5_ = _data_->builder;
		json_builder_add_string_value (_data_->_tmp5_, _data_->to_folder);
	}
	_data_->_tmp6_ = _data_->builder;
	json_builder_end_object (_data_->_tmp6_);
	_data_->_tmp7_ = g_new0 (TubaViewsDriveReqData, 0);
	_data_->rqs = _data_->_tmp7_;
	_data_->rqs_length1 = 0;
	_data_->_rqs_size_ = _data_->rqs_length1;
	if (_data_->items_length1 > 0) {
		{
			_data_->item_data_collection_length1 = 0;
			_data_->_item_data_collection_size_ = 0;
			_data_->item_data_collection = _data_->items;
			_data_->item_data_collection_length1 = _data_->items_length1;
			for (_data_->item_data_it = 0; _data_->item_data_it < _data_->item_data_collection_length1; _data_->item_data_it = _data_->item_data_it + 1) {
				_data_->_tmp8_ = _data_->item_data_collection[_data_->item_data_it];
				memset (&_data_->_tmp9_, 0, sizeof (TubaViewsDriveItemData));
				tuba_views_drive_item_data_copy (&_data_->_tmp8_, &_data_->_tmp9_);
				_data_->item_data = _data_->_tmp9_;
				{
					_data_->_tmp11_ = _data_->item_data;
					if (_data_->_tmp11_.folder) {
						_data_->_tmp10_ = "folder/";
					} else {
						_data_->_tmp10_ = "";
					}
					_data_->_tmp12_ = string_to_string (_data_->_tmp10_);
					_data_->_tmp13_ = _data_->item_data;
					_data_->_tmp14_ = _data_->_tmp13_.id;
					_data_->_tmp15_ = string_to_string (_data_->_tmp14_);
					_data_->_tmp16_ = g_strconcat ("/api/iceshrimp/drive/", _data_->_tmp12_, _data_->_tmp15_, "/move", NULL);
					_data_->_tmp17_ = _data_->_tmp16_;
					_data_->_tmp18_ = tuba_accounts;
					_data_->_tmp19_ = tuba_account_store_get_active (_data_->_tmp18_);
					_data_->_tmp20_ = _data_->_tmp19_;
					_data_->_tmp21_ = _g_object_ref0 (_data_->_tmp20_);
					_data_->_tmp22_ = tuba_accounts;
					_data_->_tmp23_ = tuba_account_store_get_active (_data_->_tmp22_);
					_data_->_tmp24_ = _data_->_tmp23_;
					_data_->_tmp25_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp24_);
					_data_->_tmp26_ = _data_->_tmp25_;
					_data_->_tmp27_ = g_strdup (_data_->_tmp26_);
					_data_->_tmp28_ = NULL;
					_data_->_tmp28_ = tuba_request_v2_new (_data_->_tmp17_, TUBA_REQUEST_V2_METHOD_POST);
					tuba_request_v2_set_account (_data_->_tmp28_, _data_->_tmp21_);
					_g_object_unref0 (_data_->_tmp21_);
					tuba_request_v2_set_force_token (_data_->_tmp28_, _data_->_tmp27_);
					_g_free0 (_data_->_tmp27_);
					_data_->_tmp29_ = _data_->_tmp28_;
					_g_free0 (_data_->_tmp17_);
					_data_->req = _data_->_tmp29_;
					_data_->_tmp30_ = _data_->req;
					_data_->_tmp31_ = _data_->builder;
					tuba_request_v2_set_body_from_json (_data_->_tmp30_, _data_->_tmp31_);
					_data_->_tmp32_ = _data_->req;
					_data_->_tmp33_ = _g_object_ref0 (_data_->_tmp32_);
					_data_->_tmp34_ = _data_->item_data;
					_data_->_tmp35_ = _data_->_tmp34_;
					memset (&_data_->_tmp36_, 0, sizeof (TubaViewsDriveItemData));
					tuba_views_drive_item_data_copy (&_data_->_tmp35_, &_data_->_tmp36_);
					memset (&_data_->_tmp37_, 0, sizeof (TubaViewsDriveReqData));
					memset (&_data_->_tmp37_, 0, sizeof (TubaViewsDriveReqData));
					_g_object_unref0 (_data_->_tmp37_.req);
					_data_->_tmp37_.req = _data_->_tmp33_;
					tuba_views_drive_item_data_destroy (&_data_->_tmp37_.item_data);
					_data_->_tmp37_.item_data = _data_->_tmp36_;
					_vala_array_add75 (&_data_->rqs, &_data_->rqs_length1, &_data_->_rqs_size_, &_data_->_tmp37_);
					_g_object_unref0 (_data_->req);
					tuba_views_drive_item_data_destroy (&_data_->item_data);
				}
			}
		}
	}
	_data_->_tmp38_ = _data_->rqs;
	_data_->_tmp38__length1 = _data_->rqs_length1;
	_data_->step = (gdouble) (1 / _data_->_tmp38__length1);
	_data_->_tmp39_ = _data_->rqs;
	_data_->_tmp39__length1 = _data_->rqs_length1;
	{
		_data_->rq_collection_length1 = 0;
		_data_->_rq_collection_size_ = 0;
		_data_->rq_collection = _data_->_tmp39_;
		_data_->rq_collection_length1 = _data_->_tmp39__length1;
		for (_data_->rq_it = 0; _data_->rq_it < _data_->rq_collection_length1; _data_->rq_it = _data_->rq_it + 1) {
			_data_->_tmp40_ = _data_->rq_collection[_data_->rq_it];
			memset (&_data_->_tmp41_, 0, sizeof (TubaViewsDriveReqData));
			tuba_views_drive_req_data_copy (&_data_->_tmp40_, &_data_->_tmp41_);
			_data_->rq = _data_->_tmp41_;
			{
				_data_->_tmp42_ = _data_->self->priv->main_cancellable;
				if (g_cancellable_is_cancelled (_data_->_tmp42_)) {
					tuba_views_drive_req_data_destroy (&_data_->rq);
					break;
				}
				{
					_data_->_tmp43_ = tuba_views_drive_get_progress (_data_->self);
					_data_->_tmp44_ = _data_->_tmp43_;
					tuba_views_drive_set_progress (_data_->self, _data_->_tmp44_ + _data_->step);
					_data_->_tmp45_ = _data_->rq;
					_data_->_tmp46_ = _data_->_tmp45_.req;
					_data_->_state_ = 1;
					tuba_request_v2_exec (_data_->_tmp46_, tuba_views_drive_move_items_real_ready, _data_);
					return FALSE;
					_state_1:
					_data_->_tmp47_ = tuba_request_v2_exec_finish (_data_->_tmp46_, _data_->_res_, NULL, &_data_->_inner_error0_);
					_data_->_tmp48_ = _data_->_tmp47_;
					_g_object_unref0 (_data_->_tmp48_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_data_->_tmp49_ = _data_->self->priv->store;
					_data_->_tmp50_ = _data_->rq;
					_data_->_tmp51_ = _data_->_tmp50_.item_data;
					_data_->_tmp52_ = _data_->_tmp51_.item;
					_data_->_tmp53_ = 0U;
					_data_->_tmp54_ = g_list_store_find (_data_->_tmp49_, (GObject*) _data_->_tmp52_, &_data_->_tmp53_);
					_data_->pos = _data_->_tmp53_;
					if (_data_->_tmp54_) {
						_data_->_tmp55_ = _data_->self->priv->store;
						g_list_store_remove (_data_->_tmp55_, _data_->pos);
					} else {
						_data_->requires_refresh = TRUE;
					}
				}
				goto __finally0;
				__catch0_g_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp56_ = tuba_app;
					_data_->_tmp57_ = _data_->rq;
					_data_->_tmp58_ = _data_->_tmp57_.item_data;
					_data_->_tmp59_ = _data_->_tmp58_.name;
					_data_->_tmp60_ = g_markup_escape_text (_data_->_tmp59_, (gssize) -1);
					_data_->_tmp61_ = _data_->_tmp60_;
					_data_->_tmp62_ = _data_->e;
					_data_->_tmp63_ = _data_->_tmp62_->message;
					_data_->_tmp64_ = g_strdup_printf (_ ("Couldn't move '%s': %s"), _data_->_tmp61_, _data_->_tmp63_);
					_data_->_tmp65_ = _data_->_tmp64_;
					g_signal_emit_by_name (_data_->_tmp56_, "toast", _data_->_tmp65_, (guint) 5, NULL, NULL, NULL);
					_g_free0 (_data_->_tmp65_);
					_g_free0 (_data_->_tmp61_);
					_data_->_tmp66_ = _data_->rq;
					_data_->_tmp67_ = _data_->_tmp66_.item_data;
					_data_->_tmp68_ = _data_->_tmp67_.name;
					_data_->_tmp69_ = string_to_string (_data_->_tmp68_);
					_data_->_tmp70_ = _data_->e;
					_data_->_tmp71_ = g_strdup_printf ("%i", _data_->_tmp70_->code);
					_data_->_tmp72_ = _data_->_tmp71_;
					_data_->_tmp73_ = _data_->e;
					_data_->_tmp74_ = _data_->_tmp73_->message;
					_data_->_tmp75_ = string_to_string (_data_->_tmp74_);
					_data_->_tmp76_ = g_strconcat ("Couldn't move item '", _data_->_tmp69_, "': ", _data_->_tmp72_, " ", _data_->_tmp75_, NULL);
					_data_->_tmp77_ = _data_->_tmp76_;
					g_warning ("Drive.vala:1225: %s", _data_->_tmp77_);
					_g_free0 (_data_->_tmp77_);
					_g_free0 (_data_->_tmp72_);
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					tuba_views_drive_req_data_destroy (&_data_->rq);
					_data_->rqs = (_vala_TubaViewsDriveReqData_array_free (_data_->rqs, _data_->rqs_length1), NULL);
					_g_object_unref0 (_data_->builder);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
					g_clear_error (&_data_->_inner_error0_);
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				tuba_views_drive_req_data_destroy (&_data_->rq);
			}
		}
	}
	tuba_views_drive_set_working (_data_->self, FALSE);
	if (_data_->requires_refresh) {
		tuba_views_drive_on_refresh (_data_->self);
	}
	_data_->rqs = (_vala_TubaViewsDriveReqData_array_free (_data_->rqs, _data_->rqs_length1), NULL);
	_g_object_unref0 (_data_->builder);
	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
tuba_views_drive_ask_delete_single_real_data_free (gpointer _data)
{
	TubaViewsDriveAskDeleteSingleRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->item);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveAskDeleteSingleRealData, _data_);
}

static void
tuba_views_drive_ask_delete_single_real (TubaViewsDrive* self,
                                         TubaViewsDriveItemWidget* item,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	TubaViewsDriveAskDeleteSingleRealData* _data_;
	TubaViewsDrive* _tmp0_;
	TubaViewsDriveItemWidget* _tmp1_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveAskDeleteSingleRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_ask_delete_single_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (item);
	_g_object_unref0 (_data_->item);
	_data_->item = _tmp1_;
	tuba_views_drive_ask_delete_single_real_co (_data_);
}

static void
tuba_views_drive_ask_delete_single_real_finish (TubaViewsDrive* self,
                                                GAsyncResult* _res_)
{
	TubaViewsDriveAskDeleteSingleRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_drive_ask_delete_single_real_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	TubaViewsDriveAskDeleteSingleRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_ask_delete_single_real_co (_data_);
}

static gboolean
tuba_views_drive_ask_delete_single_real_co (TubaViewsDriveAskDeleteSingleRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_app;
	_data_->_tmp1_ = tuba_views_drive_item_widget_get_filename (_data_->item);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = g_strdup_printf (_ ("Delete '%s'?"), _data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	memset (&_data_->_tmp5_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp5_.text);
	_data_->_tmp5_.text = _data_->_tmp4_;
	_data_->_tmp5_.use_markup = FALSE;
	memset (&_data_->_tmp6_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp6_.text);
	_data_->_tmp6_.text = _ ("This is irreversible.");
	_data_->_tmp6_.use_markup = FALSE;
	_data_->_tmp7_ = tuba_app;
	_data_->_tmp8_ = tuba_application_get_main_window (_data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	memset (&_data_->_tmp10_, 0, sizeof (TubaApplicationQuestionButtons));
	tuba_application_question_button_destroy (&_data_->_tmp10_.yes);
	_data_->_tmp10_.yes = (TubaApplicationQuestionButton) {_ ("Delete"), ADW_RESPONSE_DESTRUCTIVE};
	tuba_application_question_button_destroy (&_data_->_tmp10_.no);
	_data_->_tmp10_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
	_data_->_state_ = 1;
	tuba_application_question (_data_->_tmp0_, &_data_->_tmp5_, &_data_->_tmp6_, (GtkWidget*) _data_->_tmp9_, &_data_->_tmp10_, NULL, FALSE, tuba_views_drive_ask_delete_single_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp11_ = tuba_application_question_finish (_data_->_tmp0_, _data_->_res_);
	_g_free0 (_data_->_tmp4_);
	_data_->qs = _data_->_tmp11_;
	if (tuba_application_question_answer_truthy (_data_->qs)) {
		tuba_views_drive_set_working (_data_->self, TRUE);
		_data_->_tmp13_ = tuba_views_drive_item_widget_get_folder (_data_->item);
		_data_->_tmp14_ = _data_->_tmp13_;
		if (_data_->_tmp14_) {
			_data_->_tmp12_ = "folder/";
		} else {
			_data_->_tmp12_ = "";
		}
		_data_->_tmp15_ = string_to_string (_data_->_tmp12_);
		_data_->_tmp16_ = tuba_views_drive_item_widget_get_item_id (_data_->item);
		_data_->_tmp17_ = _data_->_tmp16_;
		_data_->_tmp18_ = string_to_string (_data_->_tmp17_);
		_data_->_tmp19_ = g_strconcat ("/api/iceshrimp/drive/", _data_->_tmp15_, _data_->_tmp18_, NULL);
		_data_->_tmp20_ = _data_->_tmp19_;
		_data_->_tmp21_ = tuba_accounts;
		_data_->_tmp22_ = tuba_account_store_get_active (_data_->_tmp21_);
		_data_->_tmp23_ = _data_->_tmp22_;
		_data_->_tmp24_ = _g_object_ref0 (_data_->_tmp23_);
		_data_->_tmp25_ = tuba_accounts;
		_data_->_tmp26_ = tuba_account_store_get_active (_data_->_tmp25_);
		_data_->_tmp27_ = _data_->_tmp26_;
		_data_->_tmp28_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp27_);
		_data_->_tmp29_ = _data_->_tmp28_;
		_data_->_tmp30_ = g_strdup (_data_->_tmp29_);
		_data_->_tmp31_ = NULL;
		_data_->_tmp31_ = tuba_request_v2_new (_data_->_tmp20_, TUBA_REQUEST_V2_METHOD_DELETE);
		tuba_request_v2_set_account (_data_->_tmp31_, _data_->_tmp24_);
		_g_object_unref0 (_data_->_tmp24_);
		tuba_request_v2_set_force_token (_data_->_tmp31_, _data_->_tmp30_);
		_g_free0 (_data_->_tmp30_);
		_data_->_tmp32_ = _data_->_tmp31_;
		_g_free0 (_data_->_tmp20_);
		_data_->req = _data_->_tmp32_;
		{
			_data_->_tmp33_ = _data_->req;
			_data_->_state_ = 2;
			tuba_request_v2_exec (_data_->_tmp33_, tuba_views_drive_ask_delete_single_real_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp34_ = tuba_request_v2_exec_finish (_data_->_tmp33_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp35_ = _data_->_tmp34_;
			_g_object_unref0 (_data_->_tmp35_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp36_ = _data_->self->priv->store;
			_data_->_tmp37_ = tuba_views_drive_item_widget_get_item (_data_->item);
			_data_->_tmp38_ = _data_->_tmp37_;
			_data_->_tmp39_ = 0U;
			_data_->_tmp40_ = g_list_store_find (_data_->_tmp36_, (GObject*) _data_->_tmp38_, &_data_->_tmp39_);
			_data_->pos = _data_->_tmp39_;
			if (_data_->_tmp40_) {
				_data_->_tmp41_ = _data_->self->priv->store;
				g_list_store_remove (_data_->_tmp41_, _data_->pos);
			} else {
				tuba_views_drive_on_refresh (_data_->self);
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp42_ = tuba_app;
			_data_->_tmp43_ = tuba_views_drive_item_widget_get_filename (_data_->item);
			_data_->_tmp44_ = _data_->_tmp43_;
			_data_->_tmp45_ = g_markup_escape_text (_data_->_tmp44_, (gssize) -1);
			_data_->_tmp46_ = _data_->_tmp45_;
			_data_->_tmp47_ = _data_->e;
			_data_->_tmp48_ = _data_->_tmp47_->message;
			_data_->_tmp49_ = g_strdup_printf (_ ("Couldn't delete '%s': %s"), _data_->_tmp46_, _data_->_tmp48_);
			_data_->_tmp50_ = _data_->_tmp49_;
			g_signal_emit_by_name (_data_->_tmp42_, "toast", _data_->_tmp50_, (guint) 5, NULL, NULL, NULL);
			_g_free0 (_data_->_tmp50_);
			_g_free0 (_data_->_tmp46_);
			_data_->_tmp52_ = tuba_views_drive_item_widget_get_folder (_data_->item);
			_data_->_tmp53_ = _data_->_tmp52_;
			if (_data_->_tmp53_) {
				_data_->_tmp51_ = "folder";
			} else {
				_data_->_tmp51_ = "file";
			}
			_data_->_tmp54_ = string_to_string (_data_->_tmp51_);
			_data_->_tmp55_ = tuba_views_drive_item_widget_get_filename (_data_->item);
			_data_->_tmp56_ = _data_->_tmp55_;
			_data_->_tmp57_ = string_to_string (_data_->_tmp56_);
			_data_->_tmp58_ = _data_->e;
			_data_->_tmp59_ = g_strdup_printf ("%i", _data_->_tmp58_->code);
			_data_->_tmp60_ = _data_->_tmp59_;
			_data_->_tmp61_ = _data_->e;
			_data_->_tmp62_ = _data_->_tmp61_->message;
			_data_->_tmp63_ = string_to_string (_data_->_tmp62_);
			_data_->_tmp64_ = g_strconcat ("Couldn't delete ", _data_->_tmp54_, " '", _data_->_tmp57_, "': ", _data_->_tmp60_, " ", _data_->_tmp63_, NULL);
			_data_->_tmp65_ = _data_->_tmp64_;
			g_warning ("Drive.vala:1262: %s", _data_->_tmp65_);
			_g_free0 (_data_->_tmp65_);
			_g_free0 (_data_->_tmp60_);
			_g_error_free0 (_data_->e);
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->req);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		tuba_views_drive_set_working (_data_->self, FALSE);
		_g_object_unref0 (_data_->req);
	}
	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 Block65Data*
block65_data_ref (Block65Data* _data65_)
{
	g_atomic_int_inc (&_data65_->_ref_count_);
	return _data65_;
}

static void
block65_data_unref (void * _userdata_)
{
	Block65Data* _data65_;
	_data65_ = (Block65Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data65_->_ref_count_)) {
		TubaViewsDrive* self;
		self = _data65_->self;
		_data65_->undeletable_messages = (_vala_array_free (_data65_->undeletable_messages, _data65_->undeletable_messages_length1, (GDestroyNotify) g_free), NULL);
		_data65_->items = (_vala_TubaViewsDriveItemData_array_free (_data65_->items, _data65_->items_length1), NULL);
		_g_object_unref0 (self);
		g_slice_free (Block65Data, _data65_);
	}
}

static void
_vala_array_add76 (guint* * array,
                   gint* length,
                   gint* size,
                   guint value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (guint, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
_vala_array_add77 (guint* * array,
                   gint* length,
                   gint* size,
                   guint value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (guint, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
_vala_array_add78 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
_vala_array_add79 (TubaViewsDriveItemData* * array,
                   gint* length,
                   gint* size,
                   const TubaViewsDriveItemData* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveItemData, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
_vala_array_add80 (TubaViewsDriveItemData* * array,
                   gint* length,
                   gint* size,
                   const TubaViewsDriveItemData* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveItemData, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
____lambda195_ (Block65Data* _data65_,
                GObject* obj,
                GAsyncResult* res)
{
	TubaViewsDrive* self;
	TubaApplication* _tmp0_;
	self = _data65_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = tuba_app;
	if (tuba_application_question_answer_truthy (tuba_application_question_finish (_tmp0_, res))) {
		gchar** _tmp1_;
		gint _tmp1__length1;
		TubaViewsDriveItemData* _tmp6_;
		gint _tmp6__length1;
		_tmp1_ = _data65_->undeletable_messages;
		_tmp1__length1 = _data65_->undeletable_messages_length1;
		{
			gchar** message_collection = NULL;
			gint message_collection_length1 = 0;
			gint _message_collection_size_ = 0;
			gint message_it = 0;
			message_collection = _tmp1_;
			message_collection_length1 = _tmp1__length1;
			for (message_it = 0; message_it < message_collection_length1; message_it = message_it + 1) {
				gchar* _tmp2_;
				gchar* message = NULL;
				_tmp2_ = g_strdup (message_collection[message_it]);
				message = _tmp2_;
				{
					TubaApplication* _tmp3_;
					const gchar* _tmp4_;
					const gchar* _tmp5_;
					_tmp3_ = tuba_app;
					_tmp4_ = message;
					g_signal_emit_by_name (_tmp3_, "toast", _tmp4_, (guint) 5, NULL, NULL, NULL);
					_tmp5_ = message;
					g_warning ("Drive.vala:1348: %s", _tmp5_);
					_g_free0 (message);
				}
			}
		}
		_tmp6_ = _data65_->items;
		_tmp6__length1 = _data65_->items_length1;
		tuba_views_drive_delete_real_many (self, _tmp6_, (gint) _tmp6__length1, NULL, NULL);
	}
}

static void
_____lambda195__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	____lambda195_ (self, source_object, res);
	block65_data_unref (self);
}

static void
tuba_views_drive_on_delete_request (TubaViewsDrive* self,
                                    TubaViewsDriveItemWidget* item)
{
	GtkBitset* bitset = NULL;
	GtkMultiSelection* _tmp0_;
	GtkBitset* _tmp1_;
	guint64 size = 0ULL;
	GtkBitset* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selection;
	_tmp1_ = gtk_selection_model_get_selection ((GtkSelectionModel*) _tmp0_);
	bitset = _tmp1_;
	_tmp2_ = bitset;
	size = gtk_bitset_get_size (_tmp2_);
	if (size <= ((guint64) 1)) {
		_tmp4_ = item != NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp5_ = tuba_views_drive_item_widget_get_item_id (item);
		_tmp6_ = _tmp5_;
		_tmp3_ = _tmp6_ != NULL;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		gchar* error_reason = NULL;
		TubaViewsDriveItem* _tmp7_;
		TubaViewsDriveItem* _tmp8_;
		gchar* _tmp9_ = NULL;
		gboolean _tmp10_;
		error_reason = NULL;
		_tmp7_ = tuba_views_drive_item_widget_get_item (item);
		_tmp8_ = _tmp7_;
		_tmp10_ = tuba_views_drive_item_can_delete (_tmp8_, &_tmp9_);
		_g_free0 (error_reason);
		error_reason = _tmp9_;
		if (!_tmp10_) {
			gchar* message = NULL;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			gchar* _tmp13_;
			gchar* _tmp14_;
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			TubaApplication* _tmp18_;
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			_tmp11_ = tuba_views_drive_item_widget_get_filename (item);
			_tmp12_ = _tmp11_;
			_tmp13_ = g_markup_escape_text (_tmp12_, (gssize) -1);
			_tmp14_ = _tmp13_;
			_tmp15_ = error_reason;
			_tmp16_ = g_strdup_printf (_ ("'%s' cannot be deleted: %s"), _tmp14_, _tmp15_);
			_tmp17_ = _tmp16_;
			_g_free0 (_tmp14_);
			message = _tmp17_;
			_tmp18_ = tuba_app;
			_tmp19_ = message;
			g_signal_emit_by_name (_tmp18_, "toast", _tmp19_, (guint) 5, NULL, NULL, NULL);
			_tmp20_ = message;
			g_warning ("Drive.vala:1278: %s", _tmp20_);
			_g_free0 (message);
			_g_free0 (error_reason);
			_gtk_bitset_unref0 (bitset);
			return;
		}
		tuba_views_drive_ask_delete_single_real (self, item, NULL, NULL);
		_g_free0 (error_reason);
	} else {
		gboolean _tmp21_ = FALSE;
		if (size > ((guint64) 1)) {
			_tmp21_ = TRUE;
		} else {
			_tmp21_ = item == NULL;
		}
		if (_tmp21_) {
			Block65Data* _data65_;
			TubaViewsDriveItemData* _tmp22_;
			guint* positions = NULL;
			guint* _tmp23_;
			gint positions_length1;
			gint _positions_size_;
			guint val = 0U;
			GtkBitsetIter iter = {0};
			GtkBitset* _tmp24_;
			guint _tmp25_ = 0U;
			gboolean _tmp26_;
			gchar** _tmp29_;
			guint* _tmp30_;
			gint _tmp30__length1;
			TubaViewsDriveItemData* _tmp109_;
			gint _tmp109__length1;
			TubaApplication* _tmp111_;
			TubaApplicationQuestionText _tmp112_ = {0};
			TubaApplicationQuestionText _tmp113_ = {0};
			TubaApplication* _tmp114_;
			TubaDialogsMainWindow* _tmp115_;
			TubaDialogsMainWindow* _tmp116_;
			TubaApplicationQuestionButtons _tmp117_ = {0};
			_data65_ = g_slice_new0 (Block65Data);
			_data65_->_ref_count_ = 1;
			_data65_->self = g_object_ref (self);
			_tmp22_ = g_new0 (TubaViewsDriveItemData, 0);
			_data65_->items = _tmp22_;
			_data65_->items_length1 = 0;
			_data65_->_items_size_ = _data65_->items_length1;
			_tmp23_ = g_new0 (guint, 0);
			positions = _tmp23_;
			positions_length1 = 0;
			_positions_size_ = positions_length1;
			memset (&iter, 0, sizeof (GtkBitsetIter));
			_tmp24_ = bitset;
			_tmp26_ = gtk_bitset_iter_init_first (&iter, _tmp24_, &_tmp25_);
			val = _tmp25_;
			if (_tmp26_) {
				_vala_array_add76 (&positions, &positions_length1, &_positions_size_, val);
				while (TRUE) {
					guint _tmp27_ = 0U;
					gboolean _tmp28_;
					_tmp28_ = gtk_bitset_iter_next (&iter, &_tmp27_);
					val = _tmp27_;
					if (!_tmp28_) {
						break;
					}
					_vala_array_add77 (&positions, &positions_length1, &_positions_size_, val);
				}
			}
			_tmp29_ = g_new0 (gchar*, 0 + 1);
			_data65_->undeletable_messages = _tmp29_;
			_data65_->undeletable_messages_length1 = 0;
			_data65_->_undeletable_messages_size_ = _data65_->undeletable_messages_length1;
			_tmp30_ = positions;
			_tmp30__length1 = positions_length1;
			{
				guint* pos_collection = NULL;
				gint pos_collection_length1 = 0;
				gint _pos_collection_size_ = 0;
				gint pos_it = 0;
				pos_collection = _tmp30_;
				pos_collection_length1 = _tmp30__length1;
				for (pos_it = 0; pos_it < pos_collection_length1; pos_it = pos_it + 1) {
					guint pos = 0U;
					pos = pos_collection[pos_it];
					{
						TubaViewsDriveItem* sub_item = NULL;
						GListStore* _tmp31_;
						GObject* _tmp32_;
						TubaViewsDriveItem* _tmp54_;
						TubaAPIIceshrimpFolder* _tmp55_;
						TubaAPIIceshrimpFolder* _tmp56_;
						_tmp31_ = self->priv->store;
						_tmp32_ = g_list_model_get_item ((GListModel*) _tmp31_, pos);
						sub_item = G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem);
						{
							gchar* error_reason = NULL;
							TubaViewsDriveItem* _tmp33_;
							gchar* _tmp34_ = NULL;
							gboolean _tmp35_;
							error_reason = NULL;
							_tmp33_ = sub_item;
							_tmp35_ = tuba_views_drive_item_can_delete (_tmp33_, &_tmp34_);
							_g_free0 (error_reason);
							error_reason = _tmp34_;
							if (!_tmp35_) {
								const gchar* _tmp36_ = NULL;
								TubaViewsDriveItem* _tmp37_;
								TubaAPIIceshrimpFolder* _tmp38_;
								TubaAPIIceshrimpFolder* _tmp39_;
								gchar* _tmp50_;
								gchar* _tmp51_;
								const gchar* _tmp52_;
								gchar* _tmp53_;
								_tmp37_ = sub_item;
								_tmp38_ = tuba_views_drive_item_get_folder (_tmp37_);
								_tmp39_ = _tmp38_;
								if (_tmp39_ != NULL) {
									TubaViewsDriveItem* _tmp40_;
									TubaAPIIceshrimpFolder* _tmp41_;
									TubaAPIIceshrimpFolder* _tmp42_;
									const gchar* _tmp43_;
									const gchar* _tmp44_;
									_tmp40_ = sub_item;
									_tmp41_ = tuba_views_drive_item_get_folder (_tmp40_);
									_tmp42_ = _tmp41_;
									_tmp43_ = tuba_api_iceshrimp_folder_get_name (_tmp42_);
									_tmp44_ = _tmp43_;
									_tmp36_ = _tmp44_;
								} else {
									TubaViewsDriveItem* _tmp45_;
									TubaAPIIceshrimpFile* _tmp46_;
									TubaAPIIceshrimpFile* _tmp47_;
									const gchar* _tmp48_;
									const gchar* _tmp49_;
									_tmp45_ = sub_item;
									_tmp46_ = tuba_views_drive_item_get_file (_tmp45_);
									_tmp47_ = _tmp46_;
									_tmp48_ = tuba_api_iceshrimp_file_get_filename (_tmp47_);
									_tmp49_ = _tmp48_;
									_tmp36_ = _tmp49_;
								}
								_tmp50_ = g_markup_escape_text (_tmp36_, (gssize) -1);
								_tmp51_ = _tmp50_;
								_tmp52_ = error_reason;
								_tmp53_ = g_strdup_printf (_ ("'%s' cannot be deleted: %s"), _tmp51_, _tmp52_);
								_vala_array_add78 (&_data65_->undeletable_messages, &_data65_->undeletable_messages_length1, &_data65_->_undeletable_messages_size_, _tmp53_);
								_g_free0 (_tmp51_);
								_g_free0 (error_reason);
								_g_object_unref0 (sub_item);
								continue;
							}
							_g_free0 (error_reason);
						}
						_tmp54_ = sub_item;
						_tmp55_ = tuba_views_drive_item_get_folder (_tmp54_);
						_tmp56_ = _tmp55_;
						if (_tmp56_ != NULL) {
							gboolean _tmp57_ = FALSE;
							TubaViewsDriveItem* _tmp58_;
							TubaAPIIceshrimpFolder* _tmp59_;
							TubaAPIIceshrimpFolder* _tmp60_;
							const gchar* _tmp61_;
							const gchar* _tmp62_;
							_tmp58_ = sub_item;
							_tmp59_ = tuba_views_drive_item_get_folder (_tmp58_);
							_tmp60_ = _tmp59_;
							_tmp61_ = tuba_api_iceshrimp_folder_get_id (_tmp60_);
							_tmp62_ = _tmp61_;
							if (_tmp62_ != NULL) {
								TubaViewsDriveItem* _tmp63_;
								TubaAPIIceshrimpFolder* _tmp64_;
								TubaAPIIceshrimpFolder* _tmp65_;
								const gchar* _tmp66_;
								const gchar* _tmp67_;
								_tmp63_ = sub_item;
								_tmp64_ = tuba_views_drive_item_get_folder (_tmp63_);
								_tmp65_ = _tmp64_;
								_tmp66_ = tuba_api_iceshrimp_folder_get_id (_tmp65_);
								_tmp67_ = _tmp66_;
								_tmp57_ = g_strcmp0 (_tmp67_, "") != 0;
							} else {
								_tmp57_ = FALSE;
							}
							if (_tmp57_) {
								TubaViewsDriveItem* _tmp68_;
								TubaAPIIceshrimpFolder* _tmp69_;
								TubaAPIIceshrimpFolder* _tmp70_;
								const gchar* _tmp71_;
								const gchar* _tmp72_;
								gchar* _tmp73_;
								TubaViewsDriveItem* _tmp74_;
								TubaAPIIceshrimpFolder* _tmp75_;
								TubaAPIIceshrimpFolder* _tmp76_;
								const gchar* _tmp77_;
								const gchar* _tmp78_;
								gchar* _tmp79_;
								TubaViewsDriveItem* _tmp80_;
								TubaViewsDriveItem* _tmp81_;
								TubaViewsDriveItemData _tmp82_ = {0};
								_tmp68_ = sub_item;
								_tmp69_ = tuba_views_drive_item_get_folder (_tmp68_);
								_tmp70_ = _tmp69_;
								_tmp71_ = tuba_api_iceshrimp_folder_get_id (_tmp70_);
								_tmp72_ = _tmp71_;
								_tmp73_ = g_strdup (_tmp72_);
								_tmp74_ = sub_item;
								_tmp75_ = tuba_views_drive_item_get_folder (_tmp74_);
								_tmp76_ = _tmp75_;
								_tmp77_ = tuba_api_iceshrimp_folder_get_name (_tmp76_);
								_tmp78_ = _tmp77_;
								_tmp79_ = g_strdup (_tmp78_);
								_tmp80_ = sub_item;
								_tmp81_ = _g_object_ref0 (_tmp80_);
								memset (&_tmp82_, 0, sizeof (TubaViewsDriveItemData));
								_g_free0 (_tmp82_.id);
								_tmp82_.id = _tmp73_;
								_g_free0 (_tmp82_.name);
								_tmp82_.name = _tmp79_;
								_tmp82_.folder = TRUE;
								_g_object_unref0 (_tmp82_.item);
								_tmp82_.item = _tmp81_;
								_vala_array_add79 (&_data65_->items, &_data65_->items_length1, &_data65_->_items_size_, &_tmp82_);
							}
						} else {
							gboolean _tmp83_ = FALSE;
							TubaViewsDriveItem* _tmp84_;
							TubaAPIIceshrimpFile* _tmp85_;
							TubaAPIIceshrimpFile* _tmp86_;
							const gchar* _tmp87_;
							const gchar* _tmp88_;
							_tmp84_ = sub_item;
							_tmp85_ = tuba_views_drive_item_get_file (_tmp84_);
							_tmp86_ = _tmp85_;
							_tmp87_ = tuba_api_iceshrimp_file_get_id (_tmp86_);
							_tmp88_ = _tmp87_;
							if (_tmp88_ != NULL) {
								TubaViewsDriveItem* _tmp89_;
								TubaAPIIceshrimpFile* _tmp90_;
								TubaAPIIceshrimpFile* _tmp91_;
								const gchar* _tmp92_;
								const gchar* _tmp93_;
								_tmp89_ = sub_item;
								_tmp90_ = tuba_views_drive_item_get_file (_tmp89_);
								_tmp91_ = _tmp90_;
								_tmp92_ = tuba_api_iceshrimp_file_get_id (_tmp91_);
								_tmp93_ = _tmp92_;
								_tmp83_ = g_strcmp0 (_tmp93_, "") != 0;
							} else {
								_tmp83_ = FALSE;
							}
							if (_tmp83_) {
								TubaViewsDriveItem* _tmp94_;
								TubaAPIIceshrimpFile* _tmp95_;
								TubaAPIIceshrimpFile* _tmp96_;
								const gchar* _tmp97_;
								const gchar* _tmp98_;
								gchar* _tmp99_;
								TubaViewsDriveItem* _tmp100_;
								TubaAPIIceshrimpFile* _tmp101_;
								TubaAPIIceshrimpFile* _tmp102_;
								const gchar* _tmp103_;
								const gchar* _tmp104_;
								gchar* _tmp105_;
								TubaViewsDriveItem* _tmp106_;
								TubaViewsDriveItem* _tmp107_;
								TubaViewsDriveItemData _tmp108_ = {0};
								_tmp94_ = sub_item;
								_tmp95_ = tuba_views_drive_item_get_file (_tmp94_);
								_tmp96_ = _tmp95_;
								_tmp97_ = tuba_api_iceshrimp_file_get_id (_tmp96_);
								_tmp98_ = _tmp97_;
								_tmp99_ = g_strdup (_tmp98_);
								_tmp100_ = sub_item;
								_tmp101_ = tuba_views_drive_item_get_file (_tmp100_);
								_tmp102_ = _tmp101_;
								_tmp103_ = tuba_api_iceshrimp_file_get_filename (_tmp102_);
								_tmp104_ = _tmp103_;
								_tmp105_ = g_strdup (_tmp104_);
								_tmp106_ = sub_item;
								_tmp107_ = _g_object_ref0 (_tmp106_);
								memset (&_tmp108_, 0, sizeof (TubaViewsDriveItemData));
								_g_free0 (_tmp108_.id);
								_tmp108_.id = _tmp99_;
								_g_free0 (_tmp108_.name);
								_tmp108_.name = _tmp105_;
								_tmp108_.folder = FALSE;
								_g_object_unref0 (_tmp108_.item);
								_tmp108_.item = _tmp107_;
								_vala_array_add80 (&_data65_->items, &_data65_->items_length1, &_data65_->_items_size_, &_tmp108_);
							}
						}
						_g_object_unref0 (sub_item);
					}
				}
			}
			_tmp109_ = _data65_->items;
			_tmp109__length1 = _data65_->items_length1;
			if (_tmp109__length1 == 0) {
				TubaApplication* _tmp110_;
				_tmp110_ = tuba_app;
				g_signal_emit_by_name (_tmp110_, "toast", _ ("No Deletable Files in Selection"), (guint) 5, NULL, NULL, NULL);
				positions = (g_free (positions), NULL);
				block65_data_unref (_data65_);
				_data65_ = NULL;
				_gtk_bitset_unref0 (bitset);
				return;
			}
			_tmp111_ = tuba_app;
			_g_free0 (_tmp112_.text);
			_tmp112_.text = _ ("Delete Selection?");
			_tmp112_.use_markup = FALSE;
			_g_free0 (_tmp113_.text);
			_tmp113_.text = _ ("This is irreversible.");
			_tmp113_.use_markup = FALSE;
			_tmp114_ = tuba_app;
			_tmp115_ = tuba_application_get_main_window (_tmp114_);
			_tmp116_ = _tmp115_;
			tuba_application_question_button_destroy (&_tmp117_.yes);
			_tmp117_.yes = (TubaApplicationQuestionButton) {_ ("Delete"), ADW_RESPONSE_DESTRUCTIVE};
			tuba_application_question_button_destroy (&_tmp117_.no);
			_tmp117_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
			tuba_application_question (_tmp111_, &_tmp112_, &_tmp113_, (GtkWidget*) _tmp116_, &_tmp117_, NULL, FALSE, _____lambda195__gasync_ready_callback, block65_data_ref (_data65_));
			positions = (g_free (positions), NULL);
			block65_data_unref (_data65_);
			_data65_ = NULL;
		}
	}
	_gtk_bitset_unref0 (bitset);
}

static void
tuba_views_drive_delete_real_many_data_free (gpointer _data)
{
	TubaViewsDriveDeleteRealManyData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveDeleteRealManyData, _data_);
}

static void
tuba_views_drive_delete_real_many (TubaViewsDrive* self,
                                   TubaViewsDriveItemData* items,
                                   gint items_length1,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	TubaViewsDriveDeleteRealManyData* _data_;
	TubaViewsDrive* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveDeleteRealManyData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_delete_real_many_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->items = items;
	_data_->items_length1 = items_length1;
	tuba_views_drive_delete_real_many_co (_data_);
}

static void
tuba_views_drive_delete_real_many_finish (TubaViewsDrive* self,
                                          GAsyncResult* _res_)
{
	TubaViewsDriveDeleteRealManyData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
_vala_array_add81 (TubaViewsDriveReqData* * array,
                   gint* length,
                   gint* size,
                   const TubaViewsDriveReqData* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (TubaViewsDriveReqData, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

static void
tuba_views_drive_delete_real_many_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	TubaViewsDriveDeleteRealManyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_delete_real_many_co (_data_);
}

static gboolean
tuba_views_drive_delete_real_many_co (TubaViewsDriveDeleteRealManyData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->requires_refresh = FALSE;
	tuba_views_drive_set_working (_data_->self, TRUE);
	_data_->_tmp0_ = _data_->self->priv->cancel_btn;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp0_, TRUE);
	_data_->_tmp1_ = g_new0 (TubaViewsDriveReqData, 0);
	_data_->rqs = _data_->_tmp1_;
	_data_->rqs_length1 = 0;
	_data_->_rqs_size_ = _data_->rqs_length1;
	if (_data_->items_length1 > 0) {
		{
			_data_->item_data_collection_length1 = 0;
			_data_->_item_data_collection_size_ = 0;
			_data_->item_data_collection = _data_->items;
			_data_->item_data_collection_length1 = _data_->items_length1;
			for (_data_->item_data_it = 0; _data_->item_data_it < _data_->item_data_collection_length1; _data_->item_data_it = _data_->item_data_it + 1) {
				_data_->_tmp2_ = _data_->item_data_collection[_data_->item_data_it];
				memset (&_data_->_tmp3_, 0, sizeof (TubaViewsDriveItemData));
				tuba_views_drive_item_data_copy (&_data_->_tmp2_, &_data_->_tmp3_);
				_data_->item_data = _data_->_tmp3_;
				{
					_data_->_tmp5_ = _data_->item_data;
					if (_data_->_tmp5_.folder) {
						_data_->_tmp4_ = "folder/";
					} else {
						_data_->_tmp4_ = "";
					}
					_data_->_tmp6_ = string_to_string (_data_->_tmp4_);
					_data_->_tmp7_ = _data_->item_data;
					_data_->_tmp8_ = _data_->_tmp7_.id;
					_data_->_tmp9_ = string_to_string (_data_->_tmp8_);
					_data_->_tmp10_ = g_strconcat ("/api/iceshrimp/drive/", _data_->_tmp6_, _data_->_tmp9_, NULL);
					_data_->_tmp11_ = _data_->_tmp10_;
					_data_->_tmp12_ = tuba_accounts;
					_data_->_tmp13_ = tuba_account_store_get_active (_data_->_tmp12_);
					_data_->_tmp14_ = _data_->_tmp13_;
					_data_->_tmp15_ = _g_object_ref0 (_data_->_tmp14_);
					_data_->_tmp16_ = tuba_accounts;
					_data_->_tmp17_ = tuba_account_store_get_active (_data_->_tmp16_);
					_data_->_tmp18_ = _data_->_tmp17_;
					_data_->_tmp19_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp18_);
					_data_->_tmp20_ = _data_->_tmp19_;
					_data_->_tmp21_ = g_strdup (_data_->_tmp20_);
					_data_->_tmp22_ = NULL;
					_data_->_tmp22_ = tuba_request_v2_new (_data_->_tmp11_, TUBA_REQUEST_V2_METHOD_DELETE);
					tuba_request_v2_set_account (_data_->_tmp22_, _data_->_tmp15_);
					_g_object_unref0 (_data_->_tmp15_);
					tuba_request_v2_set_force_token (_data_->_tmp22_, _data_->_tmp21_);
					_g_free0 (_data_->_tmp21_);
					_data_->_tmp23_ = _data_->item_data;
					_data_->_tmp24_ = _data_->_tmp23_;
					memset (&_data_->_tmp25_, 0, sizeof (TubaViewsDriveItemData));
					tuba_views_drive_item_data_copy (&_data_->_tmp24_, &_data_->_tmp25_);
					memset (&_data_->_tmp26_, 0, sizeof (TubaViewsDriveReqData));
					memset (&_data_->_tmp26_, 0, sizeof (TubaViewsDriveReqData));
					_g_object_unref0 (_data_->_tmp26_.req);
					_data_->_tmp26_.req = _data_->_tmp22_;
					tuba_views_drive_item_data_destroy (&_data_->_tmp26_.item_data);
					_data_->_tmp26_.item_data = _data_->_tmp25_;
					_vala_array_add81 (&_data_->rqs, &_data_->rqs_length1, &_data_->_rqs_size_, &_data_->_tmp26_);
					_g_free0 (_data_->_tmp11_);
					tuba_views_drive_item_data_destroy (&_data_->item_data);
				}
			}
		}
	}
	_data_->_tmp27_ = _data_->rqs;
	_data_->_tmp27__length1 = _data_->rqs_length1;
	_data_->step = (gdouble) (1 / _data_->_tmp27__length1);
	_data_->_tmp28_ = _data_->rqs;
	_data_->_tmp28__length1 = _data_->rqs_length1;
	{
		_data_->rq_collection_length1 = 0;
		_data_->_rq_collection_size_ = 0;
		_data_->rq_collection = _data_->_tmp28_;
		_data_->rq_collection_length1 = _data_->_tmp28__length1;
		for (_data_->rq_it = 0; _data_->rq_it < _data_->rq_collection_length1; _data_->rq_it = _data_->rq_it + 1) {
			_data_->_tmp29_ = _data_->rq_collection[_data_->rq_it];
			memset (&_data_->_tmp30_, 0, sizeof (TubaViewsDriveReqData));
			tuba_views_drive_req_data_copy (&_data_->_tmp29_, &_data_->_tmp30_);
			_data_->rq = _data_->_tmp30_;
			{
				_data_->_tmp31_ = _data_->self->priv->main_cancellable;
				if (g_cancellable_is_cancelled (_data_->_tmp31_)) {
					tuba_views_drive_req_data_destroy (&_data_->rq);
					break;
				}
				{
					_data_->_tmp32_ = tuba_views_drive_get_progress (_data_->self);
					_data_->_tmp33_ = _data_->_tmp32_;
					tuba_views_drive_set_progress (_data_->self, _data_->_tmp33_ + _data_->step);
					_data_->_tmp34_ = _data_->rq;
					_data_->_tmp35_ = _data_->_tmp34_.req;
					_data_->_state_ = 1;
					tuba_request_v2_exec (_data_->_tmp35_, tuba_views_drive_delete_real_many_ready, _data_);
					return FALSE;
					_state_1:
					_data_->_tmp36_ = tuba_request_v2_exec_finish (_data_->_tmp35_, _data_->_res_, NULL, &_data_->_inner_error0_);
					_data_->_tmp37_ = _data_->_tmp36_;
					_g_object_unref0 (_data_->_tmp37_);
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_data_->_tmp38_ = _data_->self->priv->store;
					_data_->_tmp39_ = _data_->rq;
					_data_->_tmp40_ = _data_->_tmp39_.item_data;
					_data_->_tmp41_ = _data_->_tmp40_.item;
					_data_->_tmp42_ = 0U;
					_data_->_tmp43_ = g_list_store_find (_data_->_tmp38_, (GObject*) _data_->_tmp41_, &_data_->_tmp42_);
					_data_->pos = _data_->_tmp42_;
					if (_data_->_tmp43_) {
						_data_->_tmp44_ = _data_->self->priv->store;
						g_list_store_remove (_data_->_tmp44_, _data_->pos);
					} else {
						_data_->requires_refresh = TRUE;
					}
				}
				goto __finally0;
				__catch0_g_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp45_ = tuba_app;
					_data_->_tmp46_ = _data_->rq;
					_data_->_tmp47_ = _data_->_tmp46_.item_data;
					_data_->_tmp48_ = _data_->_tmp47_.name;
					_data_->_tmp49_ = g_markup_escape_text (_data_->_tmp48_, (gssize) -1);
					_data_->_tmp50_ = _data_->_tmp49_;
					_data_->_tmp51_ = _data_->e;
					_data_->_tmp52_ = _data_->_tmp51_->message;
					_data_->_tmp53_ = g_strdup_printf (_ ("Couldn't delete '%s': %s"), _data_->_tmp50_, _data_->_tmp52_);
					_data_->_tmp54_ = _data_->_tmp53_;
					g_signal_emit_by_name (_data_->_tmp45_, "toast", _data_->_tmp54_, (guint) 5, NULL, NULL, NULL);
					_g_free0 (_data_->_tmp54_);
					_g_free0 (_data_->_tmp50_);
					_data_->_tmp55_ = _data_->rq;
					_data_->_tmp56_ = _data_->_tmp55_.item_data;
					_data_->_tmp57_ = _data_->_tmp56_.name;
					_data_->_tmp58_ = string_to_string (_data_->_tmp57_);
					_data_->_tmp59_ = _data_->e;
					_data_->_tmp60_ = g_strdup_printf ("%i", _data_->_tmp59_->code);
					_data_->_tmp61_ = _data_->_tmp60_;
					_data_->_tmp62_ = _data_->e;
					_data_->_tmp63_ = _data_->_tmp62_->message;
					_data_->_tmp64_ = string_to_string (_data_->_tmp63_);
					_data_->_tmp65_ = g_strconcat ("Couldn't delete item '", _data_->_tmp58_, "': ", _data_->_tmp61_, " ", _data_->_tmp64_, NULL);
					_data_->_tmp66_ = _data_->_tmp65_;
					g_warning ("Drive.vala:1390: %s", _data_->_tmp66_);
					_g_free0 (_data_->_tmp66_);
					_g_free0 (_data_->_tmp61_);
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					tuba_views_drive_req_data_destroy (&_data_->rq);
					_data_->rqs = (_vala_TubaViewsDriveReqData_array_free (_data_->rqs, _data_->rqs_length1), NULL);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
					g_clear_error (&_data_->_inner_error0_);
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				tuba_views_drive_req_data_destroy (&_data_->rq);
			}
		}
	}
	tuba_views_drive_set_working (_data_->self, FALSE);
	if (_data_->requires_refresh) {
		tuba_views_drive_on_refresh (_data_->self);
	}
	_data_->rqs = (_vala_TubaViewsDriveReqData_array_free (_data_->rqs, _data_->rqs_length1), NULL);
	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 Block66Data*
block66_data_ref (Block66Data* _data66_)
{
	g_atomic_int_inc (&_data66_->_ref_count_);
	return _data66_;
}

static void
block66_data_unref (void * _userdata_)
{
	Block66Data* _data66_;
	_data66_ = (Block66Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data66_->_ref_count_)) {
		TubaViewsDrive* self;
		self = _data66_->self;
		_g_object_unref0 (_data66_->chooser);
		_g_object_unref0 (self);
		g_slice_free (Block66Data, _data66_);
	}
}

static void
_vala_array_add82 (GFile** * array,
                   gint* length,
                   gint* size,
                   GFile* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GFile*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static GFile**
_vala_array_dup42 (GFile** self,
                   gssize length)
{
	if (length >= 0) {
		GFile** result;
		gssize i;
		result = g_new0 (GFile*, length + 1);
		for (i = 0; i < length; i++) {
			GFile* _tmp0_;
			_tmp0_ = _g_object_ref0 (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static void
__lambda194_ (Block66Data* _data66_,
              GObject* obj,
              GAsyncResult* res)
{
	TubaViewsDrive* self;
	GError* _inner_error0_ = NULL;
	self = _data66_->self;
	g_return_if_fail (res != NULL);
	{
		GListModel* files = NULL;
		GListModel* _tmp0_;
		GFile** files_to_upload = NULL;
		GFile** _tmp1_;
		gint files_to_upload_length1;
		gint _files_to_upload_size_;
		guint amount_of_files = 0U;
		GListModel* _tmp2_;
		GFile** _tmp11_;
		gint _tmp11__length1;
		GFile** _tmp12_;
		gint _tmp12__length1;
		_tmp0_ = gtk_file_dialog_open_multiple_finish (_data66_->chooser, res, &_inner_error0_);
		files = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = g_new0 (GFile*, 0 + 1);
		files_to_upload = _tmp1_;
		files_to_upload_length1 = 0;
		_files_to_upload_size_ = files_to_upload_length1;
		_tmp2_ = files;
		amount_of_files = g_list_model_get_n_items (_tmp2_);
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp3_ = FALSE;
				_tmp3_ = TRUE;
				while (TRUE) {
					GFile* file = NULL;
					GListModel* _tmp5_;
					GObject* _tmp6_;
					GFile* _tmp7_;
					GFile* _tmp8_;
					if (!_tmp3_) {
						gint _tmp4_;
						_tmp4_ = i;
						i = _tmp4_ + 1;
					}
					_tmp3_ = FALSE;
					if (!(((guint) i) < amount_of_files)) {
						break;
					}
					_tmp5_ = files;
					_tmp6_ = g_list_model_get_item (_tmp5_, (guint) i);
					_tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, g_file_get_type ()) ? ((GFile*) _tmp6_) : NULL;
					if (_tmp7_ == NULL) {
						_g_object_unref0 (_tmp6_);
					}
					file = _tmp7_;
					_tmp8_ = file;
					if (_tmp8_ != NULL) {
						GFile* _tmp9_;
						GFile* _tmp10_;
						_tmp9_ = file;
						_tmp10_ = _g_object_ref0 (_tmp9_);
						_vala_array_add82 (&files_to_upload, &files_to_upload_length1, &_files_to_upload_size_, _tmp10_);
					}
					_g_object_unref0 (file);
				}
			}
		}
		_tmp11_ = files_to_upload;
		_tmp11__length1 = files_to_upload_length1;
		_tmp12_ = (_tmp11_ != NULL) ? _vala_array_dup42 (_tmp11_, _tmp11__length1) : _tmp11_;
		_tmp12__length1 = _tmp11__length1;
		tuba_views_drive_upload_files (self, _tmp12_, (gint) _tmp12__length1, NULL, NULL);
		files_to_upload = (_vala_array_free (files_to_upload, files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
		_g_object_unref0 (files);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp13_ = e;
		_tmp14_ = _tmp13_->message;
		_tmp15_ = string_to_string (_tmp14_);
		_tmp16_ = g_strconcat ("Couldn't get the result of FileDialog for Drive: ", _tmp15_, NULL);
		_tmp17_ = _tmp16_;
		g_warning ("Drive.vala:1421: %s", _tmp17_);
		_g_free0 (_tmp17_);
		_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
___lambda194__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda194_ (self, source_object, res);
	block66_data_unref (self);
}

static void
tuba_views_drive_upload_pick (TubaViewsDrive* self)
{
	Block66Data* _data66_;
	gchar* _tmp0_;
	GtkFileDialog* _tmp1_ = NULL;
	TubaApplication* _tmp2_;
	TubaDialogsMainWindow* _tmp3_;
	TubaDialogsMainWindow* _tmp4_;
	g_return_if_fail (self != NULL);
	_data66_ = g_slice_new0 (Block66Data);
	_data66_->_ref_count_ = 1;
	_data66_->self = g_object_ref (self);
	_tmp0_ = g_strdup (_ ("Upload Files"));
	_tmp1_ = gtk_file_dialog_new ();
	gtk_file_dialog_set_title (_tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	gtk_file_dialog_set_modal (_tmp1_, TRUE);
	_data66_->chooser = _tmp1_;
	_tmp2_ = tuba_app;
	_tmp3_ = tuba_application_get_main_window (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_file_dialog_open_multiple (_data66_->chooser, (GtkWindow*) _tmp4_, NULL, ___lambda194__gasync_ready_callback, block66_data_ref (_data66_));
	block66_data_unref (_data66_);
	_data66_ = NULL;
}

static void
tuba_views_drive_upload_files_data_free (gpointer _data)
{
	TubaViewsDriveUploadFilesData* _data_;
	_data_ = _data;
	_data_->files_to_upload = (_vala_array_free (_data_->files_to_upload, _data_->files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveUploadFilesData, _data_);
}

static void
tuba_views_drive_upload_files (TubaViewsDrive* self,
                               GFile** files_to_upload,
                               gint files_to_upload_length1,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	TubaViewsDriveUploadFilesData* _data_;
	TubaViewsDrive* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveUploadFilesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_upload_files_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->files_to_upload = (_vala_array_free (_data_->files_to_upload, _data_->files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
	_data_->files_to_upload = files_to_upload;
	_data_->files_to_upload_length1 = files_to_upload_length1;
	tuba_views_drive_upload_files_co (_data_);
}

static void
tuba_views_drive_upload_files_finish (TubaViewsDrive* self,
                                      GAsyncResult* _res_)
{
	TubaViewsDriveUploadFilesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
_vala_array_add83 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static void
tuba_views_drive_upload_files_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_)
{
	TubaViewsDriveUploadFilesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_upload_files_co (_data_);
}

static void
_vala_array_add84 (gchar** * array,
                   gint* length,
                   gint* size,
                   gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

static gboolean
tuba_views_drive_upload_files_co (TubaViewsDriveUploadFilesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->files_to_upload_length1 == 0) {
		_data_->files_to_upload = (_vala_array_free (_data_->files_to_upload, _data_->files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
		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;
	}
	tuba_views_drive_set_working (_data_->self, TRUE);
	_data_->_tmp0_ = _data_->self->priv->cancel_btn;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp0_, TRUE);
	_data_->_tmp1_ = _data_->self->priv->_current_folder;
	_data_->_tmp2_ = tuba_api_iceshrimp_folder_get_files (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	if (_data_->_tmp3_ == NULL) {
		_data_->_tmp4_ = _data_->self->priv->_current_folder;
		_data_->_tmp5_ = gee_array_list_new (TUBA_API_ICESHRIMP_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		_data_->_tmp6_ = _data_->_tmp5_;
		tuba_api_iceshrimp_folder_set_files (_data_->_tmp4_, _data_->_tmp6_);
		_g_object_unref0 (_data_->_tmp6_);
	}
	_data_->_tmp7_ = g_new0 (gchar*, 0 + 1);
	_data_->reserved = _data_->_tmp7_;
	_data_->reserved_length1 = 0;
	_data_->_reserved_size_ = _data_->reserved_length1;
	{
		_data_->_tmp8_ = _data_->self->priv->_current_folder;
		_data_->_tmp9_ = tuba_api_iceshrimp_folder_get_files (_data_->_tmp8_);
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_file_list = _data_->_tmp10_;
		_data_->_tmp11_ = _data_->_file_list;
		_data_->_tmp12_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp11_);
		_data_->_tmp13_ = _data_->_tmp12_;
		_data_->_file_size = _data_->_tmp13_;
		_data_->_file_index = -1;
		while (TRUE) {
			_data_->_file_index = _data_->_file_index + 1;
			_data_->_tmp14_ = _data_->_file_index;
			_data_->_tmp15_ = _data_->_file_size;
			if (!(_data_->_tmp14_ < _data_->_tmp15_)) {
				break;
			}
			_data_->_tmp16_ = _data_->_file_list;
			_data_->_tmp17_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp16_, _data_->_file_index);
			_data_->file = (TubaAPIIceshrimpFile*) _data_->_tmp17_;
			_data_->_tmp18_ = _data_->file;
			_data_->_tmp19_ = tuba_api_iceshrimp_file_get_id (_data_->_tmp18_);
			_data_->_tmp20_ = _data_->_tmp19_;
			_data_->_tmp21_ = g_strdup (_data_->_tmp20_);
			_vala_array_add83 (&_data_->reserved, &_data_->reserved_length1, &_data_->_reserved_size_, _data_->_tmp21_);
			_g_object_unref0 (_data_->file);
		}
	}
	_data_->step = (gdouble) (1 / _data_->files_to_upload_length1);
	_data_->_tmp23_ = _data_->self->priv->_current_folder;
	_data_->_tmp24_ = tuba_api_iceshrimp_folder_get_folders (_data_->_tmp23_);
	_data_->_tmp25_ = _data_->_tmp24_;
	if (_data_->_tmp25_ == NULL) {
		_data_->_tmp22_ = 0;
	} else {
		_data_->_tmp26_ = _data_->self->priv->_current_folder;
		_data_->_tmp27_ = tuba_api_iceshrimp_folder_get_folders (_data_->_tmp26_);
		_data_->_tmp28_ = _data_->_tmp27_;
		_data_->_tmp29_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp28_);
		_data_->_tmp30_ = _data_->_tmp29_;
		_data_->_tmp22_ = _data_->_tmp30_;
	}
	_data_->folders_start_pos = _data_->_tmp22_;
	_data_->_tmp31_ = _data_->self->priv->_current_folder;
	_data_->_tmp32_ = tuba_api_iceshrimp_folder_get_id (_data_->_tmp31_);
	_data_->_tmp33_ = _data_->_tmp32_;
	_data_->_tmp34_ = g_strdup (_data_->_tmp33_);
	_data_->to_folder = _data_->_tmp34_;
	{
		_data_->file_collection_length1 = 0;
		_data_->_file_collection_size_ = 0;
		_data_->file_collection = _data_->files_to_upload;
		_data_->file_collection_length1 = _data_->files_to_upload_length1;
		for (_data_->file_it = 0; _data_->file_it < _data_->file_collection_length1; _data_->file_it = _data_->file_it + 1) {
			_data_->_tmp35_ = _g_object_ref0 (_data_->file_collection[_data_->file_it]);
			_data_->_vala1_file = _data_->_tmp35_;
			{
				_data_->_tmp36_ = _data_->self->priv->main_cancellable;
				if (g_cancellable_is_cancelled (_data_->_tmp36_)) {
					_g_object_unref0 (_data_->_vala1_file);
					break;
				}
				{
					_data_->_tmp37_ = tuba_views_drive_get_progress (_data_->self);
					_data_->_tmp38_ = _data_->_tmp37_;
					tuba_views_drive_set_progress (_data_->self, _data_->_tmp38_ + _data_->step);
					_data_->_tmp39_ = tuba_views_drive_get_progress (_data_->self);
					_data_->_tmp40_ = _data_->_tmp39_;
					_data_->progress_before = _data_->_tmp40_;
					_data_->_tmp41_ = _data_->to_folder;
					_data_->_tmp42_ = _data_->_vala1_file;
					_data_->_state_ = 1;
					tuba_views_drive_upload_file_real (_data_->self, _data_->_tmp41_, _data_->_tmp42_, tuba_views_drive_upload_files_ready, _data_);
					return FALSE;
					_state_1:
					_data_->_tmp43_ = tuba_views_drive_upload_file_real_finish (_data_->self, _data_->_res_, &_data_->_inner_error0_);
					_data_->is_file = _data_->_tmp43_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					tuba_views_drive_set_progress (_data_->self, _data_->progress_before);
					_data_->_tmp44_ = _data_->is_file;
					_data_->_tmp45_ = tuba_api_iceshrimp_file_get_id (_data_->_tmp44_);
					_data_->_tmp46_ = _data_->_tmp45_;
					_data_->_tmp47_ = _data_->reserved;
					_data_->_tmp47__length1 = _data_->reserved_length1;
					if (_vala_string_array_contains (_data_->_tmp47_, _data_->_tmp47__length1, _data_->_tmp46_)) {
						_data_->_tmp48_ = tuba_app;
						_data_->_tmp49_ = _data_->is_file;
						_data_->_tmp50_ = tuba_api_iceshrimp_file_get_filename (_data_->_tmp49_);
						_data_->_tmp51_ = _data_->_tmp50_;
						_data_->_tmp52_ = g_strdup_printf (_ ("'%s' already exists"), _data_->_tmp51_);
						_data_->_tmp53_ = _data_->_tmp52_;
						g_signal_emit_by_name (_data_->_tmp48_, "toast", _data_->_tmp53_, (guint) 5, NULL, NULL, NULL);
						_g_free0 (_data_->_tmp53_);
					} else {
						_data_->_tmp54_ = _data_->self->priv->_current_folder;
						_data_->_tmp55_ = tuba_api_iceshrimp_folder_get_files (_data_->_tmp54_);
						_data_->_tmp56_ = _data_->_tmp55_;
						_data_->_tmp57_ = _data_->is_file;
						gee_abstract_list_insert ((GeeAbstractList*) _data_->_tmp56_, 0, _data_->_tmp57_);
						_data_->_tmp58_ = _data_->self->priv->store;
						_data_->_tmp59_ = _data_->is_file;
						_data_->_tmp60_ = tuba_views_drive_item_new_from_file (_data_->_tmp59_);
						_data_->_tmp61_ = g_new0 (GObject*, 1 + 1);
						_data_->_tmp61_[0] = (GObject*) _data_->_tmp60_;
						_data_->_tmp62_ = _data_->_tmp61_;
						_data_->_tmp62__length1 = 1;
						g_list_store_splice (_data_->_tmp58_, (guint) _data_->folders_start_pos, (guint) 0, _data_->_tmp62_, (guint) 1);
						_data_->_tmp62_ = (_vala_array_free (_data_->_tmp62_, _data_->_tmp62__length1, (GDestroyNotify) g_object_unref), NULL);
						_data_->_tmp63_ = _data_->is_file;
						_data_->_tmp64_ = tuba_api_iceshrimp_file_get_id (_data_->_tmp63_);
						_data_->_tmp65_ = _data_->_tmp64_;
						_data_->_tmp66_ = g_strdup (_data_->_tmp65_);
						_vala_array_add84 (&_data_->reserved, &_data_->reserved_length1, &_data_->_reserved_size_, _data_->_tmp66_);
					}
					_g_object_unref0 (_data_->is_file);
				}
				goto __finally0;
				__catch0_g_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp67_ = _data_->e;
					_data_->_tmp68_ = _data_->_tmp67_->message;
					_data_->_tmp69_ = string_to_string (_data_->_tmp68_);
					_data_->_tmp70_ = _data_->e;
					_data_->_tmp71_ = g_strdup_printf ("%i", _data_->_tmp70_->code);
					_data_->_tmp72_ = _data_->_tmp71_;
					_data_->_tmp73_ = g_strconcat (_data_->_tmp69_, " ", _data_->_tmp72_, NULL);
					_data_->_tmp74_ = _data_->_tmp73_;
					g_warning ("Drive.vala:1460: %s", _data_->_tmp74_);
					_g_free0 (_data_->_tmp74_);
					_g_free0 (_data_->_tmp72_);
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_object_unref0 (_data_->_vala1_file);
					_g_free0 (_data_->to_folder);
					_data_->reserved = (_vala_array_free (_data_->reserved, _data_->reserved_length1, (GDestroyNotify) g_free), NULL);
					_data_->files_to_upload = (_vala_array_free (_data_->files_to_upload, _data_->files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
					g_clear_error (&_data_->_inner_error0_);
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				_g_object_unref0 (_data_->_vala1_file);
			}
		}
	}
	tuba_views_drive_set_working (_data_->self, FALSE);
	_g_free0 (_data_->to_folder);
	_data_->reserved = (_vala_array_free (_data_->reserved, _data_->reserved_length1, (GDestroyNotify) g_free), NULL);
	_data_->files_to_upload = (_vala_array_free (_data_->files_to_upload, _data_->files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
	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
tuba_views_drive_upload_file_real_data_free (gpointer _data)
{
	TubaViewsDriveUploadFileRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->to_folder);
	_g_object_unref0 (_data_->file);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveUploadFileRealData, _data_);
}

static void
tuba_views_drive_upload_file_real (TubaViewsDrive* self,
                                   const gchar* to_folder,
                                   GFile* file,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	TubaViewsDriveUploadFileRealData* _data_;
	TubaViewsDrive* _tmp0_;
	gchar* _tmp1_;
	GFile* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveUploadFileRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_upload_file_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (to_folder);
	_g_free0 (_data_->to_folder);
	_data_->to_folder = _tmp1_;
	_tmp2_ = _g_object_ref0 (file);
	_g_object_unref0 (_data_->file);
	_data_->file = _tmp2_;
	tuba_views_drive_upload_file_real_co (_data_);
}

static TubaAPIIceshrimpFile*
tuba_views_drive_upload_file_real_finish (TubaViewsDrive* self,
                                          GAsyncResult* _res_,
                                          GError** error)
{
	TubaAPIIceshrimpFile* result;
	TubaViewsDriveUploadFileRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static guint8*
_vala_array_dup43 (guint8* self,
                   gssize length)
{
	if (length > 0) {
		return g_memdup2 (self, length * sizeof (guint8));
	}
	return NULL;
}

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 void
_tuba_views_drive_on_upload_bytes_written_tuba_request_v2_wrote_body_data (TubaRequestV2* _sender,
                                                                           guint chunk_size,
                                                                           gpointer self)
{
	tuba_views_drive_on_upload_bytes_written ((TubaViewsDrive*) self, chunk_size);
}

static void
tuba_views_drive_upload_file_real_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	TubaViewsDriveUploadFileRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_upload_file_real_co (_data_);
}

static void
_tuba_views_drive_on_extracted_alt_text_tuba_views_drive_item_alt_extractor_extracted_alt (TubaViewsDriveItemAltExtractor* _sender,
                                                                                           const gchar* extracted_alt_text,
                                                                                           TubaAPIIceshrimpFile* is_file,
                                                                                           gpointer self)
{
	tuba_views_drive_on_extracted_alt_text ((TubaViewsDrive*) self, extracted_alt_text, is_file);
}

static gpointer
_tuba_views_drive_item_alt_extractor_fetch_gthread_func (gpointer self)
{
	gpointer result;
	tuba_views_drive_item_alt_extractor_fetch ((TubaViewsDriveItemAltExtractor*) self);
	result = NULL;
	g_object_unref (self);
	return result;
}

static gboolean
tuba_views_drive_upload_file_real_co (TubaViewsDriveUploadFileRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->self->priv->bytes_written = (guint) 0;
	_data_->self->priv->total_bytes = (gsize) 0;
	_data_->_tmp0_ = g_file_get_uri (_data_->file);
	_data_->uri = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->uri;
	_data_->_tmp2_ = string_to_string (_data_->_tmp1_);
	_data_->_tmp3_ = g_strconcat ("Uploading new media: ", _data_->_tmp2_, "…", NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	g_debug ("Drive.vala:1473: %s", _data_->_tmp4_);
	_g_free0 (_data_->_tmp4_);
	{
		_data_->contents_length1 = 0;
		_data_->_contents_size_ = 0;
		{
			_data_->_tmp5_ = NULL;
			_data_->_tmp6_ = 0;
			g_file_load_contents (_data_->file, NULL, &_data_->_tmp5_, &_data_->_tmp6_, NULL, &_data_->_inner_error0_);
			_data_->contents = (g_free (_data_->contents), NULL);
			_data_->contents = _data_->_tmp5_;
			_data_->contents_length1 = _data_->_tmp6_;
			_data_->_contents_size_ = _data_->contents_length1;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp7_ = g_file_query_info (_data_->file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, 0, NULL, &_data_->_inner_error0_);
			_data_->type = _data_->_tmp7_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp8_ = _data_->type;
			_data_->_tmp9_ = g_file_info_get_content_type (_data_->_tmp8_);
			_data_->_tmp10_ = g_strdup (_data_->_tmp9_);
			_g_free0 (_data_->mime);
			_data_->mime = _data_->_tmp10_;
			_g_object_unref0 (_data_->type);
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp11_ = _data_->uri;
			_data_->_tmp12_ = _data_->e;
			_data_->_tmp13_ = _data_->_tmp12_->message;
			_data_->_tmp14_ = g_strdup_printf ("Can't open file %s:\n%s", _data_->_tmp11_, _data_->_tmp13_);
			_data_->_tmp15_ = _data_->_tmp14_;
			_data_->_tmp16_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_INTERNAL, _data_->_tmp15_);
			_data_->_tmp17_ = _data_->_tmp16_;
			_g_free0 (_data_->_tmp15_);
			_data_->_inner_error0_ = _data_->_tmp17_;
			_g_error_free0 (_data_->e);
			goto __finally0;
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_data_->contents = (g_free (_data_->contents), NULL);
			_g_free0 (_data_->uri);
			_g_free0 (_data_->mime);
			_g_bytes_unref0 (_data_->buffer);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp18_ = _data_->contents;
		_data_->_tmp18__length1 = _data_->contents_length1;
		_data_->_tmp19_ = (_data_->_tmp18_ != NULL) ? _vala_array_dup43 (_data_->_tmp18_, _data_->_tmp18__length1) : _data_->_tmp18_;
		_data_->_tmp19__length1 = _data_->_tmp18__length1;
		_data_->_tmp20_ = g_bytes_new_take (_data_->_tmp19_, _data_->_tmp19__length1);
		_g_bytes_unref0 (_data_->buffer);
		_data_->buffer = _data_->_tmp20_;
		_data_->_tmp21_ = _data_->buffer;
		_data_->self->priv->total_bytes = g_bytes_get_size (_data_->_tmp21_);
		_data_->contents = (g_free (_data_->contents), NULL);
	}
	_data_->_tmp22_ = g_file_get_basename (_data_->file);
	_data_->filename = _data_->_tmp22_;
	_data_->_tmp23_ = _data_->filename;
	if (_data_->_tmp23_ == NULL) {
		_data_->_tmp24_ = _data_->mime;
		_data_->_tmp25_ = string_replace (_data_->_tmp24_, "/", ".");
		_g_free0 (_data_->filename);
		_data_->filename = _data_->_tmp25_;
	}
	if (_data_->to_folder == NULL) {
		_data_->_tmp27_ = g_strdup ("");
		_g_free0 (_data_->_tmp26_);
		_data_->_tmp26_ = _data_->_tmp27_;
	} else {
		_data_->_tmp28_ = string_to_string (_data_->to_folder);
		_data_->_tmp29_ = g_strconcat ("?folderId=", _data_->_tmp28_, NULL);
		_g_free0 (_data_->_tmp26_);
		_data_->_tmp26_ = _data_->_tmp29_;
	}
	_data_->_tmp30_ = _data_->_tmp26_;
	_data_->_tmp26_ = NULL;
	_data_->folder_id = _data_->_tmp30_;
	_data_->_tmp31_ = tuba_accounts;
	_data_->_tmp32_ = tuba_account_store_get_active (_data_->_tmp31_);
	_data_->_tmp33_ = _data_->_tmp32_;
	_data_->_tmp34_ = tuba_instance_account_get_instance (_data_->_tmp33_);
	_data_->_tmp35_ = _data_->_tmp34_;
	_data_->_tmp36_ = string_to_string (_data_->_tmp35_);
	_data_->_tmp37_ = _data_->folder_id;
	_data_->_tmp38_ = string_to_string (_data_->_tmp37_);
	_data_->_tmp39_ = g_strconcat (_data_->_tmp36_, "/api/iceshrimp/drive", _data_->_tmp38_, NULL);
	_data_->_tmp40_ = _data_->_tmp39_;
	_data_->_tmp41_ = tuba_accounts;
	_data_->_tmp42_ = tuba_account_store_get_active (_data_->_tmp41_);
	_data_->_tmp43_ = _data_->_tmp42_;
	_data_->_tmp44_ = _g_object_ref0 (_data_->_tmp43_);
	_data_->_tmp45_ = tuba_accounts;
	_data_->_tmp46_ = tuba_account_store_get_active (_data_->_tmp45_);
	_data_->_tmp47_ = _data_->_tmp46_;
	_data_->_tmp48_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp47_);
	_data_->_tmp49_ = _data_->_tmp48_;
	_data_->_tmp50_ = g_strdup (_data_->_tmp49_);
	_data_->_tmp51_ = NULL;
	_data_->_tmp51_ = tuba_request_v2_new (_data_->_tmp40_, TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp51_, _data_->_tmp44_);
	_g_object_unref0 (_data_->_tmp44_);
	tuba_request_v2_set_force_token (_data_->_tmp51_, _data_->_tmp50_);
	_g_free0 (_data_->_tmp50_);
	tuba_request_v2_set_track_written_body_data (_data_->_tmp51_, TRUE);
	_data_->_tmp52_ = _data_->_tmp51_;
	_g_free0 (_data_->_tmp40_);
	_data_->msg = _data_->_tmp52_;
	_data_->_tmp53_ = _data_->msg;
	_data_->_tmp54_ = _data_->mime;
	_data_->_tmp55_ = _data_->buffer;
	tuba_request_v2_add_form_data_file (_data_->_tmp53_, "file", _data_->_tmp54_, _data_->_tmp55_);
	_data_->_tmp56_ = _data_->msg;
	g_signal_connect_object (_data_->_tmp56_, "wrote-body-data", (GCallback) _tuba_views_drive_on_upload_bytes_written_tuba_request_v2_wrote_body_data, _data_->self, 0);
	_data_->_tmp57_ = _data_->msg;
	_data_->_state_ = 1;
	tuba_request_v2_exec (_data_->_tmp57_, tuba_views_drive_upload_file_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp58_ = tuba_request_v2_exec_finish (_data_->_tmp57_, _data_->_res_, NULL, &_data_->_inner_error0_);
	_data_->in_stream = _data_->_tmp58_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->msg);
		_g_free0 (_data_->folder_id);
		_g_free0 (_data_->_tmp26_);
		_g_free0 (_data_->filename);
		_g_free0 (_data_->uri);
		_g_free0 (_data_->mime);
		_g_bytes_unref0 (_data_->buffer);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp59_ = _data_->in_stream;
	if (_data_->_tmp59_ == NULL) {
		_data_->_tmp60_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_INSTANCE, "Broken Stream");
		_data_->_inner_error0_ = _data_->_tmp60_;
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->msg);
		_g_free0 (_data_->folder_id);
		_g_free0 (_data_->_tmp26_);
		_g_free0 (_data_->filename);
		_g_free0 (_data_->uri);
		_g_free0 (_data_->mime);
		_g_bytes_unref0 (_data_->buffer);
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		_data_->_tmp61_ = _data_->self->priv->main_cancellable;
		if (g_cancellable_is_cancelled (_data_->_tmp61_)) {
			_data_->_tmp62_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_USER, "Cancelled");
			_data_->_inner_error0_ = _data_->_tmp62_;
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->msg);
			_g_free0 (_data_->folder_id);
			_g_free0 (_data_->_tmp26_);
			_g_free0 (_data_->filename);
			_g_free0 (_data_->uri);
			_g_free0 (_data_->mime);
			_g_bytes_unref0 (_data_->buffer);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	tuba_views_drive_set_progress (_data_->self, (gdouble) 1);
	_data_->_tmp63_ = _data_->in_stream;
	_data_->_state_ = 2;
	tuba_network_get_parser_from_inputstream_async (_data_->_tmp63_, NULL, tuba_views_drive_upload_file_real_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp64_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
	_data_->parser = _data_->_tmp64_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->msg);
		_g_free0 (_data_->folder_id);
		_g_free0 (_data_->_tmp26_);
		_g_free0 (_data_->filename);
		_g_free0 (_data_->uri);
		_g_free0 (_data_->mime);
		_g_bytes_unref0 (_data_->buffer);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp65_ = tuba_network;
	_data_->_tmp66_ = _data_->parser;
	_data_->_tmp67_ = tuba_network_parse_node (_data_->_tmp65_, _data_->_tmp66_);
	_data_->node = _data_->_tmp67_;
	_data_->_tmp68_ = _data_->node;
	_data_->_tmp69_ = __vala_JsonNode_copy0 (_data_->_tmp68_);
	_data_->_tmp70_ = tuba_helper_entity_from_json (_data_->_tmp69_, TUBA_API_ICESHRIMP_TYPE_FILE, FALSE);
	_data_->entity = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp70_, TUBA_API_ICESHRIMP_TYPE_FILE, TubaAPIIceshrimpFile);
	_data_->_tmp72_ = _data_->entity;
	_data_->_tmp73_ = tuba_api_iceshrimp_file_get_contentType (_data_->_tmp72_);
	_data_->_tmp74_ = _data_->_tmp73_;
	if (g_str_has_prefix (_data_->_tmp74_, "image/")) {
		_data_->_tmp75_ = tuba_settings;
		_data_->_tmp76_ = tuba_settings_get_extract_alt_from_metadata (_data_->_tmp75_);
		_data_->_tmp77_ = _data_->_tmp76_;
		_data_->_tmp71_ = _data_->_tmp77_;
	} else {
		_data_->_tmp71_ = FALSE;
	}
	if (_data_->_tmp71_) {
		_data_->_tmp78_ = _data_->uri;
		_data_->_tmp79_ = _data_->entity;
		_data_->_tmp80_ = tuba_views_drive_item_alt_extractor_new (_data_->_tmp78_, _data_->_tmp79_);
		_data_->working_loader = _data_->_tmp80_;
		_data_->_tmp81_ = _data_->working_loader;
		g_signal_connect_object (_data_->_tmp81_, "extracted-alt", (GCallback) _tuba_views_drive_on_extracted_alt_text_tuba_views_drive_item_alt_extractor_extracted_alt, _data_->self, 0);
		{
			_data_->_tmp82_ = _data_->uri;
			_data_->_tmp83_ = string_to_string (_data_->_tmp82_);
			_data_->_tmp84_ = g_strconcat ("Item Alt Extractor ", _data_->_tmp83_, NULL);
			_data_->_tmp85_ = _data_->_tmp84_;
			_data_->_tmp86_ = _data_->working_loader;
			_data_->_tmp87_ = g_thread_try_new (_data_->_tmp85_, _tuba_views_drive_item_alt_extractor_fetch_gthread_func, g_object_ref (_data_->_tmp86_), &_data_->_inner_error0_);
			_data_->_tmp88_ = _data_->_tmp87_;
			_g_thread_unref0 (_data_->_tmp88_);
			_g_free0 (_data_->_tmp85_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->_vala1_e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp89_ = _data_->uri;
			_data_->_tmp90_ = _data_->_vala1_e;
			_data_->_tmp91_ = _data_->_tmp90_->message;
			g_critical ("Drive.vala:1520: Couldn't spawn alt extractor for %s: %s", _data_->_tmp89_, _data_->_tmp91_);
			_g_error_free0 (_data_->_vala1_e);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->working_loader);
			_g_object_unref0 (_data_->entity);
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->msg);
			_g_free0 (_data_->folder_id);
			_g_free0 (_data_->_tmp26_);
			_g_free0 (_data_->filename);
			_g_free0 (_data_->uri);
			_g_free0 (_data_->mime);
			_g_bytes_unref0 (_data_->buffer);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->working_loader);
	}
	_data_->_tmp92_ = _data_->filename;
	_data_->_tmp93_ = g_strdup_printf (_ ("Finished Uploading '%s'"), _data_->_tmp92_);
	_data_->_tmp94_ = _data_->_tmp93_;
	gtk_accessible_announce ((GtkAccessible*) _data_->self, _data_->_tmp94_, GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_LOW);
	_g_free0 (_data_->_tmp94_);
	_data_->result = _data_->entity;
	__vala_JsonNode_free0 (_data_->node);
	_g_object_unref0 (_data_->parser);
	_g_object_unref0 (_data_->in_stream);
	_g_object_unref0 (_data_->msg);
	_g_free0 (_data_->folder_id);
	_g_free0 (_data_->_tmp26_);
	_g_free0 (_data_->filename);
	_g_free0 (_data_->uri);
	_g_free0 (_data_->mime);
	_g_bytes_unref0 (_data_->buffer);
	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
tuba_views_drive_on_upload_bytes_written (TubaViewsDrive* self,
                                          guint chunk)
{
	g_return_if_fail (self != NULL);
	self->priv->bytes_written = self->priv->bytes_written + chunk;
	tuba_views_drive_set_progress (self, CLAMP (((gdouble) self->priv->bytes_written) / ((gdouble) self->priv->total_bytes), (gdouble) 0, 0.999999999));
}

static void
tuba_views_drive_on_extracted_alt_text (TubaViewsDrive* self,
                                        const gchar* new_alt_text,
                                        TubaAPIIceshrimpFile* is_file)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_alt_text != NULL);
	g_return_if_fail (is_file != NULL);
	_tmp2_ = tuba_api_iceshrimp_file_get_description (is_file);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp4_ = tuba_api_iceshrimp_file_get_description (is_file);
		_tmp5_ = _tmp4_;
		_tmp1_ = g_strcmp0 (_tmp5_, "") != 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (new_alt_text, "") == 0;
	}
	if (_tmp0_) {
		return;
	}
	tuba_views_drive_apply_alt_text (self, new_alt_text, is_file, NULL, NULL);
}

static void
tuba_views_drive_apply_alt_text_data_free (gpointer _data)
{
	TubaViewsDriveApplyAltTextData* _data_;
	_data_ = _data;
	_g_free0 (_data_->new_alt_text);
	_g_object_unref0 (_data_->is_file);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveApplyAltTextData, _data_);
}

static void
tuba_views_drive_apply_alt_text (TubaViewsDrive* self,
                                 const gchar* new_alt_text,
                                 TubaAPIIceshrimpFile* is_file,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	TubaViewsDriveApplyAltTextData* _data_;
	TubaViewsDrive* _tmp0_;
	gchar* _tmp1_;
	TubaAPIIceshrimpFile* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_alt_text != NULL);
	g_return_if_fail (is_file != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveApplyAltTextData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_apply_alt_text_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (new_alt_text);
	_g_free0 (_data_->new_alt_text);
	_data_->new_alt_text = _tmp1_;
	_tmp2_ = _g_object_ref0 (is_file);
	_g_object_unref0 (_data_->is_file);
	_data_->is_file = _tmp2_;
	tuba_views_drive_apply_alt_text_co (_data_);
}

static void
tuba_views_drive_apply_alt_text_finish (TubaViewsDrive* self,
                                        GAsyncResult* _res_)
{
	TubaViewsDriveApplyAltTextData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_drive_apply_alt_text_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	TubaViewsDriveApplyAltTextData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_apply_alt_text_co (_data_);
}

static gboolean
tuba_views_drive_apply_alt_text_co (TubaViewsDriveApplyAltTextData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = json_builder_new ();
	_data_->builder = _data_->_tmp0_;
	json_builder_begin_object (_data_->builder);
	json_builder_set_member_name (_data_->builder, "description");
	json_builder_add_string_value (_data_->builder, _data_->new_alt_text);
	json_builder_set_member_name (_data_->builder, "filename");
	json_builder_add_null_value (_data_->builder);
	json_builder_set_member_name (_data_->builder, "sensitive");
	json_builder_add_null_value (_data_->builder);
	json_builder_end_object (_data_->builder);
	_data_->_tmp1_ = tuba_api_iceshrimp_file_get_id (_data_->is_file);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = string_to_string (_data_->_tmp2_);
	_data_->_tmp4_ = g_strconcat ("/api/iceshrimp/drive/", _data_->_tmp3_, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = tuba_accounts;
	_data_->_tmp7_ = tuba_account_store_get_active (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = _g_object_ref0 (_data_->_tmp8_);
	_data_->_tmp10_ = tuba_accounts;
	_data_->_tmp11_ = tuba_account_store_get_active (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = g_strdup (_data_->_tmp14_);
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = tuba_request_v2_new (_data_->_tmp5_, TUBA_REQUEST_V2_METHOD_PATCH);
	tuba_request_v2_set_account (_data_->_tmp16_, _data_->_tmp9_);
	_g_object_unref0 (_data_->_tmp9_);
	tuba_request_v2_set_force_token (_data_->_tmp16_, _data_->_tmp15_);
	_g_free0 (_data_->_tmp15_);
	_data_->_tmp17_ = _data_->_tmp16_;
	_g_free0 (_data_->_tmp5_);
	_data_->req = _data_->_tmp17_;
	tuba_request_v2_set_body_from_json (_data_->req, _data_->builder);
	{
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->req, tuba_views_drive_apply_alt_text_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp18_ = tuba_request_v2_exec_finish (_data_->req, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp19_ = _data_->_tmp18_;
		_g_object_unref0 (_data_->_tmp19_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		tuba_api_iceshrimp_file_set_description (_data_->is_file, _data_->new_alt_text);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp20_ = string_to_string (_data_->new_alt_text);
		_data_->_tmp21_ = _data_->e;
		_data_->_tmp22_ = g_strdup_printf ("%i", _data_->_tmp21_->code);
		_data_->_tmp23_ = _data_->_tmp22_;
		_data_->_tmp24_ = _data_->e;
		_data_->_tmp25_ = _data_->_tmp24_->message;
		_data_->_tmp26_ = string_to_string (_data_->_tmp25_);
		_data_->_tmp27_ = g_strconcat ("Couldn't apply alt text \"", _data_->_tmp20_, "\": ", _data_->_tmp23_, " ", _data_->_tmp26_, NULL);
		_data_->_tmp28_ = _data_->_tmp27_;
		g_warning ("Drive.vala:1590: %s", _data_->_tmp28_);
		_g_free0 (_data_->_tmp28_);
		_g_free0 (_data_->_tmp23_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_object_unref0 (_data_->builder);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	_g_object_unref0 (_data_->builder);
	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;
}

TubaViewsDrive*
tuba_views_drive_construct (GType object_type)
{
	TubaViewsDrive * self = NULL;
	self = (TubaViewsDrive*) tuba_views_base_construct (object_type);
	return self;
}

TubaViewsDrive*
tuba_views_drive_new (void)
{
	return tuba_views_drive_construct (TUBA_VIEWS_TYPE_DRIVE);
}

static gboolean
tuba_views_drive_get_working (TubaViewsDrive* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_working;
	return result;
}

static void
tuba_views_drive_set_working (TubaViewsDrive* self,
                              gboolean value)
{
	TubaDialogsComposerComponentsDropOverlay* _tmp0_;
	GtkButton* _tmp1_;
	GtkGridView* _tmp2_;
	GtkMenuButton* _tmp3_;
	GtkButton* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->drop_overlay;
	_tmp1_ = self->priv->go_back_btn;
	_tmp2_ = self->priv->grid;
	_tmp3_ = self->priv->create_folder_btn;
	_tmp4_ = self->priv->upload_file_btn;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, !value);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, !value);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, !value);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, !value);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, !value);
	self->priv->_working = value;
	if (value) {
		GCancellable* _tmp5_;
		_tmp5_ = self->priv->main_cancellable;
		g_cancellable_reset (_tmp5_);
	} else {
		GtkButton* _tmp6_;
		tuba_views_drive_set_progress (self, (gdouble) 0);
		_tmp6_ = self->priv->cancel_btn;
		gtk_widget_set_visible ((GtkWidget*) _tmp6_, FALSE);
	}
}

static gdouble
tuba_views_drive_get_progress (TubaViewsDrive* self)
{
	gdouble result;
	GtkProgressBar* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->osd_bar;
	_tmp1_ = gtk_progress_bar_get_fraction (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static void
tuba_views_drive_set_progress (TubaViewsDrive* self,
                               gdouble value)
{
	GtkProgressBar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkProgressBar* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	GtkProgressBar* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->osd_bar;
	gtk_progress_bar_set_fraction (_tmp0_, CLAMP (value, (gdouble) 0, (gdouble) 1));
	_tmp2_ = self->priv->osd_bar;
	_tmp3_ = gtk_progress_bar_get_fraction (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != ((gdouble) 0)) {
		GtkProgressBar* _tmp5_;
		gdouble _tmp6_;
		gdouble _tmp7_;
		_tmp5_ = self->priv->osd_bar;
		_tmp6_ = gtk_progress_bar_get_fraction (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_ != ((gdouble) 1);
	} else {
		_tmp1_ = FALSE;
	}
	_tmp8_ = self->priv->osd_bar;
	gtk_widget_set_visible ((GtkWidget*) _tmp8_, _tmp1_);
}

static TubaAPIIceshrimpFolder*
tuba_views_drive_get_current_folder (TubaViewsDrive* self)
{
	TubaAPIIceshrimpFolder* result;
	TubaAPIIceshrimpFolder* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_current_folder;
	result = _tmp0_;
	return result;
}

static void
tuba_views_drive_set_current_folder (TubaViewsDrive* self,
                                     TubaAPIIceshrimpFolder* value)
{
	TubaAPIIceshrimpFolder* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_current_folder);
	self->priv->_current_folder = _tmp0_;
}

static inline gpointer
tuba_views_drive_item_get_instance_private (TubaViewsDriveItem* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsDriveItem_private_offset);
}

gboolean
tuba_views_drive_item_can_delete (TubaViewsDriveItem* self,
                                  gchar** reason)
{
	gchar* _vala_reason = NULL;
	gboolean res = FALSE;
	TubaAPIIceshrimpFolder* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	res = FALSE;
	_g_free0 (_vala_reason);
	_vala_reason = NULL;
	_tmp0_ = self->priv->_folder;
	if (_tmp0_ != NULL) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		TubaAPIIceshrimpFolder* _tmp3_;
		GeeArrayList* _tmp4_;
		GeeArrayList* _tmp5_;
		_tmp3_ = self->priv->_folder;
		_tmp4_ = tuba_api_iceshrimp_folder_get_files (_tmp3_);
		_tmp5_ = _tmp4_;
		if (_tmp5_ == NULL) {
			_tmp2_ = TRUE;
		} else {
			TubaAPIIceshrimpFolder* _tmp6_;
			GeeArrayList* _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			_tmp6_ = self->priv->_folder;
			_tmp7_ = tuba_api_iceshrimp_folder_get_files (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_);
			_tmp10_ = _tmp9_;
			_tmp2_ = _tmp10_ == 0;
		}
		if (_tmp2_) {
			gboolean _tmp11_ = FALSE;
			TubaAPIIceshrimpFolder* _tmp12_;
			GeeArrayList* _tmp13_;
			GeeArrayList* _tmp14_;
			_tmp12_ = self->priv->_folder;
			_tmp13_ = tuba_api_iceshrimp_folder_get_folders (_tmp12_);
			_tmp14_ = _tmp13_;
			if (_tmp14_ == NULL) {
				_tmp11_ = TRUE;
			} else {
				TubaAPIIceshrimpFolder* _tmp15_;
				GeeArrayList* _tmp16_;
				GeeArrayList* _tmp17_;
				gint _tmp18_;
				gint _tmp19_;
				_tmp15_ = self->priv->_folder;
				_tmp16_ = tuba_api_iceshrimp_folder_get_folders (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp17_);
				_tmp19_ = _tmp18_;
				_tmp11_ = _tmp19_ == 0;
			}
			_tmp1_ = _tmp11_;
		} else {
			_tmp1_ = FALSE;
		}
		res = _tmp1_;
		if (!res) {
			gchar* _tmp20_;
			_tmp20_ = g_strdup (_ ("Folder is not empty"));
			_g_free0 (_vala_reason);
			_vala_reason = _tmp20_;
		}
	} else {
		TubaAPIIceshrimpFile* _tmp21_;
		_tmp21_ = self->priv->_file;
		if (_tmp21_ != NULL) {
			gboolean _tmp22_ = FALSE;
			TubaAPIIceshrimpFile* _tmp23_;
			gboolean _tmp24_;
			gboolean _tmp25_;
			_tmp23_ = self->priv->_file;
			_tmp24_ = tuba_api_iceshrimp_file_get_isAvatar (_tmp23_);
			_tmp25_ = _tmp24_;
			if (!_tmp25_) {
				TubaAPIIceshrimpFile* _tmp26_;
				gboolean _tmp27_;
				gboolean _tmp28_;
				_tmp26_ = self->priv->_file;
				_tmp27_ = tuba_api_iceshrimp_file_get_isBanner (_tmp26_);
				_tmp28_ = _tmp27_;
				_tmp22_ = !_tmp28_;
			} else {
				_tmp22_ = FALSE;
			}
			res = _tmp22_;
			if (!res) {
				const gchar* _tmp29_ = NULL;
				TubaAPIIceshrimpFile* _tmp30_;
				gboolean _tmp31_;
				gboolean _tmp32_;
				gchar* _tmp33_;
				_tmp30_ = self->priv->_file;
				_tmp31_ = tuba_api_iceshrimp_file_get_isAvatar (_tmp30_);
				_tmp32_ = _tmp31_;
				if (_tmp32_) {
					_tmp29_ = _ ("File is used as an avatar");
				} else {
					_tmp29_ = _ ("File is used as a banner");
				}
				_tmp33_ = g_strdup (_tmp29_);
				_g_free0 (_vala_reason);
				_vala_reason = _tmp33_;
			}
		}
	}
	result = res;
	if (reason) {
		*reason = _vala_reason;
	} else {
		_g_free0 (_vala_reason);
	}
	return result;
}

TubaViewsDriveItem*
tuba_views_drive_item_construct_from_folder (GType object_type,
                                             TubaAPIIceshrimpFolder* folder)
{
	TubaViewsDriveItem * self = NULL;
	g_return_val_if_fail (folder != NULL, NULL);
	self = (TubaViewsDriveItem*) g_object_new (object_type, NULL);
	tuba_views_drive_item_set_folder (self, folder);
	return self;
}

TubaViewsDriveItem*
tuba_views_drive_item_new_from_folder (TubaAPIIceshrimpFolder* folder)
{
	return tuba_views_drive_item_construct_from_folder (TUBA_VIEWS_DRIVE_TYPE_ITEM, folder);
}

TubaViewsDriveItem*
tuba_views_drive_item_construct_from_file (GType object_type,
                                           TubaAPIIceshrimpFile* file)
{
	TubaViewsDriveItem * self = NULL;
	g_return_val_if_fail (file != NULL, NULL);
	self = (TubaViewsDriveItem*) g_object_new (object_type, NULL);
	tuba_views_drive_item_set_file (self, file);
	return self;
}

TubaViewsDriveItem*
tuba_views_drive_item_new_from_file (TubaAPIIceshrimpFile* file)
{
	return tuba_views_drive_item_construct_from_file (TUBA_VIEWS_DRIVE_TYPE_ITEM, file);
}

TubaViewsDriveItem*
tuba_views_drive_item_construct (GType object_type)
{
	TubaViewsDriveItem * self = NULL;
	self = (TubaViewsDriveItem*) g_object_new (object_type, NULL);
	return self;
}

TubaViewsDriveItem*
tuba_views_drive_item_new (void)
{
	return tuba_views_drive_item_construct (TUBA_VIEWS_DRIVE_TYPE_ITEM);
}

TubaAPIIceshrimpFolder*
tuba_views_drive_item_get_folder (TubaViewsDriveItem* self)
{
	TubaAPIIceshrimpFolder* result;
	TubaAPIIceshrimpFolder* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_folder;
	result = _tmp0_;
	return result;
}

void
tuba_views_drive_item_set_folder (TubaViewsDriveItem* self,
                                  TubaAPIIceshrimpFolder* value)
{
	TubaAPIIceshrimpFolder* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_drive_item_get_folder (self);
	if (old_value != value) {
		TubaAPIIceshrimpFolder* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_folder);
		self->priv->_folder = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_drive_item_properties[TUBA_VIEWS_DRIVE_ITEM_FOLDER_PROPERTY]);
	}
}

TubaAPIIceshrimpFile*
tuba_views_drive_item_get_file (TubaViewsDriveItem* self)
{
	TubaAPIIceshrimpFile* result;
	TubaAPIIceshrimpFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_file;
	result = _tmp0_;
	return result;
}

void
tuba_views_drive_item_set_file (TubaViewsDriveItem* self,
                                TubaAPIIceshrimpFile* value)
{
	TubaAPIIceshrimpFile* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_drive_item_get_file (self);
	if (old_value != value) {
		TubaAPIIceshrimpFile* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_file);
		self->priv->_file = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_drive_item_properties[TUBA_VIEWS_DRIVE_ITEM_FILE_PROPERTY]);
	}
}

static void
tuba_views_drive_item_class_init (TubaViewsDriveItemClass * klass,
                                  gpointer klass_data)
{
	tuba_views_drive_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsDriveItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_drive_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_drive_item_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_drive_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ITEM_FOLDER_PROPERTY, tuba_views_drive_item_properties[TUBA_VIEWS_DRIVE_ITEM_FOLDER_PROPERTY] = g_param_spec_object ("folder", "folder", "folder", TUBA_API_ICESHRIMP_TYPE_FOLDER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ITEM_FILE_PROPERTY, tuba_views_drive_item_properties[TUBA_VIEWS_DRIVE_ITEM_FILE_PROPERTY] = g_param_spec_object ("file", "file", "file", TUBA_API_ICESHRIMP_TYPE_FILE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_views_drive_item_instance_init (TubaViewsDriveItem * self,
                                     gpointer klass)
{
	self->priv = tuba_views_drive_item_get_instance_private (self);
	self->priv->_folder = NULL;
	self->priv->_file = NULL;
}

static void
tuba_views_drive_item_finalize (GObject * obj)
{
	TubaViewsDriveItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem);
	g_debug ("Drive.vala:9: Destroying DriveItem");
	_g_object_unref0 (self->priv->_folder);
	_g_object_unref0 (self->priv->_file);
	G_OBJECT_CLASS (tuba_views_drive_item_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_drive_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsDriveItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_drive_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsDriveItem), 0, (GInstanceInitFunc) tuba_views_drive_item_instance_init, NULL };
	GType tuba_views_drive_item_type_id;
	tuba_views_drive_item_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaViewsDriveItem", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsDriveItem_private_offset = g_type_add_instance_private (tuba_views_drive_item_type_id, sizeof (TubaViewsDriveItemPrivate));
	return tuba_views_drive_item_type_id;
}

GType
tuba_views_drive_item_get_type (void)
{
	static GType tuba_views_drive_item_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_drive_item_type_id__once)) {
		GType tuba_views_drive_item_type_id;
		tuba_views_drive_item_type_id = tuba_views_drive_item_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_drive_item_type_id__once, tuba_views_drive_item_type_id);
	}
	return tuba_views_drive_item_type_id__once;
}

static void
_vala_tuba_views_drive_item_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	TubaViewsDriveItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem);
	switch (property_id) {
		case TUBA_VIEWS_DRIVE_ITEM_FOLDER_PROPERTY:
		g_value_set_object (value, tuba_views_drive_item_get_folder (self));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_FILE_PROPERTY:
		g_value_set_object (value, tuba_views_drive_item_get_file (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_drive_item_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	TubaViewsDriveItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_DRIVE_TYPE_ITEM, TubaViewsDriveItem);
	switch (property_id) {
		case TUBA_VIEWS_DRIVE_ITEM_FOLDER_PROPERTY:
		tuba_views_drive_item_set_folder (self, g_value_get_object (value));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_FILE_PROPERTY:
		tuba_views_drive_item_set_file (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_views_drive_item_widget_get_instance_private (TubaViewsDriveItemWidget* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsDriveItemWidget_private_offset);
}

static void
tuba_views_drive_item_widget_update_indicators (TubaViewsDriveItemWidget* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp43_ = FALSE;
	gboolean _tmp44_ = FALSE;
	GtkImage* _tmp45_;
	gboolean _tmp46_;
	gboolean _tmp47_;
	GtkBox* _tmp54_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_views_drive_item_widget_get_folder (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		TubaViewsDriveItem* _tmp3_;
		TubaViewsDriveItem* _tmp4_;
		_tmp3_ = tuba_views_drive_item_widget_get_item (self);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == NULL;
	}
	if (_tmp0_) {
		GtkImage* _tmp5_;
		GtkImage* _tmp6_;
		GtkImage* _tmp7_;
		_tmp5_ = self->priv->indicator_alt;
		_tmp6_ = self->priv->indicator_avi;
		_tmp7_ = self->priv->indicator_sensitive;
		gtk_widget_set_visible ((GtkWidget*) _tmp7_, FALSE);
		gtk_widget_set_visible ((GtkWidget*) _tmp6_, FALSE);
		gtk_widget_set_visible ((GtkWidget*) _tmp5_, FALSE);
	} else {
		gboolean _tmp8_ = FALSE;
		TubaViewsDriveItem* _tmp9_;
		TubaViewsDriveItem* _tmp10_;
		TubaAPIIceshrimpFile* _tmp11_;
		TubaAPIIceshrimpFile* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		GtkImage* _tmp21_;
		gboolean _tmp22_ = FALSE;
		TubaViewsDriveItem* _tmp23_;
		TubaViewsDriveItem* _tmp24_;
		TubaAPIIceshrimpFile* _tmp25_;
		TubaAPIIceshrimpFile* _tmp26_;
		gboolean _tmp27_;
		gboolean _tmp28_;
		GtkImage* _tmp35_;
		GtkImage* _tmp36_;
		TubaViewsDriveItem* _tmp37_;
		TubaViewsDriveItem* _tmp38_;
		TubaAPIIceshrimpFile* _tmp39_;
		TubaAPIIceshrimpFile* _tmp40_;
		gboolean _tmp41_;
		gboolean _tmp42_;
		_tmp9_ = tuba_views_drive_item_widget_get_item (self);
		_tmp10_ = _tmp9_;
		_tmp11_ = tuba_views_drive_item_get_file (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = tuba_api_iceshrimp_file_get_description (_tmp12_);
		_tmp14_ = _tmp13_;
		if (_tmp14_ != NULL) {
			TubaViewsDriveItem* _tmp15_;
			TubaViewsDriveItem* _tmp16_;
			TubaAPIIceshrimpFile* _tmp17_;
			TubaAPIIceshrimpFile* _tmp18_;
			const gchar* _tmp19_;
			const gchar* _tmp20_;
			_tmp15_ = tuba_views_drive_item_widget_get_item (self);
			_tmp16_ = _tmp15_;
			_tmp17_ = tuba_views_drive_item_get_file (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = tuba_api_iceshrimp_file_get_description (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp8_ = g_strcmp0 (_tmp20_, "") != 0;
		} else {
			_tmp8_ = FALSE;
		}
		_tmp21_ = self->priv->indicator_alt;
		gtk_widget_set_visible ((GtkWidget*) _tmp21_, _tmp8_);
		_tmp23_ = tuba_views_drive_item_widget_get_item (self);
		_tmp24_ = _tmp23_;
		_tmp25_ = tuba_views_drive_item_get_file (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = tuba_api_iceshrimp_file_get_isAvatar (_tmp26_);
		_tmp28_ = _tmp27_;
		if (_tmp28_) {
			_tmp22_ = TRUE;
		} else {
			TubaViewsDriveItem* _tmp29_;
			TubaViewsDriveItem* _tmp30_;
			TubaAPIIceshrimpFile* _tmp31_;
			TubaAPIIceshrimpFile* _tmp32_;
			gboolean _tmp33_;
			gboolean _tmp34_;
			_tmp29_ = tuba_views_drive_item_widget_get_item (self);
			_tmp30_ = _tmp29_;
			_tmp31_ = tuba_views_drive_item_get_file (_tmp30_);
			_tmp32_ = _tmp31_;
			_tmp33_ = tuba_api_iceshrimp_file_get_isBanner (_tmp32_);
			_tmp34_ = _tmp33_;
			_tmp22_ = _tmp34_;
		}
		_tmp35_ = self->priv->indicator_avi;
		gtk_widget_set_visible ((GtkWidget*) _tmp35_, _tmp22_);
		_tmp36_ = self->priv->indicator_sensitive;
		_tmp37_ = tuba_views_drive_item_widget_get_item (self);
		_tmp38_ = _tmp37_;
		_tmp39_ = tuba_views_drive_item_get_file (_tmp38_);
		_tmp40_ = _tmp39_;
		_tmp41_ = tuba_api_iceshrimp_file_get_sensitive (_tmp40_);
		_tmp42_ = _tmp41_;
		gtk_widget_set_visible ((GtkWidget*) _tmp36_, _tmp42_);
	}
	_tmp45_ = self->priv->indicator_alt;
	_tmp46_ = gtk_widget_get_visible ((GtkWidget*) _tmp45_);
	_tmp47_ = _tmp46_;
	if (_tmp47_) {
		_tmp44_ = TRUE;
	} else {
		GtkImage* _tmp48_;
		gboolean _tmp49_;
		gboolean _tmp50_;
		_tmp48_ = self->priv->indicator_avi;
		_tmp49_ = gtk_widget_get_visible ((GtkWidget*) _tmp48_);
		_tmp50_ = _tmp49_;
		_tmp44_ = _tmp50_;
	}
	if (_tmp44_) {
		_tmp43_ = TRUE;
	} else {
		GtkImage* _tmp51_;
		gboolean _tmp52_;
		gboolean _tmp53_;
		_tmp51_ = self->priv->indicator_sensitive;
		_tmp52_ = gtk_widget_get_visible ((GtkWidget*) _tmp51_);
		_tmp53_ = _tmp52_;
		_tmp43_ = _tmp53_;
	}
	_tmp54_ = self->priv->indicator_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp54_, _tmp43_);
}

static void
tuba_views_drive_item_widget_update_drop_target (TubaViewsDriveItemWidget* self,
                                                 gboolean dragging)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_views_drive_item_widget_get_folder (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = !dragging;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkDropTarget* _tmp3_;
		GType* _tmp4_;
		GType* _tmp5_;
		gint _tmp5__length1;
		_tmp3_ = self->priv->drop_target_controller;
		_tmp4_ = g_new0 (GType, 1);
		_tmp4_[0] = TUBA_VIEWS_DRIVE_TYPE_ITEM;
		_tmp5_ = _tmp4_;
		_tmp5__length1 = 1;
		gtk_drop_target_set_gtypes (_tmp3_, _tmp5_, (gsize) 1);
		_tmp5_ = (g_free (_tmp5_), NULL);
	} else {
		GtkDropTarget* _tmp6_;
		_tmp6_ = self->priv->drop_target_controller;
		gtk_drop_target_set_gtypes (_tmp6_, NULL, (gsize) 0);
	}
}

static gboolean
tuba_views_drive_item_widget_on_drop (TubaViewsDriveItemWidget* self,
                                      GtkDropTarget* dt_controller,
                                      GValue* value,
                                      gdouble x,
                                      gdouble y)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (dt_controller != NULL, FALSE);
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp3_ = self->priv->_working;
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = tuba_views_drive_item_widget_get_folder (self);
		_tmp5_ = _tmp4_;
		_tmp2_ = !_tmp5_;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		TubaViewsDriveItem* _tmp6_;
		TubaViewsDriveItem* _tmp7_;
		_tmp6_ = tuba_views_drive_item_widget_get_item (self);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_ == NULL;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = ((gpointer) gtk_drop_target_get_value (dt_controller)) == NULL;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp8_ = tuba_views_drive_item_widget_get_item_id (self);
	_tmp9_ = _tmp8_;
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_MOVE_SIGNAL], 0, _tmp9_, g_value_get_object (gtk_drop_target_get_value (dt_controller)));
	result = TRUE;
	return result;
}

void
tuba_views_drive_item_widget_cleanup (TubaViewsDriveItemWidget* self)
{
	GtkDropTarget* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->drop_target_controller;
	if (((gpointer) gtk_drop_target_get_value (_tmp0_)) != NULL) {
		GtkDropTarget* _tmp1_;
		GValue _tmp2_;
		_tmp1_ = self->priv->drop_target_controller;
		_tmp2_ = *gtk_drop_target_get_value (_tmp1_);
		g_value_set_object (&_tmp2_, NULL);
	}
}

static GdkContentProvider*
tuba_views_drive_item_widget_on_drag_prepare (TubaViewsDriveItemWidget* self,
                                              gdouble x,
                                              gdouble y)
{
	gboolean _tmp0_ = FALSE;
	TubaViewsDriveItem* _tmp1_;
	TubaViewsDriveItem* _tmp2_;
	TubaViewsDriveItem* _tmp4_;
	TubaViewsDriveItem* _tmp5_;
	GValue _tmp6_ = {0};
	GdkContentProvider* _tmp7_;
	GdkContentProvider* _tmp8_;
	GdkContentProvider* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = tuba_views_drive_item_widget_get_item (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_working;
		_tmp0_ = _tmp3_;
	}
	if (_tmp0_) {
		result = NULL;
		return result;
	}
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_PRESSED_SIGNAL], 0, FALSE);
	self->priv->drag_x = x;
	self->priv->drag_y = y;
	_tmp4_ = tuba_views_drive_item_widget_get_item (self);
	_tmp5_ = _tmp4_;
	g_value_init (&_tmp6_, TUBA_VIEWS_DRIVE_TYPE_ITEM);
	g_value_set_object (&_tmp6_, _tmp5_);
	_tmp7_ = gdk_content_provider_new_for_value (&_tmp6_);
	_tmp8_ = _tmp7_;
	G_IS_VALUE (&_tmp6_) ? (g_value_unset (&_tmp6_), NULL) : NULL;
	result = _tmp8_;
	return result;
}

static void
tuba_views_drive_item_widget_on_drag_begin (TubaViewsDriveItemWidget* self,
                                            GtkDragSource* ds_controller,
                                            GdkDrag* drag)
{
	gboolean _tmp0_;
	GtkWidgetPaintable* _tmp1_;
	GtkWidgetPaintable* _tmp2_;
	GdkPaintable* _tmp3_;
	GdkPaintable* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ds_controller != NULL);
	g_return_if_fail (drag != NULL);
	tuba_views_drive_item_widget_update_drop_target (self, TRUE);
	_tmp0_ = self->priv->_working;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = (GtkWidgetPaintable*) gtk_widget_paintable_new ((GtkWidget*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = gdk_paintable_get_current_image ((GdkPaintable*) _tmp2_);
	_tmp4_ = _tmp3_;
	gtk_drag_source_set_icon (ds_controller, _tmp4_, (gint) self->priv->drag_x, (gint) self->priv->drag_y);
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
}

static void
tuba_views_drive_item_widget_on_drag_end (TubaViewsDriveItemWidget* self,
                                          GdkDrag* drag,
                                          gboolean delete_data)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (drag != NULL);
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_PRESSED_SIGNAL], 0, TRUE);
	tuba_views_drive_item_widget_update_drop_target (self, FALSE);
}

static gboolean
tuba_views_drive_item_widget_on_drag_cancel (TubaViewsDriveItemWidget* self,
                                             GdkDrag* drag,
                                             GdkDragCancelReason reason)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (drag != NULL, FALSE);
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_PRESSED_SIGNAL], 0, TRUE);
	tuba_views_drive_item_widget_update_drop_target (self, FALSE);
	result = FALSE;
	return result;
}

static GVariant*
_variant_new13 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
tuba_views_drive_item_widget_update_actions (TubaViewsDriveItemWidget* self)
{
	TubaViewsDriveItem* _tmp0_;
	TubaViewsDriveItem* _tmp1_;
	GSimpleAction** _tmp17_;
	gint _tmp17__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_views_drive_item_widget_get_item (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		GSimpleAction* _tmp2_;
		TubaViewsDriveItem* _tmp3_;
		TubaViewsDriveItem* _tmp4_;
		TubaViewsDriveItem* _tmp5_;
		TubaViewsDriveItem* _tmp6_;
		TubaAPIIceshrimpFile* _tmp7_;
		TubaAPIIceshrimpFile* _tmp8_;
		_tmp2_ = self->priv->delete_action;
		_tmp3_ = tuba_views_drive_item_widget_get_item (self);
		_tmp4_ = _tmp3_;
		g_simple_action_set_enabled (_tmp2_, tuba_views_drive_item_can_delete (_tmp4_, NULL));
		_tmp5_ = tuba_views_drive_item_widget_get_item (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_views_drive_item_get_file (_tmp6_);
		_tmp8_ = _tmp7_;
		if (_tmp8_ != NULL) {
			GSimpleAction* _tmp9_;
			TubaViewsDriveItem* _tmp10_;
			TubaViewsDriveItem* _tmp11_;
			TubaAPIIceshrimpFile* _tmp12_;
			TubaAPIIceshrimpFile* _tmp13_;
			gboolean _tmp14_;
			gboolean _tmp15_;
			GVariant* _tmp16_;
			_tmp9_ = self->priv->ms_action;
			_tmp10_ = tuba_views_drive_item_widget_get_item (self);
			_tmp11_ = _tmp10_;
			_tmp12_ = tuba_views_drive_item_get_file (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = tuba_api_iceshrimp_file_get_sensitive (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = _variant_new13 (_tmp15_);
			g_simple_action_set_state (_tmp9_, _tmp16_);
			_g_variant_unref0 (_tmp16_);
		}
	}
	_tmp17_ = self->priv->file_only_actions;
	_tmp17__length1 = self->priv->file_only_actions_length1;
	{
		GSimpleAction** action_collection = NULL;
		gint action_collection_length1 = 0;
		gint _action_collection_size_ = 0;
		gint action_it = 0;
		action_collection = _tmp17_;
		action_collection_length1 = _tmp17__length1;
		for (action_it = 0; action_it < action_collection_length1; action_it = action_it + 1) {
			GSimpleAction* _tmp18_;
			GSimpleAction* action = NULL;
			_tmp18_ = _g_object_ref0 (action_collection[action_it]);
			action = _tmp18_;
			{
				GSimpleAction* _tmp19_;
				gboolean _tmp20_;
				gboolean _tmp21_;
				_tmp19_ = action;
				_tmp20_ = tuba_views_drive_item_widget_get_folder (self);
				_tmp21_ = _tmp20_;
				g_simple_action_set_enabled (_tmp19_, !_tmp21_);
				_g_object_unref0 (action);
			}
		}
	}
}

static void
tuba_views_drive_item_widget_on_ms_change (TubaViewsDriveItemWidget* self,
                                           GVariant* variant)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (variant == NULL) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_;
		gboolean _tmp2_;
		_tmp1_ = tuba_views_drive_item_widget_get_folder (self);
		_tmp2_ = _tmp1_;
		_tmp0_ = _tmp2_;
	}
	if (_tmp0_) {
		return;
	}
	tuba_views_drive_item_widget_set_working (self, TRUE);
	tuba_views_drive_item_widget_on_ms_change_real (self, NULL, NULL);
}

static void
tuba_views_drive_item_widget_on_ms_change_real_data_free (gpointer _data)
{
	TubaViewsDriveItemWidgetOnMsChangeRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveItemWidgetOnMsChangeRealData, _data_);
}

static void
tuba_views_drive_item_widget_on_ms_change_real (TubaViewsDriveItemWidget* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	TubaViewsDriveItemWidgetOnMsChangeRealData* _data_;
	TubaViewsDriveItemWidget* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveItemWidgetOnMsChangeRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_item_widget_on_ms_change_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_drive_item_widget_on_ms_change_real_co (_data_);
}

static void
tuba_views_drive_item_widget_on_ms_change_real_finish (TubaViewsDriveItemWidget* self,
                                                       GAsyncResult* _res_)
{
	TubaViewsDriveItemWidgetOnMsChangeRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_drive_item_widget_on_ms_change_real_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_)
{
	TubaViewsDriveItemWidgetOnMsChangeRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_item_widget_on_ms_change_real_co (_data_);
}

static GVariant*
_variant_new14 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static gboolean
tuba_views_drive_item_widget_on_ms_change_real_co (TubaViewsDriveItemWidgetOnMsChangeRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = json_builder_new ();
	_data_->builder = _data_->_tmp0_;
	json_builder_begin_object (_data_->builder);
	json_builder_set_member_name (_data_->builder, "description");
	json_builder_add_null_value (_data_->builder);
	json_builder_set_member_name (_data_->builder, "filename");
	json_builder_add_null_value (_data_->builder);
	json_builder_set_member_name (_data_->builder, "sensitive");
	_data_->_tmp1_ = tuba_views_drive_item_widget_get_item (_data_->self);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = tuba_views_drive_item_get_file (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = tuba_api_iceshrimp_file_get_sensitive (_data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	json_builder_add_boolean_value (_data_->builder, !_data_->_tmp6_);
	json_builder_end_object (_data_->builder);
	_data_->_tmp7_ = tuba_views_drive_item_widget_get_item_id (_data_->self);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = string_to_string (_data_->_tmp8_);
	_data_->_tmp10_ = g_strconcat ("/api/iceshrimp/drive/", _data_->_tmp9_, NULL);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = tuba_accounts;
	_data_->_tmp13_ = tuba_account_store_get_active (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = _g_object_ref0 (_data_->_tmp14_);
	_data_->_tmp16_ = tuba_accounts;
	_data_->_tmp17_ = tuba_account_store_get_active (_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	_data_->_tmp21_ = g_strdup (_data_->_tmp20_);
	_data_->_tmp22_ = NULL;
	_data_->_tmp22_ = tuba_request_v2_new (_data_->_tmp11_, TUBA_REQUEST_V2_METHOD_PATCH);
	tuba_request_v2_set_account (_data_->_tmp22_, _data_->_tmp15_);
	_g_object_unref0 (_data_->_tmp15_);
	tuba_request_v2_set_force_token (_data_->_tmp22_, _data_->_tmp21_);
	_g_free0 (_data_->_tmp21_);
	_data_->_tmp23_ = _data_->_tmp22_;
	_g_free0 (_data_->_tmp11_);
	_data_->req = _data_->_tmp23_;
	tuba_request_v2_set_body_from_json (_data_->req, _data_->builder);
	{
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->req, tuba_views_drive_item_widget_on_ms_change_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp24_ = tuba_request_v2_exec_finish (_data_->req, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp25_ = _data_->_tmp24_;
		_g_object_unref0 (_data_->_tmp25_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp26_ = _data_->self->priv->ms_action;
		_data_->_tmp27_ = tuba_views_drive_item_widget_get_item (_data_->self);
		_data_->_tmp28_ = _data_->_tmp27_;
		_data_->_tmp29_ = tuba_views_drive_item_get_file (_data_->_tmp28_);
		_data_->_tmp30_ = _data_->_tmp29_;
		_data_->_tmp31_ = tuba_api_iceshrimp_file_get_sensitive (_data_->_tmp30_);
		_data_->_tmp32_ = _data_->_tmp31_;
		_data_->_tmp33_ = _variant_new14 (!_data_->_tmp32_);
		g_simple_action_set_state (_data_->_tmp26_, _data_->_tmp33_);
		_g_variant_unref0 (_data_->_tmp33_);
		_data_->_tmp34_ = tuba_views_drive_item_widget_get_item (_data_->self);
		_data_->_tmp35_ = _data_->_tmp34_;
		_data_->_tmp36_ = tuba_views_drive_item_get_file (_data_->_tmp35_);
		_data_->_tmp37_ = _data_->_tmp36_;
		_data_->_tmp38_ = tuba_views_drive_item_widget_get_item (_data_->self);
		_data_->_tmp39_ = _data_->_tmp38_;
		_data_->_tmp40_ = tuba_views_drive_item_get_file (_data_->_tmp39_);
		_data_->_tmp41_ = _data_->_tmp40_;
		_data_->_tmp42_ = tuba_api_iceshrimp_file_get_sensitive (_data_->_tmp41_);
		_data_->_tmp43_ = _data_->_tmp42_;
		tuba_api_iceshrimp_file_set_sensitive (_data_->_tmp37_, !_data_->_tmp43_);
		tuba_views_drive_item_widget_update_indicators (_data_->self);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp44_ = tuba_app;
		_data_->_tmp45_ = tuba_views_drive_item_widget_get_filename (_data_->self);
		_data_->_tmp46_ = _data_->_tmp45_;
		_data_->_tmp47_ = g_markup_escape_text (_data_->_tmp46_, (gssize) -1);
		_data_->_tmp48_ = _data_->_tmp47_;
		_data_->_tmp49_ = _data_->e;
		_data_->_tmp50_ = _data_->_tmp49_->message;
		_data_->_tmp51_ = g_strdup_printf (_ ("Couldn't mark '%s' as sensitive: %s"), _data_->_tmp48_, _data_->_tmp50_);
		_data_->_tmp52_ = _data_->_tmp51_;
		g_signal_emit_by_name (_data_->_tmp44_, "toast", _data_->_tmp52_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp52_);
		_g_free0 (_data_->_tmp48_);
		_data_->_tmp54_ = tuba_views_drive_item_widget_get_folder (_data_->self);
		_data_->_tmp55_ = _data_->_tmp54_;
		if (_data_->_tmp55_) {
			_data_->_tmp53_ = "folder";
		} else {
			_data_->_tmp53_ = "file";
		}
		_data_->_tmp56_ = string_to_string (_data_->_tmp53_);
		_data_->_tmp57_ = tuba_views_drive_item_widget_get_filename (_data_->self);
		_data_->_tmp58_ = _data_->_tmp57_;
		_data_->_tmp59_ = string_to_string (_data_->_tmp58_);
		_data_->_tmp60_ = _data_->e;
		_data_->_tmp61_ = g_strdup_printf ("%i", _data_->_tmp60_->code);
		_data_->_tmp62_ = _data_->_tmp61_;
		_data_->_tmp63_ = _data_->e;
		_data_->_tmp64_ = _data_->_tmp63_->message;
		_data_->_tmp65_ = string_to_string (_data_->_tmp64_);
		_data_->_tmp66_ = g_strconcat ("Couldn't mark ", _data_->_tmp56_, " '", _data_->_tmp59_, "' as sensitive: ", _data_->_tmp62_, " ", _data_->_tmp65_, NULL);
		_data_->_tmp67_ = _data_->_tmp66_;
		g_warning ("Drive.vala:384: %s", _data_->_tmp67_);
		_g_free0 (_data_->_tmp67_);
		_g_free0 (_data_->_tmp62_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_object_unref0 (_data_->builder);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	tuba_views_drive_item_widget_set_working (_data_->self, FALSE);
	_g_object_unref0 (_data_->req);
	_g_object_unref0 (_data_->builder);
	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
tuba_views_drive_item_widget_on_copy (TubaViewsDriveItemWidget* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	TubaViewsDriveItem* _tmp5_;
	TubaViewsDriveItem* _tmp6_;
	TubaAPIIceshrimpFile* _tmp7_;
	TubaAPIIceshrimpFile* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_views_drive_item_widget_get_folder (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		TubaViewsDriveItem* _tmp3_;
		TubaViewsDriveItem* _tmp4_;
		_tmp3_ = tuba_views_drive_item_widget_get_item (self);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = tuba_views_drive_item_widget_get_item (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = tuba_views_drive_item_get_file (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = tuba_api_iceshrimp_file_get_url (_tmp8_);
	_tmp10_ = _tmp9_;
	tuba_utils_host_copy (_tmp10_);
}

static void
tuba_views_drive_item_widget_on_open (TubaViewsDriveItemWidget* self)
{
	TubaViewsDriveItem* _tmp0_;
	TubaViewsDriveItem* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_views_drive_item_widget_get_item (self);
	_tmp1_ = _tmp0_;
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_OPEN_ME_SIGNAL], 0, _tmp1_);
}

static void
tuba_views_drive_item_widget_on_delete (TubaViewsDriveItemWidget* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_DELETE_ME_SIGNAL], 0);
}

static void
_tuba_views_drive_item_widget_on_rename_done_tuba_views_drive_entry_popover_done (TubaViewsDriveEntryPopover* _sender,
                                                                                  const gchar* _result_,
                                                                                  gpointer self)
{
	tuba_views_drive_item_widget_on_rename_done ((TubaViewsDriveItemWidget*) self, _result_);
}

static void
tuba_views_drive_item_widget_on_rename (TubaViewsDriveItemWidget* self)
{
	TubaViewsDriveEntryPopover* _tmp0_;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	gboolean _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	TubaViewsDriveEntryPopover* _tmp7_;
	TubaViewsDriveEntryPopover* _tmp8_;
	TubaViewsDriveEntryPopover* _tmp9_;
	TubaViewsDriveEntryPopover* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	TubaViewsDriveEntryPopover* _tmp13_;
	TubaViewsDriveEntryPopover* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->rename_popover;
	if (_tmp0_ != NULL) {
		TubaViewsDriveEntryPopover* _tmp1_;
		_tmp1_ = self->priv->rename_popover;
		gtk_widget_unparent ((GtkWidget*) _tmp1_);
		_g_object_unref0 (self->priv->rename_popover);
		self->priv->rename_popover = NULL;
	}
	_tmp3_ = tuba_views_drive_item_widget_get_folder (self);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		_tmp2_ = _ ("Rename Folder");
	} else {
		_tmp2_ = _ ("Rename File");
	}
	_tmp5_ = tuba_views_drive_item_widget_get_filename (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = tuba_views_drive_entry_popover_new (_tmp2_, _tmp6_, _ ("Rename"), NULL, 0, FALSE);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->rename_popover);
	self->priv->rename_popover = _tmp7_;
	_tmp8_ = self->priv->rename_popover;
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILL_RESERVED_NAMES_SIGNAL], 0, _tmp8_);
	_tmp9_ = self->priv->rename_popover;
	gtk_widget_set_parent ((GtkWidget*) _tmp9_, (GtkWidget*) self);
	_tmp10_ = self->priv->rename_popover;
	_tmp11_ = tuba_views_drive_item_widget_get_filename (self);
	_tmp12_ = _tmp11_;
	tuba_views_drive_entry_popover_set_text (_tmp10_, _tmp12_);
	_tmp13_ = self->priv->rename_popover;
	g_signal_connect_object (_tmp13_, "done", (GCallback) _tuba_views_drive_item_widget_on_rename_done_tuba_views_drive_entry_popover_done, self, 0);
	_tmp14_ = self->priv->rename_popover;
	gtk_popover_popup ((GtkPopover*) _tmp14_);
}

static void
_tuba_views_drive_item_widget_on_alt_done_tuba_views_drive_entry_popover_done (TubaViewsDriveEntryPopover* _sender,
                                                                               const gchar* _result_,
                                                                               gpointer self)
{
	tuba_views_drive_item_widget_on_alt_done ((TubaViewsDriveItemWidget*) self, _result_);
}

static void
tuba_views_drive_item_widget_on_alt_text (TubaViewsDriveItemWidget* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	TubaViewsDriveEntryPopover* _tmp5_;
	TubaViewsDriveEntryPopover* _tmp35_;
	TubaViewsDriveEntryPopover* _tmp36_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_views_drive_item_widget_get_folder (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		TubaViewsDriveItem* _tmp3_;
		TubaViewsDriveItem* _tmp4_;
		_tmp3_ = tuba_views_drive_item_widget_get_item (self);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = self->priv->alt_popover;
	if (_tmp5_ == NULL) {
		const gchar* _tmp6_ = NULL;
		TubaViewsDriveItem* _tmp7_;
		TubaViewsDriveItem* _tmp8_;
		TubaAPIIceshrimpFile* _tmp9_;
		TubaAPIIceshrimpFile* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		TubaViewsDriveEntryPopover* _tmp19_;
		TubaViewsDriveEntryPopover* _tmp20_;
		_tmp7_ = tuba_views_drive_item_widget_get_item (self);
		_tmp8_ = _tmp7_;
		_tmp9_ = tuba_views_drive_item_get_file (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = tuba_api_iceshrimp_file_get_description (_tmp10_);
		_tmp12_ = _tmp11_;
		if (_tmp12_ == NULL) {
			_tmp6_ = "";
		} else {
			TubaViewsDriveItem* _tmp13_;
			TubaViewsDriveItem* _tmp14_;
			TubaAPIIceshrimpFile* _tmp15_;
			TubaAPIIceshrimpFile* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_tmp13_ = tuba_views_drive_item_widget_get_item (self);
			_tmp14_ = _tmp13_;
			_tmp15_ = tuba_views_drive_item_get_file (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = tuba_api_iceshrimp_file_get_description (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp6_ = _tmp18_;
		}
		_tmp19_ = tuba_views_drive_entry_popover_new (_ ("Alternative Text"), _tmp6_, _ ("Save"), NULL, 0, TRUE);
		g_object_ref_sink (_tmp19_);
		_g_object_unref0 (self->priv->alt_popover);
		self->priv->alt_popover = _tmp19_;
		_tmp20_ = self->priv->alt_popover;
		gtk_widget_set_parent ((GtkWidget*) _tmp20_, (GtkWidget*) self);
	} else {
		const gchar* _tmp21_ = NULL;
		TubaViewsDriveItem* _tmp22_;
		TubaViewsDriveItem* _tmp23_;
		TubaAPIIceshrimpFile* _tmp24_;
		TubaAPIIceshrimpFile* _tmp25_;
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		TubaViewsDriveEntryPopover* _tmp34_;
		_tmp22_ = tuba_views_drive_item_widget_get_item (self);
		_tmp23_ = _tmp22_;
		_tmp24_ = tuba_views_drive_item_get_file (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = tuba_api_iceshrimp_file_get_description (_tmp25_);
		_tmp27_ = _tmp26_;
		if (_tmp27_ == NULL) {
			_tmp21_ = "";
		} else {
			TubaViewsDriveItem* _tmp28_;
			TubaViewsDriveItem* _tmp29_;
			TubaAPIIceshrimpFile* _tmp30_;
			TubaAPIIceshrimpFile* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			_tmp28_ = tuba_views_drive_item_widget_get_item (self);
			_tmp29_ = _tmp28_;
			_tmp30_ = tuba_views_drive_item_get_file (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = tuba_api_iceshrimp_file_get_description (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp21_ = _tmp33_;
		}
		_tmp34_ = self->priv->alt_popover;
		tuba_views_drive_entry_popover_set_text (_tmp34_, _tmp21_);
	}
	_tmp35_ = self->priv->alt_popover;
	g_signal_connect_object (_tmp35_, "done", (GCallback) _tuba_views_drive_item_widget_on_alt_done_tuba_views_drive_entry_popover_done, self, 0);
	_tmp36_ = self->priv->alt_popover;
	gtk_popover_popup ((GtkPopover*) _tmp36_);
}

static void
tuba_views_drive_item_widget_on_alt_done (TubaViewsDriveItemWidget* self,
                                          const gchar* new_alt)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_alt != NULL);
	tuba_views_drive_item_widget_set_working (self, TRUE);
	tuba_views_drive_item_widget_on_alt_real (self, new_alt, NULL, NULL);
}

static void
tuba_views_drive_item_widget_on_alt_real_data_free (gpointer _data)
{
	TubaViewsDriveItemWidgetOnAltRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->new_alt);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveItemWidgetOnAltRealData, _data_);
}

static void
tuba_views_drive_item_widget_on_alt_real (TubaViewsDriveItemWidget* self,
                                          const gchar* new_alt,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	TubaViewsDriveItemWidgetOnAltRealData* _data_;
	TubaViewsDriveItemWidget* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_alt != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveItemWidgetOnAltRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_item_widget_on_alt_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (new_alt);
	_g_free0 (_data_->new_alt);
	_data_->new_alt = _tmp1_;
	tuba_views_drive_item_widget_on_alt_real_co (_data_);
}

static void
tuba_views_drive_item_widget_on_alt_real_finish (TubaViewsDriveItemWidget* self,
                                                 GAsyncResult* _res_)
{
	TubaViewsDriveItemWidgetOnAltRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_drive_item_widget_on_alt_real_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	TubaViewsDriveItemWidgetOnAltRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_item_widget_on_alt_real_co (_data_);
}

static gboolean
tuba_views_drive_item_widget_on_alt_real_co (TubaViewsDriveItemWidgetOnAltRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = json_builder_new ();
	_data_->builder = _data_->_tmp0_;
	json_builder_begin_object (_data_->builder);
	json_builder_set_member_name (_data_->builder, "filename");
	json_builder_add_null_value (_data_->builder);
	json_builder_set_member_name (_data_->builder, "sensitive");
	json_builder_add_null_value (_data_->builder);
	json_builder_set_member_name (_data_->builder, "description");
	json_builder_add_string_value (_data_->builder, _data_->new_alt);
	json_builder_end_object (_data_->builder);
	_data_->_tmp1_ = tuba_views_drive_item_widget_get_item_id (_data_->self);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = string_to_string (_data_->_tmp2_);
	_data_->_tmp4_ = g_strconcat ("/api/iceshrimp/drive/", _data_->_tmp3_, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = tuba_accounts;
	_data_->_tmp7_ = tuba_account_store_get_active (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = _g_object_ref0 (_data_->_tmp8_);
	_data_->_tmp10_ = tuba_accounts;
	_data_->_tmp11_ = tuba_account_store_get_active (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = g_strdup (_data_->_tmp14_);
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = tuba_request_v2_new (_data_->_tmp5_, TUBA_REQUEST_V2_METHOD_PATCH);
	tuba_request_v2_set_account (_data_->_tmp16_, _data_->_tmp9_);
	_g_object_unref0 (_data_->_tmp9_);
	tuba_request_v2_set_force_token (_data_->_tmp16_, _data_->_tmp15_);
	_g_free0 (_data_->_tmp15_);
	_data_->_tmp17_ = _data_->_tmp16_;
	_g_free0 (_data_->_tmp5_);
	_data_->req = _data_->_tmp17_;
	tuba_request_v2_set_body_from_json (_data_->req, _data_->builder);
	{
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->req, tuba_views_drive_item_widget_on_alt_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp18_ = tuba_request_v2_exec_finish (_data_->req, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp19_ = _data_->_tmp18_;
		_g_object_unref0 (_data_->_tmp19_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp20_ = tuba_views_drive_item_widget_get_item (_data_->self);
		_data_->_tmp21_ = _data_->_tmp20_;
		_data_->_tmp22_ = tuba_views_drive_item_get_file (_data_->_tmp21_);
		_data_->_tmp23_ = _data_->_tmp22_;
		tuba_api_iceshrimp_file_set_description (_data_->_tmp23_, _data_->new_alt);
		tuba_views_drive_item_widget_update_indicators (_data_->self);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp24_ = tuba_app;
		_data_->_tmp25_ = tuba_views_drive_item_widget_get_filename (_data_->self);
		_data_->_tmp26_ = _data_->_tmp25_;
		_data_->_tmp27_ = g_markup_escape_text (_data_->_tmp26_, (gssize) -1);
		_data_->_tmp28_ = _data_->_tmp27_;
		_data_->_tmp29_ = _data_->e;
		_data_->_tmp30_ = _data_->_tmp29_->message;
		_data_->_tmp31_ = g_strdup_printf (_ ("Couldn't change alt text for '%s': %s"), _data_->_tmp28_, _data_->_tmp30_);
		_data_->_tmp32_ = _data_->_tmp31_;
		g_signal_emit_by_name (_data_->_tmp24_, "toast", _data_->_tmp32_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp32_);
		_g_free0 (_data_->_tmp28_);
		_data_->_tmp33_ = tuba_views_drive_item_widget_get_filename (_data_->self);
		_data_->_tmp34_ = _data_->_tmp33_;
		_data_->_tmp35_ = string_to_string (_data_->_tmp34_);
		_data_->_tmp36_ = string_to_string (_data_->new_alt);
		_data_->_tmp37_ = _data_->e;
		_data_->_tmp38_ = g_strdup_printf ("%i", _data_->_tmp37_->code);
		_data_->_tmp39_ = _data_->_tmp38_;
		_data_->_tmp40_ = _data_->e;
		_data_->_tmp41_ = _data_->_tmp40_->message;
		_data_->_tmp42_ = string_to_string (_data_->_tmp41_);
		_data_->_tmp43_ = g_strconcat ("Couldn't change alt for '", _data_->_tmp35_, "' to '", _data_->_tmp36_, "': ", _data_->_tmp39_, " ", _data_->_tmp42_, NULL);
		_data_->_tmp44_ = _data_->_tmp43_;
		g_warning ("Drive.vala:472: %s", _data_->_tmp44_);
		_g_free0 (_data_->_tmp44_);
		_g_free0 (_data_->_tmp39_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_object_unref0 (_data_->builder);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	tuba_views_drive_item_widget_set_working (_data_->self, FALSE);
	_g_object_unref0 (_data_->req);
	_g_object_unref0 (_data_->builder);
	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
tuba_views_drive_item_widget_on_rename_done (TubaViewsDriveItemWidget* self,
                                             const gchar* new_name)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_name != NULL);
	tuba_views_drive_item_widget_set_working (self, TRUE);
	tuba_views_drive_item_widget_on_rename_real (self, new_name, NULL, NULL);
}

static void
tuba_views_drive_item_widget_on_rename_real_data_free (gpointer _data)
{
	TubaViewsDriveItemWidgetOnRenameRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->new_name);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsDriveItemWidgetOnRenameRealData, _data_);
}

static void
tuba_views_drive_item_widget_on_rename_real (TubaViewsDriveItemWidget* self,
                                             const gchar* new_name,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	TubaViewsDriveItemWidgetOnRenameRealData* _data_;
	TubaViewsDriveItemWidget* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_name != NULL);
	_data_ = g_slice_new0 (TubaViewsDriveItemWidgetOnRenameRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_drive_item_widget_on_rename_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (new_name);
	_g_free0 (_data_->new_name);
	_data_->new_name = _tmp1_;
	tuba_views_drive_item_widget_on_rename_real_co (_data_);
}

static void
tuba_views_drive_item_widget_on_rename_real_finish (TubaViewsDriveItemWidget* self,
                                                    GAsyncResult* _res_)
{
	TubaViewsDriveItemWidgetOnRenameRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static guint8*
string_get_data (const gchar* self,
                 gint* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res;
	_tmp2__length1 = res_length1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

static guint8*
_vala_array_dup44 (guint8* self,
                   gssize length)
{
	if (length > 0) {
		return g_memdup2 (self, length * sizeof (guint8));
	}
	return NULL;
}

static void
tuba_views_drive_item_widget_on_rename_real_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	TubaViewsDriveItemWidgetOnRenameRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_drive_item_widget_on_rename_real_co (_data_);
}

static gboolean
tuba_views_drive_item_widget_on_rename_real_co (TubaViewsDriveItemWidgetOnRenameRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_views_drive_item_widget_get_folder (_data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	if (_data_->_tmp1_) {
		_data_->_tmp2_ = json_node_new (JSON_NODE_VALUE);
		_data_->node = _data_->_tmp2_;
		_data_->_tmp3_ = _data_->node;
		json_node_set_string (_data_->_tmp3_, _data_->new_name);
		_data_->_tmp4_ = json_generator_new ();
		_data_->gen = _data_->_tmp4_;
		_data_->_tmp5_ = _data_->gen;
		_data_->_tmp6_ = _data_->node;
		json_generator_set_root (_data_->_tmp5_, _data_->_tmp6_);
		_data_->_tmp7_ = tuba_views_drive_item_widget_get_item_id (_data_->self);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp9_ = string_to_string (_data_->_tmp8_);
		_data_->_tmp10_ = g_strconcat ("/api/iceshrimp/drive/folder/", _data_->_tmp9_, NULL);
		_data_->_tmp11_ = _data_->_tmp10_;
		_data_->_tmp12_ = tuba_request_v2_new (_data_->_tmp11_, TUBA_REQUEST_V2_METHOD_PUT);
		_g_object_unref0 (_data_->req);
		_data_->req = _data_->_tmp12_;
		_g_free0 (_data_->_tmp11_);
		_data_->_tmp13_ = _data_->req;
		_data_->_tmp14_ = _data_->gen;
		_data_->_tmp15_ = json_generator_to_data (_data_->_tmp14_, NULL);
		_data_->_tmp16_ = _data_->_tmp15_;
		_data_->_tmp18_ = 0;
		_data_->_tmp17_ = string_get_data (_data_->_tmp16_, &_data_->_tmp18_);
		_data_->_tmp17__length1 = _data_->_tmp18_;
		_data_->_tmp19_ = _data_->_tmp17_;
		_data_->_tmp19__length1 = _data_->_tmp17__length1;
		_data_->_tmp20_ = (_data_->_tmp19_ != NULL) ? _vala_array_dup44 (_data_->_tmp19_, _data_->_tmp19__length1) : _data_->_tmp19_;
		_data_->_tmp20__length1 = _data_->_tmp19__length1;
		_data_->_tmp21_ = g_bytes_new_take (_data_->_tmp20_, _data_->_tmp20__length1);
		_data_->_tmp22_ = _data_->_tmp21_;
		tuba_request_v2_set_body (_data_->_tmp13_, "application/json", _data_->_tmp22_);
		_g_bytes_unref0 (_data_->_tmp22_);
		_g_free0 (_data_->_tmp16_);
		_g_object_unref0 (_data_->gen);
		__vala_JsonNode_free0 (_data_->node);
	} else {
		_data_->_tmp23_ = json_builder_new ();
		_data_->builder = _data_->_tmp23_;
		_data_->_tmp24_ = _data_->builder;
		json_builder_begin_object (_data_->_tmp24_);
		_data_->_tmp25_ = _data_->builder;
		json_builder_set_member_name (_data_->_tmp25_, "description");
		_data_->_tmp26_ = _data_->builder;
		json_builder_add_null_value (_data_->_tmp26_);
		_data_->_tmp27_ = _data_->builder;
		json_builder_set_member_name (_data_->_tmp27_, "sensitive");
		_data_->_tmp28_ = _data_->builder;
		json_builder_add_null_value (_data_->_tmp28_);
		_data_->_tmp29_ = _data_->builder;
		json_builder_set_member_name (_data_->_tmp29_, "filename");
		_data_->_tmp30_ = _data_->builder;
		json_builder_add_string_value (_data_->_tmp30_, _data_->new_name);
		_data_->_tmp31_ = _data_->builder;
		json_builder_end_object (_data_->_tmp31_);
		_data_->_tmp32_ = tuba_views_drive_item_widget_get_item_id (_data_->self);
		_data_->_tmp33_ = _data_->_tmp32_;
		_data_->_tmp34_ = string_to_string (_data_->_tmp33_);
		_data_->_tmp35_ = g_strconcat ("/api/iceshrimp/drive/", _data_->_tmp34_, NULL);
		_data_->_tmp36_ = _data_->_tmp35_;
		_data_->_tmp37_ = tuba_request_v2_new (_data_->_tmp36_, TUBA_REQUEST_V2_METHOD_PATCH);
		_g_object_unref0 (_data_->req);
		_data_->req = _data_->_tmp37_;
		_g_free0 (_data_->_tmp36_);
		_data_->_tmp38_ = _data_->req;
		_data_->_tmp39_ = _data_->builder;
		tuba_request_v2_set_body_from_json (_data_->_tmp38_, _data_->_tmp39_);
		_g_object_unref0 (_data_->builder);
	}
	_data_->_tmp40_ = _data_->req;
	_data_->_tmp41_ = tuba_accounts;
	_data_->_tmp42_ = tuba_account_store_get_active (_data_->_tmp41_);
	_data_->_tmp43_ = _data_->_tmp42_;
	tuba_request_v2_set_account (_data_->_tmp40_, _data_->_tmp43_);
	_data_->_tmp44_ = _data_->req;
	_data_->_tmp45_ = tuba_accounts;
	_data_->_tmp46_ = tuba_account_store_get_active (_data_->_tmp45_);
	_data_->_tmp47_ = _data_->_tmp46_;
	_data_->_tmp48_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_data_->_tmp47_);
	_data_->_tmp49_ = _data_->_tmp48_;
	tuba_request_v2_set_force_token (_data_->_tmp44_, _data_->_tmp49_);
	{
		_data_->_tmp50_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp50_, tuba_views_drive_item_widget_on_rename_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp51_ = tuba_request_v2_exec_finish (_data_->_tmp50_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp52_ = _data_->_tmp51_;
		_g_object_unref0 (_data_->_tmp52_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		tuba_views_drive_item_widget_set_filename (_data_->self, _data_->new_name);
		_data_->_tmp53_ = tuba_views_drive_item_widget_get_folder (_data_->self);
		_data_->_tmp54_ = _data_->_tmp53_;
		if (_data_->_tmp54_) {
			_data_->_tmp55_ = tuba_views_drive_item_widget_get_item (_data_->self);
			_data_->_tmp56_ = _data_->_tmp55_;
			_data_->_tmp57_ = tuba_views_drive_item_get_folder (_data_->_tmp56_);
			_data_->_tmp58_ = _data_->_tmp57_;
			tuba_api_iceshrimp_folder_set_name (_data_->_tmp58_, _data_->new_name);
		} else {
			_data_->_tmp59_ = tuba_views_drive_item_widget_get_item (_data_->self);
			_data_->_tmp60_ = _data_->_tmp59_;
			_data_->_tmp61_ = tuba_views_drive_item_get_file (_data_->_tmp60_);
			_data_->_tmp62_ = _data_->_tmp61_;
			tuba_api_iceshrimp_file_set_filename (_data_->_tmp62_, _data_->new_name);
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp63_ = tuba_app;
		_data_->_tmp64_ = tuba_views_drive_item_widget_get_filename (_data_->self);
		_data_->_tmp65_ = _data_->_tmp64_;
		_data_->_tmp66_ = g_markup_escape_text (_data_->_tmp65_, (gssize) -1);
		_data_->_tmp67_ = _data_->_tmp66_;
		_data_->_tmp68_ = _data_->e;
		_data_->_tmp69_ = _data_->_tmp68_->message;
		_data_->_tmp70_ = g_strdup_printf (_ ("Couldn't rename '%s': %s"), _data_->_tmp67_, _data_->_tmp69_);
		_data_->_tmp71_ = _data_->_tmp70_;
		g_signal_emit_by_name (_data_->_tmp63_, "toast", _data_->_tmp71_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp71_);
		_g_free0 (_data_->_tmp67_);
		_data_->_tmp73_ = tuba_views_drive_item_widget_get_folder (_data_->self);
		_data_->_tmp74_ = _data_->_tmp73_;
		if (_data_->_tmp74_) {
			_data_->_tmp72_ = "folder";
		} else {
			_data_->_tmp72_ = "file";
		}
		_data_->_tmp75_ = string_to_string (_data_->_tmp72_);
		_data_->_tmp76_ = tuba_views_drive_item_widget_get_filename (_data_->self);
		_data_->_tmp77_ = _data_->_tmp76_;
		_data_->_tmp78_ = string_to_string (_data_->_tmp77_);
		_data_->_tmp79_ = string_to_string (_data_->new_name);
		_data_->_tmp80_ = _data_->e;
		_data_->_tmp81_ = g_strdup_printf ("%i", _data_->_tmp80_->code);
		_data_->_tmp82_ = _data_->_tmp81_;
		_data_->_tmp83_ = _data_->e;
		_data_->_tmp84_ = _data_->_tmp83_->message;
		_data_->_tmp85_ = string_to_string (_data_->_tmp84_);
		_data_->_tmp86_ = g_strconcat ("Couldn't rename ", _data_->_tmp75_, " '", _data_->_tmp78_, "' to '", _data_->_tmp79_, "': ", _data_->_tmp82_, " ", _data_->_tmp85_, NULL);
		_data_->_tmp87_ = _data_->_tmp86_;
		g_warning ("Drive.vala:521: %s", _data_->_tmp87_);
		_g_free0 (_data_->_tmp87_);
		_g_free0 (_data_->_tmp82_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	tuba_views_drive_item_widget_set_working (_data_->self, FALSE);
	_g_object_unref0 (_data_->req);
	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
tuba_views_drive_item_widget_on_long_press (TubaViewsDriveItemWidget* self,
                                            gdouble x,
                                            gdouble y)
{
	g_return_if_fail (self != NULL);
	tuba_views_drive_item_widget_on_secondary_click (self, 1, x, y);
}

static void
tuba_views_drive_item_widget_on_secondary_click (TubaViewsDriveItemWidget* self,
                                                 gint n_press,
                                                 gdouble x,
                                                 gdouble y)
{
	gboolean _tmp0_;
	GtkGestureClick* _tmp1_;
	GtkGestureLongPress* _tmp2_;
	TubaApplication* _tmp3_;
	TubaDialogsMainWindow* _tmp4_;
	TubaDialogsMainWindow* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	GdkRectangle rectangle = {0};
	GdkRectangle _tmp8_ = {0};
	GtkPopoverMenu* _tmp9_;
	GdkRectangle _tmp10_;
	GtkPopoverMenu* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_working;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->priv->gesture_click_controller;
	gtk_gesture_set_state ((GtkGesture*) _tmp1_, GTK_EVENT_SEQUENCE_CLAIMED);
	_tmp2_ = self->priv->gesture_lp_controller;
	gtk_gesture_set_state ((GtkGesture*) _tmp2_, GTK_EVENT_SEQUENCE_CLAIMED);
	_tmp3_ = tuba_app;
	_tmp4_ = tuba_application_get_main_window (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_dialogs_main_window_get_is_media_viewer_visible (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_) {
		return;
	}
	_tmp8_.x = (gint) x;
	_tmp8_.y = (gint) y;
	_tmp8_.width = 0;
	_tmp8_.height = 0;
	rectangle = _tmp8_;
	_tmp9_ = self->priv->context_menu;
	_tmp10_ = rectangle;
	gtk_popover_set_pointing_to ((GtkPopover*) _tmp9_, &_tmp10_);
	_tmp11_ = self->priv->context_menu;
	gtk_popover_popup ((GtkPopover*) _tmp11_);
}

static void
tuba_views_drive_item_widget_on_primary_click_pressed (TubaViewsDriveItemWidget* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_PRESSED_SIGNAL], 0, FALSE);
}

static void
tuba_views_drive_item_widget_on_primary_click_released (TubaViewsDriveItemWidget* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_PRESSED_SIGNAL], 0, TRUE);
}

void
tuba_views_drive_item_widget_populate (TubaViewsDriveItemWidget* self,
                                       TubaViewsDriveItem* item)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	tuba_views_drive_item_widget_set_item (self, item);
}

void
tuba_views_drive_item_widget_update_folder_color (TubaViewsDriveItemWidget* self)
{
	AdwStyleManager* adw_manager = NULL;
	AdwStyleManager* _tmp0_;
	AdwStyleManager* _tmp1_;
	gchar* color = NULL;
	gchar* _tmp2_;
	AdwStyleManager* _tmp3_;
	GtkImage* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp0_ = adw_style_manager_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	adw_manager = _tmp1_;
	_tmp2_ = g_strdup ("blue");
	color = _tmp2_;
	_tmp3_ = adw_manager;
	if (adw_style_manager_get_system_supports_accent_colors (_tmp3_)) {
		AdwStyleManager* _tmp4_;
		_tmp4_ = adw_manager;
		switch (adw_style_manager_get_accent_color (_tmp4_)) {
			case ADW_ACCENT_COLOR_YELLOW:
			{
				gchar* _tmp5_;
				_tmp5_ = g_strdup ("yellow");
				_g_free0 (color);
				color = _tmp5_;
				break;
			}
			case ADW_ACCENT_COLOR_TEAL:
			{
				gchar* _tmp6_;
				_tmp6_ = g_strdup ("teal");
				_g_free0 (color);
				color = _tmp6_;
				break;
			}
			case ADW_ACCENT_COLOR_PURPLE:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup ("purple");
				_g_free0 (color);
				color = _tmp7_;
				break;
			}
			case ADW_ACCENT_COLOR_RED:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup ("red");
				_g_free0 (color);
				color = _tmp8_;
				break;
			}
			case ADW_ACCENT_COLOR_GREEN:
			{
				gchar* _tmp9_;
				_tmp9_ = g_strdup ("green");
				_g_free0 (color);
				color = _tmp9_;
				break;
			}
			case ADW_ACCENT_COLOR_ORANGE:
			{
				gchar* _tmp10_;
				_tmp10_ = g_strdup ("orange");
				_g_free0 (color);
				color = _tmp10_;
				break;
			}
			case ADW_ACCENT_COLOR_SLATE:
			{
				gchar* _tmp11_;
				_tmp11_ = g_strdup ("slate");
				_g_free0 (color);
				color = _tmp11_;
				break;
			}
			case ADW_ACCENT_COLOR_PINK:
			{
				gchar* _tmp12_;
				_tmp12_ = g_strdup ("pink");
				_g_free0 (color);
				color = _tmp12_;
				break;
			}
			default:
			{
				break;
			}
		}
	}
	_tmp13_ = self->priv->image;
	_tmp14_ = color;
	_tmp15_ = string_to_string (_tmp14_);
	_tmp16_ = g_strconcat ("/dev/geopjr/Tuba/icons/folders/", _tmp15_, ".svg", NULL);
	_tmp17_ = _tmp16_;
	g_object_set (_tmp13_, "resource", _tmp17_, NULL);
	_g_free0 (_tmp17_);
	_g_free0 (color);
	_g_object_unref0 (adw_manager);
}

static void
tuba_views_drive_item_widget_on_thumbnail_loaded (TubaViewsDriveItemWidget* self,
                                                  GdkPaintable* data)
{
	g_return_if_fail (self != NULL);
	if (data != NULL) {
		GtkImage* _tmp0_;
		_tmp0_ = self->priv->image;
		g_object_set (_tmp0_, "paintable", data, NULL);
	}
}

TubaViewsDriveItemWidget*
tuba_views_drive_item_widget_construct (GType object_type)
{
	TubaViewsDriveItemWidget * self = NULL;
	self = (TubaViewsDriveItemWidget*) g_object_new (object_type, NULL);
	return self;
}

TubaViewsDriveItemWidget*
tuba_views_drive_item_widget_new (void)
{
	return tuba_views_drive_item_widget_construct (TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET);
}

gboolean
tuba_views_drive_item_widget_get_working (TubaViewsDriveItemWidget* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_working;
	return result;
}

void
tuba_views_drive_item_widget_set_working (TubaViewsDriveItemWidget* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_drive_item_widget_get_working (self);
	if (old_value != value) {
		self->priv->_working = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_WORKING_PROPERTY]);
	}
}

gboolean
tuba_views_drive_item_widget_get_folder (TubaViewsDriveItemWidget* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	TubaViewsDriveItem* _tmp1_;
	TubaViewsDriveItem* _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = tuba_views_drive_item_widget_get_item (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		_tmp0_ = FALSE;
	} else {
		TubaViewsDriveItem* _tmp3_;
		TubaViewsDriveItem* _tmp4_;
		TubaAPIIceshrimpFolder* _tmp5_;
		TubaAPIIceshrimpFolder* _tmp6_;
		_tmp3_ = tuba_views_drive_item_widget_get_item (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = tuba_views_drive_item_get_folder (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ != NULL;
	}
	result = _tmp0_;
	return result;
}

const gchar*
tuba_views_drive_item_widget_get_filename (TubaViewsDriveItemWidget* self)
{
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	TubaViewsDriveItem* _tmp1_;
	TubaViewsDriveItem* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = tuba_views_drive_item_widget_get_item (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		_tmp0_ = "";
	} else {
		const gchar* _tmp3_ = NULL;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = tuba_views_drive_item_widget_get_folder (self);
		_tmp5_ = _tmp4_;
		if (_tmp5_) {
			TubaViewsDriveItem* _tmp6_;
			TubaViewsDriveItem* _tmp7_;
			TubaAPIIceshrimpFolder* _tmp8_;
			TubaAPIIceshrimpFolder* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			_tmp6_ = tuba_views_drive_item_widget_get_item (self);
			_tmp7_ = _tmp6_;
			_tmp8_ = tuba_views_drive_item_get_folder (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = tuba_api_iceshrimp_folder_get_name (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp3_ = _tmp11_;
		} else {
			TubaViewsDriveItem* _tmp12_;
			TubaViewsDriveItem* _tmp13_;
			TubaAPIIceshrimpFile* _tmp14_;
			TubaAPIIceshrimpFile* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			_tmp12_ = tuba_views_drive_item_widget_get_item (self);
			_tmp13_ = _tmp12_;
			_tmp14_ = tuba_views_drive_item_get_file (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = tuba_api_iceshrimp_file_get_filename (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp3_ = _tmp17_;
		}
		_tmp0_ = _tmp3_;
	}
	result = _tmp0_;
	return result;
}

void
tuba_views_drive_item_widget_set_filename (TubaViewsDriveItemWidget* self,
                                           const gchar* value)
{
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->label;
	_tmp1_ = self->priv->label;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, value);
	gtk_label_set_label (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILENAME_PROPERTY]);
}

const gchar*
tuba_views_drive_item_widget_get_item_id (TubaViewsDriveItemWidget* self)
{
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	TubaViewsDriveItem* _tmp1_;
	TubaViewsDriveItem* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = tuba_views_drive_item_widget_get_item (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		_tmp0_ = "";
	} else {
		const gchar* _tmp3_ = NULL;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = tuba_views_drive_item_widget_get_folder (self);
		_tmp5_ = _tmp4_;
		if (_tmp5_) {
			TubaViewsDriveItem* _tmp6_;
			TubaViewsDriveItem* _tmp7_;
			TubaAPIIceshrimpFolder* _tmp8_;
			TubaAPIIceshrimpFolder* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			_tmp6_ = tuba_views_drive_item_widget_get_item (self);
			_tmp7_ = _tmp6_;
			_tmp8_ = tuba_views_drive_item_get_folder (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = tuba_api_iceshrimp_folder_get_id (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp3_ = _tmp11_;
		} else {
			TubaViewsDriveItem* _tmp12_;
			TubaViewsDriveItem* _tmp13_;
			TubaAPIIceshrimpFile* _tmp14_;
			TubaAPIIceshrimpFile* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			_tmp12_ = tuba_views_drive_item_widget_get_item (self);
			_tmp13_ = _tmp12_;
			_tmp14_ = tuba_views_drive_item_get_file (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = tuba_api_iceshrimp_file_get_id (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp3_ = _tmp17_;
		}
		_tmp0_ = _tmp3_;
	}
	result = _tmp0_;
	return result;
}

TubaViewsDriveItem*
tuba_views_drive_item_widget_get_item (TubaViewsDriveItemWidget* self)
{
	TubaViewsDriveItem* result;
	TubaViewsDriveItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_item;
	result = _tmp0_;
	return result;
}

static void
_tuba_views_drive_item_widget_update_folder_color_g_object_notify (GObject* _sender,
                                                                   GParamSpec* pspec,
                                                                   gpointer self)
{
	tuba_views_drive_item_widget_update_folder_color ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_thumbnail_loaded_tuba_helper_image_on_item_changed_fn (GdkPaintable* data,
                                                                                        gpointer self)
{
	tuba_views_drive_item_widget_on_thumbnail_loaded ((TubaViewsDriveItemWidget*) self, data);
}

static void
tuba_views_drive_item_widget_set_item (TubaViewsDriveItemWidget* self,
                                       TubaViewsDriveItem* value)
{
	TubaViewsDriveItem* _tmp0_;
	TubaAPIIceshrimpFolder* _tmp1_;
	TubaAPIIceshrimpFolder* _tmp2_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	g_return_if_fail (self != NULL);
	self->priv->_item = value;
	_tmp0_ = self->priv->_item;
	_tmp1_ = tuba_views_drive_item_get_folder (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		if (self->priv->last_style_manager_notify == ((gulong) 0)) {
			AdwStyleManager* _tmp3_;
			gulong _tmp4_;
			_tmp3_ = adw_style_manager_get_default ();
			_tmp4_ = g_signal_connect_object ((GObject*) _tmp3_, "notify::accent-color-rgba", (GCallback) _tuba_views_drive_item_widget_update_folder_color_g_object_notify, self, 0);
			self->priv->last_style_manager_notify = _tmp4_;
			tuba_views_drive_item_widget_update_folder_color (self);
		}
	} else {
		TubaViewsDriveItem* _tmp5_;
		TubaAPIIceshrimpFile* _tmp6_;
		TubaAPIIceshrimpFile* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp5_ = self->priv->_item;
		_tmp6_ = tuba_views_drive_item_get_file (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = tuba_api_iceshrimp_file_get_contentType (_tmp7_);
		_tmp9_ = _tmp8_;
		if (g_str_has_prefix (_tmp9_, "image/")) {
			TubaViewsDriveItem* _tmp10_;
			TubaAPIIceshrimpFile* _tmp11_;
			TubaAPIIceshrimpFile* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			_tmp10_ = self->priv->_item;
			_tmp11_ = tuba_views_drive_item_get_file (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = tuba_api_iceshrimp_file_get_thumbnailUrl (_tmp12_);
			_tmp14_ = _tmp13_;
			tuba_helper_image_request_paintable (_tmp14_, NULL, FALSE, _tuba_views_drive_item_widget_on_thumbnail_loaded_tuba_helper_image_on_item_changed_fn, g_object_ref (self), g_object_unref, NULL);
		}
	}
	_tmp15_ = tuba_views_drive_item_widget_get_filename (self);
	_tmp16_ = _tmp15_;
	tuba_views_drive_item_widget_set_filename (self, _tmp16_);
	tuba_views_drive_item_widget_update_actions (self);
	tuba_views_drive_item_widget_update_indicators (self);
	tuba_views_drive_item_widget_update_drop_target (self, FALSE);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_PROPERTY]);
}

static void
g_cclosure_user_marshal_VOID__STRING_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_OBJECT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static GVariant*
_variant_new15 (gboolean value)
{
	return g_variant_ref_sink (g_variant_new_boolean (value));
}

static void
_tuba_views_drive_item_widget_on_open_g_simple_action_activate (GSimpleAction* _sender,
                                                                GVariant* parameter,
                                                                gpointer self)
{
	tuba_views_drive_item_widget_on_open ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_copy_g_simple_action_activate (GSimpleAction* _sender,
                                                                GVariant* parameter,
                                                                gpointer self)
{
	tuba_views_drive_item_widget_on_copy ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_ms_change_g_simple_action_change_state (GSimpleAction* _sender,
                                                                         GVariant* value,
                                                                         gpointer self)
{
	tuba_views_drive_item_widget_on_ms_change ((TubaViewsDriveItemWidget*) self, value);
}

static void
_tuba_views_drive_item_widget_on_alt_text_g_simple_action_activate (GSimpleAction* _sender,
                                                                    GVariant* parameter,
                                                                    gpointer self)
{
	tuba_views_drive_item_widget_on_alt_text ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_rename_g_simple_action_activate (GSimpleAction* _sender,
                                                                  GVariant* parameter,
                                                                  gpointer self)
{
	tuba_views_drive_item_widget_on_rename ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_delete_g_simple_action_activate (GSimpleAction* _sender,
                                                                  GVariant* parameter,
                                                                  gpointer self)
{
	tuba_views_drive_item_widget_on_delete ((TubaViewsDriveItemWidget*) self);
}

static GVariant*
_variant_new16 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new17 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new18 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static void
_tuba_views_drive_item_widget_on_primary_click_pressed_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                                  gint n_press,
                                                                                  gdouble x,
                                                                                  gdouble y,
                                                                                  gpointer self)
{
	tuba_views_drive_item_widget_on_primary_click_pressed ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_primary_click_released_gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                                    gint n_press,
                                                                                    gdouble x,
                                                                                    gdouble y,
                                                                                    gpointer self)
{
	tuba_views_drive_item_widget_on_primary_click_released ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_primary_click_released_gtk_gesture_click_stopped (GtkGestureClick* _sender,
                                                                                   gpointer self)
{
	tuba_views_drive_item_widget_on_primary_click_released ((TubaViewsDriveItemWidget*) self);
}

static void
_tuba_views_drive_item_widget_on_secondary_click_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                            gint n_press,
                                                                            gdouble x,
                                                                            gdouble y,
                                                                            gpointer self)
{
	tuba_views_drive_item_widget_on_secondary_click ((TubaViewsDriveItemWidget*) self, n_press, x, y);
}

static void
_tuba_views_drive_item_widget_on_long_press_gtk_gesture_long_press_pressed (GtkGestureLongPress* _sender,
                                                                            gdouble x,
                                                                            gdouble y,
                                                                            gpointer self)
{
	tuba_views_drive_item_widget_on_long_press ((TubaViewsDriveItemWidget*) self, x, y);
}

static GdkContentProvider*
_tuba_views_drive_item_widget_on_drag_prepare_gtk_drag_source_prepare (GtkDragSource* _sender,
                                                                       gdouble x,
                                                                       gdouble y,
                                                                       gpointer self)
{
	GdkContentProvider* result;
	result = tuba_views_drive_item_widget_on_drag_prepare ((TubaViewsDriveItemWidget*) self, x, y);
	return result;
}

static void
_tuba_views_drive_item_widget_on_drag_begin_gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                                                        GdkDrag* drag,
                                                                        gpointer self)
{
	tuba_views_drive_item_widget_on_drag_begin ((TubaViewsDriveItemWidget*) self, _sender, drag);
}

static void
_tuba_views_drive_item_widget_on_drag_end_gtk_drag_source_drag_end (GtkDragSource* _sender,
                                                                    GdkDrag* drag,
                                                                    gboolean delete_data,
                                                                    gpointer self)
{
	tuba_views_drive_item_widget_on_drag_end ((TubaViewsDriveItemWidget*) self, drag, delete_data);
}

static gboolean
_tuba_views_drive_item_widget_on_drag_cancel_gtk_drag_source_drag_cancel (GtkDragSource* _sender,
                                                                          GdkDrag* drag,
                                                                          GdkDragCancelReason reason,
                                                                          gpointer self)
{
	gboolean result;
	result = tuba_views_drive_item_widget_on_drag_cancel ((TubaViewsDriveItemWidget*) self, drag, reason);
	return result;
}

static gboolean
_tuba_views_drive_item_widget_on_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                            GValue* value,
                                                            gdouble x,
                                                            gdouble y,
                                                            gpointer self)
{
	gboolean result;
	result = tuba_views_drive_item_widget_on_drop ((TubaViewsDriveItemWidget*) self, _sender, value, x, y);
	return result;
}

static GObject *
tuba_views_drive_item_widget_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsDriveItemWidget * self;
	gint _tmp0_ = 0;
	GtkImage* _tmp1_ = NULL;
	GtkLabel* _tmp2_ = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	GtkBox* _tmp6_ = NULL;
	gchar* _tmp7_;
	GtkImage* _tmp8_ = NULL;
	GtkBox* _tmp9_;
	GtkImage* _tmp10_;
	gchar* _tmp11_;
	GtkImage* _tmp12_ = NULL;
	GtkBox* _tmp13_;
	GtkImage* _tmp14_;
	gchar* _tmp15_;
	GtkImage* _tmp16_ = NULL;
	GtkBox* _tmp17_;
	GtkImage* _tmp18_;
	GtkOverlay* overlay = NULL;
	GtkImage* _tmp19_;
	GtkWidget* _tmp20_;
	GtkOverlay* _tmp21_ = NULL;
	GtkOverlay* _tmp22_;
	GtkBox* _tmp23_;
	GtkOverlay* _tmp24_;
	GtkLabel* _tmp25_;
	GSimpleAction* open_action = NULL;
	GSimpleAction* _tmp26_;
	GSimpleAction* copy_link_action = NULL;
	GSimpleAction* _tmp27_;
	GVariant* _tmp28_;
	GSimpleAction* _tmp29_;
	GSimpleAction* alt_action = NULL;
	GSimpleAction* _tmp30_;
	GSimpleAction* rename_action = NULL;
	GSimpleAction* _tmp31_;
	GSimpleAction* _tmp32_;
	GSimpleAction* _tmp33_;
	GSimpleAction* _tmp34_;
	GSimpleAction* _tmp35_;
	GSimpleAction* _tmp36_;
	GSimpleAction* _tmp37_;
	GSimpleAction* _tmp38_;
	GSimpleAction* _tmp39_;
	GSimpleAction* _tmp40_;
	GSimpleAction* _tmp41_;
	GSimpleAction* _tmp42_;
	GSimpleAction* _tmp43_;
	GSimpleAction* _tmp44_;
	GSimpleAction** _tmp45_;
	GSimpleActionGroup* action_group = NULL;
	GSimpleActionGroup* _tmp46_;
	GSimpleActionGroup* _tmp47_;
	GSimpleAction* _tmp48_;
	GSimpleActionGroup* _tmp49_;
	GSimpleAction* _tmp50_;
	GSimpleActionGroup* _tmp51_;
	GSimpleAction* _tmp52_;
	GSimpleActionGroup* _tmp53_;
	GSimpleAction* _tmp54_;
	GSimpleActionGroup* _tmp55_;
	GSimpleAction* _tmp56_;
	GSimpleActionGroup* _tmp57_;
	GSimpleAction* _tmp58_;
	GSimpleActionGroup* _tmp59_;
	GMenu* menu_model = NULL;
	GMenu* _tmp60_;
	GMenu* open_menu = NULL;
	GMenu* _tmp61_;
	GMenu* _tmp62_;
	GMenuItem* copy_link_menu_item = NULL;
	GMenuItem* _tmp63_;
	GMenuItem* _tmp64_;
	GVariant* _tmp65_;
	GMenu* _tmp66_;
	GMenuItem* _tmp67_;
	GMenu* _tmp68_;
	GMenu* _tmp69_;
	GMenu* file_menu = NULL;
	GMenu* _tmp70_;
	GMenuItem* ms_menu_item = NULL;
	GMenuItem* _tmp71_;
	GMenuItem* _tmp72_;
	GVariant* _tmp73_;
	GMenu* _tmp74_;
	GMenuItem* _tmp75_;
	GMenuItem* alt_menu_item = NULL;
	GMenuItem* _tmp76_;
	GMenuItem* _tmp77_;
	GVariant* _tmp78_;
	GMenu* _tmp79_;
	GMenuItem* _tmp80_;
	GMenu* _tmp81_;
	GMenu* _tmp82_;
	GMenu* item_menu = NULL;
	GMenu* _tmp83_;
	GMenu* _tmp84_;
	GMenu* _tmp85_;
	GMenu* _tmp86_;
	GMenu* _tmp87_;
	GMenu* _tmp88_;
	GtkPopoverMenu* _tmp89_ = NULL;
	GtkPopoverMenu* _tmp90_;
	GtkGestureClick* _tmp91_ = NULL;
	GtkGestureClick* _tmp92_ = NULL;
	GtkGestureLongPress* _tmp93_ = NULL;
	GtkGestureClick* _tmp94_;
	GtkEventController* _tmp95_;
	GtkGestureClick* _tmp96_;
	GtkEventController* _tmp97_;
	GtkGestureLongPress* _tmp98_;
	GtkEventController* _tmp99_;
	GtkGestureClick* _tmp100_;
	GtkGestureClick* _tmp101_;
	GtkGestureClick* _tmp102_;
	GtkGestureClick* _tmp103_;
	GtkGestureLongPress* _tmp104_;
	GtkDragSource* drag_source_controller = NULL;
	GtkDragSource* _tmp105_ = NULL;
	GtkDragSource* _tmp106_;
	GtkDragSource* _tmp107_;
	GtkDragSource* _tmp108_;
	GtkDragSource* _tmp109_;
	GtkDragSource* _tmp110_;
	GtkEventController* _tmp111_;
	GtkDropTarget* _tmp112_;
	GtkDropTarget* _tmp113_;
	GtkDropTarget* _tmp114_;
	GtkEventController* _tmp115_;
	parent_class = G_OBJECT_CLASS (tuba_views_drive_item_widget_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidget);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	gtk_box_set_spacing ((GtkBox*) self, 6);
	gtk_widget_set_margin_end ((GtkWidget*) self, 9);
	gtk_widget_set_margin_start ((GtkWidget*) self, 9);
	_tmp0_ = 96;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("tuba-paper-symbolic");
	gtk_image_set_icon_size (_tmp1_, GTK_ICON_SIZE_LARGE);
	g_object_set ((GtkWidget*) _tmp1_, "width-request", _tmp0_, NULL);
	g_object_set ((GtkWidget*) _tmp1_, "height-request", _tmp0_, NULL);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->image);
	self->priv->image = _tmp1_;
	_tmp2_ = (GtkLabel*) gtk_label_new ("");
	gtk_label_set_ellipsize (_tmp2_, PANGO_ELLIPSIZE_MIDDLE);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp2_;
	_tmp3_ = g_strdup ("osd");
	_tmp4_ = g_strdup ("indicator-box");
	_tmp5_ = g_new0 (gchar*, 2 + 1);
	_tmp5_[0] = _tmp3_;
	_tmp5_[1] = _tmp4_;
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, 6);
	gtk_widget_set_can_focus ((GtkWidget*) _tmp6_, FALSE);
	gtk_widget_set_focusable ((GtkWidget*) _tmp6_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp6_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, FALSE);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->indicator_box);
	self->priv->indicator_box = _tmp6_;
	_tmp7_ = g_strdup (_ ("Alternative Text"));
	_tmp8_ = (GtkImage*) gtk_image_new_from_icon_name ("document-edit-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp8_, _tmp7_);
	_g_free0 (_tmp7_);
	gtk_widget_set_visible ((GtkWidget*) _tmp8_, FALSE);
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->indicator_alt);
	self->priv->indicator_alt = _tmp8_;
	_tmp9_ = self->priv->indicator_box;
	_tmp10_ = self->priv->indicator_alt;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = g_strdup (_ ("Used by a Profile"));
	_tmp12_ = (GtkImage*) gtk_image_new_from_icon_name ("tuba-person-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp12_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp12_, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp12_, _tmp11_);
	_g_free0 (_tmp11_);
	gtk_widget_set_visible ((GtkWidget*) _tmp12_, FALSE);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->indicator_avi);
	self->priv->indicator_avi = _tmp12_;
	_tmp13_ = self->priv->indicator_box;
	_tmp14_ = self->priv->indicator_avi;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = g_strdup (_ ("Sensitive"));
	_tmp16_ = (GtkImage*) gtk_image_new_from_icon_name ("tuba-eye-not-looking-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp16_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp16_, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp16_, _tmp15_);
	_g_free0 (_tmp15_);
	gtk_widget_set_visible ((GtkWidget*) _tmp16_, FALSE);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->indicator_sensitive);
	self->priv->indicator_sensitive = _tmp16_;
	_tmp17_ = self->priv->indicator_box;
	_tmp18_ = self->priv->indicator_sensitive;
	gtk_box_append (_tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->image;
	_tmp20_ = _g_object_ref0 ((GtkWidget*) _tmp19_);
	_tmp21_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_overlay_set_child (_tmp21_, _tmp20_);
	_g_object_unref0 (_tmp20_);
	g_object_ref_sink (_tmp21_);
	overlay = _tmp21_;
	_tmp22_ = overlay;
	_tmp23_ = self->priv->indicator_box;
	gtk_overlay_add_overlay (_tmp22_, (GtkWidget*) _tmp23_);
	_tmp24_ = overlay;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp24_);
	_tmp25_ = self->priv->label;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp25_);
	_tmp26_ = g_simple_action_new ("open", NULL);
	open_action = _tmp26_;
	_tmp27_ = g_simple_action_new ("copy-link", NULL);
	copy_link_action = _tmp27_;
	_tmp28_ = _variant_new15 (FALSE);
	_tmp29_ = g_simple_action_new_stateful ("mark-as-sensitive", NULL, _tmp28_);
	_g_object_unref0 (self->priv->ms_action);
	self->priv->ms_action = _tmp29_;
	_g_variant_unref0 (_tmp28_);
	_tmp30_ = g_simple_action_new ("set-alt-text", NULL);
	alt_action = _tmp30_;
	_tmp31_ = g_simple_action_new ("rename", NULL);
	rename_action = _tmp31_;
	_tmp32_ = g_simple_action_new ("delete", NULL);
	_g_object_unref0 (self->priv->delete_action);
	self->priv->delete_action = _tmp32_;
	_tmp33_ = open_action;
	g_signal_connect_object (_tmp33_, "activate", (GCallback) _tuba_views_drive_item_widget_on_open_g_simple_action_activate, self, 0);
	_tmp34_ = copy_link_action;
	g_signal_connect_object (_tmp34_, "activate", (GCallback) _tuba_views_drive_item_widget_on_copy_g_simple_action_activate, self, 0);
	_tmp35_ = self->priv->ms_action;
	g_signal_connect_object (_tmp35_, "change-state", (GCallback) _tuba_views_drive_item_widget_on_ms_change_g_simple_action_change_state, self, 0);
	_tmp36_ = alt_action;
	g_signal_connect_object (_tmp36_, "activate", (GCallback) _tuba_views_drive_item_widget_on_alt_text_g_simple_action_activate, self, 0);
	_tmp37_ = rename_action;
	g_signal_connect_object (_tmp37_, "activate", (GCallback) _tuba_views_drive_item_widget_on_rename_g_simple_action_activate, self, 0);
	_tmp38_ = self->priv->delete_action;
	g_signal_connect_object (_tmp38_, "activate", (GCallback) _tuba_views_drive_item_widget_on_delete_g_simple_action_activate, self, 0);
	_tmp39_ = copy_link_action;
	_tmp40_ = _g_object_ref0 (_tmp39_);
	_tmp41_ = self->priv->ms_action;
	_tmp42_ = _g_object_ref0 (_tmp41_);
	_tmp43_ = alt_action;
	_tmp44_ = _g_object_ref0 (_tmp43_);
	_tmp45_ = g_new0 (GSimpleAction*, 3 + 1);
	_tmp45_[0] = _tmp40_;
	_tmp45_[1] = _tmp42_;
	_tmp45_[2] = _tmp44_;
	self->priv->file_only_actions = (_vala_array_free (self->priv->file_only_actions, self->priv->file_only_actions_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->file_only_actions = _tmp45_;
	self->priv->file_only_actions_length1 = 3;
	self->priv->_file_only_actions_size_ = self->priv->file_only_actions_length1;
	_tmp46_ = g_simple_action_group_new ();
	action_group = _tmp46_;
	_tmp47_ = action_group;
	_tmp48_ = open_action;
	g_action_map_add_action ((GActionMap*) _tmp47_, (GAction*) _tmp48_);
	_tmp49_ = action_group;
	_tmp50_ = copy_link_action;
	g_action_map_add_action ((GActionMap*) _tmp49_, (GAction*) _tmp50_);
	_tmp51_ = action_group;
	_tmp52_ = self->priv->ms_action;
	g_action_map_add_action ((GActionMap*) _tmp51_, (GAction*) _tmp52_);
	_tmp53_ = action_group;
	_tmp54_ = alt_action;
	g_action_map_add_action ((GActionMap*) _tmp53_, (GAction*) _tmp54_);
	_tmp55_ = action_group;
	_tmp56_ = rename_action;
	g_action_map_add_action ((GActionMap*) _tmp55_, (GAction*) _tmp56_);
	_tmp57_ = action_group;
	_tmp58_ = self->priv->delete_action;
	g_action_map_add_action ((GActionMap*) _tmp57_, (GAction*) _tmp58_);
	_tmp59_ = action_group;
	gtk_widget_insert_action_group ((GtkWidget*) self, "driveitem", (GActionGroup*) _tmp59_);
	_tmp60_ = g_menu_new ();
	menu_model = _tmp60_;
	_tmp61_ = g_menu_new ();
	open_menu = _tmp61_;
	_tmp62_ = open_menu;
	g_menu_append (_tmp62_, _ ("Open"), "driveitem.open");
	_tmp63_ = g_menu_item_new (_ ("Copy Link"), "driveitem.copy-link");
	copy_link_menu_item = _tmp63_;
	_tmp64_ = copy_link_menu_item;
	_tmp65_ = _variant_new16 ("action-disabled");
	g_menu_item_set_attribute_value (_tmp64_, "hidden-when", _tmp65_);
	_g_variant_unref0 (_tmp65_);
	_tmp66_ = open_menu;
	_tmp67_ = copy_link_menu_item;
	g_menu_append_item (_tmp66_, _tmp67_);
	_tmp68_ = menu_model;
	_tmp69_ = open_menu;
	g_menu_append_section (_tmp68_, NULL, (GMenuModel*) _tmp69_);
	_tmp70_ = g_menu_new ();
	file_menu = _tmp70_;
	_tmp71_ = g_menu_item_new (_ ("Mark as Sensitive"), "driveitem.mark-as-sensitive");
	ms_menu_item = _tmp71_;
	_tmp72_ = ms_menu_item;
	_tmp73_ = _variant_new17 ("action-disabled");
	g_menu_item_set_attribute_value (_tmp72_, "hidden-when", _tmp73_);
	_g_variant_unref0 (_tmp73_);
	_tmp74_ = file_menu;
	_tmp75_ = ms_menu_item;
	g_menu_append_item (_tmp74_, _tmp75_);
	_tmp76_ = g_menu_item_new (_ ("Edit Alt Text"), "driveitem.set-alt-text");
	alt_menu_item = _tmp76_;
	_tmp77_ = alt_menu_item;
	_tmp78_ = _variant_new18 ("action-disabled");
	g_menu_item_set_attribute_value (_tmp77_, "hidden-when", _tmp78_);
	_g_variant_unref0 (_tmp78_);
	_tmp79_ = file_menu;
	_tmp80_ = alt_menu_item;
	g_menu_append_item (_tmp79_, _tmp80_);
	_tmp81_ = menu_model;
	_tmp82_ = file_menu;
	g_menu_append_section (_tmp81_, NULL, (GMenuModel*) _tmp82_);
	_tmp83_ = g_menu_new ();
	item_menu = _tmp83_;
	_tmp84_ = item_menu;
	g_menu_append (_tmp84_, _ ("Rename"), "driveitem.rename");
	_tmp85_ = item_menu;
	g_menu_append (_tmp85_, _ ("Delete"), "driveitem.delete");
	_tmp86_ = menu_model;
	_tmp87_ = item_menu;
	g_menu_append_section (_tmp86_, NULL, (GMenuModel*) _tmp87_);
	_tmp88_ = menu_model;
	_tmp89_ = (GtkPopoverMenu*) gtk_popover_menu_new_from_model ((GMenuModel*) _tmp88_);
	gtk_popover_set_has_arrow ((GtkPopover*) _tmp89_, FALSE);
	gtk_widget_set_halign ((GtkWidget*) _tmp89_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp89_);
	_g_object_unref0 (self->priv->context_menu);
	self->priv->context_menu = _tmp89_;
	_tmp90_ = self->priv->context_menu;
	gtk_widget_set_parent ((GtkWidget*) _tmp90_, (GtkWidget*) self);
	_tmp91_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp91_, (guint) GDK_BUTTON_PRIMARY);
	_g_object_unref0 (self->priv->gesture_click_controller_grab);
	self->priv->gesture_click_controller_grab = _tmp91_;
	_tmp92_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp92_, (guint) GDK_BUTTON_SECONDARY);
	_g_object_unref0 (self->priv->gesture_click_controller);
	self->priv->gesture_click_controller = _tmp92_;
	_tmp93_ = (GtkGestureLongPress*) gtk_gesture_long_press_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp93_, (guint) GDK_BUTTON_PRIMARY);
	gtk_gesture_single_set_touch_only ((GtkGestureSingle*) _tmp93_, TRUE);
	_g_object_unref0 (self->priv->gesture_lp_controller);
	self->priv->gesture_lp_controller = _tmp93_;
	_tmp94_ = self->priv->gesture_click_controller_grab;
	_tmp95_ = _g_object_ref0 ((GtkEventController*) _tmp94_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp95_);
	_tmp96_ = self->priv->gesture_click_controller;
	_tmp97_ = _g_object_ref0 ((GtkEventController*) _tmp96_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp97_);
	_tmp98_ = self->priv->gesture_lp_controller;
	_tmp99_ = _g_object_ref0 ((GtkEventController*) _tmp98_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp99_);
	_tmp100_ = self->priv->gesture_click_controller_grab;
	g_signal_connect_object (_tmp100_, "pressed", (GCallback) _tuba_views_drive_item_widget_on_primary_click_pressed_gtk_gesture_click_pressed, self, 0);
	_tmp101_ = self->priv->gesture_click_controller_grab;
	g_signal_connect_object (_tmp101_, "released", (GCallback) _tuba_views_drive_item_widget_on_primary_click_released_gtk_gesture_click_released, self, 0);
	_tmp102_ = self->priv->gesture_click_controller_grab;
	g_signal_connect_object (_tmp102_, "stopped", (GCallback) _tuba_views_drive_item_widget_on_primary_click_released_gtk_gesture_click_stopped, self, 0);
	_tmp103_ = self->priv->gesture_click_controller;
	g_signal_connect_object (_tmp103_, "pressed", (GCallback) _tuba_views_drive_item_widget_on_secondary_click_gtk_gesture_click_pressed, self, 0);
	_tmp104_ = self->priv->gesture_lp_controller;
	g_signal_connect_object (_tmp104_, "pressed", (GCallback) _tuba_views_drive_item_widget_on_long_press_gtk_gesture_long_press_pressed, self, 0);
	_tmp105_ = gtk_drag_source_new ();
	gtk_drag_source_set_actions (_tmp105_, GDK_ACTION_MOVE);
	drag_source_controller = _tmp105_;
	_tmp106_ = drag_source_controller;
	g_signal_connect_object (_tmp106_, "prepare", (GCallback) _tuba_views_drive_item_widget_on_drag_prepare_gtk_drag_source_prepare, self, 0);
	_tmp107_ = drag_source_controller;
	g_signal_connect_object (_tmp107_, "drag-begin", (GCallback) _tuba_views_drive_item_widget_on_drag_begin_gtk_drag_source_drag_begin, self, 0);
	_tmp108_ = drag_source_controller;
	g_signal_connect_object (_tmp108_, "drag-end", (GCallback) _tuba_views_drive_item_widget_on_drag_end_gtk_drag_source_drag_end, self, 0);
	_tmp109_ = drag_source_controller;
	g_signal_connect_object (_tmp109_, "drag-cancel", (GCallback) _tuba_views_drive_item_widget_on_drag_cancel_gtk_drag_source_drag_cancel, self, 0);
	_tmp110_ = drag_source_controller;
	_tmp111_ = _g_object_ref0 ((GtkEventController*) _tmp110_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp111_);
	_tmp112_ = gtk_drop_target_new (TUBA_VIEWS_DRIVE_TYPE_ITEM, GDK_ACTION_MOVE);
	_g_object_unref0 (self->priv->drop_target_controller);
	self->priv->drop_target_controller = _tmp112_;
	_tmp113_ = self->priv->drop_target_controller;
	g_signal_connect_object (_tmp113_, "drop", (GCallback) _tuba_views_drive_item_widget_on_drop_gtk_drop_target_drop, self, 0);
	_tmp114_ = self->priv->drop_target_controller;
	_tmp115_ = _g_object_ref0 ((GtkEventController*) _tmp114_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp115_);
	_g_object_unref0 (drag_source_controller);
	_g_object_unref0 (item_menu);
	_g_object_unref0 (alt_menu_item);
	_g_object_unref0 (ms_menu_item);
	_g_object_unref0 (file_menu);
	_g_object_unref0 (copy_link_menu_item);
	_g_object_unref0 (open_menu);
	_g_object_unref0 (menu_model);
	_g_object_unref0 (action_group);
	_g_object_unref0 (rename_action);
	_g_object_unref0 (alt_action);
	_g_object_unref0 (copy_link_action);
	_g_object_unref0 (open_action);
	_g_object_unref0 (overlay);
	return obj;
}

static void
tuba_views_drive_item_widget_class_init (TubaViewsDriveItemWidgetClass * klass,
                                         gpointer klass_data)
{
	tuba_views_drive_item_widget_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsDriveItemWidget_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_drive_item_widget_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_drive_item_widget_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_drive_item_widget_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_drive_item_widget_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ITEM_WIDGET_WORKING_PROPERTY, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_WORKING_PROPERTY] = g_param_spec_boolean ("working", "working", "working", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ITEM_WIDGET_FOLDER_PROPERTY, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_FOLDER_PROPERTY] = g_param_spec_boolean ("folder", "folder", "folder", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILENAME_PROPERTY, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILENAME_PROPERTY] = g_param_spec_string ("filename", "filename", "filename", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_ID_PROPERTY, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_ID_PROPERTY] = g_param_spec_string ("item-id", "item-id", "item-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_PROPERTY, tuba_views_drive_item_widget_properties[TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_PROPERTY] = g_param_spec_object ("item", "item", "item", TUBA_VIEWS_DRIVE_TYPE_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_REFRESH_SIGNAL] = g_signal_new ("refresh", TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_DELETE_ME_SIGNAL] = g_signal_new ("delete-me", TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_OPEN_ME_SIGNAL] = g_signal_new ("open-me", TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TUBA_VIEWS_DRIVE_TYPE_ITEM);
	tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILL_RESERVED_NAMES_SIGNAL] = g_signal_new ("fill-reserved-names", TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER);
	tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_PRESSED_SIGNAL] = g_signal_new ("pressed", TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	tuba_views_drive_item_widget_signals[TUBA_VIEWS_DRIVE_ITEM_WIDGET_MOVE_SIGNAL] = g_signal_new ("move", TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_OBJECT, G_TYPE_NONE, 2, G_TYPE_STRING, TUBA_VIEWS_DRIVE_TYPE_ITEM);
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "drive-item");
}

static void
tuba_views_drive_item_widget_instance_init (TubaViewsDriveItemWidget * self,
                                            gpointer klass)
{
	self->priv = tuba_views_drive_item_widget_get_instance_private (self);
	self->priv->_working = FALSE;
	self->priv->last_style_manager_notify = (gulong) 0;
	self->priv->_item = NULL;
	self->priv->rename_popover = NULL;
	self->priv->alt_popover = NULL;
	self->priv->drag_x = (gdouble) 0;
	self->priv->drag_y = (gdouble) 0;
}

static void
tuba_views_drive_item_widget_finalize (GObject * obj)
{
	TubaViewsDriveItemWidget * self;
	GtkPopoverMenu* _tmp0_;
	TubaViewsDriveEntryPopover* _tmp1_;
	TubaViewsDriveEntryPopover* _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidget);
	_tmp0_ = self->priv->context_menu;
	gtk_widget_unparent ((GtkWidget*) _tmp0_);
	_g_object_unref0 (self->priv->context_menu);
	self->priv->context_menu = NULL;
	_tmp1_ = self->priv->rename_popover;
	if (_tmp1_ != NULL) {
		TubaViewsDriveEntryPopover* _tmp2_;
		_tmp2_ = self->priv->rename_popover;
		gtk_widget_unparent ((GtkWidget*) _tmp2_);
		_g_object_unref0 (self->priv->rename_popover);
		self->priv->rename_popover = NULL;
	}
	_tmp3_ = self->priv->alt_popover;
	if (_tmp3_ != NULL) {
		TubaViewsDriveEntryPopover* _tmp4_;
		_tmp4_ = self->priv->alt_popover;
		gtk_widget_unparent ((GtkWidget*) _tmp4_);
		_g_object_unref0 (self->priv->alt_popover);
		self->priv->alt_popover = NULL;
	}
	tuba_views_drive_item_widget_cleanup (self);
	g_debug ("Drive.vala:60: Destroying DriveItemWidget");
	_g_object_unref0 (self->priv->image);
	_g_object_unref0 (self->priv->label);
	_g_object_unref0 (self->priv->context_menu);
	_g_object_unref0 (self->priv->gesture_click_controller_grab);
	_g_object_unref0 (self->priv->gesture_click_controller);
	_g_object_unref0 (self->priv->gesture_lp_controller);
	_g_object_unref0 (self->priv->rename_popover);
	_g_object_unref0 (self->priv->alt_popover);
	self->priv->file_only_actions = (_vala_array_free (self->priv->file_only_actions, self->priv->file_only_actions_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (self->priv->ms_action);
	_g_object_unref0 (self->priv->delete_action);
	_g_object_unref0 (self->priv->indicator_alt);
	_g_object_unref0 (self->priv->indicator_avi);
	_g_object_unref0 (self->priv->indicator_sensitive);
	_g_object_unref0 (self->priv->indicator_box);
	_g_object_unref0 (self->priv->drop_target_controller);
	G_OBJECT_CLASS (tuba_views_drive_item_widget_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_drive_item_widget_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsDriveItemWidgetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_drive_item_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsDriveItemWidget), 0, (GInstanceInitFunc) tuba_views_drive_item_widget_instance_init, NULL };
	GType tuba_views_drive_item_widget_type_id;
	tuba_views_drive_item_widget_type_id = g_type_register_static (gtk_box_get_type (), "TubaViewsDriveItemWidget", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsDriveItemWidget_private_offset = g_type_add_instance_private (tuba_views_drive_item_widget_type_id, sizeof (TubaViewsDriveItemWidgetPrivate));
	return tuba_views_drive_item_widget_type_id;
}

GType
tuba_views_drive_item_widget_get_type (void)
{
	static GType tuba_views_drive_item_widget_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_drive_item_widget_type_id__once)) {
		GType tuba_views_drive_item_widget_type_id;
		tuba_views_drive_item_widget_type_id = tuba_views_drive_item_widget_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_drive_item_widget_type_id__once, tuba_views_drive_item_widget_type_id);
	}
	return tuba_views_drive_item_widget_type_id__once;
}

static void
_vala_tuba_views_drive_item_widget_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	TubaViewsDriveItemWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidget);
	switch (property_id) {
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_WORKING_PROPERTY:
		g_value_set_boolean (value, tuba_views_drive_item_widget_get_working (self));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_FOLDER_PROPERTY:
		g_value_set_boolean (value, tuba_views_drive_item_widget_get_folder (self));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILENAME_PROPERTY:
		g_value_set_string (value, tuba_views_drive_item_widget_get_filename (self));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_ID_PROPERTY:
		g_value_set_string (value, tuba_views_drive_item_widget_get_item_id (self));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_PROPERTY:
		g_value_set_object (value, tuba_views_drive_item_widget_get_item (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_drive_item_widget_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	TubaViewsDriveItemWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_DRIVE_TYPE_ITEM_WIDGET, TubaViewsDriveItemWidget);
	switch (property_id) {
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_WORKING_PROPERTY:
		tuba_views_drive_item_widget_set_working (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_FILENAME_PROPERTY:
		tuba_views_drive_item_widget_set_filename (self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_DRIVE_ITEM_WIDGET_ITEM_PROPERTY:
		tuba_views_drive_item_widget_set_item (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_views_drive_entry_popover_get_instance_private (TubaViewsDriveEntryPopover* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsDriveEntryPopover_private_offset);
}

static gchar**
_vala_array_dup45 (gchar** self,
                   gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

TubaViewsDriveEntryPopover*
tuba_views_drive_entry_popover_construct (GType object_type,
                                          const gchar* title_label,
                                          const gchar* placeholder,
                                          const gchar* button_label,
                                          gchar** taken_names,
                                          gint taken_names_length1,
                                          gboolean empty_allowed)
{
	TubaViewsDriveEntryPopover * self = NULL;
	GtkLabel* _tmp0_;
	GtkEntry* _tmp1_;
	GtkButton* _tmp2_;
	g_return_val_if_fail (title_label != NULL, NULL);
	g_return_val_if_fail (placeholder != NULL, NULL);
	g_return_val_if_fail (button_label != NULL, NULL);
	self = (TubaViewsDriveEntryPopover*) g_object_new (object_type, NULL);
	_tmp0_ = self->priv->title;
	gtk_label_set_label (_tmp0_, title_label);
	_tmp1_ = self->priv->entry;
	gtk_entry_set_placeholder_text (_tmp1_, placeholder);
	_tmp2_ = self->priv->action;
	gtk_button_set_label (_tmp2_, button_label);
	if (taken_names != NULL) {
		gchar** _tmp3_;
		gint _tmp3__length1;
		_tmp3_ = (taken_names != NULL) ? _vala_array_dup45 (taken_names, taken_names_length1) : taken_names;
		_tmp3__length1 = taken_names_length1;
		self->priv->taken_names = (_vala_array_free (self->priv->taken_names, self->priv->taken_names_length1, (GDestroyNotify) g_free), NULL);
		self->priv->taken_names = _tmp3_;
		self->priv->taken_names_length1 = _tmp3__length1;
		self->priv->_taken_names_size_ = self->priv->taken_names_length1;
	}
	self->priv->can_be_empty = empty_allowed;
	return self;
}

TubaViewsDriveEntryPopover*
tuba_views_drive_entry_popover_new (const gchar* title_label,
                                    const gchar* placeholder,
                                    const gchar* button_label,
                                    gchar** taken_names,
                                    gint taken_names_length1,
                                    gboolean empty_allowed)
{
	return tuba_views_drive_entry_popover_construct (TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, title_label, placeholder, button_label, taken_names, taken_names_length1, empty_allowed);
}

void
tuba_views_drive_entry_popover_clear (TubaViewsDriveEntryPopover* self)
{
	GtkEntry* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	GtkEntryBuffer* _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	gint _tmp4_ = 0;
	guint8* _tmp5_;
	gint _tmp5__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->entry;
	_tmp1_ = gtk_entry_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_get_data ("", &_tmp4_);
	_tmp3__length1 = _tmp4_;
	_tmp5_ = _tmp3_;
	_tmp5__length1 = _tmp3__length1;
	gtk_entry_buffer_set_text (_tmp2_, (const char*) _tmp5_, (gint) _tmp5__length1);
}

static gchar**
_vala_array_dup46 (gchar** self,
                   gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

void
tuba_views_drive_entry_popover_update_taken_names (TubaViewsDriveEntryPopover* self,
                                                   gchar** taken_names,
                                                   gint taken_names_length1)
{
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_if_fail (self != NULL);
	if (taken_names == NULL) {
		gchar** _tmp0_;
		_tmp0_ = g_new0 (gchar*, 0 + 1);
		self->priv->taken_names = (_vala_array_free (self->priv->taken_names, self->priv->taken_names_length1, (GDestroyNotify) g_free), NULL);
		self->priv->taken_names = _tmp0_;
		self->priv->taken_names_length1 = 0;
		self->priv->_taken_names_size_ = self->priv->taken_names_length1;
		return;
	}
	_tmp1_ = (taken_names != NULL) ? _vala_array_dup46 (taken_names, taken_names_length1) : taken_names;
	_tmp1__length1 = taken_names_length1;
	self->priv->taken_names = (_vala_array_free (self->priv->taken_names, self->priv->taken_names_length1, (GDestroyNotify) g_free), NULL);
	self->priv->taken_names = _tmp1_;
	self->priv->taken_names_length1 = _tmp1__length1;
	self->priv->_taken_names_size_ = self->priv->taken_names_length1;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
tuba_views_drive_entry_popover_on_action (TubaViewsDriveEntryPopover* self)
{
	GtkButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkEntry* _tmp3_;
	GtkEntryBuffer* _tmp4_;
	GtkEntryBuffer* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->action;
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = self->priv->entry;
	_tmp4_ = gtk_entry_get_buffer (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gtk_entry_buffer_get_text (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = string_strip (_tmp7_);
	_tmp9_ = _tmp8_;
	g_signal_emit (self, tuba_views_drive_entry_popover_signals[TUBA_VIEWS_DRIVE_ENTRY_POPOVER_DONE_SIGNAL], 0, _tmp9_);
	_g_free0 (_tmp9_);
	gtk_popover_popdown ((GtkPopover*) self);
}

static void
tuba_views_drive_entry_popover_validate (TubaViewsDriveEntryPopover* self)
{
	gchar* stripped_text = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean invalid = FALSE;
	GtkButton* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_strip (_tmp2_);
	stripped_text = _tmp3_;
	if (!self->priv->can_be_empty) {
		const gchar* _tmp6_;
		_tmp6_ = stripped_text;
		_tmp5_ = g_strcmp0 (_tmp6_, "") == 0;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar** _tmp10_;
		gint _tmp10__length1;
		_tmp7_ = stripped_text;
		_tmp8_ = g_utf8_strdown (_tmp7_, (gssize) -1);
		_tmp9_ = _tmp8_;
		_tmp10_ = self->priv->taken_names;
		_tmp10__length1 = self->priv->taken_names_length1;
		_tmp4_ = _vala_string_array_contains (_tmp10_, _tmp10__length1, _tmp9_);
		_g_free0 (_tmp9_);
	}
	invalid = _tmp4_;
	_tmp11_ = self->priv->action;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, !invalid);
	if (invalid) {
		GtkEntry* _tmp12_;
		_tmp12_ = self->priv->entry;
		gtk_widget_add_css_class ((GtkWidget*) _tmp12_, "error");
	} else {
		GtkEntry* _tmp13_;
		_tmp13_ = self->priv->entry;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp13_, "error");
	}
	_g_free0 (stripped_text);
}

const gchar*
tuba_views_drive_entry_popover_get_text (TubaViewsDriveEntryPopover* self)
{
	const gchar* result;
	GtkEntry* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	GtkEntryBuffer* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->entry;
	_tmp1_ = gtk_entry_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_entry_buffer_get_text (_tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp4_;
	return result;
}

void
tuba_views_drive_entry_popover_set_text (TubaViewsDriveEntryPopover* self,
                                         const gchar* value)
{
	GtkEntry* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	GtkEntryBuffer* _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	gint _tmp4_ = 0;
	guint8* _tmp5_;
	gint _tmp5__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->entry;
	_tmp1_ = gtk_entry_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_get_data (value, &_tmp4_);
	_tmp3__length1 = _tmp4_;
	_tmp5_ = _tmp3_;
	_tmp5__length1 = _tmp3__length1;
	gtk_entry_buffer_set_text (_tmp2_, (const char*) _tmp5_, (gint) _tmp5__length1);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_drive_entry_popover_properties[TUBA_VIEWS_DRIVE_ENTRY_POPOVER_TEXT_PROPERTY]);
}

static void
_tuba_views_drive_entry_popover_on_action_gtk_entry_activate (GtkEntry* _sender,
                                                              gpointer self)
{
	tuba_views_drive_entry_popover_on_action ((TubaViewsDriveEntryPopover*) self);
}

static void
_tuba_views_drive_entry_popover_validate_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self)
{
	tuba_views_drive_entry_popover_validate ((TubaViewsDriveEntryPopover*) self);
}

static void
_tuba_views_drive_entry_popover_on_action_gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self)
{
	tuba_views_drive_entry_popover_on_action ((TubaViewsDriveEntryPopover*) self);
}

static GObject *
tuba_views_drive_entry_popover_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsDriveEntryPopover * self;
	gint _tmp0_ = 0;
	GtkBox* box = NULL;
	GtkBox* _tmp1_ = NULL;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkLabel* _tmp4_ = NULL;
	GtkBox* _tmp5_;
	GtkLabel* _tmp6_;
	GtkEntry* _tmp7_ = NULL;
	GtkEntry* _tmp8_;
	GtkEntry* _tmp9_;
	GtkEntryBuffer* _tmp10_;
	GtkEntryBuffer* _tmp11_;
	GtkBox* _tmp12_;
	GtkEntry* _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_;
	GtkButton* _tmp16_ = NULL;
	GtkButton* _tmp17_;
	GtkBox* _tmp18_;
	GtkButton* _tmp19_;
	GtkBox* _tmp20_;
	GtkEntry* _tmp21_;
	parent_class = G_OBJECT_CLASS (tuba_views_drive_entry_popover_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, TubaViewsDriveEntryPopover);
	_tmp0_ = 12;
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	g_object_set ((GtkWidget*) _tmp1_, "width-request", 200, NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp1_, _tmp0_);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp1_, _tmp0_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp1_, _tmp0_);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp1_, _tmp0_);
	g_object_ref_sink (_tmp1_);
	box = _tmp1_;
	_tmp2_ = g_strdup ("title-2");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->title);
	self->priv->title = _tmp4_;
	_tmp5_ = box;
	_tmp6_ = self->priv->title;
	gtk_box_append (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = (GtkEntry*) gtk_entry_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp7_, TRUE);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->entry);
	self->priv->entry = _tmp7_;
	_tmp8_ = self->priv->entry;
	g_signal_connect_object (_tmp8_, "activate", (GCallback) _tuba_views_drive_entry_popover_on_action_gtk_entry_activate, self, 0);
	_tmp9_ = self->priv->entry;
	_tmp10_ = gtk_entry_get_buffer (_tmp9_);
	_tmp11_ = _tmp10_;
	g_signal_connect_object ((GObject*) _tmp11_, "notify::text", (GCallback) _tuba_views_drive_entry_popover_validate_g_object_notify, self, 0);
	_tmp12_ = box;
	_tmp13_ = self->priv->entry;
	gtk_box_append (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = g_strdup ("suggested-action");
	_tmp15_ = g_new0 (gchar*, 1 + 1);
	_tmp15_[0] = _tmp14_;
	_tmp16_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp16_, FALSE);
	gtk_widget_set_halign ((GtkWidget*) _tmp16_, GTK_ALIGN_END);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp16_, _tmp15_);
	_tmp15_ = (_vala_array_free (_tmp15_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->action);
	self->priv->action = _tmp16_;
	_tmp17_ = self->priv->action;
	g_signal_connect_object (_tmp17_, "clicked", (GCallback) _tuba_views_drive_entry_popover_on_action_gtk_button_clicked, self, 0);
	_tmp18_ = box;
	_tmp19_ = self->priv->action;
	gtk_box_append (_tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = box;
	gtk_popover_set_child ((GtkPopover*) self, (GtkWidget*) _tmp20_);
	_tmp21_ = self->priv->entry;
	g_object_set ((GtkPopover*) self, "default-widget", (GtkWidget*) _tmp21_, NULL);
	_g_object_unref0 (box);
	return obj;
}

static void
tuba_views_drive_entry_popover_class_init (TubaViewsDriveEntryPopoverClass * klass,
                                           gpointer klass_data)
{
	tuba_views_drive_entry_popover_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsDriveEntryPopover_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_drive_entry_popover_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_drive_entry_popover_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_drive_entry_popover_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_drive_entry_popover_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_DRIVE_ENTRY_POPOVER_TEXT_PROPERTY, tuba_views_drive_entry_popover_properties[TUBA_VIEWS_DRIVE_ENTRY_POPOVER_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_views_drive_entry_popover_signals[TUBA_VIEWS_DRIVE_ENTRY_POPOVER_DONE_SIGNAL] = g_signal_new ("done", TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
tuba_views_drive_entry_popover_instance_init (TubaViewsDriveEntryPopover * self,
                                              gpointer klass)
{
	gchar** _tmp0_;
	self->priv = tuba_views_drive_entry_popover_get_instance_private (self);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	self->priv->taken_names = _tmp0_;
	self->priv->taken_names_length1 = 0;
	self->priv->_taken_names_size_ = self->priv->taken_names_length1;
	self->priv->can_be_empty = FALSE;
}

static void
tuba_views_drive_entry_popover_finalize (GObject * obj)
{
	TubaViewsDriveEntryPopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, TubaViewsDriveEntryPopover);
	_g_object_unref0 (self->priv->title);
	_g_object_unref0 (self->priv->entry);
	_g_object_unref0 (self->priv->action);
	self->priv->taken_names = (_vala_array_free (self->priv->taken_names, self->priv->taken_names_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (tuba_views_drive_entry_popover_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_drive_entry_popover_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsDriveEntryPopoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_drive_entry_popover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsDriveEntryPopover), 0, (GInstanceInitFunc) tuba_views_drive_entry_popover_instance_init, NULL };
	GType tuba_views_drive_entry_popover_type_id;
	tuba_views_drive_entry_popover_type_id = g_type_register_static (gtk_popover_get_type (), "TubaViewsDriveEntryPopover", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsDriveEntryPopover_private_offset = g_type_add_instance_private (tuba_views_drive_entry_popover_type_id, sizeof (TubaViewsDriveEntryPopoverPrivate));
	return tuba_views_drive_entry_popover_type_id;
}

GType
tuba_views_drive_entry_popover_get_type (void)
{
	static GType tuba_views_drive_entry_popover_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_drive_entry_popover_type_id__once)) {
		GType tuba_views_drive_entry_popover_type_id;
		tuba_views_drive_entry_popover_type_id = tuba_views_drive_entry_popover_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_drive_entry_popover_type_id__once, tuba_views_drive_entry_popover_type_id);
	}
	return tuba_views_drive_entry_popover_type_id__once;
}

static void
_vala_tuba_views_drive_entry_popover_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	TubaViewsDriveEntryPopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, TubaViewsDriveEntryPopover);
	switch (property_id) {
		case TUBA_VIEWS_DRIVE_ENTRY_POPOVER_TEXT_PROPERTY:
		g_value_set_string (value, tuba_views_drive_entry_popover_get_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_drive_entry_popover_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec)
{
	TubaViewsDriveEntryPopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_DRIVE_TYPE_ENTRY_POPOVER, TubaViewsDriveEntryPopover);
	switch (property_id) {
		case TUBA_VIEWS_DRIVE_ENTRY_POPOVER_TEXT_PROPERTY:
		tuba_views_drive_entry_popover_set_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_views_drive_item_alt_extractor_get_instance_private (TubaViewsDriveItemAltExtractor* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsDriveItemAltExtractor_private_offset);
}

static TubaViewsDriveItemAltExtractor*
tuba_views_drive_item_alt_extractor_construct (GType object_type,
                                               const gchar* file_uri,
                                               TubaAPIIceshrimpFile* is_file)
{
	TubaViewsDriveItemAltExtractor * self = NULL;
	GFile* _tmp0_;
	TubaAPIIceshrimpFile* _tmp1_;
	g_return_val_if_fail (file_uri != NULL, NULL);
	g_return_val_if_fail (is_file != NULL, NULL);
	self = (TubaViewsDriveItemAltExtractor*) g_object_new (object_type, NULL);
	_tmp0_ = g_file_new_for_uri (file_uri);
	_g_object_unref0 (self->priv->file);
	self->priv->file = _tmp0_;
	_tmp1_ = _g_object_ref0 (is_file);
	_g_object_unref0 (self->priv->is_file);
	self->priv->is_file = _tmp1_;
	return self;
}

static TubaViewsDriveItemAltExtractor*
tuba_views_drive_item_alt_extractor_new (const gchar* file_uri,
                                         TubaAPIIceshrimpFile* is_file)
{
	return tuba_views_drive_item_alt_extractor_construct (TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR, file_uri, is_file);
}

static void
tuba_views_drive_item_alt_extractor_fetch (TubaViewsDriveItemAltExtractor* self)
{
	gchar* file_uri = NULL;
	GFile* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* extracted_alt_text = NULL;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->file;
	_tmp1_ = g_file_get_uri (_tmp0_);
	file_uri = _tmp1_;
	_tmp2_ = file_uri;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = g_strconcat ("Extracting alt text for ", _tmp3_, NULL);
	_tmp5_ = _tmp4_;
	g_debug ("Drive.vala:1557: %s", _tmp5_);
	_g_free0 (_tmp5_);
	_tmp6_ = file_uri;
	_tmp7_ = tuba_utils_exif_extract_alt_text (_tmp6_);
	extracted_alt_text = _tmp7_;
	_tmp8_ = extracted_alt_text;
	if (_tmp8_ != NULL) {
		const gchar* _tmp9_;
		TubaAPIIceshrimpFile* _tmp10_;
		_tmp9_ = extracted_alt_text;
		_tmp10_ = self->priv->is_file;
		g_signal_emit (self, tuba_views_drive_item_alt_extractor_signals[TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_EXTRACTED_ALT_SIGNAL], 0, _tmp9_, _tmp10_);
	}
	_g_free0 (extracted_alt_text);
	_g_free0 (file_uri);
}

static void
tuba_views_drive_item_alt_extractor_class_init (TubaViewsDriveItemAltExtractorClass * klass,
                                                gpointer klass_data)
{
	tuba_views_drive_item_alt_extractor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsDriveItemAltExtractor_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_views_drive_item_alt_extractor_finalize;
	tuba_views_drive_item_alt_extractor_signals[TUBA_VIEWS_DRIVE_ITEM_ALT_EXTRACTOR_EXTRACTED_ALT_SIGNAL] = g_signal_new ("extracted-alt", TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_OBJECT, G_TYPE_NONE, 2, G_TYPE_STRING, TUBA_API_ICESHRIMP_TYPE_FILE);
}

static void
tuba_views_drive_item_alt_extractor_instance_init (TubaViewsDriveItemAltExtractor * self,
                                                   gpointer klass)
{
	self->priv = tuba_views_drive_item_alt_extractor_get_instance_private (self);
}

static void
tuba_views_drive_item_alt_extractor_finalize (GObject * obj)
{
	TubaViewsDriveItemAltExtractor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_DRIVE_TYPE_ITEM_ALT_EXTRACTOR, TubaViewsDriveItemAltExtractor);
	g_debug ("Drive.vala:1545: Destroying ItemAltExtractor");
	_g_object_unref0 (self->priv->file);
	_g_object_unref0 (self->priv->is_file);
	G_OBJECT_CLASS (tuba_views_drive_item_alt_extractor_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_drive_item_alt_extractor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsDriveItemAltExtractorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_drive_item_alt_extractor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsDriveItemAltExtractor), 0, (GInstanceInitFunc) tuba_views_drive_item_alt_extractor_instance_init, NULL };
	GType tuba_views_drive_item_alt_extractor_type_id;
	tuba_views_drive_item_alt_extractor_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaViewsDriveItemAltExtractor", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsDriveItemAltExtractor_private_offset = g_type_add_instance_private (tuba_views_drive_item_alt_extractor_type_id, sizeof (TubaViewsDriveItemAltExtractorPrivate));
	return tuba_views_drive_item_alt_extractor_type_id;
}

static GType
tuba_views_drive_item_alt_extractor_get_type (void)
{
	static GType tuba_views_drive_item_alt_extractor_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_drive_item_alt_extractor_type_id__once)) {
		GType tuba_views_drive_item_alt_extractor_type_id;
		tuba_views_drive_item_alt_extractor_type_id = tuba_views_drive_item_alt_extractor_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_drive_item_alt_extractor_type_id__once, tuba_views_drive_item_alt_extractor_type_id);
	}
	return tuba_views_drive_item_alt_extractor_type_id__once;
}

static void
tuba_views_drive_item_data_copy (const TubaViewsDriveItemData* self,
                                 TubaViewsDriveItemData* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	TubaViewsDriveItem* _tmp4_;
	TubaViewsDriveItem* _tmp5_;
	_tmp0_ = (*self).id;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).id);
	(*dest).id = _tmp1_;
	_tmp2_ = (*self).name;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).name);
	(*dest).name = _tmp3_;
	(*dest).folder = (*self).folder;
	_tmp4_ = (*self).item;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 ((*dest).item);
	(*dest).item = _tmp5_;
}

static void
tuba_views_drive_item_data_destroy (TubaViewsDriveItemData* self)
{
	_g_free0 ((*self).id);
	_g_free0 ((*self).name);
	_g_object_unref0 ((*self).item);
}

static TubaViewsDriveItemData*
tuba_views_drive_item_data_dup (const TubaViewsDriveItemData* self)
{
	TubaViewsDriveItemData* dup;
	dup = g_new0 (TubaViewsDriveItemData, 1);
	tuba_views_drive_item_data_copy (self, dup);
	return dup;
}

static void
tuba_views_drive_item_data_free (TubaViewsDriveItemData* self)
{
	tuba_views_drive_item_data_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
tuba_views_drive_item_data_get_type_once (void)
{
	GType tuba_views_drive_item_data_type_id;
	tuba_views_drive_item_data_type_id = g_boxed_type_register_static ("TubaViewsDriveItemData", (GBoxedCopyFunc) tuba_views_drive_item_data_dup, (GBoxedFreeFunc) tuba_views_drive_item_data_free);
	return tuba_views_drive_item_data_type_id;
}

static GType
tuba_views_drive_item_data_get_type (void)
{
	static GType tuba_views_drive_item_data_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_drive_item_data_type_id__once)) {
		GType tuba_views_drive_item_data_type_id;
		tuba_views_drive_item_data_type_id = tuba_views_drive_item_data_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_drive_item_data_type_id__once, tuba_views_drive_item_data_type_id);
	}
	return tuba_views_drive_item_data_type_id__once;
}

static void
tuba_views_drive_req_data_copy (const TubaViewsDriveReqData* self,
                                TubaViewsDriveReqData* dest)
{
	TubaRequestV2* _tmp0_;
	TubaRequestV2* _tmp1_;
	TubaViewsDriveItemData _tmp2_;
	TubaViewsDriveItemData _tmp3_;
	TubaViewsDriveItemData _tmp4_ = {0};
	_tmp0_ = (*self).req;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 ((*dest).req);
	(*dest).req = _tmp1_;
	_tmp2_ = (*self).item_data;
	_tmp3_ = _tmp2_;
	tuba_views_drive_item_data_copy (&_tmp3_, &_tmp4_);
	tuba_views_drive_item_data_destroy (&(*dest).item_data);
	(*dest).item_data = _tmp4_;
}

static void
tuba_views_drive_req_data_destroy (TubaViewsDriveReqData* self)
{
	_g_object_unref0 ((*self).req);
	tuba_views_drive_item_data_destroy (&(*self).item_data);
}

static TubaViewsDriveReqData*
tuba_views_drive_req_data_dup (const TubaViewsDriveReqData* self)
{
	TubaViewsDriveReqData* dup;
	dup = g_new0 (TubaViewsDriveReqData, 1);
	tuba_views_drive_req_data_copy (self, dup);
	return dup;
}

static void
tuba_views_drive_req_data_free (TubaViewsDriveReqData* self)
{
	tuba_views_drive_req_data_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
tuba_views_drive_req_data_get_type_once (void)
{
	GType tuba_views_drive_req_data_type_id;
	tuba_views_drive_req_data_type_id = g_boxed_type_register_static ("TubaViewsDriveReqData", (GBoxedCopyFunc) tuba_views_drive_req_data_dup, (GBoxedFreeFunc) tuba_views_drive_req_data_free);
	return tuba_views_drive_req_data_type_id;
}

static GType
tuba_views_drive_req_data_get_type (void)
{
	static GType tuba_views_drive_req_data_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_drive_req_data_type_id__once)) {
		GType tuba_views_drive_req_data_type_id;
		tuba_views_drive_req_data_type_id = tuba_views_drive_req_data_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_drive_req_data_type_id__once, tuba_views_drive_req_data_type_id);
	}
	return tuba_views_drive_req_data_type_id__once;
}

static void
_tuba_views_drive_setup_listitem_cb_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                        GObject* object,
                                                                        gpointer self)
{
	tuba_views_drive_setup_listitem_cb ((TubaViewsDrive*) self, object);
}

static void
_tuba_views_drive_bind_listitem_cb_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                      GObject* object,
                                                                      gpointer self)
{
	tuba_views_drive_bind_listitem_cb ((TubaViewsDrive*) self, object);
}

static void
_tuba_views_drive_on_store_changed_g_list_model_items_changed (GListModel* _sender,
                                                               guint position,
                                                               guint removed,
                                                               guint added,
                                                               gpointer self)
{
	tuba_views_drive_on_store_changed ((TubaViewsDrive*) self);
}

static void
_tuba_views_drive_on_item_activated_gtk_grid_view_activate (GtkGridView* _sender,
                                                            guint position,
                                                            gpointer self)
{
	tuba_views_drive_on_item_activated ((TubaViewsDrive*) self, position);
}

static void
_tuba_views_drive_on_primary_click_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                              gint n_press,
                                                              gdouble x,
                                                              gdouble y,
                                                              gpointer self)
{
	tuba_views_drive_on_primary_click ((TubaViewsDrive*) self, _sender, n_press, x, y);
}

static void
_tuba_views_drive_on_delete_action_g_simple_action_activate (GSimpleAction* _sender,
                                                             GVariant* parameter,
                                                             gpointer self)
{
	tuba_views_drive_on_delete_action ((TubaViewsDrive*) self);
}

static GdkDragAction
_tuba_views_drive_on_drag_enter_gtk_drop_target_enter (GtkDropTarget* _sender,
                                                       gdouble x,
                                                       gdouble y,
                                                       gpointer self)
{
	GdkDragAction result;
	result = tuba_views_drive_on_drag_enter ((TubaViewsDrive*) self, x, y);
	return result;
}

static void
_tuba_views_drive_on_drag_leave_gtk_drop_target_leave (GtkDropTarget* _sender,
                                                       gpointer self)
{
	tuba_views_drive_on_drag_leave ((TubaViewsDrive*) self);
}

static gboolean
_tuba_views_drive_on_drag_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                     GValue* value,
                                                     gdouble x,
                                                     gdouble y,
                                                     gpointer self)
{
	gboolean result;
	result = tuba_views_drive_on_drag_drop ((TubaViewsDrive*) self, value, x, y);
	return result;
}

static void
_tuba_views_drive_on_refresh_tuba_application_refresh (TubaApplication* _sender,
                                                       gpointer self)
{
	tuba_views_drive_on_refresh ((TubaViewsDrive*) self);
}

static GObject *
tuba_views_drive_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsDrive * self;
	GtkProgressBar* _tmp0_ = NULL;
	GtkProgressBar* _tmp1_;
	GtkOverlay* _tmp2_;
	GtkProgressBar* _tmp3_;
	GtkSignalListItemFactory* signallistitemfactory = NULL;
	GtkSignalListItemFactory* _tmp4_;
	GtkSignalListItemFactory* _tmp5_;
	GtkSignalListItemFactory* _tmp6_;
	GListStore* _tmp7_;
	GListStore* _tmp8_;
	GListStore* _tmp9_;
	GListModel* _tmp10_;
	GtkMultiSelection* _tmp11_;
	GtkMultiSelection* _tmp12_;
	GtkSelectionModel* _tmp13_;
	GtkSignalListItemFactory* _tmp14_;
	GtkListItemFactory* _tmp15_;
	GtkGridView* _tmp16_ = NULL;
	GtkGridView* _tmp17_;
	GtkGridView* _tmp18_;
	gchar* _tmp19_;
	GtkGridView* _tmp20_;
	GtkWidget* _tmp21_;
	gchar* _tmp22_;
	gchar** _tmp23_;
	AdwClampScrollable* _tmp24_ = NULL;
	GtkScrolledWindow* _tmp25_ = NULL;
	TubaDialogsComposerComponentsDropOverlay* _tmp26_ = NULL;
	GtkStack* _tmp27_;
	GtkScrolledWindow* _tmp28_;
	GtkStackPage* _tmp29_;
	GtkStack* _tmp30_;
	TubaDialogsComposerComponentsDropOverlay* _tmp31_;
	GtkGestureClick* primary_click = NULL;
	GtkGestureClick* _tmp32_ = NULL;
	GtkGestureClick* _tmp33_;
	GtkGridView* _tmp34_;
	GtkGestureClick* _tmp35_;
	GtkEventController* _tmp36_;
	gboolean _tmp37_ = FALSE;
	TubaAccountStore* _tmp38_;
	TubaInstanceAccount* _tmp39_;
	TubaInstanceAccount* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	GSimpleAction* delete_action = NULL;
	GSimpleAction* _tmp50_;
	GSimpleAction* _tmp51_;
	GSimpleActionGroup* action_group = NULL;
	GSimpleActionGroup* _tmp52_;
	GSimpleActionGroup* _tmp53_;
	GSimpleAction* _tmp54_;
	GtkGridView* _tmp55_;
	GSimpleActionGroup* _tmp56_;
	GtkGridView* _tmp57_;
	GtkGridView* _tmp58_;
	GtkDropTarget* base_drop_target_controller = NULL;
	GtkDropTarget* _tmp59_;
	GtkDropTarget* _tmp60_;
	GtkDropTarget* _tmp61_;
	GtkDropTarget* _tmp62_;
	TubaDialogsComposerComponentsDropOverlay* _tmp63_;
	GtkDropTarget* _tmp64_;
	GtkEventController* _tmp65_;
	TubaApplication* _tmp66_;
	parent_class = G_OBJECT_CLASS (tuba_views_drive_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_DRIVE, TubaViewsDrive);
	tuba_views_base_set_icon ((TubaViewsBase*) self, "tuba-folder-visiting-symbolic");
	tuba_views_base_set_label ((TubaViewsBase*) self, _ ("Drive"));
	_tmp0_ = (GtkProgressBar*) gtk_progress_bar_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->osd_bar);
	self->priv->osd_bar = _tmp0_;
	_tmp1_ = self->priv->osd_bar;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "osd");
	_tmp2_ = ((TubaViewsBase*) self)->scrolled_overlay;
	_tmp3_ = self->priv->osd_bar;
	gtk_overlay_add_overlay (_tmp2_, (GtkWidget*) _tmp3_);
	_tmp4_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	signallistitemfactory = _tmp4_;
	_tmp5_ = signallistitemfactory;
	g_signal_connect_object (_tmp5_, "setup", (GCallback) _tuba_views_drive_setup_listitem_cb_gtk_signal_list_item_factory_setup, self, 0);
	_tmp6_ = signallistitemfactory;
	g_signal_connect_object (_tmp6_, "bind", (GCallback) _tuba_views_drive_bind_listitem_cb_gtk_signal_list_item_factory_bind, self, 0);
	_tmp7_ = g_list_store_new (TUBA_VIEWS_DRIVE_TYPE_ITEM);
	_g_object_unref0 (self->priv->store);
	self->priv->store = _tmp7_;
	_tmp8_ = self->priv->store;
	g_signal_connect_object ((GListModel*) _tmp8_, "items-changed", (GCallback) _tuba_views_drive_on_store_changed_g_list_model_items_changed, self, 0);
	_tmp9_ = self->priv->store;
	_tmp10_ = _g_object_ref0 ((GListModel*) _tmp9_);
	_tmp11_ = gtk_multi_selection_new (_tmp10_);
	_g_object_unref0 (self->priv->selection);
	self->priv->selection = _tmp11_;
	_tmp12_ = self->priv->selection;
	_tmp13_ = _g_object_ref0 ((GtkSelectionModel*) _tmp12_);
	_tmp14_ = signallistitemfactory;
	_tmp15_ = _g_object_ref0 ((GtkListItemFactory*) _tmp14_);
	_tmp16_ = (GtkGridView*) gtk_grid_view_new (_tmp13_, _tmp15_);
	gtk_grid_view_set_enable_rubberband (_tmp16_, TRUE);
	gtk_grid_view_set_single_click_activate (_tmp16_, FALSE);
	gtk_widget_set_overflow ((GtkWidget*) _tmp16_, GTK_OVERFLOW_VISIBLE);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->grid);
	self->priv->grid = _tmp16_;
	_tmp17_ = self->priv->grid;
	g_signal_connect_object (_tmp17_, "activate", (GCallback) _tuba_views_drive_on_item_activated_gtk_grid_view_activate, self, 0);
	_tmp18_ = self->priv->grid;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp18_, "view");
	_tmp19_ = g_strdup (_ ("Drop files to upload them"));
	_tmp20_ = self->priv->grid;
	_tmp21_ = _g_object_ref0 ((GtkWidget*) _tmp20_);
	_tmp22_ = g_strdup ("ttl-view");
	_tmp23_ = g_new0 (gchar*, 1 + 1);
	_tmp23_[0] = _tmp22_;
	_tmp24_ = (AdwClampScrollable*) adw_clamp_scrollable_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp24_, TRUE);
	adw_clamp_scrollable_set_maximum_size (_tmp24_, 670);
	adw_clamp_scrollable_set_tightening_threshold (_tmp24_, 670);
	adw_clamp_scrollable_set_child (_tmp24_, _tmp21_);
	_g_object_unref0 (_tmp21_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp24_, _tmp23_);
	_tmp23_ = (_vala_array_free (_tmp23_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_overflow ((GtkWidget*) _tmp24_, GTK_OVERFLOW_HIDDEN);
	g_object_ref_sink (_tmp24_);
	_tmp25_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp25_, TRUE);
	gtk_scrolled_window_set_child (_tmp25_, (GtkWidget*) _tmp24_);
	_g_object_unref0 (_tmp24_);
	g_object_ref_sink (_tmp25_);
	_tmp26_ = tuba_dialogs_composer_components_drop_overlay_new ();
	tuba_dialogs_composer_components_drop_overlay_set_title (_tmp26_, _tmp19_);
	_g_free0 (_tmp19_);
	tuba_dialogs_composer_components_drop_overlay_set_overlay_child (_tmp26_, (GtkWidget*) _tmp25_);
	_g_object_unref0 (_tmp25_);
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->drop_overlay);
	self->priv->drop_overlay = _tmp26_;
	_tmp27_ = ((TubaViewsBase*) self)->states;
	_tmp28_ = ((TubaViewsBase*) self)->scrolled;
	_tmp29_ = gtk_stack_get_page (_tmp27_, (GtkWidget*) _tmp28_);
	gtk_stack_page_set_name (_tmp29_, "old-content");
	_tmp30_ = ((TubaViewsBase*) self)->states;
	_tmp31_ = self->priv->drop_overlay;
	gtk_stack_add_named (_tmp30_, (GtkWidget*) _tmp31_, "content");
	_tmp32_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp32_, (guint) GDK_BUTTON_PRIMARY);
	primary_click = _tmp32_;
	_tmp33_ = primary_click;
	g_signal_connect_object (_tmp33_, "pressed", (GCallback) _tuba_views_drive_on_primary_click_gtk_gesture_click_pressed, self, 0);
	_tmp34_ = self->priv->grid;
	_tmp35_ = primary_click;
	_tmp36_ = _g_object_ref0 ((GtkEventController*) _tmp35_);
	gtk_widget_add_controller ((GtkWidget*) _tmp34_, _tmp36_);
	_tmp38_ = tuba_accounts;
	_tmp39_ = tuba_account_store_get_active (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_tmp40_);
	_tmp42_ = _tmp41_;
	if (_tmp42_ == NULL) {
		_tmp37_ = TRUE;
	} else {
		TubaAccountStore* _tmp43_;
		TubaInstanceAccount* _tmp44_;
		TubaInstanceAccount* _tmp45_;
		const gchar* _tmp46_;
		const gchar* _tmp47_;
		_tmp43_ = tuba_accounts;
		_tmp44_ = tuba_account_store_get_active (_tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = tuba_instance_account_get_tuba_iceshrimp_api_key (_tmp45_);
		_tmp47_ = _tmp46_;
		_tmp37_ = g_strcmp0 (_tmp47_, "") == 0;
	}
	if (_tmp37_) {
		TubaViewsBaseStatusMessage* _tmp48_ = NULL;
		TubaViewsBaseStatusMessage* _tmp49_;
		_tmp48_ = tuba_views_base_status_message_new ();
		_tmp48_->loading = TRUE;
		_tmp49_ = _tmp48_;
		tuba_views_base_set_base_status ((TubaViewsBase*) self, _tmp49_);
		_g_object_unref0 (_tmp49_);
		tuba_views_drive_authorize_iceshrimp (self, NULL, NULL);
	} else {
		tuba_views_drive_load_folder (self, NULL, NULL, NULL);
	}
	_tmp50_ = g_simple_action_new ("delete", NULL);
	delete_action = _tmp50_;
	_tmp51_ = delete_action;
	g_signal_connect_object (_tmp51_, "activate", (GCallback) _tuba_views_drive_on_delete_action_g_simple_action_activate, self, 0);
	_tmp52_ = g_simple_action_group_new ();
	action_group = _tmp52_;
	_tmp53_ = action_group;
	_tmp54_ = delete_action;
	g_action_map_add_action ((GActionMap*) _tmp53_, (GAction*) _tmp54_);
	_tmp55_ = self->priv->grid;
	_tmp56_ = action_group;
	gtk_widget_insert_action_group ((GtkWidget*) _tmp55_, "drive", (GActionGroup*) _tmp56_);
	_tmp57_ = self->priv->grid;
	gtk_widget_class_add_binding_action (G_TYPE_INSTANCE_GET_CLASS (_tmp57_, gtk_widget_get_type (), GtkWidgetClass), GDK_KEY_Delete, 0, "drive.delete", NULL, NULL);
	_tmp58_ = self->priv->grid;
	gtk_widget_class_add_binding_action (G_TYPE_INSTANCE_GET_CLASS (_tmp58_, gtk_widget_get_type (), GtkWidgetClass), GDK_KEY_KP_Delete, 0, "drive.delete", NULL, NULL);
	_tmp59_ = gtk_drop_target_new (gdk_file_list_get_type (), GDK_ACTION_COPY);
	base_drop_target_controller = _tmp59_;
	_tmp60_ = base_drop_target_controller;
	g_signal_connect_object (_tmp60_, "enter", (GCallback) _tuba_views_drive_on_drag_enter_gtk_drop_target_enter, self, 0);
	_tmp61_ = base_drop_target_controller;
	g_signal_connect_object (_tmp61_, "leave", (GCallback) _tuba_views_drive_on_drag_leave_gtk_drop_target_leave, self, 0);
	_tmp62_ = base_drop_target_controller;
	g_signal_connect_object (_tmp62_, "drop", (GCallback) _tuba_views_drive_on_drag_drop_gtk_drop_target_drop, self, 0);
	_tmp63_ = self->priv->drop_overlay;
	_tmp64_ = base_drop_target_controller;
	_tmp65_ = _g_object_ref0 ((GtkEventController*) _tmp64_);
	gtk_widget_add_controller ((GtkWidget*) _tmp63_, _tmp65_);
	_tmp66_ = tuba_app;
	g_signal_connect_object (_tmp66_, "refresh", (GCallback) _tuba_views_drive_on_refresh_tuba_application_refresh, self, 0);
	_g_object_unref0 (base_drop_target_controller);
	_g_object_unref0 (action_group);
	_g_object_unref0 (delete_action);
	_g_object_unref0 (primary_click);
	_g_object_unref0 (signallistitemfactory);
	return obj;
}

static void
tuba_views_drive_class_init (TubaViewsDriveClass * klass,
                             gpointer klass_data)
{
	tuba_views_drive_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsDrive_private_offset);
	((TubaViewsBaseClass *) klass)->build_header = (void (*) (TubaViewsBase*)) tuba_views_drive_real_build_header;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_drive_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_drive_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_drive_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_drive_finalize;
}

static void
tuba_views_drive_instance_init (TubaViewsDrive * self,
                                gpointer klass)
{
	GCancellable* _tmp0_;
	self->priv = tuba_views_drive_get_instance_private (self);
	self->priv->_working = FALSE;
	_tmp0_ = g_cancellable_new ();
	self->priv->main_cancellable = _tmp0_;
	self->priv->_current_folder = NULL;
	self->priv->bytes_written = (guint) 0;
	self->priv->total_bytes = (gsize) 0;
}

static void
tuba_views_drive_finalize (GObject * obj)
{
	TubaViewsDrive * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_DRIVE, TubaViewsDrive);
	tuba_views_drive_cleanup (self);
	g_debug ("Drive.vala:4: Destroying Drive");
	_g_object_unref0 (self->priv->go_back_btn);
	_g_object_unref0 (self->priv->create_folder_btn);
	_g_object_unref0 (self->priv->upload_file_btn);
	_g_object_unref0 (self->priv->create_folder_btn_popover);
	_g_object_unref0 (self->priv->cancel_btn);
	_g_object_unref0 (self->priv->back_drop_target_controller);
	_g_object_unref0 (self->priv->main_cancellable);
	_g_object_unref0 (self->priv->_current_folder);
	_g_object_unref0 (self->priv->grid);
	_g_object_unref0 (self->priv->selection);
	_g_object_unref0 (self->priv->store);
	_g_object_unref0 (self->priv->drop_overlay);
	_g_object_unref0 (self->priv->osd_bar);
	G_OBJECT_CLASS (tuba_views_drive_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_drive_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsDriveClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_drive_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsDrive), 0, (GInstanceInitFunc) tuba_views_drive_instance_init, NULL };
	GType tuba_views_drive_type_id;
	tuba_views_drive_type_id = g_type_register_static (TUBA_VIEWS_TYPE_BASE, "TubaViewsDrive", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsDrive_private_offset = g_type_add_instance_private (tuba_views_drive_type_id, sizeof (TubaViewsDrivePrivate));
	return tuba_views_drive_type_id;
}

GType
tuba_views_drive_get_type (void)
{
	static GType tuba_views_drive_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_drive_type_id__once)) {
		GType tuba_views_drive_type_id;
		tuba_views_drive_type_id = tuba_views_drive_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_drive_type_id__once, tuba_views_drive_type_id);
	}
	return tuba_views_drive_type_id__once;
}

static void
_vala_tuba_views_drive_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	TubaViewsDrive * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_DRIVE, TubaViewsDrive);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_drive_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	TubaViewsDrive * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_DRIVE, TubaViewsDrive);
	switch (property_id) {
		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);
}

