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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <adwaita.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <libsoup/soup.h>
#include <gee.h>
#include <json-glib/json-glib.h>
#include <pango/pango.h>
#include <float.h>
#include <math.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_WIDGETS_TYPE_COLLECTION_ROW (tuba_widgets_collection_row_get_type ())
#define TUBA_WIDGETS_COLLECTION_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_COLLECTION_ROW, TubaWidgetsCollectionRow))
#define TUBA_WIDGETS_COLLECTION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_COLLECTION_ROW, TubaWidgetsCollectionRowClass))
#define TUBA_WIDGETS_IS_COLLECTION_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_COLLECTION_ROW))
#define TUBA_WIDGETS_IS_COLLECTION_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_COLLECTION_ROW))
#define TUBA_WIDGETS_COLLECTION_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_COLLECTION_ROW, TubaWidgetsCollectionRowClass))

typedef struct _TubaWidgetsCollectionRow TubaWidgetsCollectionRow;
typedef struct _TubaWidgetsCollectionRowClass TubaWidgetsCollectionRowClass;
typedef struct _TubaWidgetsCollectionRowPrivate TubaWidgetsCollectionRowPrivate;

#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_TYPE_COLLECTION (tuba_api_collection_get_type ())
#define TUBA_API_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_COLLECTION, TubaAPICollection))
#define TUBA_API_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_COLLECTION, TubaAPICollectionClass))
#define TUBA_API_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_COLLECTION))
#define TUBA_API_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_COLLECTION))
#define TUBA_API_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_COLLECTION, TubaAPICollectionClass))

typedef struct _TubaAPICollection TubaAPICollection;
typedef struct _TubaAPICollectionClass TubaAPICollectionClass;
enum  {
	TUBA_WIDGETS_COLLECTION_ROW_0_PROPERTY,
	TUBA_WIDGETS_COLLECTION_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_collection_row_properties[TUBA_WIDGETS_COLLECTION_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_WIDGETS_TYPE_COLLECTION (tuba_widgets_collection_get_type ())
#define TUBA_WIDGETS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_COLLECTION, TubaWidgetsCollection))
#define TUBA_WIDGETS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_COLLECTION, TubaWidgetsCollectionClass))
#define TUBA_WIDGETS_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_COLLECTION))
#define TUBA_WIDGETS_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_COLLECTION))
#define TUBA_WIDGETS_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_COLLECTION, TubaWidgetsCollectionClass))

typedef struct _TubaWidgetsCollection TubaWidgetsCollection;
typedef struct _TubaWidgetsCollectionClass TubaWidgetsCollectionClass;

#define TUBA_DIALOGS_TYPE_COLLECTION (tuba_dialogs_collection_get_type ())
#define TUBA_DIALOGS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_COLLECTION, TubaDialogsCollection))
#define TUBA_DIALOGS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_COLLECTION, TubaDialogsCollectionClass))
#define TUBA_DIALOGS_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_COLLECTION))
#define TUBA_DIALOGS_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_COLLECTION))
#define TUBA_DIALOGS_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_COLLECTION, TubaDialogsCollectionClass))

typedef struct _TubaDialogsCollection TubaDialogsCollection;
typedef struct _TubaDialogsCollectionClass TubaDialogsCollectionClass;

#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;
enum  {
	TUBA_WIDGETS_COLLECTION_ROW_OPEN_SIGNAL,
	TUBA_WIDGETS_COLLECTION_ROW_NUM_SIGNALS
};
static guint tuba_widgets_collection_row_signals[TUBA_WIDGETS_COLLECTION_ROW_NUM_SIGNALS] = {0};

#define TUBA_WIDGETS_TYPE_COLLECTION_BUTTON (tuba_widgets_collection_button_get_type ())
#define TUBA_WIDGETS_COLLECTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_COLLECTION_BUTTON, TubaWidgetsCollectionButton))
#define TUBA_WIDGETS_COLLECTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_COLLECTION_BUTTON, TubaWidgetsCollectionButtonClass))
#define TUBA_WIDGETS_IS_COLLECTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_COLLECTION_BUTTON))
#define TUBA_WIDGETS_IS_COLLECTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_COLLECTION_BUTTON))
#define TUBA_WIDGETS_COLLECTION_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_COLLECTION_BUTTON, TubaWidgetsCollectionButtonClass))

typedef struct _TubaWidgetsCollectionButton TubaWidgetsCollectionButton;
typedef struct _TubaWidgetsCollectionButtonClass TubaWidgetsCollectionButtonClass;
typedef struct _TubaWidgetsCollectionButtonPrivate TubaWidgetsCollectionButtonPrivate;
enum  {
	TUBA_WIDGETS_COLLECTION_BUTTON_0_PROPERTY,
	TUBA_WIDGETS_COLLECTION_BUTTON_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_collection_button_properties[TUBA_WIDGETS_COLLECTION_BUTTON_NUM_PROPERTIES];
typedef struct _TubaWidgetsCollectionPrivate TubaWidgetsCollectionPrivate;

#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;
enum  {
	TUBA_WIDGETS_COLLECTION_0_PROPERTY,
	TUBA_WIDGETS_COLLECTION_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_collection_properties[TUBA_WIDGETS_COLLECTION_NUM_PROPERTIES];
typedef void (*GSimpleActionActivateCallback) (GSimpleAction* action, GVariant* parameter, gpointer user_data);
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_DIALOGS_TYPE_COLLECTIONS (tuba_dialogs_collections_get_type ())
#define TUBA_DIALOGS_COLLECTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_COLLECTIONS, TubaDialogsCollections))
#define TUBA_DIALOGS_COLLECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_COLLECTIONS, TubaDialogsCollectionsClass))
#define TUBA_DIALOGS_IS_COLLECTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_COLLECTIONS))
#define TUBA_DIALOGS_IS_COLLECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_COLLECTIONS))
#define TUBA_DIALOGS_COLLECTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_COLLECTIONS, TubaDialogsCollectionsClass))

typedef struct _TubaDialogsCollections TubaDialogsCollections;
typedef struct _TubaDialogsCollectionsClass TubaDialogsCollectionsClass;

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

#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_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 _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaWidgetsCollectionOnRemoveMeRealData TubaWidgetsCollectionOnRemoveMeRealData;

#define TUBA_API_TYPE_MENTION (tuba_api_mention_get_type ())
#define TUBA_API_MENTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_MENTION, TubaAPIMention))
#define TUBA_API_MENTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_MENTION, TubaAPIMentionClass))
#define TUBA_API_IS_MENTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_MENTION))
#define TUBA_API_IS_MENTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_MENTION))
#define TUBA_API_MENTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_MENTION, TubaAPIMentionClass))

typedef struct _TubaAPIMention TubaAPIMention;
typedef struct _TubaAPIMentionClass TubaAPIMentionClass;

#define TUBA_DIALOGS_TYPE_REPORT (tuba_dialogs_report_get_type ())
#define TUBA_DIALOGS_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_REPORT, TubaDialogsReport))
#define TUBA_DIALOGS_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_REPORT, TubaDialogsReportClass))
#define TUBA_DIALOGS_IS_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_REPORT))
#define TUBA_DIALOGS_IS_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_REPORT))
#define TUBA_DIALOGS_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_REPORT, TubaDialogsReportClass))

typedef struct _TubaDialogsReport TubaDialogsReport;
typedef struct _TubaDialogsReportClass TubaDialogsReportClass;
typedef struct _TubaWidgetsCollectionOnDeleteRealData TubaWidgetsCollectionOnDeleteRealData;
typedef void (*TubaNetworkNodeCallback) (JsonNode* node, gpointer user_data, GError** error);

#define TUBA_API_TYPE_RELATIONSHIP (tuba_api_relationship_get_type ())
#define TUBA_API_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationship))
#define TUBA_API_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationshipClass))
#define TUBA_API_IS_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_RELATIONSHIP))
#define TUBA_API_IS_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_RELATIONSHIP))
#define TUBA_API_RELATIONSHIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationshipClass))

typedef struct _TubaAPIRelationship TubaAPIRelationship;
typedef struct _TubaAPIRelationshipClass TubaAPIRelationshipClass;

#define TUBA_API_RELATIONSHIP_TYPE_MODIFY_PARAM (tuba_api_relationship_modify_param_get_type ())
typedef struct _TubaAPIRelationshipModifyParam TubaAPIRelationshipModifyParam;
typedef struct _TubaWidgetsCollectionBlockAuthorData TubaWidgetsCollectionBlockAuthorData;

#define TUBA_API_COLLECTION_TYPE_ITEM (tuba_api_collection_item_get_type ())
#define TUBA_API_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_COLLECTION_TYPE_ITEM, TubaAPICollectionItem))
#define TUBA_API_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_COLLECTION_TYPE_ITEM, TubaAPICollectionItemClass))
#define TUBA_API_COLLECTION_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_COLLECTION_TYPE_ITEM))
#define TUBA_API_COLLECTION_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_COLLECTION_TYPE_ITEM))
#define TUBA_API_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_COLLECTION_TYPE_ITEM, TubaAPICollectionItemClass))

typedef struct _TubaAPICollectionItem TubaAPICollectionItem;
typedef struct _TubaAPICollectionItemClass TubaAPICollectionItemClass;

#define TUBA_WIDGETS_COLLECTION_TYPE_AVATARS (tuba_widgets_collection_avatars_get_type ())
#define TUBA_WIDGETS_COLLECTION_AVATARS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_COLLECTION_TYPE_AVATARS, TubaWidgetsCollectionAvatars))
#define TUBA_WIDGETS_COLLECTION_AVATARS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_COLLECTION_TYPE_AVATARS, TubaWidgetsCollectionAvatarsClass))
#define TUBA_WIDGETS_COLLECTION_IS_AVATARS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_COLLECTION_TYPE_AVATARS))
#define TUBA_WIDGETS_COLLECTION_IS_AVATARS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_COLLECTION_TYPE_AVATARS))
#define TUBA_WIDGETS_COLLECTION_AVATARS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_COLLECTION_TYPE_AVATARS, TubaWidgetsCollectionAvatarsClass))

typedef struct _TubaWidgetsCollectionAvatars TubaWidgetsCollectionAvatars;
typedef struct _TubaWidgetsCollectionAvatarsClass TubaWidgetsCollectionAvatarsClass;

#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_WIDGETS_TYPE_RICH_LABEL (tuba_widgets_rich_label_get_type ())
#define TUBA_WIDGETS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabel))
#define TUBA_WIDGETS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabelClass))
#define TUBA_WIDGETS_IS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL))
#define TUBA_WIDGETS_IS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_RICH_LABEL))
#define TUBA_WIDGETS_RICH_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabelClass))

typedef struct _TubaWidgetsRichLabel TubaWidgetsRichLabel;
typedef struct _TubaWidgetsRichLabelClass TubaWidgetsRichLabelClass;
typedef struct _TubaWidgetsCollectionGetCollectionRealData TubaWidgetsCollectionGetCollectionRealData;
typedef struct _TubaWidgetsCollectionAvatarsPrivate TubaWidgetsCollectionAvatarsPrivate;
enum  {
	TUBA_WIDGETS_COLLECTION_AVATARS_0_PROPERTY,
	TUBA_WIDGETS_COLLECTION_AVATARS_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_collection_avatars_properties[TUBA_WIDGETS_COLLECTION_AVATARS_NUM_PROPERTIES];
typedef struct _Block89Data Block89Data;
typedef struct _Block90Data Block90Data;

#define TUBA_WIDGETS_TYPE_AVATAR (tuba_widgets_avatar_get_type ())
#define TUBA_WIDGETS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatar))
#define TUBA_WIDGETS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatarClass))
#define TUBA_WIDGETS_IS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_AVATAR))
#define TUBA_WIDGETS_IS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_AVATAR))
#define TUBA_WIDGETS_AVATAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_AVATAR, TubaWidgetsAvatarClass))

typedef struct _TubaWidgetsAvatar TubaWidgetsAvatar;
typedef struct _TubaWidgetsAvatarClass TubaWidgetsAvatarClass;
typedef struct _TubaWidgetsCollectionAvatarsPopulateData TubaWidgetsCollectionAvatarsPopulateData;
enum  {
	TUBA_WIDGETS_COLLECTION_REFRESH_SIGNAL,
	TUBA_WIDGETS_COLLECTION_NUM_SIGNALS
};
static guint tuba_widgets_collection_signals[TUBA_WIDGETS_COLLECTION_NUM_SIGNALS] = {0};

struct _TubaWidgetsCollectionRow {
	GtkListBoxRow parent_instance;
	TubaWidgetsCollectionRowPrivate * priv;
};

struct _TubaWidgetsCollectionRowClass {
	GtkListBoxRowClass parent_class;
};

struct _TubaWidgetsCollectionRowPrivate {
	TubaAPICollection* collection;
};

struct _TubaWidgetsCollectionButton {
	GtkButton parent_instance;
	TubaWidgetsCollectionButtonPrivate * priv;
};

struct _TubaWidgetsCollectionButtonClass {
	GtkButtonClass parent_class;
};

struct _TubaWidgetsCollectionButtonPrivate {
	TubaAPICollection* collection;
};

struct _TubaWidgetsCollection {
	GtkBox parent_instance;
	TubaWidgetsCollectionPrivate * priv;
};

struct _TubaWidgetsCollectionClass {
	GtkBoxClass parent_class;
};

struct _TubaWidgetsCollectionPrivate {
	TubaAPICollection* collection;
	gchar* collection_self_item_id;
	TubaAPIAccount* author;
};

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

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

struct _TubaApplicationQuestionButtons {
	TubaApplicationQuestionButton yes;
	TubaApplicationQuestionButton no;
};

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 _TubaWidgetsCollectionOnRemoveMeRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaWidgetsCollection* self;
	TubaApplicationQuestionAnswer question_answer;
	TubaApplication* _tmp0_;
	TubaAPICollection* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TubaApplicationQuestionText _tmp6_;
	TubaApplication* _tmp7_;
	TubaDialogsMainWindow* _tmp8_;
	TubaDialogsMainWindow* _tmp9_;
	TubaApplicationQuestionButtons _tmp10_;
	TubaApplicationQuestionAnswer _tmp11_;
	TubaRequestV2* req;
	TubaAPICollection* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	TubaAccountStore* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	TubaRequestV2* _tmp24_;
	TubaRequestV2* _tmp25_;
	TubaRequestV2* _tmp26_;
	GInputStream* _tmp27_;
	GInputStream* _tmp28_;
	GError* e;
	TubaApplication* _tmp29_;
	GError* _tmp30_;
	const gchar* _tmp31_;
	TubaAPICollection* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	GError* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	GError* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	GError* _inner_error0_;
};

struct _TubaWidgetsCollectionOnDeleteRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaWidgetsCollection* self;
	TubaApplicationQuestionAnswer question_answer;
	TubaApplication* _tmp0_;
	TubaAPICollection* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TubaApplicationQuestionText _tmp6_;
	TubaApplication* _tmp7_;
	TubaDialogsMainWindow* _tmp8_;
	TubaDialogsMainWindow* _tmp9_;
	TubaApplicationQuestionButtons _tmp10_;
	TubaApplicationQuestionAnswer _tmp11_;
	TubaRequestV2* req;
	TubaAPICollection* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	TubaAccountStore* _tmp18_;
	TubaInstanceAccount* _tmp19_;
	TubaInstanceAccount* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	TubaRequestV2* _tmp22_;
	TubaRequestV2* _tmp23_;
	TubaRequestV2* _tmp24_;
	GInputStream* _tmp25_;
	GInputStream* _tmp26_;
	GError* e;
	TubaApplication* _tmp27_;
	GError* _tmp28_;
	const gchar* _tmp29_;
	TubaAPICollection* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	GError* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	GError* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	GError* _inner_error0_;
};

struct _TubaAPIRelationshipModifyParam {
	gchar* param;
	gchar* val;
};

struct _TubaWidgetsCollectionBlockAuthorData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaWidgetsCollection* self;
	TubaRequestV2* req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	TubaRequestV2* _tmp5_;
	TubaAPICollection* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp9_;
	GInputStream* _tmp10_;
	JsonParser* parser;
	GInputStream* _tmp11_;
	JsonParser* _tmp12_;
	JsonParser* _tmp13_;
	GError* e;
	TubaApplication* _tmp14_;
	GError* _tmp15_;
	const gchar* _tmp16_;
	TubaAPICollection* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	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 _TubaWidgetsCollectionGetCollectionRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaWidgetsCollection* self;
	GtkBox* title_box;
	TubaRequestV2* req;
	TubaAPICollection* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TubaAccountStore* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaRequestV2* _tmp10_;
	TubaRequestV2* _tmp11_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp12_;
	GInputStream* _tmp13_;
	JsonParser* parser;
	GInputStream* _tmp14_;
	JsonParser* _tmp15_;
	JsonNode* node;
	TubaNetwork* _tmp16_;
	JsonParser* _tmp17_;
	JsonNode* _tmp18_;
	TubaAPIAccount* acc;
	JsonNode* _tmp19_;
	TubaAPIAccount* _tmp20_;
	TubaAPIAccount* _tmp21_;
	TubaAPIAccount* _tmp22_;
	TubaAPIAccount* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	TubaAPIAccount* _tmp28_;
	GeeHashMap* _tmp29_;
	GeeHashMap* _tmp30_;
	GeeHashMap* _tmp31_;
	TubaWidgetsRichLabel* _tmp32_;
	TubaWidgetsRichLabel* _tmp33_;
	GError* e;
	TubaApplication* _tmp34_;
	GError* _tmp35_;
	const gchar* _tmp36_;
	TubaAPICollection* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	GError* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	GError* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	GError* _inner_error0_;
};

struct _TubaWidgetsCollectionAvatars {
	GtkBox parent_instance;
	TubaWidgetsCollectionAvatarsPrivate * priv;
};

struct _TubaWidgetsCollectionAvatarsClass {
	GtkBoxClass parent_class;
};

struct _TubaWidgetsCollectionAvatarsPrivate {
	GtkBox* box1;
	GtkBox* box2;
};

struct _Block89Data {
	int _ref_count_;
	TubaWidgetsCollectionAvatars* self;
	gchar** account_ids;
	gint account_ids_length1;
	gpointer _async_data_;
};

struct _Block90Data {
	int _ref_count_;
	Block89Data * _data89_;
	gint i;
};

struct _TubaWidgetsCollectionAvatarsPopulateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaWidgetsCollectionAvatars* self;
	gchar** account_ids;
	gint account_ids_length1;
	Block89Data* _data89_;
	Block90Data* _data90_;
	gchar** accounts_arr;
	gchar** _tmp0_;
	gint accounts_arr_length1;
	gint _accounts_arr_size_;
	gchar** acc_id_collection;
	gint acc_id_collection_length1;
	gint _acc_id_collection_size_;
	gint acc_id_it;
	gchar* _tmp1_;
	gchar* acc_id;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	TubaRequestV2* req;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	TubaAccountStore* _tmp11_;
	TubaInstanceAccount* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaRequestV2* _tmp15_;
	TubaRequestV2* _tmp16_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp17_;
	GInputStream* _tmp18_;
	JsonParser* parser;
	GInputStream* _tmp19_;
	JsonParser* _tmp20_;
	JsonParser* _tmp21_;
	GError* e;
	gchar* msg;
	GError* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	TubaApplication* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	GError* _inner_error0_;
};

static gint TubaWidgetsCollectionRow_private_offset;
static gpointer tuba_widgets_collection_row_parent_class = NULL;
VALA_EXTERN TubaApplication* tuba_app;
static gint TubaWidgetsCollectionButton_private_offset;
static gpointer tuba_widgets_collection_button_parent_class = NULL;
static gint TubaWidgetsCollection_private_offset;
static gpointer tuba_widgets_collection_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaNetwork* tuba_network;
static gint TubaWidgetsCollectionAvatars_private_offset;
static gpointer tuba_widgets_collection_avatars_parent_class = NULL;

VALA_EXTERN GType tuba_widgets_collection_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsCollectionRow, 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_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPICollection, g_object_unref)
VALA_EXTERN TubaWidgetsCollectionRow* tuba_widgets_collection_row_new (TubaAPICollection* collection);
VALA_EXTERN TubaWidgetsCollectionRow* tuba_widgets_collection_row_construct (GType object_type,
                                                                 TubaAPICollection* collection);
static void tuba_widgets_collection_row_on_activated (TubaWidgetsCollectionRow* self);
static void _tuba_widgets_collection_row_on_activated_tuba_widgets_collection_row_open (TubaWidgetsCollectionRow* _sender,
                                                                                 gpointer self);
static void _tuba_widgets_collection_row_on_activated_gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                          gpointer self);
VALA_EXTERN GType tuba_widgets_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsCollection, g_object_unref)
VALA_EXTERN TubaWidgetsCollection* tuba_widgets_collection_new (TubaAPICollection* collection,
                                                    gboolean has_menu);
VALA_EXTERN TubaWidgetsCollection* tuba_widgets_collection_construct (GType object_type,
                                                          TubaAPICollection* collection,
                                                          gboolean has_menu);
static void tuba_widgets_collection_row_refresh (TubaWidgetsCollectionRow* self);
static void _tuba_widgets_collection_row_refresh_tuba_widgets_collection_refresh (TubaWidgetsCollection* _sender,
                                                                           gpointer self);
VALA_EXTERN GType tuba_dialogs_collection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsCollection, g_object_unref)
VALA_EXTERN TubaDialogsCollection* tuba_dialogs_collection_new (TubaAPICollection* collection);
VALA_EXTERN TubaDialogsCollection* tuba_dialogs_collection_construct (GType object_type,
                                                          TubaAPICollection* collection);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
static void tuba_widgets_collection_row_finalize (GObject * obj);
static GType tuba_widgets_collection_row_get_type_once (void);
VALA_EXTERN GType tuba_widgets_collection_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsCollectionButton, g_object_unref)
VALA_EXTERN TubaWidgetsCollectionButton* tuba_widgets_collection_button_new (TubaAPICollection* collection);
VALA_EXTERN TubaWidgetsCollectionButton* tuba_widgets_collection_button_construct (GType object_type,
                                                                       TubaAPICollection* collection);
static void tuba_widgets_collection_button_on_activated (TubaWidgetsCollectionButton* self);
static void _tuba_widgets_collection_button_on_activated_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self);
static void tuba_widgets_collection_button_finalize (GObject * obj);
static GType tuba_widgets_collection_button_get_type_once (void);
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
static void tuba_widgets_collection_on_copy_url (TubaWidgetsCollection* self);
static void _tuba_widgets_collection_on_copy_url_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self);
static void tuba_widgets_collection_on_edit (TubaWidgetsCollection* self);
static void _tuba_widgets_collection_on_edit_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self);
static void tuba_widgets_collection_on_remove_me (TubaWidgetsCollection* self);
static void _tuba_widgets_collection_on_remove_me_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self);
static void tuba_widgets_collection_on_report (TubaWidgetsCollection* self);
static void _tuba_widgets_collection_on_report_gsimple_action_activate_callback (GSimpleAction* action,
                                                                          GVariant* parameter,
                                                                          gpointer self);
static void tuba_widgets_collection_on_block (TubaWidgetsCollection* self);
static void _tuba_widgets_collection_on_block_gsimple_action_activate_callback (GSimpleAction* action,
                                                                         GVariant* parameter,
                                                                         gpointer self);
static void tuba_widgets_collection_on_delete (TubaWidgetsCollection* self);
static void _tuba_widgets_collection_on_delete_gsimple_action_activate_callback (GSimpleAction* action,
                                                                          GVariant* parameter,
                                                                          gpointer self);
static void tuba_widgets_collection_on_refresh (TubaWidgetsCollection* self);
VALA_EXTERN void tuba_utils_host_copy (const gchar* str);
VALA_EXTERN const gchar* tuba_api_collection_get_url (TubaAPICollection* self);
VALA_EXTERN GType tuba_dialogs_collections_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsCollections, g_object_unref)
VALA_EXTERN TubaDialogsCollections* tuba_dialogs_collections_new (TubaAPICollection* collection);
VALA_EXTERN TubaDialogsCollections* tuba_dialogs_collections_construct (GType object_type,
                                                            TubaAPICollection* collection);
static void _tuba_widgets_collection_on_refresh_tuba_dialogs_collections_refresh (TubaDialogsCollections* _sender,
                                                                           gpointer 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);
static void tuba_widgets_collection_on_remove_me_real (TubaWidgetsCollection* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void tuba_widgets_collection_on_remove_me_real_finish (TubaWidgetsCollection* self,
                                                       GAsyncResult* _res_);
static void tuba_widgets_collection_on_remove_me_real_data_free (gpointer _data);
static gboolean tuba_widgets_collection_on_remove_me_real_co (TubaWidgetsCollectionOnRemoveMeRealData* _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_api_collection_get_name (TubaAPICollection* self);
static void tuba_widgets_collection_on_remove_me_real_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
VALA_EXTERN gboolean tuba_application_question_answer_truthy (TubaApplicationQuestionAnswer self);
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN const gchar* tuba_api_collection_get_id (TubaAPICollection* self);
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_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 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_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);
VALA_EXTERN GType tuba_api_mention_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIMention, g_object_unref)
VALA_EXTERN TubaDialogsReport* tuba_dialogs_report_new (TubaAPIAccount* account,
                                            const gchar* status_id,
                                            GeeArrayList* mentions,
                                            TubaAPICollection* collection);
VALA_EXTERN TubaDialogsReport* tuba_dialogs_report_construct (GType object_type,
                                                  TubaAPIAccount* account,
                                                  const gchar* status_id,
                                                  GeeArrayList* mentions,
                                                  TubaAPICollection* collection);
VALA_EXTERN GType tuba_dialogs_report_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsReport, g_object_unref)
VALA_EXTERN gchar* tuba_api_account_get_handle (TubaAPIAccount* self);
static void __lambda135_ (TubaWidgetsCollection* self,
                   GObject* obj,
                   GAsyncResult* res);
static void tuba_widgets_collection_block_author (TubaWidgetsCollection* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static void tuba_widgets_collection_block_author_finish (TubaWidgetsCollection* self,
                                                  GAsyncResult* _res_);
static void ___lambda135__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void tuba_widgets_collection_on_delete_real (TubaWidgetsCollection* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static void tuba_widgets_collection_on_delete_real_finish (TubaWidgetsCollection* self,
                                                    GAsyncResult* _res_);
static void tuba_widgets_collection_on_delete_real_data_free (gpointer _data);
static gboolean tuba_widgets_collection_on_delete_real_co (TubaWidgetsCollectionOnDeleteRealData* _data_);
static void tuba_widgets_collection_on_delete_real_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void tuba_widgets_collection_block_author_data_free (gpointer _data);
static gboolean tuba_widgets_collection_block_author_co (TubaWidgetsCollectionBlockAuthorData* _data_);
VALA_EXTERN void tuba_request_v2_add_parameter (TubaRequestV2* self,
                                    const gchar* key,
                                    const gchar* value);
VALA_EXTERN const gchar* tuba_api_collection_get_account_id (TubaAPICollection* self);
static void tuba_widgets_collection_block_author_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 void tuba_network_parse_array (JsonParser* parser,
                               TubaNetworkNodeCallback cb,
                               gpointer cb_target,
                               GDestroyNotify cb_target_destroy_notify,
                               GError** error);
static void ___lambda136_ (TubaWidgetsCollection* self,
                    JsonNode* node,
                    GError** error);
VALA_EXTERN TubaEntity* tuba_entity_from_json (GType type,
                                   JsonNode* node,
                                   GError** error);
VALA_EXTERN GType tuba_api_relationship_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIRelationship, g_object_unref)
VALA_EXTERN GType tuba_api_relationship_modify_param_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaAPIRelationshipModifyParam* tuba_api_relationship_modify_param_dup (const TubaAPIRelationshipModifyParam* self);
VALA_EXTERN void tuba_api_relationship_modify_param_free (TubaAPIRelationshipModifyParam* self);
VALA_EXTERN void tuba_api_relationship_modify_param_copy (const TubaAPIRelationshipModifyParam* self,
                                              TubaAPIRelationshipModifyParam* dest);
VALA_EXTERN void tuba_api_relationship_modify_param_destroy (TubaAPIRelationshipModifyParam* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaAPIRelationshipModifyParam, tuba_api_relationship_modify_param_destroy)
VALA_EXTERN void tuba_api_relationship_modify (TubaAPIRelationship* self,
                                   const gchar* operation,
                                   TubaAPIRelationshipModifyParam* modify_params,
                                   gint modify_params_length1);
static void ____lambda136__tuba_network_node_callback (JsonNode* node,
                                                gpointer self,
                                                GError** error);
VALA_EXTERN const gchar* tuba_api_account_get_id (TubaAPIAccount* self);
VALA_EXTERN GType tuba_api_collection_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPICollectionItem, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_collection_get_items (TubaAPICollection* self);
VALA_EXTERN const gchar* tuba_api_collection_item_get_account_id (TubaAPICollectionItem* self);
static void _vala_array_add133 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
VALA_EXTERN const gchar* tuba_api_collection_item_get_id (TubaAPICollectionItem* self);
VALA_EXTERN gboolean tuba_api_collection_get_sensitive (TubaAPICollection* self);
VALA_EXTERN GType tuba_widgets_collection_avatars_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsCollectionAvatars, g_object_unref)
VALA_EXTERN TubaWidgetsCollectionAvatars* tuba_widgets_collection_avatars_new (gchar** account_ids,
                                                                   gint account_ids_length1,
                                                                   gboolean sensitive);
VALA_EXTERN TubaWidgetsCollectionAvatars* tuba_widgets_collection_avatars_construct (GType object_type,
                                                                         gchar** account_ids,
                                                                         gint account_ids_length1,
                                                                         gboolean sensitive);
VALA_EXTERN gint32 tuba_api_collection_get_item_count (TubaAPICollection* self);
VALA_EXTERN gchar* tuba_utils_units_shorten (gint64 unit);
VALA_EXTERN gchar* tuba_utils_date_time_humanize_aria (const gchar* iso8601);
VALA_EXTERN const gchar* tuba_api_collection_get_updated_at (TubaAPICollection* self);
static void tuba_widgets_collection_get_collection_real (TubaWidgetsCollection* self,
                                                  GtkBox* title_box,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void tuba_widgets_collection_get_collection_real_finish (TubaWidgetsCollection* self,
                                                         GAsyncResult* _res_);
static void tuba_widgets_collection_get_collection_real_data_free (gpointer _data);
static gboolean tuba_widgets_collection_get_collection_real_co (TubaWidgetsCollectionGetCollectionRealData* _data_);
static void tuba_widgets_collection_get_collection_real_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
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 TubaAPIAccount* tuba_api_account_from (JsonNode* node,
                                       GError** error);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN const gchar* tuba_api_account_get_display_name (TubaAPIAccount* self);
VALA_EXTERN GeeHashMap* tuba_api_account_get_emojis_map (TubaAPIAccount* self);
VALA_EXTERN GType tuba_widgets_rich_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsRichLabel, g_object_unref)
VALA_EXTERN TubaWidgetsRichLabel* tuba_widgets_rich_label_new_with_emojis (const gchar* text,
                                                               GeeHashMap* instance_emojis);
VALA_EXTERN TubaWidgetsRichLabel* tuba_widgets_rich_label_construct_with_emojis (GType object_type,
                                                                     const gchar* text,
                                                                     GeeHashMap* instance_emojis);
VALA_EXTERN void tuba_widgets_rich_label_set_use_markup (TubaWidgetsRichLabel* self,
                                             gboolean value);
VALA_EXTERN void tuba_widgets_rich_label_set_ellipsize (TubaWidgetsRichLabel* self,
                                            gboolean value);
VALA_EXTERN void tuba_widgets_rich_label_set_xalign (TubaWidgetsRichLabel* self,
                                         gfloat value);
static void tuba_widgets_collection_avatars_populate (TubaWidgetsCollectionAvatars* self,
                                               gchar** account_ids,
                                               gint account_ids_length1,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static void tuba_widgets_collection_avatars_populate_finish (TubaWidgetsCollectionAvatars* self,
                                                      GAsyncResult* _res_);
static void tuba_widgets_collection_avatars_populate_data_free (gpointer _data);
static gboolean tuba_widgets_collection_avatars_populate_co (TubaWidgetsCollectionAvatarsPopulateData* _data_);
static Block89Data* block89_data_ref (Block89Data* _data89_);
static void block89_data_unref (void * _userdata_);
static Block90Data* block90_data_ref (Block90Data* _data90_);
static void block90_data_unref (void * _userdata_);
static void _vala_array_add134 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void tuba_widgets_collection_avatars_populate_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
static void ___lambda137_ (Block90Data* _data90_,
                    JsonNode* node,
                    GError** error);
VALA_EXTERN GType tuba_widgets_avatar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAvatar, g_object_unref)
VALA_EXTERN TubaWidgetsAvatar* tuba_widgets_avatar_new (void);
VALA_EXTERN TubaWidgetsAvatar* tuba_widgets_avatar_construct (GType object_type);
VALA_EXTERN void tuba_widgets_avatar_set_account (TubaWidgetsAvatar* self,
                                      TubaAPIAccount* value);
VALA_EXTERN void tuba_widgets_avatar_set_size (TubaWidgetsAvatar* self,
                                   gint value);
VALA_EXTERN void tuba_widgets_avatar_set_allow_mini_profile (TubaWidgetsAvatar* self,
                                                 gboolean value);
static void ____lambda137__tuba_network_node_callback (JsonNode* node,
                                                gpointer self,
                                                GError** error);
static void tuba_widgets_collection_avatars_finalize (GObject * obj);
static GType tuba_widgets_collection_avatars_get_type_once (void);
static void tuba_widgets_collection_finalize (GObject * obj);
static GType tuba_widgets_collection_get_type_once (void);
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 const GActionEntry TUBA_WIDGETS_COLLECTION_ACTION_ENTRIES[6] = {{"copy-url", _tuba_widgets_collection_on_copy_url_gsimple_action_activate_callback}, {"edit", _tuba_widgets_collection_on_edit_gsimple_action_activate_callback}, {"remove-me", _tuba_widgets_collection_on_remove_me_gsimple_action_activate_callback}, {"report", _tuba_widgets_collection_on_report_gsimple_action_activate_callback}, {"block", _tuba_widgets_collection_on_block_gsimple_action_activate_callback}, {"delete", _tuba_widgets_collection_on_delete_gsimple_action_activate_callback}};

static inline gpointer
tuba_widgets_collection_row_get_instance_private (TubaWidgetsCollectionRow* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsCollectionRow_private_offset);
}

static void
_tuba_widgets_collection_row_on_activated_tuba_widgets_collection_row_open (TubaWidgetsCollectionRow* _sender,
                                                                            gpointer self)
{
	tuba_widgets_collection_row_on_activated ((TubaWidgetsCollectionRow*) self);
}

static void
_tuba_widgets_collection_row_on_activated_gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                     gpointer self)
{
	tuba_widgets_collection_row_on_activated ((TubaWidgetsCollectionRow*) self);
}

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

static void
_tuba_widgets_collection_row_refresh_tuba_widgets_collection_refresh (TubaWidgetsCollection* _sender,
                                                                      gpointer self)
{
	tuba_widgets_collection_row_refresh ((TubaWidgetsCollectionRow*) self);
}

TubaWidgetsCollectionRow*
tuba_widgets_collection_row_construct (GType object_type,
                                       TubaAPICollection* collection)
{
	TubaWidgetsCollectionRow * self = NULL;
	TubaAPICollection* _tmp0_;
	TubaWidgetsCollection* w = NULL;
	TubaWidgetsCollection* _tmp1_;
	g_return_val_if_fail (collection != NULL, NULL);
	self = (TubaWidgetsCollectionRow*) g_object_new (object_type, NULL);
	g_signal_connect_object (self, "open", (GCallback) _tuba_widgets_collection_row_on_activated_tuba_widgets_collection_row_open, self, 0);
	g_signal_connect_object ((GtkListBoxRow*) self, "activate", (GCallback) _tuba_widgets_collection_row_on_activated_gtk_list_box_row_activate, self, 0);
	_tmp0_ = _g_object_ref0 (collection);
	_g_object_unref0 (self->priv->collection);
	self->priv->collection = _tmp0_;
	_tmp1_ = tuba_widgets_collection_new (collection, TRUE);
	g_object_ref_sink (_tmp1_);
	w = _tmp1_;
	g_signal_connect_object (w, "refresh", (GCallback) _tuba_widgets_collection_row_refresh_tuba_widgets_collection_refresh, self, 0);
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) w);
	_g_object_unref0 (w);
	return self;
}

TubaWidgetsCollectionRow*
tuba_widgets_collection_row_new (TubaAPICollection* collection)
{
	return tuba_widgets_collection_row_construct (TUBA_WIDGETS_TYPE_COLLECTION_ROW, collection);
}

static void
tuba_widgets_collection_row_on_activated (TubaWidgetsCollectionRow* self)
{
	TubaDialogsCollection* dlg = NULL;
	TubaAPICollection* _tmp0_;
	TubaDialogsCollection* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collection;
	_tmp1_ = tuba_dialogs_collection_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dlg = _tmp1_;
	adw_dialog_present ((AdwDialog*) dlg, (GtkWidget*) self);
	_g_object_unref0 (dlg);
}

static void
tuba_widgets_collection_row_refresh (TubaWidgetsCollectionRow* self)
{
	TubaApplication* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_app;
	g_signal_emit_by_name (_tmp0_, "refresh");
}

static void
tuba_widgets_collection_row_class_init (TubaWidgetsCollectionRowClass * klass,
                                        gpointer klass_data)
{
	tuba_widgets_collection_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsCollectionRow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_collection_row_finalize;
	tuba_widgets_collection_row_signals[TUBA_WIDGETS_COLLECTION_ROW_OPEN_SIGNAL] = g_signal_new ("open", TUBA_WIDGETS_TYPE_COLLECTION_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_widgets_collection_row_instance_init (TubaWidgetsCollectionRow * self,
                                           gpointer klass)
{
	self->priv = tuba_widgets_collection_row_get_instance_private (self);
}

static void
tuba_widgets_collection_row_finalize (GObject * obj)
{
	TubaWidgetsCollectionRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_COLLECTION_ROW, TubaWidgetsCollectionRow);
	_g_object_unref0 (self->priv->collection);
	G_OBJECT_CLASS (tuba_widgets_collection_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_collection_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsCollectionRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_collection_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsCollectionRow), 0, (GInstanceInitFunc) tuba_widgets_collection_row_instance_init, NULL };
	GType tuba_widgets_collection_row_type_id;
	tuba_widgets_collection_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "TubaWidgetsCollectionRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsCollectionRow_private_offset = g_type_add_instance_private (tuba_widgets_collection_row_type_id, sizeof (TubaWidgetsCollectionRowPrivate));
	return tuba_widgets_collection_row_type_id;
}

GType
tuba_widgets_collection_row_get_type (void)
{
	static GType tuba_widgets_collection_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_collection_row_type_id__once)) {
		GType tuba_widgets_collection_row_type_id;
		tuba_widgets_collection_row_type_id = tuba_widgets_collection_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_collection_row_type_id__once, tuba_widgets_collection_row_type_id);
	}
	return tuba_widgets_collection_row_type_id__once;
}

static inline gpointer
tuba_widgets_collection_button_get_instance_private (TubaWidgetsCollectionButton* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsCollectionButton_private_offset);
}

static void
_tuba_widgets_collection_button_on_activated_gtk_button_clicked (GtkButton* _sender,
                                                                 gpointer self)
{
	tuba_widgets_collection_button_on_activated ((TubaWidgetsCollectionButton*) self);
}

TubaWidgetsCollectionButton*
tuba_widgets_collection_button_construct (GType object_type,
                                          TubaAPICollection* collection)
{
	TubaWidgetsCollectionButton * self = NULL;
	TubaAPICollection* _tmp0_;
	TubaWidgetsCollection* _tmp1_;
	TubaWidgetsCollection* _tmp2_;
	g_return_val_if_fail (collection != NULL, NULL);
	self = (TubaWidgetsCollectionButton*) g_object_new (object_type, NULL);
	gtk_widget_add_css_class ((GtkWidget*) self, "flat");
	gtk_widget_add_css_class ((GtkWidget*) self, "frame");
	gtk_widget_add_css_class ((GtkWidget*) self, "collection-button");
	_tmp0_ = _g_object_ref0 (collection);
	_g_object_unref0 (self->priv->collection);
	self->priv->collection = _tmp0_;
	g_signal_connect_object ((GtkButton*) self, "clicked", (GCallback) _tuba_widgets_collection_button_on_activated_gtk_button_clicked, self, 0);
	_tmp1_ = tuba_widgets_collection_new (collection, FALSE);
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	gtk_button_set_child ((GtkButton*) self, (GtkWidget*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	return self;
}

TubaWidgetsCollectionButton*
tuba_widgets_collection_button_new (TubaAPICollection* collection)
{
	return tuba_widgets_collection_button_construct (TUBA_WIDGETS_TYPE_COLLECTION_BUTTON, collection);
}

static void
tuba_widgets_collection_button_on_activated (TubaWidgetsCollectionButton* self)
{
	TubaDialogsCollection* dlg = NULL;
	TubaAPICollection* _tmp0_;
	TubaDialogsCollection* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collection;
	_tmp1_ = tuba_dialogs_collection_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dlg = _tmp1_;
	adw_dialog_present ((AdwDialog*) dlg, (GtkWidget*) self);
	_g_object_unref0 (dlg);
}

static void
tuba_widgets_collection_button_class_init (TubaWidgetsCollectionButtonClass * klass,
                                           gpointer klass_data)
{
	tuba_widgets_collection_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsCollectionButton_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_collection_button_finalize;
}

static void
tuba_widgets_collection_button_instance_init (TubaWidgetsCollectionButton * self,
                                              gpointer klass)
{
	self->priv = tuba_widgets_collection_button_get_instance_private (self);
}

static void
tuba_widgets_collection_button_finalize (GObject * obj)
{
	TubaWidgetsCollectionButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_COLLECTION_BUTTON, TubaWidgetsCollectionButton);
	_g_object_unref0 (self->priv->collection);
	G_OBJECT_CLASS (tuba_widgets_collection_button_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_collection_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsCollectionButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_collection_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsCollectionButton), 0, (GInstanceInitFunc) tuba_widgets_collection_button_instance_init, NULL };
	GType tuba_widgets_collection_button_type_id;
	tuba_widgets_collection_button_type_id = g_type_register_static (gtk_button_get_type (), "TubaWidgetsCollectionButton", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsCollectionButton_private_offset = g_type_add_instance_private (tuba_widgets_collection_button_type_id, sizeof (TubaWidgetsCollectionButtonPrivate));
	return tuba_widgets_collection_button_type_id;
}

GType
tuba_widgets_collection_button_get_type (void)
{
	static GType tuba_widgets_collection_button_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_collection_button_type_id__once)) {
		GType tuba_widgets_collection_button_type_id;
		tuba_widgets_collection_button_type_id = tuba_widgets_collection_button_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_collection_button_type_id__once, tuba_widgets_collection_button_type_id);
	}
	return tuba_widgets_collection_button_type_id__once;
}

static inline gpointer
tuba_widgets_collection_get_instance_private (TubaWidgetsCollection* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsCollection_private_offset);
}

static void
_tuba_widgets_collection_on_copy_url_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self)
{
	tuba_widgets_collection_on_copy_url ((TubaWidgetsCollection*) self);
}

static void
_tuba_widgets_collection_on_edit_gsimple_action_activate_callback (GSimpleAction* action,
                                                                   GVariant* parameter,
                                                                   gpointer self)
{
	tuba_widgets_collection_on_edit ((TubaWidgetsCollection*) self);
}

static void
_tuba_widgets_collection_on_remove_me_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self)
{
	tuba_widgets_collection_on_remove_me ((TubaWidgetsCollection*) self);
}

static void
_tuba_widgets_collection_on_report_gsimple_action_activate_callback (GSimpleAction* action,
                                                                     GVariant* parameter,
                                                                     gpointer self)
{
	tuba_widgets_collection_on_report ((TubaWidgetsCollection*) self);
}

static void
_tuba_widgets_collection_on_block_gsimple_action_activate_callback (GSimpleAction* action,
                                                                    GVariant* parameter,
                                                                    gpointer self)
{
	tuba_widgets_collection_on_block ((TubaWidgetsCollection*) self);
}

static void
_tuba_widgets_collection_on_delete_gsimple_action_activate_callback (GSimpleAction* action,
                                                                     GVariant* parameter,
                                                                     gpointer self)
{
	tuba_widgets_collection_on_delete ((TubaWidgetsCollection*) self);
}

static void
tuba_widgets_collection_on_refresh (TubaWidgetsCollection* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_widgets_collection_signals[TUBA_WIDGETS_COLLECTION_REFRESH_SIGNAL], 0);
}

static void
tuba_widgets_collection_on_copy_url (TubaWidgetsCollection* self)
{
	TubaAPICollection* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TubaApplication* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collection;
	_tmp1_ = tuba_api_collection_get_url (_tmp0_);
	_tmp2_ = _tmp1_;
	tuba_utils_host_copy (_tmp2_);
	_tmp3_ = tuba_app;
	g_signal_emit_by_name (_tmp3_, "toast", _ ("Copied url to clipboard"), (guint) 5, NULL, NULL, NULL);
}

static void
_tuba_widgets_collection_on_refresh_tuba_dialogs_collections_refresh (TubaDialogsCollections* _sender,
                                                                      gpointer self)
{
	tuba_widgets_collection_on_refresh ((TubaWidgetsCollection*) self);
}

static void
tuba_widgets_collection_on_edit (TubaWidgetsCollection* self)
{
	TubaDialogsCollections* dlg = NULL;
	TubaAPICollection* _tmp0_;
	TubaDialogsCollections* _tmp1_;
	TubaApplication* _tmp2_;
	TubaDialogsMainWindow* _tmp3_;
	TubaDialogsMainWindow* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->collection;
	_tmp1_ = tuba_dialogs_collections_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dlg = _tmp1_;
	g_signal_connect_object (dlg, "refresh", (GCallback) _tuba_widgets_collection_on_refresh_tuba_dialogs_collections_refresh, self, 0);
	_tmp2_ = tuba_app;
	_tmp3_ = tuba_application_get_main_window (_tmp2_);
	_tmp4_ = _tmp3_;
	adw_dialog_present ((AdwDialog*) dlg, (GtkWidget*) _tmp4_);
	_g_object_unref0 (dlg);
}

static void
tuba_widgets_collection_on_remove_me (TubaWidgetsCollection* self)
{
	g_return_if_fail (self != NULL);
	tuba_widgets_collection_on_remove_me_real (self, NULL, NULL);
}

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

static void
tuba_widgets_collection_on_remove_me_real (TubaWidgetsCollection* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	TubaWidgetsCollectionOnRemoveMeRealData* _data_;
	TubaWidgetsCollection* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaWidgetsCollectionOnRemoveMeRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_widgets_collection_on_remove_me_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_widgets_collection_on_remove_me_real_co (_data_);
}

static void
tuba_widgets_collection_on_remove_me_real_finish (TubaWidgetsCollection* self,
                                                  GAsyncResult* _res_)
{
	TubaWidgetsCollectionOnRemoveMeRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_widgets_collection_on_remove_me_real_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	TubaWidgetsCollectionOnRemoveMeRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_widgets_collection_on_remove_me_real_co (_data_);
}

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_widgets_collection_on_remove_me_real_co (TubaWidgetsCollectionOnRemoveMeRealData* _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_ = _data_->self->priv->collection;
	_data_->_tmp2_ = tuba_api_collection_get_name (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_strdup_printf (_ ("Remove yourself from \"%s\"?"), _data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	memset (&_data_->_tmp6_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp6_.text);
	_data_->_tmp6_.text = _data_->_tmp5_;
	_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) {_ ("Remove"), 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_->_tmp6_, NULL, (GtkWidget*) _data_->_tmp9_, &_data_->_tmp10_, NULL, FALSE, tuba_widgets_collection_on_remove_me_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp11_ = tuba_application_question_finish (_data_->_tmp0_, _data_->_res_);
	_g_free0 (_data_->_tmp5_);
	_data_->question_answer = _data_->_tmp11_;
	if (!tuba_application_question_answer_truthy (_data_->question_answer)) {
		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;
	}
	_data_->_tmp12_ = _data_->self->priv->collection;
	_data_->_tmp13_ = tuba_api_collection_get_id (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = string_to_string (_data_->_tmp14_);
	_data_->_tmp16_ = _data_->self->priv->collection_self_item_id;
	_data_->_tmp17_ = string_to_string (_data_->_tmp16_);
	_data_->_tmp18_ = g_strconcat ("/api/v1/collections/", _data_->_tmp15_, "/items/", _data_->_tmp17_, "/revoke", NULL);
	_data_->_tmp19_ = _data_->_tmp18_;
	_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_ = NULL;
	_data_->_tmp24_ = tuba_request_v2_new (_data_->_tmp19_, TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp24_, _data_->_tmp23_);
	_g_object_unref0 (_data_->_tmp23_);
	_data_->_tmp25_ = _data_->_tmp24_;
	_g_free0 (_data_->_tmp19_);
	_data_->req = _data_->_tmp25_;
	{
		_data_->_tmp26_ = _data_->req;
		_data_->_state_ = 2;
		tuba_request_v2_exec (_data_->_tmp26_, tuba_widgets_collection_on_remove_me_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp27_ = tuba_request_v2_exec_finish (_data_->_tmp26_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp28_ = _data_->_tmp27_;
		_g_object_unref0 (_data_->_tmp28_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		g_signal_emit (_data_->self, tuba_widgets_collection_signals[TUBA_WIDGETS_COLLECTION_REFRESH_SIGNAL], 0);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp29_ = tuba_app;
		_data_->_tmp30_ = _data_->e;
		_data_->_tmp31_ = _data_->_tmp30_->message;
		g_signal_emit_by_name (_data_->_tmp29_, "toast", _data_->_tmp31_, (guint) 5, NULL, NULL, NULL);
		_data_->_tmp32_ = _data_->self->priv->collection;
		_data_->_tmp33_ = tuba_api_collection_get_id (_data_->_tmp32_);
		_data_->_tmp34_ = _data_->_tmp33_;
		_data_->_tmp35_ = string_to_string (_data_->_tmp34_);
		_data_->_tmp36_ = _data_->e;
		_data_->_tmp37_ = g_strdup_printf ("%i", _data_->_tmp36_->code);
		_data_->_tmp38_ = _data_->_tmp37_;
		_data_->_tmp39_ = _data_->e;
		_data_->_tmp40_ = _data_->_tmp39_->message;
		_data_->_tmp41_ = string_to_string (_data_->_tmp40_);
		_data_->_tmp42_ = g_strconcat ("Couldn't remove yourself from collection ", _data_->_tmp35_, ": ", _data_->_tmp38_, " ", _data_->_tmp41_, NULL);
		_data_->_tmp43_ = _data_->_tmp42_;
		g_warning ("Collection.vala:163: %s", _data_->_tmp43_);
		_g_free0 (_data_->_tmp43_);
		_g_free0 (_data_->_tmp38_);
		_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 void
tuba_widgets_collection_on_report (TubaWidgetsCollection* self)
{
	TubaAPIAccount* _tmp0_;
	TubaAPICollection* _tmp1_;
	TubaDialogsReport* _tmp2_;
	TubaDialogsReport* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->author;
	_tmp1_ = self->priv->collection;
	_tmp2_ = tuba_dialogs_report_new (_tmp0_, NULL, NULL, _tmp1_);
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
}

static void
__lambda135_ (TubaWidgetsCollection* self,
              GObject* obj,
              GAsyncResult* res)
{
	TubaApplication* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = tuba_app;
	if (tuba_application_question_answer_truthy (tuba_application_question_finish (_tmp0_, res))) {
		tuba_widgets_collection_block_author (self, NULL, NULL);
	}
}

static void
___lambda135__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda135_ ((TubaWidgetsCollection*) self, source_object, res);
	g_object_unref (self);
}

static void
tuba_widgets_collection_on_block (TubaWidgetsCollection* self)
{
	TubaApplication* _tmp0_;
	TubaAPIAccount* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	TubaApplicationQuestionText _tmp7_ = {0};
	TubaApplication* _tmp8_;
	TubaDialogsMainWindow* _tmp9_;
	TubaDialogsMainWindow* _tmp10_;
	TubaApplicationQuestionButtons _tmp11_ = {0};
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_app;
	_tmp1_ = self->priv->author;
	_tmp2_ = tuba_api_account_get_handle (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup_printf (_ ("Block \"%s\"?"), _tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp7_.text);
	_tmp7_.text = _tmp6_;
	_tmp7_.use_markup = FALSE;
	_tmp8_ = tuba_app;
	_tmp9_ = tuba_application_get_main_window (_tmp8_);
	_tmp10_ = _tmp9_;
	tuba_application_question_button_destroy (&_tmp11_.yes);
	_tmp11_.yes = (TubaApplicationQuestionButton) {_ ("Block"), ADW_RESPONSE_DESTRUCTIVE};
	tuba_application_question_button_destroy (&_tmp11_.no);
	_tmp11_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
	tuba_application_question (_tmp0_, &_tmp7_, NULL, (GtkWidget*) _tmp10_, &_tmp11_, NULL, FALSE, ___lambda135__gasync_ready_callback, g_object_ref (self));
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
}

static void
tuba_widgets_collection_on_delete (TubaWidgetsCollection* self)
{
	g_return_if_fail (self != NULL);
	tuba_widgets_collection_on_delete_real (self, NULL, NULL);
}

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

static void
tuba_widgets_collection_on_delete_real (TubaWidgetsCollection* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	TubaWidgetsCollectionOnDeleteRealData* _data_;
	TubaWidgetsCollection* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaWidgetsCollectionOnDeleteRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_widgets_collection_on_delete_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_widgets_collection_on_delete_real_co (_data_);
}

static void
tuba_widgets_collection_on_delete_real_finish (TubaWidgetsCollection* self,
                                               GAsyncResult* _res_)
{
	TubaWidgetsCollectionOnDeleteRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_widgets_collection_on_delete_real_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	TubaWidgetsCollectionOnDeleteRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_widgets_collection_on_delete_real_co (_data_);
}

static gboolean
tuba_widgets_collection_on_delete_real_co (TubaWidgetsCollectionOnDeleteRealData* _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_ = _data_->self->priv->collection;
	_data_->_tmp2_ = tuba_api_collection_get_name (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_strdup_printf (_ ("Delete \"%s\"?"), _data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	memset (&_data_->_tmp6_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp6_.text);
	_data_->_tmp6_.text = _data_->_tmp5_;
	_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_->_tmp6_, NULL, (GtkWidget*) _data_->_tmp9_, &_data_->_tmp10_, NULL, FALSE, tuba_widgets_collection_on_delete_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp11_ = tuba_application_question_finish (_data_->_tmp0_, _data_->_res_);
	_g_free0 (_data_->_tmp5_);
	_data_->question_answer = _data_->_tmp11_;
	if (!tuba_application_question_answer_truthy (_data_->question_answer)) {
		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;
	}
	_data_->_tmp12_ = _data_->self->priv->collection;
	_data_->_tmp13_ = tuba_api_collection_get_id (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = string_to_string (_data_->_tmp14_);
	_data_->_tmp16_ = g_strconcat ("/api/v1/collections/", _data_->_tmp15_, 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_ = NULL;
	_data_->_tmp22_ = tuba_request_v2_new (_data_->_tmp17_, TUBA_REQUEST_V2_METHOD_DELETE);
	tuba_request_v2_set_account (_data_->_tmp22_, _data_->_tmp21_);
	_g_object_unref0 (_data_->_tmp21_);
	_data_->_tmp23_ = _data_->_tmp22_;
	_g_free0 (_data_->_tmp17_);
	_data_->req = _data_->_tmp23_;
	{
		_data_->_tmp24_ = _data_->req;
		_data_->_state_ = 2;
		tuba_request_v2_exec (_data_->_tmp24_, tuba_widgets_collection_on_delete_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp25_ = tuba_request_v2_exec_finish (_data_->_tmp24_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp26_ = _data_->_tmp25_;
		_g_object_unref0 (_data_->_tmp26_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		g_signal_emit (_data_->self, tuba_widgets_collection_signals[TUBA_WIDGETS_COLLECTION_REFRESH_SIGNAL], 0);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp27_ = tuba_app;
		_data_->_tmp28_ = _data_->e;
		_data_->_tmp29_ = _data_->_tmp28_->message;
		g_signal_emit_by_name (_data_->_tmp27_, "toast", _data_->_tmp29_, (guint) 5, NULL, NULL, NULL);
		_data_->_tmp30_ = _data_->self->priv->collection;
		_data_->_tmp31_ = tuba_api_collection_get_id (_data_->_tmp30_);
		_data_->_tmp32_ = _data_->_tmp31_;
		_data_->_tmp33_ = string_to_string (_data_->_tmp32_);
		_data_->_tmp34_ = _data_->e;
		_data_->_tmp35_ = g_strdup_printf ("%i", _data_->_tmp34_->code);
		_data_->_tmp36_ = _data_->_tmp35_;
		_data_->_tmp37_ = _data_->e;
		_data_->_tmp38_ = _data_->_tmp37_->message;
		_data_->_tmp39_ = string_to_string (_data_->_tmp38_);
		_data_->_tmp40_ = g_strconcat ("Couldn't delete collection ", _data_->_tmp33_, ": ", _data_->_tmp36_, " ", _data_->_tmp39_, NULL);
		_data_->_tmp41_ = _data_->_tmp40_;
		g_warning ("Collection.vala:206: %s", _data_->_tmp41_);
		_g_free0 (_data_->_tmp41_);
		_g_free0 (_data_->_tmp36_);
		_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 void
tuba_widgets_collection_block_author_data_free (gpointer _data)
{
	TubaWidgetsCollectionBlockAuthorData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaWidgetsCollectionBlockAuthorData, _data_);
}

static void
tuba_widgets_collection_block_author (TubaWidgetsCollection* self,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	TubaWidgetsCollectionBlockAuthorData* _data_;
	TubaWidgetsCollection* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaWidgetsCollectionBlockAuthorData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_widgets_collection_block_author_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_widgets_collection_block_author_co (_data_);
}

static void
tuba_widgets_collection_block_author_finish (TubaWidgetsCollection* self,
                                             GAsyncResult* _res_)
{
	TubaWidgetsCollectionBlockAuthorData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_widgets_collection_block_author_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_)
{
	TubaWidgetsCollectionBlockAuthorData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_widgets_collection_block_author_co (_data_);
}

static void
___lambda136_ (TubaWidgetsCollection* self,
               JsonNode* node,
               GError** error)
{
	TubaEntity* _tmp0_ = NULL;
	TubaEntity* _tmp1_;
	TubaAPIRelationship* rs = NULL;
	TubaAPIRelationship* _tmp2_;
	TubaAPIRelationship* _tmp3_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (node != NULL);
	_tmp1_ = tuba_entity_from_json (TUBA_API_TYPE_RELATIONSHIP, node, &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp2_ = _g_object_ref0 (TUBA_API_IS_RELATIONSHIP (_tmp0_) ? ((TubaAPIRelationship*) _tmp0_) : NULL);
	rs = _tmp2_;
	_tmp3_ = rs;
	if (_tmp3_ != NULL) {
		TubaAPIRelationship* _tmp4_;
		_tmp4_ = rs;
		tuba_api_relationship_modify (_tmp4_, "block", NULL, (gint) 0);
	}
	_g_object_unref0 (rs);
	_g_object_unref0 (_tmp0_);
}

static void
____lambda136__tuba_network_node_callback (JsonNode* node,
                                           gpointer self,
                                           GError** error)
{
	___lambda136_ ((TubaWidgetsCollection*) self, node, error);
}

static gboolean
tuba_widgets_collection_block_author_co (TubaWidgetsCollectionBlockAuthorData* _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_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/relationships", TUBA_REQUEST_V2_METHOD_GET);
		tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
		_g_object_unref0 (_data_->_tmp3_);
		_data_->req = _data_->_tmp4_;
		_data_->_tmp5_ = _data_->req;
		_data_->_tmp6_ = _data_->self->priv->collection;
		_data_->_tmp7_ = tuba_api_collection_get_account_id (_data_->_tmp6_);
		_data_->_tmp8_ = _data_->_tmp7_;
		tuba_request_v2_add_parameter (_data_->_tmp5_, "id[]", _data_->_tmp8_);
		_data_->_tmp9_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp9_, tuba_widgets_collection_block_author_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp10_ = tuba_request_v2_exec_finish (_data_->_tmp9_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp10_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->req);
			goto __catch0_g_error;
		}
		_data_->_tmp11_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp11_, NULL, tuba_widgets_collection_block_author_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp12_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp12_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			goto __catch0_g_error;
		}
		_data_->_tmp13_ = _data_->parser;
		tuba_network_parse_array (_data_->_tmp13_, ____lambda136__tuba_network_node_callback, g_object_ref (_data_->self), g_object_unref, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			goto __catch0_g_error;
		}
		g_signal_emit (_data_->self, tuba_widgets_collection_signals[TUBA_WIDGETS_COLLECTION_REFRESH_SIGNAL], 0);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->req);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp14_ = tuba_app;
		_data_->_tmp15_ = _data_->e;
		_data_->_tmp16_ = _data_->_tmp15_->message;
		g_signal_emit_by_name (_data_->_tmp14_, "toast", _data_->_tmp16_, (guint) 5, NULL, NULL, NULL);
		_data_->_tmp17_ = _data_->self->priv->collection;
		_data_->_tmp18_ = tuba_api_collection_get_account_id (_data_->_tmp17_);
		_data_->_tmp19_ = _data_->_tmp18_;
		_data_->_tmp20_ = string_to_string (_data_->_tmp19_);
		_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 block ", _data_->_tmp20_, ": ", _data_->_tmp23_, " ", _data_->_tmp26_, NULL);
		_data_->_tmp28_ = _data_->_tmp27_;
		g_warning ("Collection.vala:226: %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_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_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
_vala_array_add133 (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;
}

TubaWidgetsCollection*
tuba_widgets_collection_construct (GType object_type,
                                   TubaAPICollection* collection,
                                   gboolean has_menu)
{
	TubaWidgetsCollection * self = NULL;
	TubaAPICollection* _tmp0_;
	gboolean i_made_it = FALSE;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TubaAccountStore* _tmp3_;
	TubaInstanceAccount* _tmp4_;
	TubaInstanceAccount* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar** account_ids = NULL;
	gchar** _tmp8_;
	gint account_ids_length1;
	gint _account_ids_size_;
	gboolean _tmp9_ = FALSE;
	GeeArrayList* _tmp10_;
	GeeArrayList* _tmp11_;
	gboolean i_am_in_it = FALSE;
	const gchar* _tmp48_;
	GtkMenuButton* menu_btn = NULL;
	GtkBox* title_box = NULL;
	GtkBox* _tmp66_;
	GtkBox* _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	gchar* _tmp70_;
	gchar** _tmp71_;
	GtkLabel* _tmp72_ = NULL;
	GtkLabel* _tmp73_;
	GtkBox* _tmp74_;
	gint32 _tmp75_;
	gint32 _tmp76_;
	gint32 _tmp77_;
	gint32 _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	gchar* _tmp83_;
	gchar* _tmp84_;
	GtkLabel* _tmp85_ = NULL;
	GtkLabel* _tmp86_;
	GtkBox* _tmp87_;
	g_return_val_if_fail (collection != NULL, NULL);
	self = (TubaWidgetsCollection*) g_object_new (object_type, NULL);
	gtk_widget_add_css_class ((GtkWidget*) self, "collection");
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_HORIZONTAL);
	gtk_box_set_spacing ((GtkBox*) self, 12);
	_tmp0_ = _g_object_ref0 (collection);
	_g_object_unref0 (self->priv->collection);
	self->priv->collection = _tmp0_;
	_tmp1_ = tuba_api_collection_get_account_id (collection);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_accounts;
	_tmp4_ = tuba_account_store_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_api_account_get_id ((TubaAPIAccount*) _tmp5_);
	_tmp7_ = _tmp6_;
	i_made_it = g_strcmp0 (_tmp2_, _tmp7_) == 0;
	_tmp8_ = g_new0 (gchar*, 0 + 1);
	account_ids = _tmp8_;
	account_ids_length1 = 0;
	_account_ids_size_ = account_ids_length1;
	_tmp10_ = tuba_api_collection_get_items (collection);
	_tmp11_ = _tmp10_;
	if (_tmp11_ != NULL) {
		GeeArrayList* _tmp12_;
		GeeArrayList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		_tmp12_ = tuba_api_collection_get_items (collection);
		_tmp13_ = _tmp12_;
		_tmp14_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp9_ = _tmp15_ > 0;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		gchar** _tmp43_;
		gint _tmp43__length1;
		gboolean _tmp44_;
		gboolean _tmp45_;
		TubaWidgetsCollectionAvatars* _tmp46_ = NULL;
		TubaWidgetsCollectionAvatars* _tmp47_;
		{
			GeeArrayList* _item_list = NULL;
			GeeArrayList* _tmp16_;
			GeeArrayList* _tmp17_;
			gint _item_size = 0;
			GeeArrayList* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gint _item_index = 0;
			_tmp16_ = tuba_api_collection_get_items (collection);
			_tmp17_ = _tmp16_;
			_item_list = _tmp17_;
			_tmp18_ = _item_list;
			_tmp19_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp18_);
			_tmp20_ = _tmp19_;
			_item_size = _tmp20_;
			_item_index = -1;
			while (TRUE) {
				gint _tmp21_;
				gint _tmp22_;
				TubaAPICollectionItem* item = NULL;
				GeeArrayList* _tmp23_;
				gpointer _tmp24_;
				gchar** _tmp25_;
				gint _tmp25__length1;
				_item_index = _item_index + 1;
				_tmp21_ = _item_index;
				_tmp22_ = _item_size;
				if (!(_tmp21_ < _tmp22_)) {
					break;
				}
				_tmp23_ = _item_list;
				_tmp24_ = gee_abstract_list_get ((GeeAbstractList*) _tmp23_, _item_index);
				item = (TubaAPICollectionItem*) _tmp24_;
				_tmp25_ = account_ids;
				_tmp25__length1 = account_ids_length1;
				if (_tmp25__length1 < 4) {
					TubaAPICollectionItem* _tmp26_;
					const gchar* _tmp27_;
					const gchar* _tmp28_;
					gchar* _tmp29_;
					_tmp26_ = item;
					_tmp27_ = tuba_api_collection_item_get_account_id (_tmp26_);
					_tmp28_ = _tmp27_;
					_tmp29_ = g_strdup (_tmp28_);
					_vala_array_add133 (&account_ids, &account_ids_length1, &_account_ids_size_, _tmp29_);
				}
				if (!i_made_it) {
					TubaAPICollectionItem* _tmp30_;
					const gchar* _tmp31_;
					const gchar* _tmp32_;
					TubaAccountStore* _tmp33_;
					TubaInstanceAccount* _tmp34_;
					TubaInstanceAccount* _tmp35_;
					const gchar* _tmp36_;
					const gchar* _tmp37_;
					_tmp30_ = item;
					_tmp31_ = tuba_api_collection_item_get_account_id (_tmp30_);
					_tmp32_ = _tmp31_;
					_tmp33_ = tuba_accounts;
					_tmp34_ = tuba_account_store_get_active (_tmp33_);
					_tmp35_ = _tmp34_;
					_tmp36_ = tuba_api_account_get_id ((TubaAPIAccount*) _tmp35_);
					_tmp37_ = _tmp36_;
					if (g_strcmp0 (_tmp32_, _tmp37_) == 0) {
						TubaAPICollectionItem* _tmp38_;
						const gchar* _tmp39_;
						const gchar* _tmp40_;
						gchar* _tmp41_;
						_tmp38_ = item;
						_tmp39_ = tuba_api_collection_item_get_id (_tmp38_);
						_tmp40_ = _tmp39_;
						_tmp41_ = g_strdup (_tmp40_);
						_g_free0 (self->priv->collection_self_item_id);
						self->priv->collection_self_item_id = _tmp41_;
					}
				} else {
					gchar** _tmp42_;
					gint _tmp42__length1;
					_tmp42_ = account_ids;
					_tmp42__length1 = account_ids_length1;
					if (_tmp42__length1 >= 4) {
						_g_object_unref0 (item);
						break;
					}
				}
				_g_object_unref0 (item);
			}
		}
		_tmp43_ = account_ids;
		_tmp43__length1 = account_ids_length1;
		_tmp44_ = tuba_api_collection_get_sensitive (collection);
		_tmp45_ = _tmp44_;
		_tmp46_ = tuba_widgets_collection_avatars_new (_tmp43_, _tmp43__length1, _tmp45_);
		gtk_widget_set_halign ((GtkWidget*) _tmp46_, GTK_ALIGN_CENTER);
		gtk_widget_set_valign ((GtkWidget*) _tmp46_, GTK_ALIGN_CENTER);
		g_object_ref_sink (_tmp46_);
		_tmp47_ = _tmp46_;
		gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp47_);
		_g_object_unref0 (_tmp47_);
	}
	_tmp48_ = self->priv->collection_self_item_id;
	i_am_in_it = g_strcmp0 (_tmp48_, "") != 0;
	menu_btn = NULL;
	if (has_menu) {
		GSimpleActionGroup* actions = NULL;
		GSimpleActionGroup* _tmp49_;
		GSimpleActionGroup* _tmp50_;
		GSimpleActionGroup* _tmp51_;
		GMenu* menu_model = NULL;
		GMenu* _tmp52_;
		GMenu* _tmp53_;
		gchar* _tmp59_;
		gchar* _tmp60_;
		gchar* _tmp61_;
		gchar** _tmp62_;
		GMenu* _tmp63_;
		GMenuModel* _tmp64_;
		GtkMenuButton* _tmp65_ = NULL;
		_tmp49_ = g_simple_action_group_new ();
		actions = _tmp49_;
		_tmp50_ = actions;
		g_action_map_add_action_entries ((GActionMap*) _tmp50_, TUBA_WIDGETS_COLLECTION_ACTION_ENTRIES, (gint) G_N_ELEMENTS (TUBA_WIDGETS_COLLECTION_ACTION_ENTRIES), self);
		_tmp51_ = actions;
		gtk_widget_insert_action_group ((GtkWidget*) self, "collection", (GActionGroup*) _tmp51_);
		_tmp52_ = g_menu_new ();
		menu_model = _tmp52_;
		_tmp53_ = menu_model;
		g_menu_append (_tmp53_, _ ("Copy URL"), "collection.copy-url");
		if (i_made_it) {
			GMenu* _tmp54_;
			_tmp54_ = menu_model;
			g_menu_append (_tmp54_, _ ("Edit"), "collection.edit");
		}
		if (i_am_in_it) {
			GMenu* _tmp55_;
			_tmp55_ = menu_model;
			g_menu_append (_tmp55_, _ ("Remove Myself"), "collection.remove-me");
		}
		if (!i_made_it) {
			GMenu* _tmp56_;
			_tmp56_ = menu_model;
			g_menu_append (_tmp56_, C_ ("verb", "Report"), "collection.report");
		}
		if (i_am_in_it) {
			GMenu* _tmp57_;
			_tmp57_ = menu_model;
			g_menu_append (_tmp57_, _ ("Block Author"), "collection.block");
		}
		if (i_made_it) {
			GMenu* _tmp58_;
			_tmp58_ = menu_model;
			g_menu_append (_tmp58_, _ ("Delete"), "collection.delete");
		}
		_tmp59_ = g_strdup ("view-more-horizontal-symbolic");
		_tmp60_ = g_strdup (_ ("Menu"));
		_tmp61_ = g_strdup ("flat");
		_tmp62_ = g_new0 (gchar*, 1 + 1);
		_tmp62_[0] = _tmp61_;
		_tmp63_ = menu_model;
		_tmp64_ = _g_object_ref0 ((GMenuModel*) _tmp63_);
		_tmp65_ = (GtkMenuButton*) gtk_menu_button_new ();
		gtk_menu_button_set_icon_name (_tmp65_, _tmp59_);
		_g_free0 (_tmp59_);
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp65_, _tmp60_);
		_g_free0 (_tmp60_);
		gtk_widget_set_halign ((GtkWidget*) _tmp65_, GTK_ALIGN_CENTER);
		gtk_widget_set_valign ((GtkWidget*) _tmp65_, GTK_ALIGN_CENTER);
		gtk_widget_set_css_classes ((GtkWidget*) _tmp65_, _tmp62_);
		_tmp62_ = (_vala_array_free (_tmp62_, 1, (GDestroyNotify) g_free), NULL);
		gtk_menu_button_set_menu_model (_tmp65_, _tmp64_);
		_g_object_unref0 (_tmp64_);
		g_object_ref_sink (_tmp65_);
		_g_object_unref0 (menu_btn);
		menu_btn = _tmp65_;
		_g_object_unref0 (menu_model);
		_g_object_unref0 (actions);
	}
	_tmp66_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
	g_object_ref_sink (_tmp66_);
	title_box = _tmp66_;
	_tmp67_ = title_box;
	_tmp68_ = tuba_api_collection_get_name (collection);
	_tmp69_ = _tmp68_;
	_tmp70_ = g_strdup ("font-bold");
	_tmp71_ = g_new0 (gchar*, 1 + 1);
	_tmp71_[0] = _tmp70_;
	_tmp72_ = (GtkLabel*) gtk_label_new (_tmp69_);
	gtk_label_set_ellipsize (_tmp72_, PANGO_ELLIPSIZE_END);
	gtk_label_set_xalign (_tmp72_, (gfloat) 0);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp72_, _tmp71_);
	_tmp71_ = (_vala_array_free (_tmp71_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp72_);
	_tmp73_ = _tmp72_;
	gtk_box_append (_tmp67_, (GtkWidget*) _tmp73_);
	_g_object_unref0 (_tmp73_);
	_tmp74_ = title_box;
	_tmp75_ = tuba_api_collection_get_item_count (collection);
	_tmp76_ = _tmp75_;
	_tmp77_ = tuba_api_collection_get_item_count (collection);
	_tmp78_ = _tmp77_;
	_tmp79_ = tuba_utils_units_shorten ((gint64) _tmp78_);
	_tmp80_ = _tmp79_;
	_tmp81_ = g_strdup_printf ("<b>%s</b>", _tmp80_);
	_tmp82_ = _tmp81_;
	_tmp83_ = g_strdup_printf (ngettext ("%s Account", "%s Accounts", (gulong) _tmp76_), _tmp82_);
	_tmp84_ = _tmp83_;
	_tmp85_ = (GtkLabel*) gtk_label_new (_tmp84_);
	gtk_label_set_xalign (_tmp85_, (gfloat) 0);
	gtk_label_set_use_markup (_tmp85_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp85_, TRUE);
	g_object_ref_sink (_tmp85_);
	_tmp86_ = _tmp85_;
	gtk_box_append (_tmp74_, (GtkWidget*) _tmp86_);
	_g_object_unref0 (_tmp86_);
	_g_free0 (_tmp84_);
	_g_free0 (_tmp82_);
	_g_free0 (_tmp80_);
	_tmp87_ = title_box;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp87_);
	if (has_menu) {
		GtkMenuButton* _tmp88_;
		_tmp88_ = menu_btn;
		gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp88_);
	}
	if (i_made_it) {
		GtkBox* _tmp89_;
		const gchar* _tmp90_;
		const gchar* _tmp91_;
		gchar* _tmp92_;
		gchar* _tmp93_;
		gchar* _tmp94_;
		gchar* _tmp95_;
		GtkLabel* _tmp96_ = NULL;
		GtkLabel* _tmp97_;
		_tmp89_ = title_box;
		_tmp90_ = tuba_api_collection_get_updated_at (collection);
		_tmp91_ = _tmp90_;
		_tmp92_ = tuba_utils_date_time_humanize_aria (_tmp91_);
		_tmp93_ = _tmp92_;
		_tmp94_ = g_strdup_printf ("Last Updated: %s", _tmp93_);
		_tmp95_ = _tmp94_;
		_tmp96_ = (GtkLabel*) gtk_label_new (_tmp95_);
		gtk_label_set_xalign (_tmp96_, (gfloat) 0);
		gtk_widget_set_hexpand ((GtkWidget*) _tmp96_, TRUE);
		g_object_ref_sink (_tmp96_);
		_tmp97_ = _tmp96_;
		gtk_box_append (_tmp89_, (GtkWidget*) _tmp97_);
		_g_object_unref0 (_tmp97_);
		_g_free0 (_tmp95_);
		_g_free0 (_tmp93_);
	} else {
		GtkBox* _tmp98_;
		_tmp98_ = title_box;
		tuba_widgets_collection_get_collection_real (self, _tmp98_, NULL, NULL);
	}
	_g_object_unref0 (title_box);
	_g_object_unref0 (menu_btn);
	account_ids = (_vala_array_free (account_ids, account_ids_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

TubaWidgetsCollection*
tuba_widgets_collection_new (TubaAPICollection* collection,
                             gboolean has_menu)
{
	return tuba_widgets_collection_construct (TUBA_WIDGETS_TYPE_COLLECTION, collection, has_menu);
}

static void
tuba_widgets_collection_get_collection_real_data_free (gpointer _data)
{
	TubaWidgetsCollectionGetCollectionRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->title_box);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaWidgetsCollectionGetCollectionRealData, _data_);
}

static void
tuba_widgets_collection_get_collection_real (TubaWidgetsCollection* self,
                                             GtkBox* title_box,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	TubaWidgetsCollectionGetCollectionRealData* _data_;
	TubaWidgetsCollection* _tmp0_;
	GtkBox* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title_box != NULL);
	_data_ = g_slice_new0 (TubaWidgetsCollectionGetCollectionRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_widgets_collection_get_collection_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (title_box);
	_g_object_unref0 (_data_->title_box);
	_data_->title_box = _tmp1_;
	tuba_widgets_collection_get_collection_real_co (_data_);
}

static void
tuba_widgets_collection_get_collection_real_finish (TubaWidgetsCollection* self,
                                                    GAsyncResult* _res_)
{
	TubaWidgetsCollectionGetCollectionRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_widgets_collection_get_collection_real_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	TubaWidgetsCollectionGetCollectionRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_widgets_collection_get_collection_real_co (_data_);
}

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

static gboolean
tuba_widgets_collection_get_collection_real_co (TubaWidgetsCollectionGetCollectionRealData* _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_ = _data_->self->priv->collection;
	_data_->_tmp1_ = tuba_api_collection_get_account_id (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = string_to_string (_data_->_tmp2_);
	_data_->_tmp4_ = g_strconcat ("/api/v1/accounts/", _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_ = NULL;
	_data_->_tmp10_ = tuba_request_v2_new (_data_->_tmp5_, TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp10_, _data_->_tmp9_);
	_g_object_unref0 (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_g_free0 (_data_->_tmp5_);
	_data_->req = _data_->_tmp11_;
	{
		_data_->_tmp12_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp12_, tuba_widgets_collection_get_collection_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp13_ = tuba_request_v2_exec_finish (_data_->_tmp12_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp13_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp14_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp14_, NULL, tuba_widgets_collection_get_collection_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp15_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp15_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp16_ = tuba_network;
		_data_->_tmp17_ = _data_->parser;
		_data_->_tmp18_ = tuba_network_parse_node (_data_->_tmp16_, _data_->_tmp17_);
		_data_->node = _data_->_tmp18_;
		_data_->_tmp19_ = _data_->node;
		_data_->_tmp20_ = tuba_api_account_from (_data_->_tmp19_, &_data_->_inner_error0_);
		_data_->acc = _data_->_tmp20_;
		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;
		}
		_data_->_tmp21_ = _data_->acc;
		_data_->_tmp22_ = _g_object_ref0 (_data_->_tmp21_);
		_g_object_unref0 (_data_->self->priv->author);
		_data_->self->priv->author = _data_->_tmp22_;
		_data_->_tmp23_ = _data_->acc;
		_data_->_tmp24_ = tuba_api_account_get_display_name (_data_->_tmp23_);
		_data_->_tmp25_ = _data_->_tmp24_;
		_data_->_tmp26_ = g_strdup_printf (_ ("By %s"), _data_->_tmp25_);
		_data_->_tmp27_ = _data_->_tmp26_;
		_data_->_tmp28_ = _data_->acc;
		_data_->_tmp29_ = tuba_api_account_get_emojis_map (_data_->_tmp28_);
		_data_->_tmp30_ = _data_->_tmp29_;
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_tmp32_ = NULL;
		_data_->_tmp32_ = tuba_widgets_rich_label_new_with_emojis (_data_->_tmp27_, _data_->_tmp31_);
		tuba_widgets_rich_label_set_use_markup (_data_->_tmp32_, FALSE);
		tuba_widgets_rich_label_set_ellipsize (_data_->_tmp32_, TRUE);
		tuba_widgets_rich_label_set_xalign (_data_->_tmp32_, 0.0f);
		g_object_ref_sink (_data_->_tmp32_);
		_data_->_tmp33_ = _data_->_tmp32_;
		gtk_box_append (_data_->title_box, (GtkWidget*) _data_->_tmp33_);
		_g_object_unref0 (_data_->_tmp33_);
		_g_object_unref0 (_data_->_tmp31_);
		_g_free0 (_data_->_tmp27_);
		_g_object_unref0 (_data_->acc);
		__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_->_tmp34_ = tuba_app;
		_data_->_tmp35_ = _data_->e;
		_data_->_tmp36_ = _data_->_tmp35_->message;
		g_signal_emit_by_name (_data_->_tmp34_, "toast", _data_->_tmp36_, (guint) 5, NULL, NULL, NULL);
		_data_->_tmp37_ = _data_->self->priv->collection;
		_data_->_tmp38_ = tuba_api_collection_get_id (_data_->_tmp37_);
		_data_->_tmp39_ = _data_->_tmp38_;
		_data_->_tmp40_ = string_to_string (_data_->_tmp39_);
		_data_->_tmp41_ = _data_->e;
		_data_->_tmp42_ = g_strdup_printf ("%i", _data_->_tmp41_->code);
		_data_->_tmp43_ = _data_->_tmp42_;
		_data_->_tmp44_ = _data_->e;
		_data_->_tmp45_ = _data_->_tmp44_->message;
		_data_->_tmp46_ = string_to_string (_data_->_tmp45_);
		_data_->_tmp47_ = g_strconcat ("Couldn't fetch collection ", _data_->_tmp40_, ": ", _data_->_tmp43_, " ", _data_->_tmp46_, NULL);
		_data_->_tmp48_ = _data_->_tmp47_;
		g_warning ("Collection.vala:327: %s", _data_->_tmp48_);
		_g_free0 (_data_->_tmp48_);
		_g_free0 (_data_->_tmp43_);
		_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 inline gpointer
tuba_widgets_collection_avatars_get_instance_private (TubaWidgetsCollectionAvatars* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsCollectionAvatars_private_offset);
}

TubaWidgetsCollectionAvatars*
tuba_widgets_collection_avatars_construct (GType object_type,
                                           gchar** account_ids,
                                           gint account_ids_length1,
                                           gboolean sensitive)
{
	TubaWidgetsCollectionAvatars * self = NULL;
	self = (TubaWidgetsCollectionAvatars*) g_object_new (object_type, NULL);
	gtk_box_set_spacing ((GtkBox*) self, 2);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_HORIZONTAL);
	if (sensitive) {
		gtk_widget_add_css_class ((GtkWidget*) self, "collection-sensitive");
	}
	if (account_ids_length1 > 2) {
		GtkBox* _tmp0_;
		GtkBox* _tmp1_;
		GtkBox* _tmp2_;
		GtkBox* _tmp3_;
		gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
		_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
		g_object_ref_sink (_tmp0_);
		_g_object_unref0 (self->priv->box1);
		self->priv->box1 = _tmp0_;
		_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
		g_object_ref_sink (_tmp1_);
		_g_object_unref0 (self->priv->box2);
		self->priv->box2 = _tmp1_;
		_tmp2_ = self->priv->box1;
		gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp2_);
		_tmp3_ = self->priv->box2;
		gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp3_);
	}
	tuba_widgets_collection_avatars_populate (self, account_ids, (gint) account_ids_length1, NULL, NULL);
	return self;
}

TubaWidgetsCollectionAvatars*
tuba_widgets_collection_avatars_new (gchar** account_ids,
                                     gint account_ids_length1,
                                     gboolean sensitive)
{
	return tuba_widgets_collection_avatars_construct (TUBA_WIDGETS_COLLECTION_TYPE_AVATARS, account_ids, account_ids_length1, sensitive);
}

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

static void
tuba_widgets_collection_avatars_populate (TubaWidgetsCollectionAvatars* self,
                                          gchar** account_ids,
                                          gint account_ids_length1,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	TubaWidgetsCollectionAvatarsPopulateData* _data_;
	TubaWidgetsCollectionAvatars* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaWidgetsCollectionAvatarsPopulateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_widgets_collection_avatars_populate_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->account_ids = account_ids;
	_data_->account_ids_length1 = account_ids_length1;
	tuba_widgets_collection_avatars_populate_co (_data_);
}

static void
tuba_widgets_collection_avatars_populate_finish (TubaWidgetsCollectionAvatars* self,
                                                 GAsyncResult* _res_)
{
	TubaWidgetsCollectionAvatarsPopulateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block89Data*
block89_data_ref (Block89Data* _data89_)
{
	g_atomic_int_inc (&_data89_->_ref_count_);
	return _data89_;
}

static void
block89_data_unref (void * _userdata_)
{
	Block89Data* _data89_;
	_data89_ = (Block89Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data89_->_ref_count_)) {
		TubaWidgetsCollectionAvatars* self;
		self = _data89_->self;
		_g_object_unref0 (self);
		g_slice_free (Block89Data, _data89_);
	}
}

static Block90Data*
block90_data_ref (Block90Data* _data90_)
{
	g_atomic_int_inc (&_data90_->_ref_count_);
	return _data90_;
}

static void
block90_data_unref (void * _userdata_)
{
	Block90Data* _data90_;
	_data90_ = (Block90Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data90_->_ref_count_)) {
		TubaWidgetsCollectionAvatars* self;
		self = _data90_->_data89_->self;
		block89_data_unref (_data90_->_data89_);
		_data90_->_data89_ = NULL;
		g_slice_free (Block90Data, _data90_);
	}
}

static void
_vala_array_add134 (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*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static void
tuba_widgets_collection_avatars_populate_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	TubaWidgetsCollectionAvatarsPopulateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_widgets_collection_avatars_populate_co (_data_);
}

static void
___lambda137_ (Block90Data* _data90_,
               JsonNode* node,
               GError** error)
{
	Block89Data* _data89_;
	TubaWidgetsCollectionAvatars* self;
	TubaAPIAccount* acc = NULL;
	TubaAPIAccount* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkBox* _tmp2_;
	GError* _inner_error0_ = NULL;
	_data89_ = _data90_->_data89_;
	self = _data89_->self;
	g_return_if_fail (node != NULL);
	_tmp0_ = tuba_api_account_from (node, &_inner_error0_);
	acc = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp2_ = self->priv->box1;
	if (_tmp2_ != NULL) {
		GtkBox* _tmp3_;
		_tmp3_ = self->priv->box2;
		_tmp1_ = _tmp3_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkBox* _tmp4_ = NULL;
		GtkBox* to_add_to = NULL;
		GtkBox* _tmp7_;
		TubaWidgetsAvatar* avi = NULL;
		TubaAPIAccount* _tmp8_;
		TubaWidgetsAvatar* _tmp9_ = NULL;
		TubaWidgetsAvatar* _tmp10_;
		GtkBox* _tmp11_;
		TubaWidgetsAvatar* _tmp12_;
		if ((_data90_->i % 2) == 0) {
			GtkBox* _tmp5_;
			_tmp5_ = self->priv->box1;
			_tmp4_ = _tmp5_;
		} else {
			GtkBox* _tmp6_;
			_tmp6_ = self->priv->box2;
			_tmp4_ = _tmp6_;
		}
		_tmp7_ = _g_object_ref0 (_tmp4_);
		to_add_to = _tmp7_;
		_tmp8_ = _g_object_ref0 (acc);
		_tmp9_ = tuba_widgets_avatar_new ();
		tuba_widgets_avatar_set_account (_tmp9_, _tmp8_);
		_g_object_unref0 (_tmp8_);
		tuba_widgets_avatar_set_size (_tmp9_, 25);
		gtk_widget_set_overflow ((GtkWidget*) _tmp9_, GTK_OVERFLOW_HIDDEN);
		tuba_widgets_avatar_set_allow_mini_profile (_tmp9_, TRUE);
		g_object_ref_sink (_tmp9_);
		avi = _tmp9_;
		_tmp10_ = avi;
		gtk_widget_add_css_class ((GtkWidget*) _tmp10_, "no-min-size");
		_tmp11_ = to_add_to;
		_tmp12_ = avi;
		gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
		_data90_->i += 1;
		_g_object_unref0 (avi);
		_g_object_unref0 (to_add_to);
	} else {
		gint _tmp13_ = 0;
		TubaAPIAccount* _tmp14_;
		TubaWidgetsAvatar* _tmp15_ = NULL;
		TubaWidgetsAvatar* _tmp16_;
		if (_data89_->account_ids_length1 == 1) {
			_tmp13_ = 48;
		} else {
			_tmp13_ = 30;
		}
		_tmp14_ = _g_object_ref0 (acc);
		_tmp15_ = tuba_widgets_avatar_new ();
		tuba_widgets_avatar_set_account (_tmp15_, _tmp14_);
		_g_object_unref0 (_tmp14_);
		tuba_widgets_avatar_set_size (_tmp15_, _tmp13_);
		gtk_widget_set_overflow ((GtkWidget*) _tmp15_, GTK_OVERFLOW_HIDDEN);
		tuba_widgets_avatar_set_allow_mini_profile (_tmp15_, TRUE);
		g_object_ref_sink (_tmp15_);
		_tmp16_ = _tmp15_;
		gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp16_);
		_g_object_unref0 (_tmp16_);
	}
	_g_object_unref0 (acc);
}

static void
____lambda137__tuba_network_node_callback (JsonNode* node,
                                           gpointer self,
                                           GError** error)
{
	___lambda137_ (self, node, error);
}

static gboolean
tuba_widgets_collection_avatars_populate_co (TubaWidgetsCollectionAvatarsPopulateData* _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_->_data89_ = g_slice_new0 (Block89Data);
	_data_->_data89_->_ref_count_ = 1;
	_data_->_data89_->self = g_object_ref (_data_->self);
	_data_->_data89_->account_ids = _data_->account_ids;
	_data_->_data89_->account_ids_length1 = _data_->account_ids_length1;
	_data_->_data89_->_async_data_ = _data_;
	{
		_data_->_data90_ = g_slice_new0 (Block90Data);
		_data_->_data90_->_ref_count_ = 1;
		_data_->_data90_->_data89_ = block89_data_ref (_data_->_data89_);
		_data_->_tmp0_ = g_new0 (gchar*, 0 + 1);
		_data_->accounts_arr = _data_->_tmp0_;
		_data_->accounts_arr_length1 = 0;
		_data_->_accounts_arr_size_ = _data_->accounts_arr_length1;
		{
			_data_->acc_id_collection_length1 = 0;
			_data_->_acc_id_collection_size_ = 0;
			_data_->acc_id_collection = _data_->_data89_->account_ids;
			_data_->acc_id_collection_length1 = _data_->_data89_->account_ids_length1;
			for (_data_->acc_id_it = 0; _data_->acc_id_it < _data_->acc_id_collection_length1; _data_->acc_id_it = _data_->acc_id_it + 1) {
				_data_->_tmp1_ = g_strdup (_data_->acc_id_collection[_data_->acc_id_it]);
				_data_->acc_id = _data_->_tmp1_;
				{
					_data_->_tmp2_ = _data_->acc_id;
					_data_->_tmp3_ = string_to_string (_data_->_tmp2_);
					_data_->_tmp4_ = g_strconcat ("id[]=", _data_->_tmp3_, NULL);
					_vala_array_add134 (&_data_->accounts_arr, &_data_->accounts_arr_length1, &_data_->_accounts_arr_size_, _data_->_tmp4_);
					_g_free0 (_data_->acc_id);
				}
			}
		}
		_data_->_tmp5_ = _data_->accounts_arr;
		_data_->_tmp5__length1 = _data_->accounts_arr_length1;
		_data_->_tmp6_ = _vala_g_strjoinv ("&", _data_->_tmp5_, (gint) _data_->_tmp5__length1);
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = string_to_string (_data_->_tmp7_);
		_data_->_tmp9_ = g_strconcat ("/api/v1/accounts?", _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_ = NULL;
		_data_->_tmp15_ = tuba_request_v2_new (_data_->_tmp10_, TUBA_REQUEST_V2_METHOD_GET);
		tuba_request_v2_set_account (_data_->_tmp15_, _data_->_tmp14_);
		_g_object_unref0 (_data_->_tmp14_);
		_data_->_tmp16_ = _data_->_tmp15_;
		_g_free0 (_data_->_tmp10_);
		_g_free0 (_data_->_tmp7_);
		_data_->req = _data_->_tmp16_;
		_data_->_tmp17_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp17_, tuba_widgets_collection_avatars_populate_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp18_ = tuba_request_v2_exec_finish (_data_->_tmp17_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp18_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->req);
			_data_->accounts_arr = (_vala_array_free (_data_->accounts_arr, _data_->accounts_arr_length1, (GDestroyNotify) g_free), NULL);
			block90_data_unref (_data_->_data90_);
			_data_->_data90_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_tmp19_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp19_, NULL, tuba_widgets_collection_avatars_populate_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp20_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp20_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			_data_->accounts_arr = (_vala_array_free (_data_->accounts_arr, _data_->accounts_arr_length1, (GDestroyNotify) g_free), NULL);
			block90_data_unref (_data_->_data90_);
			_data_->_data90_ = NULL;
			goto __catch0_g_error;
		}
		_data_->_data90_->i = 0;
		_data_->_tmp21_ = _data_->parser;
		tuba_network_parse_array (_data_->_tmp21_, ____lambda137__tuba_network_node_callback, block90_data_ref (_data_->_data90_), block90_data_unref, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			_data_->accounts_arr = (_vala_array_free (_data_->accounts_arr, _data_->accounts_arr_length1, (GDestroyNotify) g_free), NULL);
			block90_data_unref (_data_->_data90_);
			_data_->_data90_ = NULL;
			goto __catch0_g_error;
		}
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->req);
		_data_->accounts_arr = (_vala_array_free (_data_->accounts_arr, _data_->accounts_arr_length1, (GDestroyNotify) g_free), NULL);
		block90_data_unref (_data_->_data90_);
		_data_->_data90_ = NULL;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp22_ = _data_->e;
		_data_->_tmp23_ = _data_->_tmp22_->message;
		_data_->_tmp24_ = g_strdup_printf (_ ("Couldn't fetch collection images: %s"), _data_->_tmp23_);
		_data_->msg = _data_->_tmp24_;
		_data_->_tmp25_ = tuba_app;
		_data_->_tmp26_ = _data_->msg;
		g_signal_emit_by_name (_data_->_tmp25_, "toast", _data_->_tmp26_, (guint) 5, NULL, NULL, NULL);
		_data_->_tmp27_ = _data_->msg;
		g_warning ("Collection.vala:107: %s", _data_->_tmp27_);
		_g_free0 (_data_->msg);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		block89_data_unref (_data_->_data89_);
		_data_->_data89_ = 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;
	}
	block89_data_unref (_data_->_data89_);
	_data_->_data89_ = 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_widgets_collection_avatars_class_init (TubaWidgetsCollectionAvatarsClass * klass,
                                            gpointer klass_data)
{
	tuba_widgets_collection_avatars_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsCollectionAvatars_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_collection_avatars_finalize;
}

static void
tuba_widgets_collection_avatars_instance_init (TubaWidgetsCollectionAvatars * self,
                                               gpointer klass)
{
	self->priv = tuba_widgets_collection_avatars_get_instance_private (self);
	self->priv->box1 = NULL;
	self->priv->box2 = NULL;
}

static void
tuba_widgets_collection_avatars_finalize (GObject * obj)
{
	TubaWidgetsCollectionAvatars * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_COLLECTION_TYPE_AVATARS, TubaWidgetsCollectionAvatars);
	_g_object_unref0 (self->priv->box1);
	_g_object_unref0 (self->priv->box2);
	G_OBJECT_CLASS (tuba_widgets_collection_avatars_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_collection_avatars_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsCollectionAvatarsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_collection_avatars_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsCollectionAvatars), 0, (GInstanceInitFunc) tuba_widgets_collection_avatars_instance_init, NULL };
	GType tuba_widgets_collection_avatars_type_id;
	tuba_widgets_collection_avatars_type_id = g_type_register_static (gtk_box_get_type (), "TubaWidgetsCollectionAvatars", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsCollectionAvatars_private_offset = g_type_add_instance_private (tuba_widgets_collection_avatars_type_id, sizeof (TubaWidgetsCollectionAvatarsPrivate));
	return tuba_widgets_collection_avatars_type_id;
}

GType
tuba_widgets_collection_avatars_get_type (void)
{
	static GType tuba_widgets_collection_avatars_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_collection_avatars_type_id__once)) {
		GType tuba_widgets_collection_avatars_type_id;
		tuba_widgets_collection_avatars_type_id = tuba_widgets_collection_avatars_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_collection_avatars_type_id__once, tuba_widgets_collection_avatars_type_id);
	}
	return tuba_widgets_collection_avatars_type_id__once;
}

static void
tuba_widgets_collection_class_init (TubaWidgetsCollectionClass * klass,
                                    gpointer klass_data)
{
	tuba_widgets_collection_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsCollection_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_collection_finalize;
	tuba_widgets_collection_signals[TUBA_WIDGETS_COLLECTION_REFRESH_SIGNAL] = g_signal_new ("refresh", TUBA_WIDGETS_TYPE_COLLECTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_widgets_collection_instance_init (TubaWidgetsCollection * self,
                                       gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tuba_widgets_collection_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->collection_self_item_id = _tmp0_;
	self->priv->author = NULL;
}

static void
tuba_widgets_collection_finalize (GObject * obj)
{
	TubaWidgetsCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_COLLECTION, TubaWidgetsCollection);
	g_debug ("Collection.vala:44: Destroying Collection");
	_g_object_unref0 (self->priv->collection);
	_g_free0 (self->priv->collection_self_item_id);
	_g_object_unref0 (self->priv->author);
	G_OBJECT_CLASS (tuba_widgets_collection_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_collection_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsCollection), 0, (GInstanceInitFunc) tuba_widgets_collection_instance_init, NULL };
	GType tuba_widgets_collection_type_id;
	tuba_widgets_collection_type_id = g_type_register_static (gtk_box_get_type (), "TubaWidgetsCollection", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsCollection_private_offset = g_type_add_instance_private (tuba_widgets_collection_type_id, sizeof (TubaWidgetsCollectionPrivate));
	return tuba_widgets_collection_type_id;
}

GType
tuba_widgets_collection_get_type (void)
{
	static GType tuba_widgets_collection_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_collection_type_id__once)) {
		GType tuba_widgets_collection_type_id;
		tuba_widgets_collection_type_id = tuba_widgets_collection_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_collection_type_id__once, tuba_widgets_collection_type_id);
	}
	return tuba_widgets_collection_type_id__once;
}

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

