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

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

#define TUBA_VIEWS_SIDEBAR_MAX_SIDEBAR_LISTS 25
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TUBA_VIEWS_TYPE_BASE (tuba_views_base_get_type ())
#define TUBA_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBase))
#define TUBA_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))
#define TUBA_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))

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

#define TUBA_VIEWS_TYPE_CONTENT_BASE (tuba_views_content_base_get_type ())
#define TUBA_VIEWS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase))
#define TUBA_VIEWS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))
#define TUBA_VIEWS_IS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_IS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_CONTENT_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))

typedef struct _TubaViewsContentBase TubaViewsContentBase;
typedef struct _TubaViewsContentBaseClass TubaViewsContentBaseClass;
typedef struct _TubaViewsContentBasePrivate TubaViewsContentBasePrivate;

#define TUBA_TYPE_ACCOUNT_HOLDER (tuba_account_holder_get_type ())
#define TUBA_ACCOUNT_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_HOLDER, TubaAccountHolder))
#define TUBA_IS_ACCOUNT_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_HOLDER))
#define TUBA_ACCOUNT_HOLDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_ACCOUNT_HOLDER, TubaAccountHolderIface))

typedef struct _TubaAccountHolder TubaAccountHolder;
typedef struct _TubaAccountHolderIface TubaAccountHolderIface;

#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_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

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

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_TYPE_STREAMABLE (tuba_streamable_get_type ())
#define TUBA_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_STREAMABLE, TubaStreamable))
#define TUBA_IS_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_STREAMABLE))
#define TUBA_STREAMABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_STREAMABLE, TubaStreamableIface))

typedef struct _TubaStreamable TubaStreamable;
typedef struct _TubaStreamableIface TubaStreamableIface;

#define TUBA_VIEWS_TYPE_TIMELINE (tuba_views_timeline_get_type ())
#define TUBA_VIEWS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline))
#define TUBA_VIEWS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))
#define TUBA_VIEWS_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))

typedef struct _TubaViewsTimeline TubaViewsTimeline;
typedef struct _TubaViewsTimelineClass TubaViewsTimelineClass;
typedef struct _TubaViewsTimelinePrivate TubaViewsTimelinePrivate;

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

#define TUBA_STREAMABLE_TYPE_EVENT (tuba_streamable_event_get_type ())
typedef struct _TubaStreamableEvent TubaStreamableEvent;

#define TUBA_VIEWS_TYPE_LISTS (tuba_views_lists_get_type ())
#define TUBA_VIEWS_LISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_LISTS, TubaViewsLists))
#define TUBA_VIEWS_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_LISTS, TubaViewsListsClass))
#define TUBA_VIEWS_IS_LISTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_LISTS))
#define TUBA_VIEWS_IS_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_LISTS))
#define TUBA_VIEWS_LISTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_LISTS, TubaViewsListsClass))

typedef struct _TubaViewsLists TubaViewsLists;
typedef struct _TubaViewsListsClass TubaViewsListsClass;
typedef struct _TubaViewsListsPrivate TubaViewsListsPrivate;
enum  {
	TUBA_VIEWS_LISTS_0_PROPERTY,
	TUBA_VIEWS_LISTS_EMPTY_PROPERTY,
	TUBA_VIEWS_LISTS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_lists_properties[TUBA_VIEWS_LISTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_VIEWS_LISTS_TYPE_ROW (tuba_views_lists_row_get_type ())
#define TUBA_VIEWS_LISTS_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_LISTS_TYPE_ROW, TubaViewsListsRow))
#define TUBA_VIEWS_LISTS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_LISTS_TYPE_ROW, TubaViewsListsRowClass))
#define TUBA_VIEWS_LISTS_IS_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_LISTS_TYPE_ROW))
#define TUBA_VIEWS_LISTS_IS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_LISTS_TYPE_ROW))
#define TUBA_VIEWS_LISTS_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_LISTS_TYPE_ROW, TubaViewsListsRowClass))

typedef struct _TubaViewsListsRow TubaViewsListsRow;
typedef struct _TubaViewsListsRowClass TubaViewsListsRowClass;

#define TUBA_API_TYPE_LIST (tuba_api_list_get_type ())
#define TUBA_API_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_LIST, TubaAPIList))
#define TUBA_API_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_LIST, TubaAPIListClass))
#define TUBA_API_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_LIST))
#define TUBA_API_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_LIST))
#define TUBA_API_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_LIST, TubaAPIListClass))

typedef struct _TubaAPIList TubaAPIList;
typedef struct _TubaAPIListClass TubaAPIListClass;
#define _g_free0(var) (var = (g_free (var), NULL))
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_OOPSIE (tuba_oopsie_get_type ())

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

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

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

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaViewsListsCreateListData TubaViewsListsCreateListData;
typedef struct _TubaViewsListsRowPrivate TubaViewsListsRowPrivate;

#define TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON (tuba_widgets_status_action_button_get_type ())
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))

typedef struct _TubaWidgetsStatusActionButton TubaWidgetsStatusActionButton;
typedef struct _TubaWidgetsStatusActionButtonClass TubaWidgetsStatusActionButtonClass;
enum  {
	TUBA_VIEWS_LISTS_ROW_0_PROPERTY,
	TUBA_VIEWS_LISTS_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_views_lists_row_properties[TUBA_VIEWS_LISTS_ROW_NUM_PROPERTIES];

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

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;

#define TUBA_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;
typedef struct _TubaViewsListsRowOnRemoveClickedRealData TubaViewsListsRowOnRemoveClickedRealData;

#define TUBA_DIALOGS_TYPE_LIST_EDIT (tuba_dialogs_list_edit_get_type ())
#define TUBA_DIALOGS_LIST_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEdit))
#define TUBA_DIALOGS_LIST_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEditClass))
#define TUBA_DIALOGS_IS_LIST_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_LIST_EDIT))
#define TUBA_DIALOGS_IS_LIST_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_LIST_EDIT))
#define TUBA_DIALOGS_LIST_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_LIST_EDIT, TubaDialogsListEditClass))

typedef struct _TubaDialogsListEdit TubaDialogsListEdit;
typedef struct _TubaDialogsListEditClass TubaDialogsListEditClass;

#define TUBA_VIEWS_TYPE_LIST (tuba_views_list_get_type ())
#define TUBA_VIEWS_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_LIST, TubaViewsList))
#define TUBA_VIEWS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_LIST, TubaViewsListClass))
#define TUBA_VIEWS_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_LIST))
#define TUBA_VIEWS_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_LIST))
#define TUBA_VIEWS_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_LIST, TubaViewsListClass))

typedef struct _TubaViewsList TubaViewsList;
typedef struct _TubaViewsListClass TubaViewsListClass;
enum  {
	TUBA_VIEWS_LISTS_ROW_REMOVE_FROM_MODEL_SIGNAL,
	TUBA_VIEWS_LISTS_ROW_OPEN_SIGNAL,
	TUBA_VIEWS_LISTS_ROW_NUM_SIGNALS
};
static guint tuba_views_lists_row_signals[TUBA_VIEWS_LISTS_ROW_NUM_SIGNALS] = {0};

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

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

struct _TubaViewsContentBase {
	TubaViewsBase parent_instance;
	TubaViewsContentBasePrivate * priv;
	GtkListBox* content;
	GListStore* model;
};

struct _TubaViewsContentBaseClass {
	TubaViewsBaseClass parent_class;
	void (*on_scrolled_vadjustment_value_change) (TubaViewsContentBase* self);
	void (*clear_all_but_first) (TubaViewsContentBase* self, gint i);
	void (*attempt_focus_grab) (TubaViewsContentBase* self);
	GtkWidget* (*on_create_model_widget) (TubaViewsContentBase* self, GObject* obj);
	void (*on_bottom_reached) (TubaViewsContentBase* self);
	void (*on_content_item_activated) (TubaViewsContentBase* self, GtkListBoxRow* row);
	gboolean (*get_empty) (TubaViewsContentBase* self);
};

struct _TubaAccountHolderIface {
	GTypeInterface parent_iface;
	void (*on_account_changed) (TubaAccountHolder* self, TubaInstanceAccount* acc);
	void (*on_accounts_changed) (TubaAccountHolder* self, GeeArrayList* accounts);
	TubaInstanceAccount* (*get_account) (TubaAccountHolder* self);
	void (*set_account) (TubaAccountHolder* self, TubaInstanceAccount* value);
};

struct _TubaStreamableIface {
	GTypeInterface parent_iface;
	gchar* (*get_stream_url) (TubaStreamable* self);
	void (*on_streaming_policy_changed) (TubaStreamable* self);
	const gchar* (*get_t_connection_url) (TubaStreamable* self);
	void (*set_t_connection_url) (TubaStreamable* self, const gchar* value);
	gboolean (*get_subscribed) (TubaStreamable* self);
	void (*set_subscribed) (TubaStreamable* self, gboolean value);
};

struct _TubaStreamableEvent {
	gchar* type;
	JsonNode* payload;
};

struct _TubaViewsTimeline {
	TubaViewsContentBase parent_instance;
	TubaViewsTimelinePrivate * priv;
};

struct _TubaViewsTimelineClass {
	TubaViewsContentBaseClass parent_class;
	gchar* (*get_req_url) (TubaViewsTimeline* self);
	void (*append_params_v2) (TubaViewsTimeline* self, TubaRequestV2* req);
	void (*on_request_finish) (TubaViewsTimeline* self);
	void (*request) (TubaViewsTimeline* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*request_finish) (TubaViewsTimeline* self, GAsyncResult* _res_);
	void (*on_refresh) (TubaViewsTimeline* self);
	void (*on_manual_refresh) (TubaViewsTimeline* self);
	void (*on_account_changed) (TubaViewsTimeline* self, TubaInstanceAccount* acc);
	gchar* (*get_stream_url) (TubaViewsTimeline* self);
	gboolean (*should_hide) (TubaViewsTimeline* self, TubaEntity* entity);
	void (*on_new_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_edit_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_delete_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_remove_user) (TubaViewsTimeline* self, const gchar* user_id);
};

struct _TubaViewsLists {
	TubaViewsTimeline parent_instance;
	TubaViewsListsPrivate * priv;
};

struct _TubaViewsListsClass {
	TubaViewsTimelineClass parent_class;
};

struct _TubaViewsListsPrivate {
	GtkEntry* child_entry;
	GtkButton* add_button;
};

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 _TubaViewsListsCreateListData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsLists* self;
	gchar* list_name;
	JsonBuilder* builder;
	JsonBuilder* _tmp0_;
	JsonBuilder* _tmp1_;
	JsonBuilder* _tmp2_;
	JsonBuilder* _tmp3_;
	JsonBuilder* _tmp4_;
	TubaRequestV2* req;
	TubaAccountStore* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaRequestV2* _tmp9_;
	TubaRequestV2* _tmp10_;
	JsonBuilder* _tmp11_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp12_;
	GInputStream* _tmp13_;
	JsonParser* parser;
	GInputStream* _tmp14_;
	JsonParser* _tmp15_;
	JsonNode* node;
	TubaNetwork* _tmp16_;
	JsonParser* _tmp17_;
	JsonNode* _tmp18_;
	TubaAPIList* list;
	JsonNode* _tmp19_;
	TubaAPIList* _tmp20_;
	GListStore* _tmp21_;
	TubaAPIList* _tmp22_;
	GError* e;
	GError* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GError* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	TubaApplication* _tmp31_;
	GError* _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	GError* _inner_error0_;
};

struct _TubaViewsListsRow {
	AdwActionRow parent_instance;
	TubaViewsListsRowPrivate * priv;
	TubaAPIList* list;
};

struct _TubaViewsListsRowClass {
	AdwActionRowClass parent_class;
	void (*open) (TubaViewsListsRow* self);
};

struct _TubaViewsListsRowPrivate {
	GtkButton* edit_button;
	TubaWidgetsStatusActionButton* fav_button;
};

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

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

struct _TubaApplicationQuestionButtons {
	TubaApplicationQuestionButton yes;
	TubaApplicationQuestionButton no;
};

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

static gint TubaViewsLists_private_offset;
static gpointer tuba_views_lists_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaNetwork* tuba_network;
VALA_EXTERN TubaApplication* tuba_app;
static gint TubaViewsListsRow_private_offset;
static gpointer tuba_views_lists_row_parent_class = NULL;
VALA_EXTERN TubaSettings* tuba_settings;

VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN GType tuba_views_content_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsContentBase, 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_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN GType tuba_account_holder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountHolder, g_object_unref)
VALA_EXTERN GType tuba_streamable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaStreamable, g_object_unref)
VALA_EXTERN GType tuba_views_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTimeline, g_object_unref)
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN GType tuba_streamable_event_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaStreamableEvent* tuba_streamable_event_dup (const TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_free (TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_copy (const TubaStreamableEvent* self,
                                 TubaStreamableEvent* dest);
VALA_EXTERN void tuba_streamable_event_destroy (TubaStreamableEvent* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaStreamableEvent, tuba_streamable_event_destroy)
VALA_EXTERN GType tuba_views_lists_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsLists, g_object_unref)
VALA_EXTERN GtkWidget* tuba_views_content_base_on_create_model_widget (TubaViewsContentBase* self,
                                                           GObject* obj);
VALA_EXTERN void tuba_views_timeline_on_request_finish (TubaViewsTimeline* self);
VALA_EXTERN TubaViewsLists* tuba_views_lists_new (void);
VALA_EXTERN TubaViewsLists* tuba_views_lists_construct (GType object_type);
static GtkWidget* tuba_views_lists_real_on_create_model_widget (TubaViewsContentBase* base,
                                                         GObject* obj);
VALA_EXTERN GType tuba_views_lists_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsListsRow, g_object_unref)
VALA_EXTERN GType tuba_api_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIList, g_object_unref)
VALA_EXTERN void tuba_views_lists_remove_list (TubaViewsLists* self,
                                   TubaAPIList* list);
static void _tuba_views_lists_remove_list_tuba_views_lists_row_remove_from_model (TubaViewsListsRow* _sender,
                                                                           TubaAPIList* t_list,
                                                                           gpointer self);
VALA_EXTERN void tuba_views_timeline_safely_remove (TubaViewsTimeline* self,
                                        gint i);
static void tuba_views_lists_create_list_data_free (gpointer _data);
VALA_EXTERN void tuba_views_lists_create_list (TubaViewsLists* self,
                                   const gchar* list_name,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
VALA_EXTERN void tuba_views_lists_create_list_finish (TubaViewsLists* self,
                                          GAsyncResult* _res_);
static gboolean tuba_views_lists_create_list_co (TubaViewsListsCreateListData* _data_);
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 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_set_body_from_json (TubaRequestV2* self,
                                         JsonBuilder* json_builder);
VALA_EXTERN void tuba_request_v2_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_views_lists_create_list_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_);
VALA_EXTERN void tuba_network_get_parser_from_inputstream_async (GInputStream* in_stream,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream_finish (GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN GType tuba_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaNetwork, g_object_unref)
VALA_EXTERN JsonNode* tuba_network_parse_node (TubaNetwork* self,
                                   JsonParser* parser);
VALA_EXTERN TubaAPIList* tuba_api_list_from (JsonNode* node,
                                 GError** error);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN void tuba_views_lists_on_action_bar_activate (TubaViewsLists* self,
                                              GtkEntryBuffer* buffer);
static void tuba_views_lists_new_item_cb (TubaViewsLists* self);
static void tuba_views_lists_on_entry_changed (TubaViewsLists* self);
static void tuba_views_lists_real_on_request_finish (TubaViewsTimeline* base);
VALA_EXTERN void tuba_views_base_on_content_changed (TubaViewsBase* self);
VALA_EXTERN gboolean tuba_views_lists_get_empty (TubaViewsLists* self);
VALA_EXTERN GType tuba_widgets_status_action_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsStatusActionButton, g_object_unref)
static void tuba_views_lists_row_on_fav_list_updated (TubaViewsListsRow* self);
VALA_EXTERN gboolean tuba_widgets_status_action_button_get_active (TubaWidgetsStatusActionButton* self);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN gchar** tuba_settings_get_favorite_lists_ids (TubaSettings* self,
                                              gint* result_length1);
VALA_EXTERN TubaViewsListsRow* tuba_views_lists_row_new (TubaAPIList* list);
VALA_EXTERN TubaViewsListsRow* tuba_views_lists_row_construct (GType object_type,
                                                   TubaAPIList* list);
VALA_EXTERN const gchar* tuba_api_list_get_title (TubaAPIList* self);
static void tuba_views_lists_row_update_fav_status (TubaViewsListsRow* self);
static void _tuba_views_lists_row_update_fav_status_g_object_notify (GObject* _sender,
                                                              GParamSpec* pspec,
                                                              gpointer self);
static void tuba_views_lists_row_title_changed (TubaViewsListsRow* self);
static void _tuba_views_lists_row_title_changed_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self);
static void tuba_views_lists_row_on_edit (TubaViewsListsRow* self);
static void _tuba_views_lists_row_on_edit_gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self);
VALA_EXTERN void tuba_instance_account_gather_fav_lists (TubaInstanceAccount* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN void tuba_instance_account_gather_fav_lists_finish (TubaInstanceAccount* self,
                                                    GAsyncResult* _res_);
VALA_EXTERN const gchar* tuba_api_list_get_id (TubaAPIList* self);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
VALA_EXTERN void tuba_widgets_status_action_button_set_active (TubaWidgetsStatusActionButton* self,
                                                   gboolean value);
static void tuba_views_lists_row_on_favorite_button_clicked (TubaViewsListsRow* self);
static void tuba_views_lists_row_add_to_favs (TubaViewsListsRow* self);
static void tuba_views_lists_row_remove_from_favs (TubaViewsListsRow* self);
static gchar** _vala_array_dup47 (gchar** self,
                           gssize length);
static void _vala_array_add89 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN void tuba_settings_set_favorite_lists_ids (TubaSettings* self,
                                           gchar** value,
                                           gint value_length1);
static void _vala_array_add90 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN AdwPreferencesDialog* tuba_views_lists_row_create_edit_preferences_dialog (TubaViewsListsRow* self,
                                                                           TubaAPIList* t_list);
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_views_lists_row_on_remove_clicked (TubaViewsListsRow* self);
static void tuba_views_lists_row_on_remove_clicked_real (TubaViewsListsRow* self,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void tuba_views_lists_row_on_remove_clicked_real_finish (TubaViewsListsRow* self,
                                                         GAsyncResult* _res_);
static void tuba_views_lists_row_on_remove_clicked_real_data_free (gpointer _data);
static gboolean tuba_views_lists_row_on_remove_clicked_real_co (TubaViewsListsRowOnRemoveClickedRealData* _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_);
static void tuba_views_lists_row_on_remove_clicked_real_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
VALA_EXTERN gboolean tuba_application_question_answer_truthy (TubaApplicationQuestionAnswer self);
VALA_EXTERN TubaDialogsListEdit* tuba_dialogs_list_edit_new (TubaAPIList* t_list);
VALA_EXTERN TubaDialogsListEdit* tuba_dialogs_list_edit_construct (GType object_type,
                                                       TubaAPIList* t_list);
VALA_EXTERN GType tuba_dialogs_list_edit_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsListEdit, g_object_unref)
static void tuba_views_lists_row_real_open (TubaViewsListsRow* self);
VALA_EXTERN GType tuba_views_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsList, g_object_unref)
VALA_EXTERN TubaViewsList* tuba_views_list_new (TubaAPIList* l);
VALA_EXTERN TubaViewsList* tuba_views_list_construct (GType object_type,
                                          TubaAPIList* l);
VALA_EXTERN TubaViewsBase* tuba_dialogs_main_window_open_view (TubaDialogsMainWindow* self,
                                                   TubaViewsBase* view);
static GObject * tuba_views_lists_row_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties);
static void _tuba_views_lists_row_on_remove_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                 gpointer self);
static void _tuba_views_lists_row___lambda160_ (TubaViewsListsRow* self);
static void __tuba_views_lists_row___lambda160__adw_action_row_activated (AdwActionRow* _sender,
                                                                   gpointer self);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_new_with_icon_name (const gchar* icon_name);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_construct_with_icon_name (GType object_type,
                                                                                           const gchar* icon_name);
VALA_EXTERN void tuba_widgets_status_action_button_set_active_icon_name (TubaWidgetsStatusActionButton* self,
                                                             const gchar* value);
static void _tuba_views_lists_row_on_favorite_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static void _tuba_views_lists_row_on_fav_list_updated_g_object_notify (GObject* _sender,
                                                                GParamSpec* pspec,
                                                                gpointer self);
static void tuba_views_lists_row_finalize (GObject * obj);
static GType tuba_views_lists_row_get_type_once (void);
static GObject * tuba_views_lists_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_timeline_set_accepts (TubaViewsTimeline* self,
                                      GType value);
static void _tuba_views_lists_new_item_cb_gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self);
static void _tuba_views_lists_new_item_cb_gtk_entry_activate (GtkEntry* _sender,
                                                       gpointer self);
static void _tuba_views_lists_on_entry_changed_g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self);
static void tuba_views_lists_finalize (GObject * obj);
static GType tuba_views_lists_get_type_once (void);
static void _vala_tuba_views_lists_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
tuba_views_lists_get_instance_private (TubaViewsLists* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsLists_private_offset);
}

TubaViewsLists*
tuba_views_lists_construct (GType object_type)
{
	TubaViewsLists * self = NULL;
	self = (TubaViewsLists*) g_object_new (object_type, "url", "/api/v1/lists", "label", _ ("Lists"), "icon", "tuba-list-compact-symbolic", "empty-state-title", _ ("No Lists"), "batch-size-min", 20, NULL);
	return self;
}

TubaViewsLists*
tuba_views_lists_new (void)
{
	return tuba_views_lists_construct (TUBA_VIEWS_TYPE_LISTS);
}

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

static void
_tuba_views_lists_remove_list_tuba_views_lists_row_remove_from_model (TubaViewsListsRow* _sender,
                                                                      TubaAPIList* t_list,
                                                                      gpointer self)
{
	tuba_views_lists_remove_list ((TubaViewsLists*) self, t_list);
}

static GtkWidget*
tuba_views_lists_real_on_create_model_widget (TubaViewsContentBase* base,
                                              GObject* obj)
{
	TubaViewsLists * self;
	GtkWidget* widget = NULL;
	GtkWidget* _tmp0_;
	TubaViewsListsRow* widget_row = NULL;
	GtkWidget* _tmp1_;
	TubaViewsListsRow* _tmp2_;
	TubaViewsListsRow* _tmp3_;
	GtkWidget* result;
	self = (TubaViewsLists*) base;
	g_return_val_if_fail (obj != NULL, NULL);
	_tmp0_ = TUBA_VIEWS_CONTENT_BASE_CLASS (tuba_views_lists_parent_class)->on_create_model_widget ((TubaViewsContentBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline), obj);
	widget = _tmp0_;
	_tmp1_ = widget;
	_tmp2_ = _g_object_ref0 (TUBA_VIEWS_LISTS_IS_ROW (_tmp1_) ? ((TubaViewsListsRow*) _tmp1_) : NULL);
	widget_row = _tmp2_;
	_tmp3_ = widget_row;
	if (_tmp3_ != NULL) {
		TubaViewsListsRow* _tmp4_;
		_tmp4_ = widget_row;
		g_signal_connect_object (_tmp4_, "remove-from-model", (GCallback) _tuba_views_lists_remove_list_tuba_views_lists_row_remove_from_model, self, 0);
	}
	result = widget;
	_g_object_unref0 (widget_row);
	return result;
}

void
tuba_views_lists_remove_list (TubaViewsLists* self,
                              TubaAPIList* list)
{
	guint indx = 0U;
	gboolean found = FALSE;
	GListStore* _tmp0_;
	guint _tmp1_ = 0U;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	if (list == NULL) {
		return;
	}
	_tmp0_ = ((TubaViewsContentBase*) self)->model;
	_tmp2_ = g_list_store_find (_tmp0_, (GObject*) list, &_tmp1_);
	indx = _tmp1_;
	found = _tmp2_;
	if (found) {
		tuba_views_timeline_safely_remove ((TubaViewsTimeline*) self, (gint) indx);
	}
}

static void
tuba_views_lists_create_list_data_free (gpointer _data)
{
	TubaViewsListsCreateListData* _data_;
	_data_ = _data;
	_g_free0 (_data_->list_name);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsListsCreateListData, _data_);
}

void
tuba_views_lists_create_list (TubaViewsLists* self,
                              const gchar* list_name,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	TubaViewsListsCreateListData* _data_;
	TubaViewsLists* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (list_name != NULL);
	_data_ = g_slice_new0 (TubaViewsListsCreateListData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_lists_create_list_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (list_name);
	_g_free0 (_data_->list_name);
	_data_->list_name = _tmp1_;
	tuba_views_lists_create_list_co (_data_);
}

void
tuba_views_lists_create_list_finish (TubaViewsLists* self,
                                     GAsyncResult* _res_)
{
	TubaViewsListsCreateListData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_lists_create_list_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_)
{
	TubaViewsListsCreateListData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_lists_create_list_co (_data_);
}

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

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

static gboolean
tuba_views_lists_create_list_co (TubaViewsListsCreateListData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = json_builder_new ();
	_data_->builder = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->builder;
	json_builder_begin_object (_data_->_tmp1_);
	_data_->_tmp2_ = _data_->builder;
	json_builder_set_member_name (_data_->_tmp2_, "title");
	_data_->_tmp3_ = _data_->builder;
	json_builder_add_string_value (_data_->_tmp3_, _data_->list_name);
	_data_->_tmp4_ = _data_->builder;
	json_builder_end_object (_data_->_tmp4_);
	_data_->_tmp5_ = tuba_accounts;
	_data_->_tmp6_ = tuba_account_store_get_active (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = _g_object_ref0 (_data_->_tmp7_);
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = tuba_request_v2_new ("/api/v1/lists", TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp9_, _data_->_tmp8_);
	_g_object_unref0 (_data_->_tmp8_);
	_data_->req = _data_->_tmp9_;
	_data_->_tmp10_ = _data_->req;
	_data_->_tmp11_ = _data_->builder;
	tuba_request_v2_set_body_from_json (_data_->_tmp10_, _data_->_tmp11_);
	{
		_data_->_tmp12_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp12_, tuba_views_lists_create_list_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_views_lists_create_list_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_list_from (_data_->_tmp19_, &_data_->_inner_error0_);
		_data_->list = _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_ = ((TubaViewsContentBase*) _data_->self)->model;
		_data_->_tmp22_ = _data_->list;
		g_list_store_insert (_data_->_tmp21_, (guint) 0, (GObject*) _data_->_tmp22_);
		_g_object_unref0 (_data_->list);
		__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_->_tmp23_ = _data_->e;
		_data_->_tmp24_ = g_strdup_printf ("%i", _data_->_tmp23_->code);
		_data_->_tmp25_ = _data_->_tmp24_;
		_data_->_tmp26_ = _data_->e;
		_data_->_tmp27_ = _data_->_tmp26_->message;
		_data_->_tmp28_ = string_to_string (_data_->_tmp27_);
		_data_->_tmp29_ = g_strconcat ("Couldn't create list: ", _data_->_tmp25_, " ", _data_->_tmp28_, NULL);
		_data_->_tmp30_ = _data_->_tmp29_;
		g_warning ("Lists.vala:214: %s", _data_->_tmp30_);
		_g_free0 (_data_->_tmp30_);
		_g_free0 (_data_->_tmp25_);
		_data_->_tmp31_ = tuba_app;
		_data_->_tmp32_ = _data_->e;
		_data_->_tmp33_ = _data_->_tmp32_->message;
		_data_->_tmp34_ = g_strdup_printf (_ ("Couldn't create list: %s"), _data_->_tmp33_);
		_data_->_tmp35_ = _data_->_tmp34_;
		g_signal_emit_by_name (_data_->_tmp31_, "toast", _data_->_tmp35_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp35_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_object_unref0 (_data_->builder);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	_g_object_unref0 (_data_->builder);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

void
tuba_views_lists_on_action_bar_activate (TubaViewsLists* self,
                                         GtkEntryBuffer* buffer)
{
	guint _tmp0_;
	guint _tmp1_;
	guint8* _tmp4_;
	gint _tmp4__length1;
	gint _tmp5_ = 0;
	guint8* _tmp6_;
	gint _tmp6__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (buffer != NULL);
	_tmp0_ = gtk_entry_buffer_get_length (buffer);
	_tmp1_ = _tmp0_;
	if (_tmp1_ > ((guint) 0)) {
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp2_ = gtk_entry_buffer_get_text (buffer);
		_tmp3_ = _tmp2_;
		tuba_views_lists_create_list (self, _tmp3_, NULL, NULL);
	}
	_tmp4_ = string_get_data ("", &_tmp5_);
	_tmp4__length1 = _tmp5_;
	_tmp6_ = _tmp4_;
	_tmp6__length1 = _tmp4__length1;
	gtk_entry_buffer_set_text (buffer, (const char*) _tmp6_, (gint) _tmp6__length1);
}

static void
tuba_views_lists_new_item_cb (TubaViewsLists* self)
{
	GtkEntry* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	GtkEntryBuffer* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->child_entry;
	_tmp1_ = gtk_entry_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	tuba_views_lists_on_action_bar_activate (self, _tmp2_);
}

static void
tuba_views_lists_on_entry_changed (TubaViewsLists* self)
{
	GtkButton* _tmp0_;
	GtkEntry* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->add_button;
	_tmp1_ = self->priv->child_entry;
	_tmp2_ = gtk_editable_get_text ((GtkEditable*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = strlen (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp5_ > 0);
}

static void
tuba_views_lists_real_on_request_finish (TubaViewsTimeline* base)
{
	TubaViewsLists * self;
	self = (TubaViewsLists*) base;
	TUBA_VIEWS_TIMELINE_CLASS (tuba_views_lists_parent_class)->on_request_finish (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline));
	tuba_views_base_on_content_changed ((TubaViewsBase*) self);
}

gboolean
tuba_views_lists_get_empty (TubaViewsLists* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = FALSE;
	return result;
}

static inline gpointer
tuba_views_lists_row_get_instance_private (TubaViewsListsRow* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsListsRow_private_offset);
}

static void
tuba_views_lists_row_on_fav_list_updated (TubaViewsListsRow* self)
{
	gboolean _tmp0_ = FALSE;
	TubaWidgetsStatusActionButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	TubaWidgetsStatusActionButton* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->fav_button;
	_tmp2_ = tuba_widgets_status_action_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		_tmp0_ = TRUE;
	} else {
		TubaSettings* _tmp4_;
		gchar** _tmp5_;
		gint _tmp5__length1;
		gint _tmp6_ = 0;
		gchar** _tmp7_;
		gint _tmp7__length1;
		_tmp4_ = tuba_settings;
		_tmp5_ = tuba_settings_get_favorite_lists_ids (_tmp4_, &_tmp6_);
		_tmp5__length1 = _tmp6_;
		_tmp7_ = _tmp5_;
		_tmp7__length1 = _tmp5__length1;
		_tmp0_ = _tmp7__length1 < TUBA_VIEWS_SIDEBAR_MAX_SIDEBAR_LISTS;
	}
	_tmp8_ = self->priv->fav_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, _tmp0_);
}

static void
_tuba_views_lists_row_update_fav_status_g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self)
{
	tuba_views_lists_row_update_fav_status ((TubaViewsListsRow*) self);
}

static void
_tuba_views_lists_row_title_changed_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self)
{
	tuba_views_lists_row_title_changed ((TubaViewsListsRow*) self);
}

static void
_tuba_views_lists_row_on_edit_gtk_button_clicked (GtkButton* _sender,
                                                  gpointer self)
{
	tuba_views_lists_row_on_edit ((TubaViewsListsRow*) self);
}

TubaViewsListsRow*
tuba_views_lists_row_construct (GType object_type,
                                TubaAPIList* list)
{
	TubaViewsListsRow * self = NULL;
	TubaAPIList* _tmp0_;
	self = (TubaViewsListsRow*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (list);
	_g_object_unref0 (self->list);
	self->list = _tmp0_;
	if (list != NULL) {
		TubaAPIList* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		TubaAPIList* _tmp6_;
		TubaAPIList* _tmp7_;
		GtkButton* _tmp8_;
		_tmp1_ = self->list;
		_tmp2_ = tuba_api_list_get_title (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_markup_escape_text (_tmp3_, (gssize) -1);
		_tmp5_ = _tmp4_;
		adw_preferences_row_set_title ((AdwPreferencesRow*) self, _tmp5_);
		_g_free0 (_tmp5_);
		_tmp6_ = self->list;
		g_signal_connect_object ((GObject*) _tmp6_, "notify::id", (GCallback) _tuba_views_lists_row_update_fav_status_g_object_notify, self, 0);
		_tmp7_ = self->list;
		g_signal_connect_object ((GObject*) _tmp7_, "notify::title", (GCallback) _tuba_views_lists_row_title_changed_g_object_notify, self, 0);
		_tmp8_ = self->priv->edit_button;
		g_signal_connect_object (_tmp8_, "clicked", (GCallback) _tuba_views_lists_row_on_edit_gtk_button_clicked, self, 0);
		tuba_views_lists_row_update_fav_status (self);
	}
	return self;
}

TubaViewsListsRow*
tuba_views_lists_row_new (TubaAPIList* list)
{
	return tuba_views_lists_row_construct (TUBA_VIEWS_LISTS_TYPE_ROW, list);
}

static void
tuba_views_lists_row_title_changed (TubaViewsListsRow* self)
{
	TubaAPIList* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	TubaAccountStore* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->list;
	_tmp1_ = tuba_api_list_get_title (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_markup_escape_text (_tmp2_, (gssize) -1);
	_tmp4_ = _tmp3_;
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = tuba_accounts;
	_tmp6_ = tuba_account_store_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	tuba_instance_account_gather_fav_lists (_tmp7_, NULL, NULL);
}

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

static void
tuba_views_lists_row_update_fav_status (TubaViewsListsRow* self)
{
	TubaWidgetsStatusActionButton* _tmp0_;
	TubaAPIList* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	TubaSettings* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint _tmp6_ = 0;
	gchar** _tmp7_;
	gint _tmp7__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->fav_button;
	_tmp1_ = self->list;
	_tmp2_ = tuba_api_list_get_id (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = tuba_settings;
	_tmp5_ = tuba_settings_get_favorite_lists_ids (_tmp4_, &_tmp6_);
	_tmp5__length1 = _tmp6_;
	_tmp7_ = _tmp5_;
	_tmp7__length1 = _tmp5__length1;
	tuba_widgets_status_action_button_set_active (_tmp0_, _vala_string_array_contains (_tmp7_, _tmp7__length1, _tmp3_));
	tuba_views_lists_row_on_fav_list_updated (self);
}

static void
tuba_views_lists_row_on_favorite_button_clicked (TubaViewsListsRow* self)
{
	TubaWidgetsStatusActionButton* _tmp0_;
	TubaWidgetsStatusActionButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	TubaWidgetsStatusActionButton* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->fav_button;
	_tmp1_ = self->priv->fav_button;
	_tmp2_ = tuba_widgets_status_action_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	tuba_widgets_status_action_button_set_active (_tmp0_, !_tmp3_);
	_tmp4_ = self->priv->fav_button;
	_tmp5_ = tuba_widgets_status_action_button_get_active (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		tuba_views_lists_row_add_to_favs (self);
	} else {
		tuba_views_lists_row_remove_from_favs (self);
	}
}

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

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

static void
tuba_views_lists_row_add_to_favs (TubaViewsListsRow* self)
{
	gchar** new_ids = NULL;
	gchar** _tmp0_;
	gint new_ids_length1;
	gint _new_ids_size_;
	TubaSettings* _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_ = 0;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar** _tmp5_;
	gint _tmp5__length1;
	TubaAPIList* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	TubaSettings* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	new_ids = _tmp0_;
	new_ids_length1 = 0;
	_new_ids_size_ = new_ids_length1;
	_tmp1_ = tuba_settings;
	_tmp2_ = tuba_settings_get_favorite_lists_ids (_tmp1_, &_tmp3_);
	_tmp2__length1 = _tmp3_;
	_tmp4_ = _tmp2_;
	_tmp4__length1 = _tmp2__length1;
	_tmp5_ = (_tmp4_ != NULL) ? _vala_array_dup47 (_tmp4_, _tmp4__length1) : _tmp4_;
	_tmp5__length1 = _tmp4__length1;
	new_ids = (_vala_array_free (new_ids, new_ids_length1, (GDestroyNotify) g_free), NULL);
	new_ids = _tmp5_;
	new_ids_length1 = _tmp5__length1;
	_new_ids_size_ = new_ids_length1;
	_tmp6_ = self->list;
	_tmp7_ = tuba_api_list_get_id (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup (_tmp8_);
	_vala_array_add89 (&new_ids, &new_ids_length1, &_new_ids_size_, _tmp9_);
	_tmp10_ = tuba_settings;
	_tmp11_ = new_ids;
	_tmp11__length1 = new_ids_length1;
	tuba_settings_set_favorite_lists_ids (_tmp10_, _tmp11_, _tmp11__length1);
	_tmp12_ = tuba_accounts;
	_tmp13_ = tuba_account_store_get_active (_tmp12_);
	_tmp14_ = _tmp13_;
	tuba_instance_account_gather_fav_lists (_tmp14_, NULL, NULL);
	new_ids = (_vala_array_free (new_ids, new_ids_length1, (GDestroyNotify) g_free), NULL);
}

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

static void
tuba_views_lists_row_remove_from_favs (TubaViewsListsRow* self)
{
	gchar** new_ids = NULL;
	gchar** _tmp0_;
	gint new_ids_length1;
	gint _new_ids_size_;
	TubaSettings* _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_ = 0;
	gchar** _tmp4_;
	gint _tmp4__length1;
	TubaSettings* _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	TubaAccountStore* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaInstanceAccount* _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	new_ids = _tmp0_;
	new_ids_length1 = 0;
	_new_ids_size_ = new_ids_length1;
	_tmp1_ = tuba_settings;
	_tmp2_ = tuba_settings_get_favorite_lists_ids (_tmp1_, &_tmp3_);
	_tmp2__length1 = _tmp3_;
	_tmp4_ = _tmp2_;
	_tmp4__length1 = _tmp2__length1;
	{
		gchar** list_id_collection = NULL;
		gint list_id_collection_length1 = 0;
		gint _list_id_collection_size_ = 0;
		gint list_id_it = 0;
		list_id_collection = _tmp4_;
		list_id_collection_length1 = _tmp4__length1;
		for (list_id_it = 0; list_id_it < list_id_collection_length1; list_id_it = list_id_it + 1) {
			gchar* _tmp5_;
			gchar* list_id = NULL;
			_tmp5_ = g_strdup (list_id_collection[list_id_it]);
			list_id = _tmp5_;
			{
				TubaAPIList* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				_tmp6_ = self->list;
				_tmp7_ = tuba_api_list_get_id (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp9_ = list_id;
				if (g_strcmp0 (_tmp8_, _tmp9_) != 0) {
					const gchar* _tmp10_;
					gchar* _tmp11_;
					_tmp10_ = list_id;
					_tmp11_ = g_strdup (_tmp10_);
					_vala_array_add90 (&new_ids, &new_ids_length1, &_new_ids_size_, _tmp11_);
				}
				_g_free0 (list_id);
			}
		}
	}
	_tmp12_ = tuba_settings;
	_tmp13_ = new_ids;
	_tmp13__length1 = new_ids_length1;
	tuba_settings_set_favorite_lists_ids (_tmp12_, _tmp13_, _tmp13__length1);
	_tmp14_ = tuba_accounts;
	_tmp15_ = tuba_account_store_get_active (_tmp14_);
	_tmp16_ = _tmp15_;
	tuba_instance_account_gather_fav_lists (_tmp16_, NULL, NULL);
	new_ids = (_vala_array_free (new_ids, new_ids_length1, (GDestroyNotify) g_free), NULL);
}

static void
tuba_views_lists_row_on_edit (TubaViewsListsRow* self)
{
	TubaAPIList* _tmp0_;
	AdwPreferencesDialog* _tmp1_;
	AdwPreferencesDialog* _tmp2_;
	TubaApplication* _tmp3_;
	TubaDialogsMainWindow* _tmp4_;
	TubaDialogsMainWindow* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->list;
	_tmp1_ = tuba_views_lists_row_create_edit_preferences_dialog (self, _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_app;
	_tmp4_ = tuba_application_get_main_window (_tmp3_);
	_tmp5_ = _tmp4_;
	adw_dialog_present ((AdwDialog*) _tmp2_, (GtkWidget*) _tmp5_);
	_g_object_unref0 (_tmp2_);
}

static void
tuba_views_lists_row_on_remove_clicked (TubaViewsListsRow* self)
{
	g_return_if_fail (self != NULL);
	tuba_views_lists_row_on_remove_clicked_real (self, NULL, NULL);
}

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

static void
tuba_views_lists_row_on_remove_clicked_real (TubaViewsListsRow* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	TubaViewsListsRowOnRemoveClickedRealData* _data_;
	TubaViewsListsRow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsListsRowOnRemoveClickedRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_lists_row_on_remove_clicked_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_lists_row_on_remove_clicked_real_co (_data_);
}

static void
tuba_views_lists_row_on_remove_clicked_real_finish (TubaViewsListsRow* self,
                                                    GAsyncResult* _res_)
{
	TubaViewsListsRowOnRemoveClickedRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_lists_row_on_remove_clicked_real_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	TubaViewsListsRowOnRemoveClickedRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_lists_row_on_remove_clicked_real_co (_data_);
}

static gboolean
tuba_views_lists_row_on_remove_clicked_real_co (TubaViewsListsRowOnRemoveClickedRealData* _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->list;
	_data_->_tmp2_ = tuba_api_list_get_title (_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;
	memset (&_data_->_tmp7_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp7_.text);
	_data_->_tmp7_.text = _ ("This action cannot be reverted.");
	_data_->_tmp7_.use_markup = FALSE;
	_data_->_tmp8_ = tuba_app;
	_data_->_tmp9_ = tuba_application_get_main_window (_data_->_tmp8_);
	_data_->_tmp10_ = _data_->_tmp9_;
	memset (&_data_->_tmp11_, 0, sizeof (TubaApplicationQuestionButtons));
	tuba_application_question_button_destroy (&_data_->_tmp11_.yes);
	_data_->_tmp11_.yes = (TubaApplicationQuestionButton) {_ ("Delete"), ADW_RESPONSE_DESTRUCTIVE};
	tuba_application_question_button_destroy (&_data_->_tmp11_.no);
	_data_->_tmp11_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
	_data_->_state_ = 1;
	tuba_application_question (_data_->_tmp0_, &_data_->_tmp6_, &_data_->_tmp7_, (GtkWidget*) _data_->_tmp10_, &_data_->_tmp11_, NULL, FALSE, tuba_views_lists_row_on_remove_clicked_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp12_ = tuba_application_question_finish (_data_->_tmp0_, _data_->_res_);
	_g_free0 (_data_->_tmp5_);
	_data_->qs = _data_->_tmp12_;
	if (tuba_application_question_answer_truthy (_data_->qs)) {
		_data_->_tmp13_ = _data_->self->list;
		_data_->_tmp14_ = tuba_api_list_get_id (_data_->_tmp13_);
		_data_->_tmp15_ = _data_->_tmp14_;
		_data_->_tmp16_ = string_to_string (_data_->_tmp15_);
		_data_->_tmp17_ = g_strconcat ("/api/v1/lists/", _data_->_tmp16_, NULL);
		_data_->_tmp18_ = _data_->_tmp17_;
		_data_->_tmp19_ = tuba_accounts;
		_data_->_tmp20_ = tuba_account_store_get_active (_data_->_tmp19_);
		_data_->_tmp21_ = _data_->_tmp20_;
		_data_->_tmp22_ = _g_object_ref0 (_data_->_tmp21_);
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = tuba_request_v2_new (_data_->_tmp18_, TUBA_REQUEST_V2_METHOD_DELETE);
		tuba_request_v2_set_account (_data_->_tmp23_, _data_->_tmp22_);
		_g_object_unref0 (_data_->_tmp22_);
		_data_->_tmp24_ = _data_->_tmp23_;
		_g_free0 (_data_->_tmp18_);
		_data_->req = _data_->_tmp24_;
		{
			_data_->_tmp25_ = _data_->req;
			_data_->_state_ = 2;
			tuba_request_v2_exec (_data_->_tmp25_, tuba_views_lists_row_on_remove_clicked_real_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp26_ = tuba_request_v2_exec_finish (_data_->_tmp25_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp27_ = _data_->_tmp26_;
			_g_object_unref0 (_data_->_tmp27_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp28_ = _data_->self->list;
			g_signal_emit (_data_->self, tuba_views_lists_row_signals[TUBA_VIEWS_LISTS_ROW_REMOVE_FROM_MODEL_SIGNAL], 0, _data_->_tmp28_);
			_data_->_tmp29_ = _data_->self->priv->fav_button;
			_data_->_tmp30_ = tuba_widgets_status_action_button_get_active (_data_->_tmp29_);
			_data_->_tmp31_ = _data_->_tmp30_;
			if (_data_->_tmp31_) {
				tuba_views_lists_row_remove_from_favs (_data_->self);
			}
			g_signal_emit_by_name ((GtkWidget*) _data_->self, "destroy");
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp32_ = _data_->e;
			_data_->_tmp33_ = g_strdup_printf ("%i", _data_->_tmp32_->code);
			_data_->_tmp34_ = _data_->_tmp33_;
			_data_->_tmp35_ = _data_->e;
			_data_->_tmp36_ = _data_->_tmp35_->message;
			_data_->_tmp37_ = string_to_string (_data_->_tmp36_);
			_data_->_tmp38_ = g_strconcat ("Couldn't delete list: ", _data_->_tmp34_, " ", _data_->_tmp37_, NULL);
			_data_->_tmp39_ = _data_->_tmp38_;
			g_warning ("Lists.vala:152: %s", _data_->_tmp39_);
			_g_free0 (_data_->_tmp39_);
			_g_free0 (_data_->_tmp34_);
			_data_->_tmp40_ = tuba_app;
			_data_->_tmp41_ = _data_->e;
			_data_->_tmp42_ = _data_->_tmp41_->message;
			_data_->_tmp43_ = g_strdup_printf (_ ("Couldn't delete list: %s"), _data_->_tmp42_);
			_data_->_tmp44_ = _data_->_tmp43_;
			g_signal_emit_by_name (_data_->_tmp40_, "toast", _data_->_tmp44_, (guint) 5, NULL, NULL, NULL);
			_g_free0 (_data_->_tmp44_);
			_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;
}

AdwPreferencesDialog*
tuba_views_lists_row_create_edit_preferences_dialog (TubaViewsListsRow* self,
                                                     TubaAPIList* t_list)
{
	TubaDialogsListEdit* _tmp0_;
	AdwPreferencesDialog* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (t_list != NULL, NULL);
	_tmp0_ = tuba_dialogs_list_edit_new (t_list);
	g_object_ref_sink (_tmp0_);
	result = (AdwPreferencesDialog*) _tmp0_;
	return result;
}

static void
tuba_views_lists_row_real_open (TubaViewsListsRow* self)
{
	TubaAPIList* _tmp0_;
	TubaViewsList* view = NULL;
	TubaAPIList* _tmp1_;
	TubaViewsList* _tmp2_;
	TubaApplication* _tmp3_;
	TubaDialogsMainWindow* _tmp4_;
	TubaDialogsMainWindow* _tmp5_;
	TubaViewsList* _tmp6_;
	TubaViewsBase* _tmp7_;
	TubaViewsBase* _tmp8_;
	_tmp0_ = self->list;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->list;
	_tmp2_ = tuba_views_list_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	view = _tmp2_;
	_tmp3_ = tuba_app;
	_tmp4_ = tuba_application_get_main_window (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = view;
	_tmp7_ = tuba_dialogs_main_window_open_view (_tmp5_, (TubaViewsBase*) _tmp6_);
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (view);
}

static void
_tuba_views_lists_row_on_remove_clicked_gtk_button_clicked (GtkButton* _sender,
                                                            gpointer self)
{
	tuba_views_lists_row_on_remove_clicked ((TubaViewsListsRow*) self);
}

static void
_tuba_views_lists_row___lambda160_ (TubaViewsListsRow* self)
{
	g_signal_emit (self, tuba_views_lists_row_signals[TUBA_VIEWS_LISTS_ROW_OPEN_SIGNAL], 0);
}

static void
__tuba_views_lists_row___lambda160__adw_action_row_activated (AdwActionRow* _sender,
                                                              gpointer self)
{
	_tuba_views_lists_row___lambda160_ ((TubaViewsListsRow*) self);
}

static void
_tuba_views_lists_row_on_favorite_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	tuba_views_lists_row_on_favorite_button_clicked ((TubaViewsListsRow*) self);
}

static void
_tuba_views_lists_row_on_fav_list_updated_g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self)
{
	tuba_views_lists_row_on_fav_list_updated ((TubaViewsListsRow*) self);
}

static GObject *
tuba_views_lists_row_constructor (GType type,
                                  guint n_construct_properties,
                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsListsRow * self;
	GtkBox* action_box = NULL;
	GtkBox* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	gchar* _tmp5_;
	GtkButton* _tmp6_ = NULL;
	GtkButton* delete_button = NULL;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gchar* _tmp12_;
	GtkButton* _tmp13_ = NULL;
	GtkButton* _tmp14_;
	GtkBox* _tmp15_;
	GtkButton* _tmp16_;
	GtkBox* _tmp17_;
	GtkButton* _tmp18_;
	GtkBox* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar** _tmp24_;
	gchar* _tmp25_;
	TubaWidgetsStatusActionButton* _tmp26_ = NULL;
	TubaWidgetsStatusActionButton* _tmp27_;
	TubaWidgetsStatusActionButton* _tmp28_;
	TubaSettings* _tmp29_;
	parent_class = G_OBJECT_CLASS (tuba_views_lists_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_LISTS_TYPE_ROW, TubaViewsListsRow);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp0_);
	action_box = _tmp0_;
	_tmp1_ = g_strdup ("document-edit-symbolic");
	_tmp2_ = g_strdup ("flat");
	_tmp3_ = g_strdup ("circular");
	_tmp4_ = g_new0 (gchar*, 2 + 1);
	_tmp4_[0] = _tmp2_;
	_tmp4_[1] = _tmp3_;
	_tmp5_ = g_strdup (_ ("Edit"));
	_tmp6_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_icon_name (_tmp6_, _tmp1_);
	_g_free0 (_tmp1_);
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp6_, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp6_, _tmp5_);
	_g_free0 (_tmp5_);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->edit_button);
	self->priv->edit_button = _tmp6_;
	_tmp7_ = g_strdup ("user-trash-symbolic");
	_tmp8_ = g_strdup ("flat");
	_tmp9_ = g_strdup ("circular");
	_tmp10_ = g_strdup ("error");
	_tmp11_ = g_new0 (gchar*, 3 + 1);
	_tmp11_[0] = _tmp8_;
	_tmp11_[1] = _tmp9_;
	_tmp11_[2] = _tmp10_;
	_tmp12_ = g_strdup (_ ("Delete"));
	_tmp13_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_icon_name (_tmp13_, _tmp7_);
	_g_free0 (_tmp7_);
	gtk_widget_set_valign ((GtkWidget*) _tmp13_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp13_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp13_, _tmp11_);
	_tmp11_ = (_vala_array_free (_tmp11_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp13_, _tmp12_);
	_g_free0 (_tmp12_);
	g_object_ref_sink (_tmp13_);
	delete_button = _tmp13_;
	_tmp14_ = delete_button;
	g_signal_connect_object (_tmp14_, "clicked", (GCallback) _tuba_views_lists_row_on_remove_clicked_gtk_button_clicked, self, 0);
	_tmp15_ = action_box;
	_tmp16_ = self->priv->edit_button;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = action_box;
	_tmp18_ = delete_button;
	gtk_box_append (_tmp17_, (GtkWidget*) _tmp18_);
	g_signal_connect_object ((AdwActionRow*) self, "activated", (GCallback) __tuba_views_lists_row___lambda160__adw_action_row_activated, self, 0);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) self, TRUE);
	_tmp19_ = action_box;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp19_);
	_tmp20_ = g_strdup ("tuba-starred-symbolic");
	_tmp21_ = g_strdup ("ttl-status-action-star");
	_tmp22_ = g_strdup ("flat");
	_tmp23_ = g_strdup ("circular");
	_tmp24_ = g_new0 (gchar*, 3 + 1);
	_tmp24_[0] = _tmp21_;
	_tmp24_[1] = _tmp22_;
	_tmp24_[2] = _tmp23_;
	_tmp25_ = g_strdup (_ ("Favorite"));
	_tmp26_ = tuba_widgets_status_action_button_new_with_icon_name ("tuba-unstarred-symbolic");
	tuba_widgets_status_action_button_set_active_icon_name (_tmp26_, _tmp20_);
	_g_free0 (_tmp20_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp26_, _tmp24_);
	_tmp24_ = (_vala_array_free (_tmp24_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp26_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp26_, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp26_, _tmp25_);
	_g_free0 (_tmp25_);
	g_object_ref_sink (_tmp26_);
	_g_object_unref0 (self->priv->fav_button);
	self->priv->fav_button = _tmp26_;
	_tmp27_ = self->priv->fav_button;
	g_signal_connect_object ((GtkButton*) _tmp27_, "clicked", (GCallback) _tuba_views_lists_row_on_favorite_button_clicked_gtk_button_clicked, self, 0);
	_tmp28_ = self->priv->fav_button;
	adw_action_row_add_prefix ((AdwActionRow*) self, (GtkWidget*) _tmp28_);
	_tmp29_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp29_, "notify::favorite-lists-ids", (GCallback) _tuba_views_lists_row_on_fav_list_updated_g_object_notify, self, 0);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (action_box);
	return obj;
}

static void
tuba_views_lists_row_class_init (TubaViewsListsRowClass * klass,
                                 gpointer klass_data)
{
	tuba_views_lists_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsListsRow_private_offset);
	((TubaViewsListsRowClass *) klass)->open = tuba_views_lists_row_real_open;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_lists_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_lists_row_finalize;
	tuba_views_lists_row_signals[TUBA_VIEWS_LISTS_ROW_REMOVE_FROM_MODEL_SIGNAL] = g_signal_new ("remove-from-model", TUBA_VIEWS_LISTS_TYPE_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TUBA_API_TYPE_LIST);
	tuba_views_lists_row_signals[TUBA_VIEWS_LISTS_ROW_OPEN_SIGNAL] = g_signal_new ("open", TUBA_VIEWS_LISTS_TYPE_ROW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (TubaViewsListsRowClass, open), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_views_lists_row_instance_init (TubaViewsListsRow * self,
                                    gpointer klass)
{
	self->priv = tuba_views_lists_row_get_instance_private (self);
}

static void
tuba_views_lists_row_finalize (GObject * obj)
{
	TubaViewsListsRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_LISTS_TYPE_ROW, TubaViewsListsRow);
	_g_object_unref0 (self->list);
	_g_object_unref0 (self->priv->edit_button);
	_g_object_unref0 (self->priv->fav_button);
	G_OBJECT_CLASS (tuba_views_lists_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_lists_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsListsRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_lists_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsListsRow), 0, (GInstanceInitFunc) tuba_views_lists_row_instance_init, NULL };
	GType tuba_views_lists_row_type_id;
	tuba_views_lists_row_type_id = g_type_register_static (adw_action_row_get_type (), "TubaViewsListsRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsListsRow_private_offset = g_type_add_instance_private (tuba_views_lists_row_type_id, sizeof (TubaViewsListsRowPrivate));
	return tuba_views_lists_row_type_id;
}

GType
tuba_views_lists_row_get_type (void)
{
	static GType tuba_views_lists_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_lists_row_type_id__once)) {
		GType tuba_views_lists_row_type_id;
		tuba_views_lists_row_type_id = tuba_views_lists_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_lists_row_type_id__once, tuba_views_lists_row_type_id);
	}
	return tuba_views_lists_row_type_id__once;
}

static void
_tuba_views_lists_new_item_cb_gtk_button_clicked (GtkButton* _sender,
                                                  gpointer self)
{
	tuba_views_lists_new_item_cb ((TubaViewsLists*) self);
}

static void
_tuba_views_lists_new_item_cb_gtk_entry_activate (GtkEntry* _sender,
                                                  gpointer self)
{
	tuba_views_lists_new_item_cb ((TubaViewsLists*) self);
}

static void
_tuba_views_lists_on_entry_changed_g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self)
{
	tuba_views_lists_on_entry_changed ((TubaViewsLists*) self);
}

static GObject *
tuba_views_lists_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsLists * self;
	gchar* _tmp0_;
	GtkEntry* _tmp1_ = NULL;
	GtkActionBar* add_action_bar = NULL;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkActionBar* _tmp4_ = NULL;
	GtkBox* child_box = NULL;
	GtkBox* _tmp5_;
	GtkButton* _tmp6_ = NULL;
	GtkButton* _tmp7_;
	GtkEntry* _tmp8_;
	GtkEntry* _tmp9_;
	GtkBox* _tmp10_;
	GtkEntry* _tmp11_;
	GtkBox* _tmp12_;
	GtkButton* _tmp13_;
	GtkActionBar* _tmp14_;
	GtkBox* _tmp15_;
	AdwToolbarView* _tmp16_;
	GtkActionBar* _tmp17_;
	parent_class = G_OBJECT_CLASS (tuba_views_lists_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_LISTS, TubaViewsLists);
	tuba_views_timeline_set_accepts ((TubaViewsTimeline*) self, TUBA_API_TYPE_LIST);
	_tmp0_ = g_strdup (_ ("New list title"));
	_tmp1_ = (GtkEntry*) gtk_entry_new ();
	gtk_entry_set_input_purpose (_tmp1_, GTK_INPUT_PURPOSE_FREE_FORM);
	gtk_entry_set_placeholder_text (_tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->child_entry);
	self->priv->child_entry = _tmp1_;
	_tmp2_ = g_strdup ("ttl-box-no-shadow");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = (GtkActionBar*) gtk_action_bar_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	add_action_bar = _tmp4_;
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp5_);
	child_box = _tmp5_;
	_tmp6_ = (GtkButton*) gtk_button_new_with_label (_ ("Add list"));
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, FALSE);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->add_button);
	self->priv->add_button = _tmp6_;
	_tmp7_ = self->priv->add_button;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) _tuba_views_lists_new_item_cb_gtk_button_clicked, self, 0);
	_tmp8_ = self->priv->child_entry;
	g_signal_connect_object (_tmp8_, "activate", (GCallback) _tuba_views_lists_new_item_cb_gtk_entry_activate, self, 0);
	_tmp9_ = self->priv->child_entry;
	g_signal_connect_object ((GObject*) _tmp9_, "notify::text", (GCallback) _tuba_views_lists_on_entry_changed_g_object_notify, self, 0);
	_tmp10_ = child_box;
	_tmp11_ = self->priv->child_entry;
	gtk_box_append (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = child_box;
	_tmp13_ = self->priv->add_button;
	gtk_box_append (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = add_action_bar;
	_tmp15_ = child_box;
	gtk_action_bar_set_center_widget (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = ((TubaViewsBase*) self)->toolbar_view;
	_tmp17_ = add_action_bar;
	adw_toolbar_view_add_top_bar (_tmp16_, (GtkWidget*) _tmp17_);
	_g_object_unref0 (child_box);
	_g_object_unref0 (add_action_bar);
	return obj;
}

static void
tuba_views_lists_class_init (TubaViewsListsClass * klass,
                             gpointer klass_data)
{
	tuba_views_lists_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsLists_private_offset);
	((TubaViewsContentBaseClass *) klass)->on_create_model_widget = (GtkWidget* (*) (TubaViewsContentBase*, GObject*)) tuba_views_lists_real_on_create_model_widget;
	((TubaViewsTimelineClass *) klass)->on_request_finish = (void (*) (TubaViewsTimeline*)) tuba_views_lists_real_on_request_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_lists_get_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_lists_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_lists_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_LISTS_EMPTY_PROPERTY, tuba_views_lists_properties[TUBA_VIEWS_LISTS_EMPTY_PROPERTY] = g_param_spec_boolean ("empty", "empty", "empty", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
tuba_views_lists_instance_init (TubaViewsLists * self,
                                gpointer klass)
{
	self->priv = tuba_views_lists_get_instance_private (self);
}

static void
tuba_views_lists_finalize (GObject * obj)
{
	TubaViewsLists * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_LISTS, TubaViewsLists);
	g_debug ("Lists.vala:269: Destroying Lists view");
	_g_object_unref0 (self->priv->child_entry);
	_g_object_unref0 (self->priv->add_button);
	G_OBJECT_CLASS (tuba_views_lists_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_lists_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsListsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_lists_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsLists), 0, (GInstanceInitFunc) tuba_views_lists_instance_init, NULL };
	GType tuba_views_lists_type_id;
	tuba_views_lists_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TIMELINE, "TubaViewsLists", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsLists_private_offset = g_type_add_instance_private (tuba_views_lists_type_id, sizeof (TubaViewsListsPrivate));
	return tuba_views_lists_type_id;
}

GType
tuba_views_lists_get_type (void)
{
	static GType tuba_views_lists_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_lists_type_id__once)) {
		GType tuba_views_lists_type_id;
		tuba_views_lists_type_id = tuba_views_lists_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_lists_type_id__once, tuba_views_lists_type_id);
	}
	return tuba_views_lists_type_id__once;
}

static void
_vala_tuba_views_lists_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	TubaViewsLists * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_LISTS, TubaViewsLists);
	switch (property_id) {
		case TUBA_VIEWS_LISTS_EMPTY_PROPERTY:
		g_value_set_boolean (value, tuba_views_lists_get_empty (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

