/* Search.c generated by valac 0.56.19, the Vala compiler
 * generated from Search.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 <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include <json-glib/json-glib.h>
#include <libsoup/soup.h>

#define TUBA_VIEWS_SEARCH_MAX_RECENTS 12
#define BUILD_RESOURCES "/dev/geopjr/Tuba/"
#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_TABBED_BASE (tuba_views_tabbed_base_get_type ())
#define TUBA_VIEWS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBase))
#define TUBA_VIEWS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBaseClass))
#define TUBA_VIEWS_IS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TABBED_BASE))
#define TUBA_VIEWS_IS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TABBED_BASE))
#define TUBA_VIEWS_TABBED_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TABBED_BASE, TubaViewsTabbedBaseClass))

typedef struct _TubaViewsTabbedBase TubaViewsTabbedBase;
typedef struct _TubaViewsTabbedBaseClass TubaViewsTabbedBaseClass;
typedef struct _TubaViewsTabbedBasePrivate TubaViewsTabbedBasePrivate;

#define TUBA_VIEWS_TYPE_SEARCH (tuba_views_search_get_type ())
#define TUBA_VIEWS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearch))
#define TUBA_VIEWS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearchClass))
#define TUBA_VIEWS_IS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_SEARCH))
#define TUBA_VIEWS_IS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_SEARCH))
#define TUBA_VIEWS_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearchClass))

typedef struct _TubaViewsSearch TubaViewsSearch;
typedef struct _TubaViewsSearchClass TubaViewsSearchClass;
typedef struct _TubaViewsSearchPrivate TubaViewsSearchPrivate;

#define TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY (tuba_views_search_search_entry_get_type ())
#define TUBA_VIEWS_SEARCH_SEARCH_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, TubaViewsSearchSearchEntry))
#define TUBA_VIEWS_SEARCH_SEARCH_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, TubaViewsSearchSearchEntryClass))
#define TUBA_VIEWS_SEARCH_IS_SEARCH_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY))
#define TUBA_VIEWS_SEARCH_IS_SEARCH_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY))
#define TUBA_VIEWS_SEARCH_SEARCH_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, TubaViewsSearchSearchEntryClass))

typedef struct _TubaViewsSearchSearchEntry TubaViewsSearchSearchEntry;
typedef struct _TubaViewsSearchSearchEntryClass TubaViewsSearchSearchEntryClass;

#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;
enum  {
	TUBA_VIEWS_SEARCH_0_PROPERTY,
	TUBA_VIEWS_SEARCH_QUERY_PROPERTY,
	TUBA_VIEWS_SEARCH_NUM_PROPERTIES
};
static GParamSpec* tuba_views_search_properties[TUBA_VIEWS_SEARCH_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#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_SEARCH_RESULT (tuba_api_search_result_get_type ())
#define TUBA_API_SEARCH_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_SEARCH_RESULT, TubaAPISearchResult))
#define TUBA_API_IS_SEARCH_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_SEARCH_RESULT))
#define TUBA_API_SEARCH_RESULT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_API_TYPE_SEARCH_RESULT, TubaAPISearchResultIface))

typedef struct _TubaAPISearchResult TubaAPISearchResult;
typedef struct _TubaAPISearchResultIface TubaAPISearchResultIface;
typedef struct _TubaViewsContentBasePrivate TubaViewsContentBasePrivate;
typedef struct _Block76Data Block76Data;
typedef struct _Block77Data Block77Data;

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

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;

#define TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW (tuba_views_search_search_history_row_get_type ())
#define TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, TubaViewsSearchSearchHistoryRow))
#define TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, TubaViewsSearchSearchHistoryRowClass))
#define TUBA_VIEWS_SEARCH_IS_SEARCH_HISTORY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW))
#define TUBA_VIEWS_SEARCH_IS_SEARCH_HISTORY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW))
#define TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, TubaViewsSearchSearchHistoryRowClass))

typedef struct _TubaViewsSearchSearchHistoryRow TubaViewsSearchSearchHistoryRow;
typedef struct _TubaViewsSearchSearchHistoryRowClass TubaViewsSearchSearchHistoryRowClass;

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

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

#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_API_TYPE_SEARCH_RESULTS (tuba_api_search_results_get_type ())
#define TUBA_API_SEARCH_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_SEARCH_RESULTS, TubaAPISearchResults))
#define TUBA_API_SEARCH_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_SEARCH_RESULTS, TubaAPISearchResultsClass))
#define TUBA_API_IS_SEARCH_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_SEARCH_RESULTS))
#define TUBA_API_IS_SEARCH_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_SEARCH_RESULTS))
#define TUBA_API_SEARCH_RESULTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_SEARCH_RESULTS, TubaAPISearchResultsClass))

typedef struct _TubaAPISearchResults TubaAPISearchResults;
typedef struct _TubaAPISearchResultsClass TubaAPISearchResultsClass;

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

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

#define TUBA_API_TYPE_TAG (tuba_api_tag_get_type ())
#define TUBA_API_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_TAG, TubaAPITag))
#define TUBA_API_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_TAG, TubaAPITagClass))
#define TUBA_API_IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_TAG))
#define TUBA_API_IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_TAG))
#define TUBA_API_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_TAG, TubaAPITagClass))

typedef struct _TubaAPITag TubaAPITag;
typedef struct _TubaAPITagClass TubaAPITagClass;

#define TUBA_API_TYPE_STATUS (tuba_api_status_get_type ())
#define TUBA_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatus))
#define TUBA_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))
#define TUBA_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_STATUS))
#define TUBA_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_STATUS))
#define TUBA_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))

typedef struct _TubaAPIStatus TubaAPIStatus;
typedef struct _TubaAPIStatusClass TubaAPIStatusClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG (tuba_views_search_advanced_search_dialog_get_type ())
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG, TubaViewsSearchAdvancedSearchDialog))
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG, TubaViewsSearchAdvancedSearchDialogClass))
#define TUBA_VIEWS_SEARCH_IS_ADVANCED_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG))
#define TUBA_VIEWS_SEARCH_IS_ADVANCED_SEARCH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG))
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG, TubaViewsSearchAdvancedSearchDialogClass))

typedef struct _TubaViewsSearchAdvancedSearchDialog TubaViewsSearchAdvancedSearchDialog;
typedef struct _TubaViewsSearchAdvancedSearchDialogClass TubaViewsSearchAdvancedSearchDialogClass;

#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 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 struct _TubaViewsSearchSearchEntryPrivate TubaViewsSearchSearchEntryPrivate;
enum  {
	TUBA_VIEWS_SEARCH_SEARCH_ENTRY_0_PROPERTY,
	TUBA_VIEWS_SEARCH_SEARCH_ENTRY_TEXT_PROPERTY,
	TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ENTRY_PROPERTY,
	TUBA_VIEWS_SEARCH_SEARCH_ENTRY_NUM_PROPERTIES
};
static GParamSpec* tuba_views_search_search_entry_properties[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_NUM_PROPERTIES];
enum  {
	TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ON_ADVANCED_SEARCH_CLICKED_SIGNAL,
	TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ON_ENTRY_ACTIVATE_SIGNAL,
	TUBA_VIEWS_SEARCH_SEARCH_ENTRY_NUM_SIGNALS
};
static guint tuba_views_search_search_entry_signals[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_NUM_SIGNALS] = {0};

#define TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW (tuba_views_search_openable_row_get_type ())
#define TUBA_VIEWS_SEARCH_OPENABLE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW, TubaViewsSearchOpenableRow))
#define TUBA_VIEWS_SEARCH_OPENABLE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW, TubaViewsSearchOpenableRowClass))
#define TUBA_VIEWS_SEARCH_IS_OPENABLE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW))
#define TUBA_VIEWS_SEARCH_IS_OPENABLE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW))
#define TUBA_VIEWS_SEARCH_OPENABLE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW, TubaViewsSearchOpenableRowClass))

typedef struct _TubaViewsSearchOpenableRow TubaViewsSearchOpenableRow;
typedef struct _TubaViewsSearchOpenableRowClass TubaViewsSearchOpenableRowClass;
typedef struct _TubaViewsSearchOpenableRowPrivate TubaViewsSearchOpenableRowPrivate;
enum  {
	TUBA_VIEWS_SEARCH_OPENABLE_ROW_0_PROPERTY,
	TUBA_VIEWS_SEARCH_OPENABLE_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_views_search_openable_row_properties[TUBA_VIEWS_SEARCH_OPENABLE_ROW_NUM_PROPERTIES];
enum  {
	TUBA_VIEWS_SEARCH_OPENABLE_ROW_OPEN_SIGNAL,
	TUBA_VIEWS_SEARCH_OPENABLE_ROW_NUM_SIGNALS
};
static guint tuba_views_search_openable_row_signals[TUBA_VIEWS_SEARCH_OPENABLE_ROW_NUM_SIGNALS] = {0};

#define TUBA_TYPE_WIDGETIZABLE (tuba_widgetizable_get_type ())
#define TUBA_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizable))
#define TUBA_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_WIDGETIZABLE))
#define TUBA_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizableIface))

typedef struct _TubaWidgetizable TubaWidgetizable;
typedef struct _TubaWidgetizableIface TubaWidgetizableIface;
typedef struct _TubaEntityPrivate TubaEntityPrivate;
typedef struct _TubaViewsSearchSearchHistoryRowPrivate TubaViewsSearchSearchHistoryRowPrivate;
enum  {
	TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_0_PROPERTY,
	TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_TITLE_PROPERTY,
	TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_views_search_search_history_row_properties[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_NUM_PROPERTIES];
enum  {
	TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_REMOVE_ME_SIGNAL,
	TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_OPEN_ME_SIGNAL,
	TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_NUM_SIGNALS
};
static guint tuba_views_search_search_history_row_signals[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_NUM_SIGNALS] = {0};
typedef struct _TubaViewsSearchAdvancedSearchDialogPrivate TubaViewsSearchAdvancedSearchDialogPrivate;
enum  {
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_0_PROPERTY,
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_NUM_PROPERTIES
};
static GParamSpec* tuba_views_search_advanced_search_dialog_properties[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_NUM_PROPERTIES];

#define TUBA_UTILS_TYPE_LOCALES (tuba_utils_locales_get_type ())
#define TUBA_UTILS_LOCALES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_UTILS_TYPE_LOCALES, TubaUtilsLocales))
#define TUBA_UTILS_LOCALES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_UTILS_TYPE_LOCALES, TubaUtilsLocalesClass))
#define TUBA_UTILS_IS_LOCALES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_UTILS_TYPE_LOCALES))
#define TUBA_UTILS_IS_LOCALES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_UTILS_TYPE_LOCALES))
#define TUBA_UTILS_LOCALES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_UTILS_TYPE_LOCALES, TubaUtilsLocalesClass))

typedef struct _TubaUtilsLocales TubaUtilsLocales;
typedef struct _TubaUtilsLocalesClass TubaUtilsLocalesClass;
typedef struct _TubaUtilsLocalesPrivate TubaUtilsLocalesPrivate;

#define TUBA_UTILS_LOCALES_TYPE_LOCALE (tuba_utils_locales_locale_get_type ())
#define TUBA_UTILS_LOCALES_LOCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocale))
#define TUBA_UTILS_LOCALES_LOCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocaleClass))
#define TUBA_UTILS_LOCALES_IS_LOCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_UTILS_LOCALES_TYPE_LOCALE))
#define TUBA_UTILS_LOCALES_IS_LOCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_UTILS_LOCALES_TYPE_LOCALE))
#define TUBA_UTILS_LOCALES_LOCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocaleClass))

typedef struct _TubaUtilsLocalesLocale TubaUtilsLocalesLocale;
typedef struct _TubaUtilsLocalesLocaleClass TubaUtilsLocalesLocaleClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER (tuba_views_search_advanced_search_dialog_account_search_popover_get_type ())
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER, TubaViewsSearchAdvancedSearchDialogAccountSearchPopover))
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER, TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverClass))
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_IS_ACCOUNT_SEARCH_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER))
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_IS_ACCOUNT_SEARCH_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER))
#define TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER, TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverClass))

typedef struct _TubaViewsSearchAdvancedSearchDialogAccountSearchPopover TubaViewsSearchAdvancedSearchDialogAccountSearchPopover;
typedef struct _TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverClass TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverClass;
typedef struct _TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverPrivate TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverPrivate;

#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;
enum  {
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_0_PROPERTY,
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_NUM_PROPERTIES
};
static GParamSpec* tuba_views_search_advanced_search_dialog_account_search_popover_properties[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_NUM_PROPERTIES];
typedef struct _Block78Data Block78Data;

#define TUBA_TYPE_OOPSIE (tuba_oopsie_get_type ())
typedef void (*TubaNetworkNodeCallback) (JsonNode* node, gpointer user_data, GError** error);

#define TUBA_WIDGETS_TYPE_ACCOUNT_ROW (tuba_widgets_account_row_get_type ())
#define TUBA_WIDGETS_ACCOUNT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRow))
#define TUBA_WIDGETS_ACCOUNT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRowClass))
#define TUBA_WIDGETS_IS_ACCOUNT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_ACCOUNT_ROW))
#define TUBA_WIDGETS_IS_ACCOUNT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_ACCOUNT_ROW))
#define TUBA_WIDGETS_ACCOUNT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRowClass))

typedef struct _TubaWidgetsAccountRow TubaWidgetsAccountRow;
typedef struct _TubaWidgetsAccountRowClass TubaWidgetsAccountRowClass;
typedef struct _TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData;
enum  {
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_ACCOUNT_PICKED_SIGNAL,
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_ERRORED_SIGNAL,
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_NUM_SIGNALS
};
static guint tuba_views_search_advanced_search_dialog_account_search_popover_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_NUM_SIGNALS] = {0};
#define _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))
enum  {
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_RESULT_SIGNAL,
	TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_NUM_SIGNALS
};
static guint tuba_views_search_advanced_search_dialog_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_NUM_SIGNALS] = {0};
typedef struct _Block79Data Block79Data;

#define TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS (tuba_api_instance_v2_api_versions_get_type ())
#define TUBA_API_INSTANCE_V2_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersions))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))

typedef struct _TubaAPIInstanceV2APIVersions TubaAPIInstanceV2APIVersions;
typedef struct _TubaAPIInstanceV2APIVersionsClass TubaAPIInstanceV2APIVersionsClass;

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 _TubaViewsTabbedBase {
	TubaViewsBase parent_instance;
	TubaViewsTabbedBasePrivate * priv;
	AdwViewSwitcher* switcher;
	AdwViewSwitcherBar* switcher_bar;
	AdwViewStack* stack;
	GtkStack* title_stack;
};

struct _TubaViewsTabbedBaseClass {
	TubaViewsBaseClass parent_class;
	void (*change_tab_alt) (TubaViewsTabbedBase* self, gint id);
	void (*on_view_switched) (TubaViewsTabbedBase* self);
	gboolean (*get_title_stack_page_visible) (TubaViewsTabbedBase* self);
	void (*set_title_stack_page_visible) (TubaViewsTabbedBase* self, gboolean value);
};

struct _TubaViewsSearch {
	TubaViewsTabbedBase parent_instance;
	TubaViewsSearchPrivate * priv;
	GtkSearchBar* bar;
	TubaViewsSearchSearchEntry* entry;
};

struct _TubaViewsSearchClass {
	TubaViewsTabbedBaseClass parent_class;
};

struct _TubaViewsSearchPrivate {
	gchar* _query;
	TubaViewsContentBase* all_tab;
	TubaViewsContentBase* accounts_tab;
	TubaViewsContentBase* statuses_tab;
	TubaViewsContentBase* hashtags_tab;
	TubaViewsContentBase* collections_tab;
	GRegex* search_query_regex;
};

struct _TubaAPISearchResultIface {
	GTypeInterface parent_iface;
	GRegex* (*get_tuba_search_query_regex) (TubaAPISearchResult* self);
	void (*set_tuba_search_query_regex) (TubaAPISearchResult* self, GRegex* value);
};

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 _Block76Data {
	int _ref_count_;
	TubaViewsSearch* self;
	TubaViewsContentBase* tab;
};

struct _Block77Data {
	int _ref_count_;
	Block76Data * _data76_;
	gint all_i;
};

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

struct _TubaViewsBaseStatusMessageClass {
	GObjectClass parent_class;
};

struct _TubaViewsSearchSearchEntry {
	GtkBox parent_instance;
	TubaViewsSearchSearchEntryPrivate * priv;
};

struct _TubaViewsSearchSearchEntryClass {
	GtkBoxClass parent_class;
};

struct _TubaViewsSearchSearchEntryPrivate {
	GtkText* _entry;
	GtkButton* clear_search_button;
};

struct _TubaViewsSearchOpenableRow {
	AdwActionRow parent_instance;
	TubaViewsSearchOpenableRowPrivate * priv;
};

struct _TubaViewsSearchOpenableRowClass {
	AdwActionRowClass parent_class;
};

struct _TubaWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaWidgetizable* self);
	void (*open) (TubaWidgetizable* self);
	void (*resolve_open) (TubaWidgetizable* self, TubaInstanceAccount* account);
};

struct _TubaEntity {
	GObject parent_instance;
	TubaEntityPrivate * priv;
};

struct _TubaEntityClass {
	GObjectClass parent_class;
	gboolean (*is_local) (TubaEntity* self, TubaInstanceAccount* account);
	GType (*deserialize_array_type) (TubaEntity* self, const gchar* prop);
};

struct _TubaViewsSearchSearchHistoryRow {
	TubaEntity parent_instance;
	TubaViewsSearchSearchHistoryRowPrivate * priv;
};

struct _TubaViewsSearchSearchHistoryRowClass {
	TubaEntityClass parent_class;
};

struct _TubaViewsSearchSearchHistoryRowPrivate {
	gchar* _title;
};

struct _TubaViewsSearchAdvancedSearchDialog {
	AdwDialog parent_instance;
	TubaViewsSearchAdvancedSearchDialogPrivate * priv;
};

struct _TubaViewsSearchAdvancedSearchDialogClass {
	AdwDialogClass parent_class;
};

struct _TubaViewsSearchAdvancedSearchDialogPrivate {
	GtkListBox* main_list;
	AdwToastOverlay* toast_overlay;
	AdwEntryRow* query_row;
	AdwEntryRow* user_row;
	GtkMenuButton* acc_search_button;
	AdwSwitchRow* reply_switch_row;
	AdwSwitchRow* cw_switch_row;
	AdwSwitchRow* media_switch_row;
	AdwSwitchRow* poll_switch_row;
	AdwSwitchRow* embed_switch_row;
	GtkCheckButton* all_radio;
	GtkCheckButton* library_radio;
	GtkCheckButton* public_radio;
	AdwExpanderRow* before_expander_row;
	GtkCalendar* before_calendar;
	AdwExpanderRow* during_expander_row;
	GtkCalendar* during_calendar;
	AdwExpanderRow* after_expander_row;
	GtkCalendar* after_calendar;
	GtkDropDown* lang_dropdown;
	GtkSwitch* lang_switch;
};

struct _TubaUtilsLocales {
	GObject parent_instance;
	TubaUtilsLocalesPrivate * priv;
	GListStore* list_store;
};

struct _TubaUtilsLocalesClass {
	GObjectClass parent_class;
};

struct _TubaViewsSearchAdvancedSearchDialogAccountSearchPopover {
	GtkPopover parent_instance;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverPrivate * priv;
};

struct _TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverClass {
	GtkPopoverClass parent_class;
};

struct _TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverPrivate {
	GtkSearchEntry* entry;
	GtkListBox* result_box;
	GtkScrolledWindow* sw;
	TubaRequestV2* last_req;
};

struct _Block78Data {
	int _ref_count_;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self;
	gint i;
};

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 _TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self;
	gchar* query;
	GtkListBox* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	TubaRequestV2* _tmp2_;
	TubaRequestV2* _tmp3_;
	GCancellable* _tmp4_;
	GCancellable* _tmp5_;
	Block78Data* _data78_;
	TubaRequestV2* _tmp6_;
	TubaRequestV2* _tmp7_;
	TubaRequestV2* _tmp8_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp9_;
	GInputStream* _tmp10_;
	gboolean _tmp11_;
	TubaRequestV2* _tmp12_;
	TubaRequestV2* _tmp13_;
	GCancellable* _tmp14_;
	GCancellable* _tmp15_;
	JsonParser* parser;
	GInputStream* _tmp16_;
	JsonParser* _tmp17_;
	JsonParser* _tmp18_;
	GtkScrolledWindow* _tmp19_;
	GError* e;
	GError* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	GError* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GError* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	GError* _inner_error0_;
};

struct _Block79Data {
	int _ref_count_;
	TubaViewsSearch* self;
	guint timeout;
};

static gint TubaViewsSearch_private_offset;
static gpointer tuba_views_search_parent_class = NULL;
VALA_EXTERN TubaSettings* tuba_settings;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaApplication* tuba_app;
static gint TubaViewsSearchSearchEntry_private_offset;
static gpointer tuba_views_search_search_entry_parent_class = NULL;
static gpointer tuba_views_search_openable_row_parent_class = NULL;
static gint TubaViewsSearchSearchHistoryRow_private_offset;
static gpointer tuba_views_search_search_history_row_parent_class = NULL;
static TubaWidgetizableIface * tuba_views_search_search_history_row_tuba_widgetizable_parent_iface = NULL;
static gint TubaViewsSearchAdvancedSearchDialog_private_offset;
static gpointer tuba_views_search_advanced_search_dialog_parent_class = NULL;
VALA_EXTERN GEqualFunc tuba_utils_locales_locale_compare;
static gint TubaViewsSearchAdvancedSearchDialogAccountSearchPopover_private_offset;
static gpointer tuba_views_search_advanced_search_dialog_account_search_popover_parent_class = NULL;

VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN GType tuba_views_tabbed_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTabbedBase, g_object_unref)
VALA_EXTERN GType tuba_views_search_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsSearch, g_object_unref)
VALA_EXTERN GType tuba_views_search_search_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsSearchSearchEntry, 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)
static gboolean tuba_views_search_append_entity (TubaViewsSearch* self,
                                          TubaViewsContentBase* tab,
                                          TubaEntity* entity);
VALA_EXTERN GType tuba_api_search_result_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPISearchResult, g_object_unref)
VALA_EXTERN void tuba_api_search_result_set_tuba_search_query_regex (TubaAPISearchResult* self,
                                                         GRegex* value);
static void tuba_views_search_append_results (TubaViewsSearch* self,
                                       GeeArrayList* array,
                                       TubaViewsContentBase* tab);
static Block76Data* block76_data_ref (Block76Data* _data76_);
static void block76_data_unref (void * _userdata_);
static Block77Data* block77_data_ref (Block77Data* _data77_);
static void block77_data_unref (void * _userdata_);
static gboolean ___lambda183_ (Block77Data* _data77_,
                        TubaEntity* e);
static gboolean ____lambda183__gee_forall_func (gpointer g,
                                         gpointer self);
static gboolean tuba_views_search_populate_with_recents (TubaViewsSearch* 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_recent_searches (TubaSettings* self,
                                           gint* result_length1);
VALA_EXTERN GType tuba_views_search_search_history_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsSearchSearchHistoryRow, g_object_unref)
VALA_EXTERN TubaViewsSearchSearchHistoryRow* tuba_views_search_search_history_row_new (const gchar* title);
VALA_EXTERN TubaViewsSearchSearchHistoryRow* tuba_views_search_search_history_row_construct (GType object_type,
                                                                                 const gchar* title);
static void tuba_views_search_on_asd_result (TubaViewsSearch* self,
                                      const gchar* _result_);
static void _tuba_views_search_on_asd_result_tuba_views_search_search_history_row_open_me (TubaViewsSearchSearchHistoryRow* _sender,
                                                                                    const gchar* title,
                                                                                    gpointer self);
static void tuba_views_search_on_remove_recent (TubaViewsSearch* self,
                                         TubaViewsSearchSearchHistoryRow* row,
                                         const gchar* query);
static void _tuba_views_search_on_remove_recent_tuba_views_search_search_history_row_remove_me (TubaViewsSearchSearchHistoryRow* _sender,
                                                                                         const gchar* title,
                                                                                         gpointer self);
static void tuba_views_search_request (TubaViewsSearch* self);
VALA_EXTERN const gchar* tuba_views_search_search_entry_get_text (TubaViewsSearchSearchEntry* self);
VALA_EXTERN void tuba_views_search_set_query (TubaViewsSearch* self,
                                  const gchar* value);
VALA_EXTERN const gchar* tuba_views_search_get_query (TubaViewsSearch* self);
VALA_EXTERN void tuba_views_base_clear (TubaViewsBase* self);
VALA_EXTERN GType tuba_views_base_status_message_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBaseStatusMessage, g_object_unref)
VALA_EXTERN TubaViewsBaseStatusMessage* tuba_views_base_status_message_new (void);
VALA_EXTERN TubaViewsBaseStatusMessage* tuba_views_base_status_message_construct (GType object_type);
VALA_EXTERN void tuba_views_base_set_base_status (TubaViewsBase* self,
                                      TubaViewsBaseStatusMessage* value);
static void tuba_views_search_generate_regex (TubaViewsSearch* self);
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 void tuba_api_search_results_request (const gchar* q,
                                      TubaInstanceAccount* account,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN GType tuba_api_search_results_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPISearchResults, g_object_unref)
VALA_EXTERN TubaAPISearchResults* tuba_api_search_results_request_finish (GAsyncResult* _res_,
                                                              GError** error);
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);
static void __lambda184_ (TubaViewsSearch* self,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN GType tuba_api_tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITag, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_search_results_get_hashtags (TubaAPISearchResults* self);
VALA_EXTERN GeeArrayList* tuba_api_search_results_get_accounts (TubaAPISearchResults* self);
VALA_EXTERN GType tuba_api_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatus, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_search_results_get_statuses (TubaAPISearchResults* self);
VALA_EXTERN GeeArrayList* tuba_api_search_results_get_collections (TubaAPISearchResults* self);
static void tuba_views_search_update_recents (TubaViewsSearch* self,
                                       const gchar* query);
VALA_EXTERN void tuba_views_base_on_content_changed (TubaViewsBase* self);
VALA_EXTERN void tuba_views_base_on_error (TubaViewsBase* self,
                               gint32 code,
                               const gchar* reason);
static void ___lambda184__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static void _vala_array_add94 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add95 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN void tuba_settings_set_recent_searches (TubaSettings* self,
                                        gchar** value,
                                        gint value_length1);
static void _vala_array_add96 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void tuba_views_search_open_advanced_search_dialog (TubaViewsSearch* self);
static GType tuba_views_search_advanced_search_dialog_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsSearchAdvancedSearchDialog, g_object_unref)
static TubaViewsSearchAdvancedSearchDialog* tuba_views_search_advanced_search_dialog_new (const gchar* from_query);
static TubaViewsSearchAdvancedSearchDialog* tuba_views_search_advanced_search_dialog_construct (GType object_type,
                                                                                         const gchar* from_query);
static void _tuba_views_search_on_asd_result_tuba_views_search_advanced_search_dialog_result (TubaViewsSearchAdvancedSearchDialog* _sender,
                                                                                       const gchar* res,
                                                                                       gpointer self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaDialogsMainWindow* tuba_application_get_main_window (TubaApplication* self);
VALA_EXTERN void tuba_views_search_search_entry_set_text (TubaViewsSearchSearchEntry* self,
                                              const gchar* value);
VALA_EXTERN TubaViewsSearch* tuba_views_search_new (void);
VALA_EXTERN TubaViewsSearch* tuba_views_search_construct (GType object_type);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_new (void);
VALA_EXTERN TubaViewsTabbedBase* tuba_views_tabbed_base_construct (GType object_type);
VALA_EXTERN void tuba_views_search_search_entry_gather_focus (TubaViewsSearchSearchEntry* self);
VALA_EXTERN GtkText* tuba_views_search_search_entry_get_entry (TubaViewsSearchSearchEntry* self);
static void tuba_views_search_search_entry_on_entry_activated (TubaViewsSearchSearchEntry* self);
static void tuba_views_search_search_entry_open_advanced_search_dialog (TubaViewsSearchSearchEntry* self);
static void tuba_views_search_search_entry_on_clear_entry (TubaViewsSearchSearchEntry* self);
static void tuba_views_search_search_entry_on_entry_change (TubaViewsSearchSearchEntry* self);
VALA_EXTERN TubaViewsSearchSearchEntry* tuba_views_search_search_entry_new (void);
VALA_EXTERN TubaViewsSearchSearchEntry* tuba_views_search_search_entry_construct (GType object_type);
static void tuba_views_search_search_entry_set_entry (TubaViewsSearchSearchEntry* self,
                                               GtkText* value);
static GObject * tuba_views_search_search_entry_constructor (GType type,
                                                      guint n_construct_properties,
                                                      GObjectConstructParam * construct_properties);
static void _tuba_views_search_search_entry_on_entry_change_gtk_editable_changed (GtkEditable* _sender,
                                                                           gpointer self);
static void _tuba_views_search_search_entry_on_entry_activated_gtk_text_activate (GtkText* _sender,
                                                                           gpointer self);
static void _tuba_views_search_search_entry_open_advanced_search_dialog_gtk_button_clicked (GtkButton* _sender,
                                                                                     gpointer self);
static void _tuba_views_search_search_entry_on_clear_entry_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self);
static void tuba_views_search_search_entry_finalize (GObject * obj);
static GType tuba_views_search_search_entry_get_type_once (void);
static void _vala_tuba_views_search_search_entry_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static void _vala_tuba_views_search_search_entry_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec);
VALA_EXTERN GType tuba_views_search_openable_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsSearchOpenableRow, g_object_unref)
VALA_EXTERN TubaViewsSearchOpenableRow* tuba_views_search_openable_row_new (void);
VALA_EXTERN TubaViewsSearchOpenableRow* tuba_views_search_openable_row_construct (GType object_type);
static GType tuba_views_search_openable_row_get_type_once (void);
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN TubaEntity* tuba_entity_new (void);
VALA_EXTERN TubaEntity* tuba_entity_construct (GType object_type);
VALA_EXTERN void tuba_views_search_search_history_row_set_title (TubaViewsSearchSearchHistoryRow* self,
                                                     const gchar* value);
static GtkWidget* tuba_views_search_search_history_row_real_to_widget (TubaWidgetizable* base);
VALA_EXTERN const gchar* tuba_views_search_search_history_row_get_title (TubaViewsSearchSearchHistoryRow* self);
VALA_EXTERN void tuba_widgetizable_open (TubaWidgetizable* self);
static void _tuba_widgetizable_open_tuba_views_search_openable_row_open (TubaViewsSearchOpenableRow* _sender,
                                                                  gpointer self);
static void tuba_views_search_search_history_row_on_remove_me (TubaViewsSearchSearchHistoryRow* self);
static void _tuba_views_search_search_history_row_on_remove_me_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void tuba_views_search_search_history_row_real_open (TubaWidgetizable* base);
VALA_EXTERN GtkWidget* tuba_widgetizable_to_widget (TubaWidgetizable* self);
static void tuba_views_search_search_history_row_finalize (GObject * obj);
static GType tuba_views_search_search_history_row_get_type_once (void);
static void _vala_tuba_views_search_search_history_row_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec);
static void _vala_tuba_views_search_search_history_row_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec);
static void tuba_views_search_advanced_search_dialog_on_account_picked (TubaViewsSearchAdvancedSearchDialog* self,
                                                                 const gchar* acc);
static void tuba_views_search_advanced_search_dialog_on_account_errored (TubaViewsSearchAdvancedSearchDialog* self,
                                                                  const gchar* msg);
VALA_EXTERN GType tuba_utils_locales_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaUtilsLocales, g_object_unref)
VALA_EXTERN TubaUtilsLocales* tuba_application_get_app_locales (TubaApplication* self);
VALA_EXTERN TubaUtilsLocalesLocale* tuba_utils_locales_locale_new (const gchar* locale,
                                                       const gchar* en_name,
                                                       const gchar* name);
VALA_EXTERN TubaUtilsLocalesLocale* tuba_utils_locales_locale_construct (GType object_type,
                                                             const gchar* locale,
                                                             const gchar* en_name,
                                                             const gchar* name);
VALA_EXTERN GType tuba_utils_locales_locale_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaUtilsLocalesLocale, g_object_unref)
static void _vala_array_add97 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void tuba_views_search_advanced_search_dialog_on_search (TubaViewsSearchAdvancedSearchDialog* self);
static void _vala_array_add98 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add99 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add100 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add101 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add102 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add103 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add104 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add105 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add106 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add107 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add108 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void _vala_array_add109 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
VALA_EXTERN const gchar* tuba_utils_locales_locale_get_locale (TubaUtilsLocalesLocale* self);
static void _vala_array_add110 (gchar** * array,
                         gint* length,
                         gint* size,
                         gchar* value);
static void tuba_views_search_advanced_search_dialog_on_exit (TubaViewsSearchAdvancedSearchDialog* self);
static void _tuba_views_search_advanced_search_dialog_on_search_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self);
static void _tuba_views_search_advanced_search_dialog_on_exit_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
VALA_EXTERN GType tuba_views_search_advanced_search_dialog_account_search_popover_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover, g_object_unref)
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
static void tuba_views_search_advanced_search_dialog_account_search_popover_on_close (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self);
static void tuba_views_search_advanced_search_dialog_account_search_popover_search (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self);
static void tuba_views_search_advanced_search_dialog_account_search_popover_search_real (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self,
                                                                                  const gchar* query,
                                                                                  GAsyncReadyCallback _callback_,
                                                                                  gpointer _user_data_);
static void tuba_views_search_advanced_search_dialog_account_search_popover_search_real_finish (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self,
                                                                                         GAsyncResult* _res_);
static void tuba_views_search_advanced_search_dialog_account_search_popover_search_real_data_free (gpointer _data);
static gboolean tuba_views_search_advanced_search_dialog_account_search_popover_search_real_co (TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData* _data_);
VALA_EXTERN GCancellable* tuba_request_v2_get_cancellable (TubaRequestV2* self);
static Block78Data* block78_data_ref (Block78Data* _data78_);
static void block78_data_unref (void * _userdata_);
VALA_EXTERN TubaRequestV2* tuba_api_account_search (const gchar* query,
                                        GError** error);
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_search_advanced_search_dialog_account_search_popover_search_real_ready (GObject* source_object,
                                                                                        GAsyncResult* _res_,
                                                                                        gpointer _user_data_);
VALA_EXTERN void tuba_network_get_parser_from_inputstream_async (GInputStream* in_stream,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream_finish (GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN void tuba_network_parse_array (JsonParser* parser,
                               TubaNetworkNodeCallback cb,
                               gpointer cb_target,
                               GDestroyNotify cb_target_destroy_notify,
                               GError** error);
static void ___lambda185_ (Block78Data* _data78_,
                    JsonNode* node,
                    GError** error);
VALA_EXTERN TubaAPIAccount* tuba_api_account_from (JsonNode* node,
                                       GError** error);
VALA_EXTERN GType tuba_widgets_account_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAccountRow, g_object_unref)
VALA_EXTERN TubaWidgetsAccountRow* tuba_widgets_account_row_new (TubaAPIAccount* account,
                                                     gboolean open_only);
VALA_EXTERN TubaWidgetsAccountRow* tuba_widgets_account_row_construct (GType object_type,
                                                           TubaAPIAccount* account,
                                                           gboolean open_only);
static void ____lambda185__tuba_network_node_callback (JsonNode* node,
                                                gpointer self,
                                                GError** error);
static void tuba_views_search_advanced_search_dialog_account_search_popover_on_account_chosen (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self,
                                                                                        GtkListBoxRow* row);
VALA_EXTERN TubaAPIAccount* tuba_widgets_account_row_get_account (TubaWidgetsAccountRow* self);
VALA_EXTERN gchar* tuba_api_account_get_full_handle (TubaAPIAccount* self);
static void tuba_views_search_advanced_search_dialog_account_search_popover_real_show (GtkWidget* base);
static TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* tuba_views_search_advanced_search_dialog_account_search_popover_new (void);
static TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* tuba_views_search_advanced_search_dialog_account_search_popover_construct (GType object_type);
static GObject * tuba_views_search_advanced_search_dialog_account_search_popover_constructor (GType type,
                                                                                       guint n_construct_properties,
                                                                                       GObjectConstructParam * construct_properties);
static void _tuba_views_search_advanced_search_dialog_account_search_popover_on_account_chosen_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                                                    GtkListBoxRow* row,
                                                                                                                    gpointer self);
static void _tuba_views_search_advanced_search_dialog_account_search_popover_search_gtk_search_entry_activate (GtkSearchEntry* _sender,
                                                                                                        gpointer self);
static void _tuba_views_search_advanced_search_dialog_account_search_popover_search_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                                                              gpointer self);
static void _tuba_views_search_advanced_search_dialog_account_search_popover_on_close_gtk_search_entry_stop_search (GtkSearchEntry* _sender,
                                                                                                             gpointer self);
static void tuba_views_search_advanced_search_dialog_account_search_popover_finalize (GObject * obj);
static GType tuba_views_search_advanced_search_dialog_account_search_popover_get_type_once (void);
static GObject * tuba_views_search_advanced_search_dialog_constructor (GType type,
                                                                guint n_construct_properties,
                                                                GObjectConstructParam * construct_properties);
static void _tuba_views_search_advanced_search_dialog_on_account_picked_tuba_views_search_advanced_search_dialog_account_search_popover_account_picked (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _sender,
                                                                                                                                                 const gchar* account,
                                                                                                                                                 gpointer self);
static void _tuba_views_search_advanced_search_dialog_on_account_errored_tuba_views_search_advanced_search_dialog_account_search_popover_errored (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _sender,
                                                                                                                                           const gchar* error_msg,
                                                                                                                                           gpointer self);
static void tuba_views_search_advanced_search_dialog_finalize (GObject * obj);
static GType tuba_views_search_advanced_search_dialog_get_type_once (void);
static GObject * tuba_views_search_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
static Block79Data* block79_data_ref (Block79Data* _data79_);
static void block79_data_unref (void * _userdata_);
VALA_EXTERN void tuba_views_base_set_uid (TubaViewsBase* self,
                              gint value);
VALA_EXTERN void tuba_views_base_set_label (TubaViewsBase* self,
                                const gchar* value);
VALA_EXTERN void tuba_views_base_set_empty_timeline_icon (TubaViewsBase* self,
                                              const gchar* value);
VALA_EXTERN void tuba_views_base_set_empty_state_title (TubaViewsBase* self,
                                            const gchar* value);
static void _tuba_views_search_open_advanced_search_dialog_tuba_views_search_search_entry_on_advanced_search_clicked (TubaViewsSearchSearchEntry* _sender,
                                                                                                               gpointer self);
static void _tuba_views_search_request_tuba_views_search_search_entry_on_entry_activate (TubaViewsSearchSearchEntry* _sender,
                                                                                  gpointer self);
static void _tuba_views_search_request_gtk_button_clicked (GtkButton* _sender,
                                                    gpointer self);
VALA_EXTERN TubaViewsContentBase* tuba_views_tabbed_base_add_list_tab (TubaViewsTabbedBase* self,
                                                           const gchar* label,
                                                           const gchar* icon,
                                                           const gchar* empty_state_title);
VALA_EXTERN GType tuba_api_instance_v2_api_versions_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstanceV2APIVersions, g_object_unref)
VALA_EXTERN TubaAPIInstanceV2APIVersions* tuba_instance_account_get_tuba_api_versions (TubaInstanceAccount* self);
VALA_EXTERN gint8 tuba_api_instance_v2_api_versions_get_mastodon (TubaAPIInstanceV2APIVersions* self);
static gboolean _tuba_views_search___lambda186_ (Block79Data* _data79_);
static gboolean __tuba_views_search___lambda186__gsource_func (gpointer self);
static void tuba_views_search_finalize (GObject * obj);
static GType tuba_views_search_get_type_once (void);
static void _vala_tuba_views_search_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_tuba_views_search_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
tuba_views_search_get_instance_private (TubaViewsSearch* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsSearch_private_offset);
}

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

static gboolean
tuba_views_search_append_entity (TubaViewsSearch* self,
                                 TubaViewsContentBase* tab,
                                 TubaEntity* entity)
{
	TubaAPISearchResult* search_result_entity = NULL;
	TubaAPISearchResult* _tmp0_;
	TubaAPISearchResult* _tmp1_;
	GListStore* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tab != NULL, FALSE);
	g_return_val_if_fail (entity != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (TUBA_API_IS_SEARCH_RESULT (entity) ? ((TubaAPISearchResult*) entity) : NULL);
	search_result_entity = _tmp0_;
	_tmp1_ = search_result_entity;
	if (_tmp1_ != NULL) {
		TubaAPISearchResult* _tmp2_;
		GRegex* _tmp3_;
		_tmp2_ = search_result_entity;
		_tmp3_ = self->priv->search_query_regex;
		tuba_api_search_result_set_tuba_search_query_regex (_tmp2_, _tmp3_);
	}
	_tmp4_ = tab->model;
	g_list_store_append (_tmp4_, (GObject*) entity);
	result = TRUE;
	_g_object_unref0 (search_result_entity);
	_g_object_unref0 (entity);
	return result;
}

static Block76Data*
block76_data_ref (Block76Data* _data76_)
{
	g_atomic_int_inc (&_data76_->_ref_count_);
	return _data76_;
}

static void
block76_data_unref (void * _userdata_)
{
	Block76Data* _data76_;
	_data76_ = (Block76Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data76_->_ref_count_)) {
		TubaViewsSearch* self;
		self = _data76_->self;
		_g_object_unref0 (_data76_->tab);
		_g_object_unref0 (self);
		g_slice_free (Block76Data, _data76_);
	}
}

static Block77Data*
block77_data_ref (Block77Data* _data77_)
{
	g_atomic_int_inc (&_data77_->_ref_count_);
	return _data77_;
}

static void
block77_data_unref (void * _userdata_)
{
	Block77Data* _data77_;
	_data77_ = (Block77Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data77_->_ref_count_)) {
		TubaViewsSearch* self;
		self = _data77_->_data76_->self;
		block76_data_unref (_data77_->_data76_);
		_data77_->_data76_ = NULL;
		g_slice_free (Block77Data, _data77_);
	}
}

static gboolean
___lambda183_ (Block77Data* _data77_,
               TubaEntity* e)
{
	Block76Data* _data76_;
	TubaViewsSearch* self;
	TubaEntity* _tmp3_;
	gboolean result;
	_data76_ = _data77_->_data76_;
	self = _data76_->self;
	g_return_val_if_fail (e != NULL, FALSE);
	if (_data77_->all_i < 4) {
		TubaViewsContentBase* _tmp0_;
		TubaEntity* _tmp1_;
		gint _tmp2_;
		_tmp0_ = self->priv->all_tab;
		_tmp1_ = _g_object_ref0 (e);
		tuba_views_search_append_entity (self, _tmp0_, _tmp1_);
		_tmp2_ = _data77_->all_i;
		_data77_->all_i = _tmp2_ + 1;
	}
	_tmp3_ = _g_object_ref0 (e);
	tuba_views_search_append_entity (self, _data76_->tab, _tmp3_);
	result = TRUE;
	_g_object_unref0 (e);
	return result;
}

static gboolean
____lambda183__gee_forall_func (gpointer g,
                                gpointer self)
{
	gboolean result;
	result = ___lambda183_ (self, (TubaEntity*) g);
	return result;
}

static void
tuba_views_search_append_results (TubaViewsSearch* self,
                                  GeeArrayList* array,
                                  TubaViewsContentBase* tab)
{
	Block76Data* _data76_;
	TubaViewsContentBase* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (array != NULL);
	g_return_if_fail (tab != NULL);
	_data76_ = g_slice_new0 (Block76Data);
	_data76_->_ref_count_ = 1;
	_data76_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (tab);
	_g_object_unref0 (_data76_->tab);
	_data76_->tab = _tmp0_;
	_tmp1_ = gee_collection_get_is_empty ((GeeCollection*) array);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		Block77Data* _data77_;
		_data77_ = g_slice_new0 (Block77Data);
		_data77_->_ref_count_ = 1;
		_data77_->_data76_ = block76_data_ref (_data76_);
		_data77_->all_i = 0;
		gee_abstract_collection_foreach ((GeeAbstractCollection*) array, ____lambda183__gee_forall_func, _data77_);
		block77_data_unref (_data77_);
		_data77_ = NULL;
	}
	block76_data_unref (_data76_);
	_data76_ = NULL;
}

static void
_tuba_views_search_on_asd_result_tuba_views_search_search_history_row_open_me (TubaViewsSearchSearchHistoryRow* _sender,
                                                                               const gchar* title,
                                                                               gpointer self)
{
	tuba_views_search_on_asd_result ((TubaViewsSearch*) self, title);
}

static void
_tuba_views_search_on_remove_recent_tuba_views_search_search_history_row_remove_me (TubaViewsSearchSearchHistoryRow* _sender,
                                                                                    const gchar* title,
                                                                                    gpointer self)
{
	tuba_views_search_on_remove_recent ((TubaViewsSearch*) self, _sender, title);
}

static gboolean
tuba_views_search_populate_with_recents (TubaViewsSearch* self)
{
	TubaSettings* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint _tmp2_ = 0;
	gchar** _tmp3_;
	gint _tmp3__length1;
	TubaSettings* _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gint _tmp6_ = 0;
	gchar** _tmp7_;
	gint _tmp7__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = tuba_settings;
	_tmp1_ = tuba_settings_get_recent_searches (_tmp0_, &_tmp2_);
	_tmp1__length1 = _tmp2_;
	_tmp3_ = _tmp1_;
	_tmp3__length1 = _tmp1__length1;
	if (_tmp3__length1 == 0) {
		result = FALSE;
		return result;
	}
	_tmp4_ = tuba_settings;
	_tmp5_ = tuba_settings_get_recent_searches (_tmp4_, &_tmp6_);
	_tmp5__length1 = _tmp6_;
	_tmp7_ = _tmp5_;
	_tmp7__length1 = _tmp5__length1;
	{
		gchar** recent_query_collection = NULL;
		gint recent_query_collection_length1 = 0;
		gint _recent_query_collection_size_ = 0;
		gint recent_query_it = 0;
		recent_query_collection = _tmp7_;
		recent_query_collection_length1 = _tmp7__length1;
		for (recent_query_it = 0; recent_query_it < recent_query_collection_length1; recent_query_it = recent_query_it + 1) {
			gchar* _tmp8_;
			gchar* recent_query = NULL;
			_tmp8_ = g_strdup (recent_query_collection[recent_query_it]);
			recent_query = _tmp8_;
			{
				TubaViewsSearchSearchHistoryRow* row = NULL;
				const gchar* _tmp9_;
				TubaViewsSearchSearchHistoryRow* _tmp10_;
				TubaViewsSearchSearchHistoryRow* _tmp11_;
				TubaViewsSearchSearchHistoryRow* _tmp12_;
				TubaViewsContentBase* _tmp13_;
				TubaViewsSearchSearchHistoryRow* _tmp14_;
				TubaEntity* _tmp15_;
				_tmp9_ = recent_query;
				_tmp10_ = tuba_views_search_search_history_row_new (_tmp9_);
				row = _tmp10_;
				_tmp11_ = row;
				g_signal_connect_object (_tmp11_, "open-me", (GCallback) _tuba_views_search_on_asd_result_tuba_views_search_search_history_row_open_me, self, 0);
				_tmp12_ = row;
				g_signal_connect_object (_tmp12_, "remove-me", (GCallback) _tuba_views_search_on_remove_recent_tuba_views_search_search_history_row_remove_me, self, 0);
				_tmp13_ = self->priv->all_tab;
				_tmp14_ = row;
				_tmp15_ = _g_object_ref0 ((TubaEntity*) _tmp14_);
				tuba_views_search_append_entity (self, _tmp13_, _tmp15_);
				_g_object_unref0 (row);
				_g_free0 (recent_query);
			}
		}
	}
	result = TRUE;
	return result;
}

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

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

static void
__lambda184_ (TubaViewsSearch* self,
              GObject* obj,
              GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		TubaAPISearchResults* results = NULL;
		TubaAPISearchResults* _tmp0_;
		gboolean hashtag = FALSE;
		const gchar* _tmp1_;
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		TubaViewsContentBase* _tmp7_;
		GeeArrayList* _tmp11_;
		GeeArrayList* _tmp12_;
		TubaViewsContentBase* _tmp13_;
		gboolean _tmp14_ = FALSE;
		TubaViewsContentBase* _tmp15_;
		const gchar* _tmp21_;
		TubaViewsBaseStatusMessage* _tmp22_;
		TubaViewsBaseStatusMessage* _tmp23_;
		_tmp0_ = tuba_api_search_results_request_finish (res, &_inner_error0_);
		results = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = self->priv->_query;
		hashtag = g_str_has_prefix (_tmp1_, "#");
		if (hashtag) {
			GeeArrayList* _tmp2_;
			GeeArrayList* _tmp3_;
			TubaViewsContentBase* _tmp4_;
			_tmp2_ = tuba_api_search_results_get_hashtags (results);
			_tmp3_ = _tmp2_;
			_tmp4_ = self->priv->hashtags_tab;
			tuba_views_search_append_results (self, _tmp3_, _tmp4_);
		}
		_tmp5_ = tuba_api_search_results_get_accounts (results);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->accounts_tab;
		tuba_views_search_append_results (self, _tmp6_, _tmp7_);
		if (!hashtag) {
			GeeArrayList* _tmp8_;
			GeeArrayList* _tmp9_;
			TubaViewsContentBase* _tmp10_;
			_tmp8_ = tuba_api_search_results_get_hashtags (results);
			_tmp9_ = _tmp8_;
			_tmp10_ = self->priv->hashtags_tab;
			tuba_views_search_append_results (self, _tmp9_, _tmp10_);
		}
		_tmp11_ = tuba_api_search_results_get_statuses (results);
		_tmp12_ = _tmp11_;
		_tmp13_ = self->priv->statuses_tab;
		tuba_views_search_append_results (self, _tmp12_, _tmp13_);
		_tmp15_ = self->priv->collections_tab;
		if (_tmp15_ != NULL) {
			GeeArrayList* _tmp16_;
			GeeArrayList* _tmp17_;
			_tmp16_ = tuba_api_search_results_get_collections (results);
			_tmp17_ = _tmp16_;
			_tmp14_ = _tmp17_ != NULL;
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			GeeArrayList* _tmp18_;
			GeeArrayList* _tmp19_;
			TubaViewsContentBase* _tmp20_;
			_tmp18_ = tuba_api_search_results_get_collections (results);
			_tmp19_ = _tmp18_;
			_tmp20_ = self->priv->collections_tab;
			tuba_views_search_append_results (self, _tmp19_, _tmp20_);
		}
		_tmp21_ = self->priv->_query;
		tuba_views_search_update_recents (self, _tmp21_);
		_tmp22_ = tuba_views_base_status_message_new ();
		_tmp23_ = _tmp22_;
		tuba_views_base_set_base_status ((TubaViewsBase*) self, _tmp23_);
		_g_object_unref0 (_tmp23_);
		tuba_views_base_on_content_changed ((TubaViewsBase*) self);
		_g_object_unref0 (results);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp24_;
		const gchar* _tmp25_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp24_ = e;
		_tmp25_ = _tmp24_->message;
		tuba_views_base_on_error ((TubaViewsBase*) self, (gint32) -1, _tmp25_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda184__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda184_ ((TubaViewsSearch*) self, source_object, res);
	g_object_unref (self);
}

static void
tuba_views_search_request (TubaViewsSearch* self)
{
	TubaViewsSearchSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	TubaViewsBaseStatusMessage* _tmp10_ = NULL;
	TubaViewsBaseStatusMessage* _tmp11_;
	const gchar* _tmp12_;
	TubaAccountStore* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->entry;
	_tmp1_ = tuba_views_search_search_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_chug (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = string_chomp (_tmp4_);
	_tmp6_ = _tmp5_;
	tuba_views_search_set_query (self, _tmp6_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_tmp7_ = self->priv->_query;
	if (g_strcmp0 (_tmp7_, "") == 0) {
		TubaViewsBaseStatusMessage* _tmp8_ = NULL;
		tuba_views_base_clear ((TubaViewsBase*) self);
		if (tuba_views_search_populate_with_recents (self)) {
			_g_object_unref0 (_tmp8_);
			_tmp8_ = NULL;
		} else {
			TubaViewsBaseStatusMessage* _tmp9_;
			_tmp9_ = tuba_views_base_status_message_new ();
			_g_object_unref0 (_tmp8_);
			_tmp8_ = _tmp9_;
		}
		tuba_views_base_set_base_status ((TubaViewsBase*) self, _tmp8_);
		_g_object_unref0 (_tmp8_);
		return;
	}
	tuba_views_base_clear ((TubaViewsBase*) self);
	_tmp10_ = tuba_views_base_status_message_new ();
	_tmp10_->loading = TRUE;
	_tmp11_ = _tmp10_;
	tuba_views_base_set_base_status ((TubaViewsBase*) self, _tmp11_);
	_g_object_unref0 (_tmp11_);
	tuba_views_search_generate_regex (self);
	_tmp12_ = self->priv->_query;
	_tmp13_ = tuba_accounts;
	_tmp14_ = tuba_account_store_get_active (_tmp13_);
	_tmp15_ = _tmp14_;
	tuba_api_search_results_request (_tmp12_, _tmp15_, ___lambda184__gasync_ready_callback, g_object_ref (self));
}

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

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

static void
_vala_array_add95 (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_search_update_recents (TubaViewsSearch* self,
                                  const gchar* query)
{
	gchar** res = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gint res_length1;
	gint _res_size_;
	TubaSettings* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gint _tmp4_ = 0;
	gchar** _tmp5_;
	gint _tmp5__length1;
	TubaSettings* _tmp31_;
	gchar** _tmp32_;
	gint _tmp32__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (query != NULL);
	_tmp0_ = g_strdup (query);
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	res = _tmp1_;
	res_length1 = 1;
	_res_size_ = res_length1;
	_tmp2_ = tuba_settings;
	_tmp3_ = tuba_settings_get_recent_searches (_tmp2_, &_tmp4_);
	_tmp3__length1 = _tmp4_;
	_tmp5_ = _tmp3_;
	_tmp5__length1 = _tmp3__length1;
	if (_vala_string_array_contains (_tmp5_, _tmp5__length1, query)) {
		TubaSettings* _tmp6_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		gint _tmp8_ = 0;
		gchar** _tmp9_;
		gint _tmp9__length1;
		_tmp6_ = tuba_settings;
		_tmp7_ = tuba_settings_get_recent_searches (_tmp6_, &_tmp8_);
		_tmp7__length1 = _tmp8_;
		_tmp9_ = _tmp7_;
		_tmp9__length1 = _tmp7__length1;
		{
			gchar** old_query_collection = NULL;
			gint old_query_collection_length1 = 0;
			gint _old_query_collection_size_ = 0;
			gint old_query_it = 0;
			old_query_collection = _tmp9_;
			old_query_collection_length1 = _tmp9__length1;
			for (old_query_it = 0; old_query_it < old_query_collection_length1; old_query_it = old_query_it + 1) {
				gchar* _tmp10_;
				gchar* old_query = NULL;
				_tmp10_ = g_strdup (old_query_collection[old_query_it]);
				old_query = _tmp10_;
				{
					const gchar* _tmp11_;
					_tmp11_ = old_query;
					if (g_strcmp0 (_tmp11_, query) != 0) {
						const gchar* _tmp12_;
						gchar* _tmp13_;
						_tmp12_ = old_query;
						_tmp13_ = g_strdup (_tmp12_);
						_vala_array_add94 (&res, &res_length1, &_res_size_, _tmp13_);
					}
					_g_free0 (old_query);
				}
			}
		}
	} else {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp14_ = FALSE;
				_tmp14_ = TRUE;
				while (TRUE) {
					gint _tmp16_ = 0;
					TubaSettings* _tmp17_;
					gchar** _tmp18_;
					gint _tmp18__length1;
					gint _tmp19_ = 0;
					gchar** _tmp20_;
					gint _tmp20__length1;
					TubaSettings* _tmp25_;
					gchar** _tmp26_;
					gint _tmp26__length1;
					gint _tmp27_ = 0;
					gchar** _tmp28_;
					gint _tmp28__length1;
					const gchar* _tmp29_;
					gchar* _tmp30_;
					if (!_tmp14_) {
						gint _tmp15_;
						_tmp15_ = i;
						i = _tmp15_ + 1;
					}
					_tmp14_ = FALSE;
					_tmp17_ = tuba_settings;
					_tmp18_ = tuba_settings_get_recent_searches (_tmp17_, &_tmp19_);
					_tmp18__length1 = _tmp19_;
					_tmp20_ = _tmp18_;
					_tmp20__length1 = _tmp18__length1;
					if (_tmp20__length1 < TUBA_VIEWS_SEARCH_MAX_RECENTS) {
						TubaSettings* _tmp21_;
						gchar** _tmp22_;
						gint _tmp22__length1;
						gint _tmp23_ = 0;
						gchar** _tmp24_;
						gint _tmp24__length1;
						_tmp21_ = tuba_settings;
						_tmp22_ = tuba_settings_get_recent_searches (_tmp21_, &_tmp23_);
						_tmp22__length1 = _tmp23_;
						_tmp24_ = _tmp22_;
						_tmp24__length1 = _tmp22__length1;
						_tmp16_ = _tmp24__length1;
					} else {
						_tmp16_ = TUBA_VIEWS_SEARCH_MAX_RECENTS - 1;
					}
					if (!(i < _tmp16_)) {
						break;
					}
					_tmp25_ = tuba_settings;
					_tmp26_ = tuba_settings_get_recent_searches (_tmp25_, &_tmp27_);
					_tmp26__length1 = _tmp27_;
					_tmp28_ = _tmp26_;
					_tmp28__length1 = _tmp26__length1;
					_tmp29_ = _tmp28_[i];
					_tmp30_ = g_strdup (_tmp29_);
					_vala_array_add95 (&res, &res_length1, &_res_size_, _tmp30_);
				}
			}
		}
	}
	_tmp31_ = tuba_settings;
	_tmp32_ = res;
	_tmp32__length1 = res_length1;
	tuba_settings_set_recent_searches (_tmp31_, _tmp32_, _tmp32__length1);
	res = (_vala_array_free (res, res_length1, (GDestroyNotify) g_free), NULL);
}

static void
_vala_array_add96 (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_search_on_remove_recent (TubaViewsSearch* self,
                                    TubaViewsSearchSearchHistoryRow* row,
                                    const gchar* query)
{
	gchar** res = NULL;
	gchar** _tmp0_;
	gint res_length1;
	gint _res_size_;
	TubaSettings* _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_ = 0;
	gchar** _tmp4_;
	gint _tmp4__length1;
	TubaSettings* _tmp9_;
	gchar** _tmp10_;
	gint _tmp10__length1;
	guint indx = 0U;
	TubaViewsContentBase* _tmp11_;
	GListStore* _tmp12_;
	guint _tmp13_ = 0U;
	gboolean _tmp14_;
	TubaViewsContentBase* _tmp17_;
	GListStore* _tmp18_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (query != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	res = _tmp0_;
	res_length1 = 0;
	_res_size_ = res_length1;
	_tmp1_ = tuba_settings;
	_tmp2_ = tuba_settings_get_recent_searches (_tmp1_, &_tmp3_);
	_tmp2__length1 = _tmp3_;
	_tmp4_ = _tmp2_;
	_tmp4__length1 = _tmp2__length1;
	{
		gchar** old_query_collection = NULL;
		gint old_query_collection_length1 = 0;
		gint _old_query_collection_size_ = 0;
		gint old_query_it = 0;
		old_query_collection = _tmp4_;
		old_query_collection_length1 = _tmp4__length1;
		for (old_query_it = 0; old_query_it < old_query_collection_length1; old_query_it = old_query_it + 1) {
			gchar* _tmp5_;
			gchar* old_query = NULL;
			_tmp5_ = g_strdup (old_query_collection[old_query_it]);
			old_query = _tmp5_;
			{
				const gchar* _tmp6_;
				_tmp6_ = old_query;
				if (g_strcmp0 (_tmp6_, query) != 0) {
					const gchar* _tmp7_;
					gchar* _tmp8_;
					_tmp7_ = old_query;
					_tmp8_ = g_strdup (_tmp7_);
					_vala_array_add96 (&res, &res_length1, &_res_size_, _tmp8_);
				}
				_g_free0 (old_query);
			}
		}
	}
	_tmp9_ = tuba_settings;
	_tmp10_ = res;
	_tmp10__length1 = res_length1;
	tuba_settings_set_recent_searches (_tmp9_, _tmp10_, _tmp10__length1);
	_tmp11_ = self->priv->all_tab;
	_tmp12_ = _tmp11_->model;
	_tmp14_ = g_list_store_find (_tmp12_, (GObject*) row, &_tmp13_);
	indx = _tmp13_;
	if (_tmp14_) {
		TubaViewsContentBase* _tmp15_;
		GListStore* _tmp16_;
		_tmp15_ = self->priv->all_tab;
		_tmp16_ = _tmp15_->model;
		g_list_store_remove (_tmp16_, indx);
	}
	_tmp17_ = self->priv->all_tab;
	_tmp18_ = _tmp17_->model;
	if (g_list_model_get_n_items ((GListModel*) _tmp18_) == ((guint) 0)) {
		TubaViewsBaseStatusMessage* _tmp19_;
		TubaViewsBaseStatusMessage* _tmp20_;
		_tmp19_ = tuba_views_base_status_message_new ();
		_tmp20_ = _tmp19_;
		tuba_views_base_set_base_status ((TubaViewsBase*) self, _tmp20_);
		_g_object_unref0 (_tmp20_);
	}
	res = (_vala_array_free (res, res_length1, (GDestroyNotify) g_free), NULL);
}

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

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

static void
tuba_views_search_generate_regex (TubaViewsSearch* self)
{
	const gchar* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_query;
	_tmp1_ = strlen (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ >= 45) {
		return;
	}
	{
		GRegex* _tmp3_ = NULL;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		GRegex* _tmp12_;
		GRegex* _tmp13_;
		GRegex* _tmp14_;
		_tmp4_ = self->priv->_query;
		_tmp5_ = g_regex_escape_string (_tmp4_, -1);
		_tmp6_ = _tmp5_;
		_tmp7_ = string_replace (_tmp6_, " ", "\\b:?|:?\\b");
		_tmp8_ = _tmp7_;
		_tmp9_ = string_to_string (_tmp8_);
		_tmp10_ = g_strconcat ("(:?\\b", _tmp9_, "\\b:?)", NULL);
		_tmp11_ = _tmp10_;
		_tmp12_ = g_regex_new (_tmp11_, G_REGEX_CASELESS | G_REGEX_OPTIMIZE, 0, &_inner_error0_);
		_tmp13_ = _tmp12_;
		_g_free0 (_tmp11_);
		_g_free0 (_tmp8_);
		_g_free0 (_tmp6_);
		_tmp3_ = _tmp13_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp14_ = _tmp3_;
		_tmp3_ = NULL;
		_g_regex_unref0 (self->priv->search_query_regex);
		self->priv->search_query_regex = _tmp14_;
		_g_regex_unref0 (_tmp3_);
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		GError* e = NULL;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		GError* _tmp17_;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp15_ = self->priv->_query;
		_tmp16_ = string_to_string (_tmp15_);
		_tmp17_ = e;
		_tmp18_ = _tmp17_->message;
		_tmp19_ = string_to_string (_tmp18_);
		_tmp20_ = g_strconcat ("Error generating search query regex from \"", _tmp16_, "\": ", _tmp19_, NULL);
		_tmp21_ = _tmp20_;
		g_warning ("Search.vala:292: %s", _tmp21_);
		_g_free0 (_tmp21_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
_tuba_views_search_on_asd_result_tuba_views_search_advanced_search_dialog_result (TubaViewsSearchAdvancedSearchDialog* _sender,
                                                                                  const gchar* res,
                                                                                  gpointer self)
{
	tuba_views_search_on_asd_result ((TubaViewsSearch*) self, res);
}

static void
tuba_views_search_open_advanced_search_dialog (TubaViewsSearch* self)
{
	TubaViewsSearchAdvancedSearchDialog* asd = NULL;
	TubaViewsSearchSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TubaViewsSearchAdvancedSearchDialog* _tmp3_;
	TubaApplication* _tmp4_;
	TubaDialogsMainWindow* _tmp5_;
	TubaDialogsMainWindow* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->entry;
	_tmp1_ = tuba_views_search_search_entry_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_views_search_advanced_search_dialog_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	asd = _tmp3_;
	g_signal_connect_object (asd, "result", (GCallback) _tuba_views_search_on_asd_result_tuba_views_search_advanced_search_dialog_result, self, 0);
	_tmp4_ = tuba_app;
	_tmp5_ = tuba_application_get_main_window (_tmp4_);
	_tmp6_ = _tmp5_;
	adw_dialog_present ((AdwDialog*) asd, (GtkWidget*) _tmp6_);
	_g_object_unref0 (asd);
}

static void
tuba_views_search_on_asd_result (TubaViewsSearch* self,
                                 const gchar* _result_)
{
	TubaViewsSearchSearchEntry* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (_result_ != NULL);
	_tmp0_ = self->entry;
	tuba_views_search_search_entry_set_text (_tmp0_, _result_);
	tuba_views_search_request (self);
}

TubaViewsSearch*
tuba_views_search_construct (GType object_type)
{
	TubaViewsSearch * self = NULL;
	self = (TubaViewsSearch*) tuba_views_tabbed_base_construct (object_type);
	return self;
}

TubaViewsSearch*
tuba_views_search_new (void)
{
	return tuba_views_search_construct (TUBA_VIEWS_TYPE_SEARCH);
}

const gchar*
tuba_views_search_get_query (TubaViewsSearch* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_query;
	result = _tmp0_;
	return result;
}

void
tuba_views_search_set_query (TubaViewsSearch* self,
                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_search_get_query (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_query);
		self->priv->_query = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_search_properties[TUBA_VIEWS_SEARCH_QUERY_PROPERTY]);
	}
}

static inline gpointer
tuba_views_search_search_entry_get_instance_private (TubaViewsSearchSearchEntry* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsSearchSearchEntry_private_offset);
}

void
tuba_views_search_search_entry_gather_focus (TubaViewsSearchSearchEntry* self)
{
	GtkText* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
}

static void
tuba_views_search_search_entry_on_entry_activated (TubaViewsSearchSearchEntry* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_search_search_entry_signals[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ON_ENTRY_ACTIVATE_SIGNAL], 0);
}

static void
tuba_views_search_search_entry_open_advanced_search_dialog (TubaViewsSearchSearchEntry* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_search_search_entry_signals[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ON_ADVANCED_SEARCH_CLICKED_SIGNAL], 0);
}

static void
tuba_views_search_search_entry_on_clear_entry (TubaViewsSearchSearchEntry* self)
{
	GtkText* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, "");
}

static void
tuba_views_search_search_entry_on_entry_change (TubaViewsSearchSearchEntry* self)
{
	gboolean can_clear = FALSE;
	GtkText* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	gfloat _tmp5_ = 0.0F;
	GtkButton* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	can_clear = g_strcmp0 (_tmp2_, "") != 0;
	_tmp3_ = self->priv->clear_search_button;
	_tmp4_ = self->priv->clear_search_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, can_clear);
	gtk_widget_set_can_target ((GtkWidget*) _tmp3_, can_clear);
	if (can_clear) {
		_tmp5_ = 1.0f;
	} else {
		_tmp5_ = 0.0f;
	}
	_tmp6_ = self->priv->clear_search_button;
	gtk_widget_set_opacity ((GtkWidget*) _tmp6_, (gdouble) _tmp5_);
}

TubaViewsSearchSearchEntry*
tuba_views_search_search_entry_construct (GType object_type)
{
	TubaViewsSearchSearchEntry * self = NULL;
	self = (TubaViewsSearchSearchEntry*) g_object_new (object_type, NULL);
	return self;
}

TubaViewsSearchSearchEntry*
tuba_views_search_search_entry_new (void)
{
	return tuba_views_search_search_entry_construct (TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY);
}

const gchar*
tuba_views_search_search_entry_get_text (TubaViewsSearchSearchEntry* self)
{
	const gchar* result;
	GtkText* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
tuba_views_search_search_entry_set_text (TubaViewsSearchSearchEntry* self,
                                         const gchar* value)
{
	GtkText* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_search_search_entry_properties[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_TEXT_PROPERTY]);
}

GtkText*
tuba_views_search_search_entry_get_entry (TubaViewsSearchSearchEntry* self)
{
	GtkText* result;
	GtkText* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_entry;
	result = _tmp0_;
	return result;
}

static void
tuba_views_search_search_entry_set_entry (TubaViewsSearchSearchEntry* self,
                                          GtkText* value)
{
	GtkText* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_search_search_entry_get_entry (self);
	if (old_value != value) {
		GtkText* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_entry);
		self->priv->_entry = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_search_search_entry_properties[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ENTRY_PROPERTY]);
	}
}

static void
_tuba_views_search_search_entry_on_entry_change_gtk_editable_changed (GtkEditable* _sender,
                                                                      gpointer self)
{
	tuba_views_search_search_entry_on_entry_change ((TubaViewsSearchSearchEntry*) self);
}

static void
_tuba_views_search_search_entry_on_entry_activated_gtk_text_activate (GtkText* _sender,
                                                                      gpointer self)
{
	tuba_views_search_search_entry_on_entry_activated ((TubaViewsSearchSearchEntry*) self);
}

static void
_tuba_views_search_search_entry_open_advanced_search_dialog_gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self)
{
	tuba_views_search_search_entry_open_advanced_search_dialog ((TubaViewsSearchSearchEntry*) self);
}

static void
_tuba_views_search_search_entry_on_clear_entry_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self)
{
	tuba_views_search_search_entry_on_clear_entry ((TubaViewsSearchSearchEntry*) self);
}

static GObject *
tuba_views_search_search_entry_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsSearchSearchEntry * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* _tmp4_;
	GtkText* _tmp5_ = NULL;
	GtkText* _tmp6_;
	GtkText* _tmp7_;
	GtkText* _tmp8_;
	GtkButton* advanced_search = NULL;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar** _tmp13_;
	GtkButton* _tmp14_ = NULL;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	GtkButton* _tmp20_ = NULL;
	GtkButton* _tmp21_;
	GtkButton* _tmp22_;
	GtkImage* _tmp23_;
	GtkImage* _tmp24_;
	GtkText* _tmp25_;
	GtkButton* _tmp26_;
	GtkButton* _tmp27_;
	parent_class = G_OBJECT_CLASS (tuba_views_search_search_entry_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, TubaViewsSearchSearchEntry);
	gtk_box_set_spacing ((GtkBox*) self, 9);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_HORIZONTAL);
	_tmp0_ = g_strdup ("search");
	_tmp1_ = g_strdup ("rounded");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 2;
	gtk_widget_set_css_classes ((GtkWidget*) self, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	_tmp4_ = g_strdup (_ ("Search Posts and Accounts"));
	_tmp5_ = (GtkText*) gtk_text_new ();
	gtk_editable_set_width_chars ((GtkEditable*) _tmp5_, 25);
	gtk_text_set_placeholder_text (_tmp5_, _tmp4_);
	_g_free0 (_tmp4_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	tuba_views_search_search_entry_set_entry (self, _tmp6_);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = self->priv->_entry;
	g_signal_connect_object ((GtkEditable*) _tmp7_, "changed", (GCallback) _tuba_views_search_search_entry_on_entry_change_gtk_editable_changed, self, 0);
	_tmp8_ = self->priv->_entry;
	g_signal_connect_object (_tmp8_, "activate", (GCallback) _tuba_views_search_search_entry_on_entry_activated_gtk_text_activate, self, 0);
	_tmp9_ = g_strdup (_ ("Advanced Search"));
	_tmp10_ = g_strdup ("flat");
	_tmp11_ = g_strdup ("circular");
	_tmp12_ = g_strdup ("entry-button");
	_tmp13_ = g_new0 (gchar*, 3 + 1);
	_tmp13_[0] = _tmp10_;
	_tmp13_[1] = _tmp11_;
	_tmp13_[2] = _tmp12_;
	_tmp14_ = (GtkButton*) gtk_button_new_from_icon_name ("tuba-funnel-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp14_, _tmp9_);
	_g_free0 (_tmp9_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp14_, _tmp13_);
	_tmp13_ = (_vala_array_free (_tmp13_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp14_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp14_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp14_);
	advanced_search = _tmp14_;
	_tmp15_ = g_strdup (_ ("Clear Entry"));
	_tmp16_ = g_strdup ("flat");
	_tmp17_ = g_strdup ("circular");
	_tmp18_ = g_strdup ("entry-button");
	_tmp19_ = g_new0 (gchar*, 3 + 1);
	_tmp19_[0] = _tmp16_;
	_tmp19_[1] = _tmp17_;
	_tmp19_[2] = _tmp18_;
	_tmp20_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-clear-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp20_, _tmp15_);
	_g_free0 (_tmp15_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp20_, _tmp19_);
	_tmp19_ = (_vala_array_free (_tmp19_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->clear_search_button);
	self->priv->clear_search_button = _tmp20_;
	tuba_views_search_search_entry_on_entry_change (self);
	_tmp21_ = advanced_search;
	g_signal_connect_object (_tmp21_, "clicked", (GCallback) _tuba_views_search_search_entry_open_advanced_search_dialog_gtk_button_clicked, self, 0);
	_tmp22_ = self->priv->clear_search_button;
	g_signal_connect_object (_tmp22_, "clicked", (GCallback) _tuba_views_search_search_entry_on_clear_entry_gtk_button_clicked, self, 0);
	_tmp23_ = (GtkImage*) gtk_image_new_from_icon_name ("tuba-loupe-large-symbolic");
	g_object_ref_sink (_tmp23_);
	_tmp24_ = _tmp23_;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp24_);
	_g_object_unref0 (_tmp24_);
	_tmp25_ = self->priv->_entry;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp25_);
	_tmp26_ = self->priv->clear_search_button;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp26_);
	_tmp27_ = advanced_search;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp27_);
	_g_object_unref0 (advanced_search);
	return obj;
}

static void
tuba_views_search_search_entry_class_init (TubaViewsSearchSearchEntryClass * klass,
                                           gpointer klass_data)
{
	tuba_views_search_search_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsSearchSearchEntry_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_search_search_entry_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_search_search_entry_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_search_search_entry_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_search_search_entry_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_SEARCH_SEARCH_ENTRY_TEXT_PROPERTY, tuba_views_search_search_entry_properties[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ENTRY_PROPERTY, tuba_views_search_search_entry_properties[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ENTRY_PROPERTY] = g_param_spec_object ("entry", "entry", "entry", gtk_text_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	tuba_views_search_search_entry_signals[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ON_ADVANCED_SEARCH_CLICKED_SIGNAL] = g_signal_new ("on-advanced-search-clicked", TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_views_search_search_entry_signals[TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ON_ENTRY_ACTIVATE_SIGNAL] = g_signal_new ("on-entry-activate", TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "entry");
}

static void
tuba_views_search_search_entry_instance_init (TubaViewsSearchSearchEntry * self,
                                              gpointer klass)
{
	self->priv = tuba_views_search_search_entry_get_instance_private (self);
}

static void
tuba_views_search_search_entry_finalize (GObject * obj)
{
	TubaViewsSearchSearchEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, TubaViewsSearchSearchEntry);
	_g_object_unref0 (self->priv->_entry);
	_g_object_unref0 (self->priv->clear_search_button);
	G_OBJECT_CLASS (tuba_views_search_search_entry_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_search_search_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsSearchSearchEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_search_search_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsSearchSearchEntry), 0, (GInstanceInitFunc) tuba_views_search_search_entry_instance_init, NULL };
	GType tuba_views_search_search_entry_type_id;
	tuba_views_search_search_entry_type_id = g_type_register_static (gtk_box_get_type (), "TubaViewsSearchSearchEntry", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsSearchSearchEntry_private_offset = g_type_add_instance_private (tuba_views_search_search_entry_type_id, sizeof (TubaViewsSearchSearchEntryPrivate));
	return tuba_views_search_search_entry_type_id;
}

GType
tuba_views_search_search_entry_get_type (void)
{
	static GType tuba_views_search_search_entry_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_search_search_entry_type_id__once)) {
		GType tuba_views_search_search_entry_type_id;
		tuba_views_search_search_entry_type_id = tuba_views_search_search_entry_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_search_search_entry_type_id__once, tuba_views_search_search_entry_type_id);
	}
	return tuba_views_search_search_entry_type_id__once;
}

static void
_vala_tuba_views_search_search_entry_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	TubaViewsSearchSearchEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, TubaViewsSearchSearchEntry);
	switch (property_id) {
		case TUBA_VIEWS_SEARCH_SEARCH_ENTRY_TEXT_PROPERTY:
		g_value_set_string (value, tuba_views_search_search_entry_get_text (self));
		break;
		case TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ENTRY_PROPERTY:
		g_value_set_object (value, tuba_views_search_search_entry_get_entry (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_search_search_entry_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec)
{
	TubaViewsSearchSearchEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_SEARCH_TYPE_SEARCH_ENTRY, TubaViewsSearchSearchEntry);
	switch (property_id) {
		case TUBA_VIEWS_SEARCH_SEARCH_ENTRY_TEXT_PROPERTY:
		tuba_views_search_search_entry_set_text (self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_SEARCH_SEARCH_ENTRY_ENTRY_PROPERTY:
		tuba_views_search_search_entry_set_entry (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

TubaViewsSearchOpenableRow*
tuba_views_search_openable_row_construct (GType object_type)
{
	TubaViewsSearchOpenableRow * self = NULL;
	self = (TubaViewsSearchOpenableRow*) g_object_new (object_type, NULL);
	return self;
}

TubaViewsSearchOpenableRow*
tuba_views_search_openable_row_new (void)
{
	return tuba_views_search_openable_row_construct (TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW);
}

static void
tuba_views_search_openable_row_class_init (TubaViewsSearchOpenableRowClass * klass,
                                           gpointer klass_data)
{
	tuba_views_search_openable_row_parent_class = g_type_class_peek_parent (klass);
	tuba_views_search_openable_row_signals[TUBA_VIEWS_SEARCH_OPENABLE_ROW_OPEN_SIGNAL] = g_signal_new ("open", TUBA_VIEWS_SEARCH_TYPE_OPENABLE_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_views_search_openable_row_instance_init (TubaViewsSearchOpenableRow * self,
                                              gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
tuba_views_search_openable_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsSearchOpenableRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_search_openable_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsSearchOpenableRow), 0, (GInstanceInitFunc) tuba_views_search_openable_row_instance_init, NULL };
	GType tuba_views_search_openable_row_type_id;
	tuba_views_search_openable_row_type_id = g_type_register_static (adw_action_row_get_type (), "TubaViewsSearchOpenableRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	return tuba_views_search_openable_row_type_id;
}

GType
tuba_views_search_openable_row_get_type (void)
{
	static GType tuba_views_search_openable_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_search_openable_row_type_id__once)) {
		GType tuba_views_search_openable_row_type_id;
		tuba_views_search_openable_row_type_id = tuba_views_search_openable_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_search_openable_row_type_id__once, tuba_views_search_openable_row_type_id);
	}
	return tuba_views_search_openable_row_type_id__once;
}

static inline gpointer
tuba_views_search_search_history_row_get_instance_private (TubaViewsSearchSearchHistoryRow* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsSearchSearchHistoryRow_private_offset);
}

TubaViewsSearchSearchHistoryRow*
tuba_views_search_search_history_row_construct (GType object_type,
                                                const gchar* title)
{
	TubaViewsSearchSearchHistoryRow * self = NULL;
	g_return_val_if_fail (title != NULL, NULL);
	self = (TubaViewsSearchSearchHistoryRow*) tuba_entity_construct (object_type);
	tuba_views_search_search_history_row_set_title (self, title);
	return self;
}

TubaViewsSearchSearchHistoryRow*
tuba_views_search_search_history_row_new (const gchar* title)
{
	return tuba_views_search_search_history_row_construct (TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, title);
}

static void
_tuba_widgetizable_open_tuba_views_search_openable_row_open (TubaViewsSearchOpenableRow* _sender,
                                                             gpointer self)
{
	tuba_widgetizable_open ((TubaWidgetizable*) self);
}

static void
_tuba_views_search_search_history_row_on_remove_me_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	tuba_views_search_search_history_row_on_remove_me ((TubaViewsSearchSearchHistoryRow*) self);
}

static GtkWidget*
tuba_views_search_search_history_row_real_to_widget (TubaWidgetizable* base)
{
	TubaViewsSearchSearchHistoryRow * self;
	TubaViewsSearchOpenableRow* row = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	TubaViewsSearchOpenableRow* _tmp2_ = NULL;
	GtkButton* remove_btn = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	GtkButton* _tmp8_ = NULL;
	GtkWidget* result;
	self = (TubaViewsSearchSearchHistoryRow*) base;
	_tmp0_ = self->priv->_title;
	_tmp1_ = g_strdup (_tmp0_);
	_tmp2_ = tuba_views_search_openable_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp2_, _tmp1_);
	_g_free0 (_tmp1_);
	adw_preferences_row_set_use_markup ((AdwPreferencesRow*) _tmp2_, FALSE);
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _tmp2_, TRUE);
	g_object_ref_sink (_tmp2_);
	row = _tmp2_;
	g_signal_connect_object (row, "open", (GCallback) _tuba_widgetizable_open_tuba_views_search_openable_row_open, (TubaWidgetizable*) self, 0);
	_tmp3_ = g_strdup (_ ("Remove"));
	_tmp4_ = g_strdup ("flat");
	_tmp5_ = g_strdup ("circular");
	_tmp6_ = g_strdup ("error");
	_tmp7_ = g_new0 (gchar*, 3 + 1);
	_tmp7_[0] = _tmp4_;
	_tmp7_[1] = _tmp5_;
	_tmp7_[2] = _tmp6_;
	_tmp8_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp8_, _tmp3_);
	_g_free0 (_tmp3_);
	gtk_widget_set_valign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp8_, _tmp7_);
	_tmp7_ = (_vala_array_free (_tmp7_, 3, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp8_);
	remove_btn = _tmp8_;
	g_signal_connect_object (remove_btn, "clicked", (GCallback) _tuba_views_search_search_history_row_on_remove_me_gtk_button_clicked, self, 0);
	adw_action_row_add_suffix ((AdwActionRow*) row, (GtkWidget*) remove_btn);
	result = (GtkWidget*) row;
	_g_object_unref0 (remove_btn);
	return result;
}

static void
tuba_views_search_search_history_row_real_open (TubaWidgetizable* base)
{
	TubaViewsSearchSearchHistoryRow * self;
	const gchar* _tmp0_;
	self = (TubaViewsSearchSearchHistoryRow*) base;
	_tmp0_ = self->priv->_title;
	g_signal_emit (self, tuba_views_search_search_history_row_signals[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_OPEN_ME_SIGNAL], 0, _tmp0_);
}

static void
tuba_views_search_search_history_row_on_remove_me (TubaViewsSearchSearchHistoryRow* self)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_title;
	g_signal_emit (self, tuba_views_search_search_history_row_signals[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_REMOVE_ME_SIGNAL], 0, _tmp0_);
}

const gchar*
tuba_views_search_search_history_row_get_title (TubaViewsSearchSearchHistoryRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
tuba_views_search_search_history_row_set_title (TubaViewsSearchSearchHistoryRow* self,
                                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_search_search_history_row_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_search_search_history_row_properties[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_TITLE_PROPERTY]);
	}
}

static void
tuba_views_search_search_history_row_class_init (TubaViewsSearchSearchHistoryRowClass * klass,
                                                 gpointer klass_data)
{
	tuba_views_search_search_history_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsSearchSearchHistoryRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_search_search_history_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_search_search_history_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_search_search_history_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_TITLE_PROPERTY, tuba_views_search_search_history_row_properties[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_views_search_search_history_row_signals[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_REMOVE_ME_SIGNAL] = g_signal_new ("remove-me", TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	tuba_views_search_search_history_row_signals[TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_OPEN_ME_SIGNAL] = g_signal_new ("open-me", TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
tuba_views_search_search_history_row_tuba_widgetizable_interface_init (TubaWidgetizableIface * iface,
                                                                       gpointer iface_data)
{
	tuba_views_search_search_history_row_tuba_widgetizable_parent_iface = g_type_interface_peek_parent (iface);
	iface->to_widget = (GtkWidget* (*) (TubaWidgetizable*)) tuba_views_search_search_history_row_real_to_widget;
	iface->open = (void (*) (TubaWidgetizable*)) tuba_views_search_search_history_row_real_open;
}

static void
tuba_views_search_search_history_row_instance_init (TubaViewsSearchSearchHistoryRow * self,
                                                    gpointer klass)
{
	self->priv = tuba_views_search_search_history_row_get_instance_private (self);
}

static void
tuba_views_search_search_history_row_finalize (GObject * obj)
{
	TubaViewsSearchSearchHistoryRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, TubaViewsSearchSearchHistoryRow);
	_g_free0 (self->priv->_title);
	G_OBJECT_CLASS (tuba_views_search_search_history_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_search_search_history_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsSearchSearchHistoryRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_search_search_history_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsSearchSearchHistoryRow), 0, (GInstanceInitFunc) tuba_views_search_search_history_row_instance_init, NULL };
	static const GInterfaceInfo tuba_widgetizable_info = { (GInterfaceInitFunc) tuba_views_search_search_history_row_tuba_widgetizable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_views_search_search_history_row_type_id;
	tuba_views_search_search_history_row_type_id = g_type_register_static (TUBA_TYPE_ENTITY, "TubaViewsSearchSearchHistoryRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_views_search_search_history_row_type_id, TUBA_TYPE_WIDGETIZABLE, &tuba_widgetizable_info);
	TubaViewsSearchSearchHistoryRow_private_offset = g_type_add_instance_private (tuba_views_search_search_history_row_type_id, sizeof (TubaViewsSearchSearchHistoryRowPrivate));
	return tuba_views_search_search_history_row_type_id;
}

GType
tuba_views_search_search_history_row_get_type (void)
{
	static GType tuba_views_search_search_history_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_search_search_history_row_type_id__once)) {
		GType tuba_views_search_search_history_row_type_id;
		tuba_views_search_search_history_row_type_id = tuba_views_search_search_history_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_search_search_history_row_type_id__once, tuba_views_search_search_history_row_type_id);
	}
	return tuba_views_search_search_history_row_type_id__once;
}

static void
_vala_tuba_views_search_search_history_row_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec)
{
	TubaViewsSearchSearchHistoryRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, TubaViewsSearchSearchHistoryRow);
	switch (property_id) {
		case TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_TITLE_PROPERTY:
		g_value_set_string (value, tuba_views_search_search_history_row_get_title (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_search_search_history_row_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec)
{
	TubaViewsSearchSearchHistoryRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_SEARCH_TYPE_SEARCH_HISTORY_ROW, TubaViewsSearchSearchHistoryRow);
	switch (property_id) {
		case TUBA_VIEWS_SEARCH_SEARCH_HISTORY_ROW_TITLE_PROPERTY:
		tuba_views_search_search_history_row_set_title (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_views_search_advanced_search_dialog_get_instance_private (TubaViewsSearchAdvancedSearchDialog* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsSearchAdvancedSearchDialog_private_offset);
}

static void
tuba_views_search_advanced_search_dialog_on_account_picked (TubaViewsSearchAdvancedSearchDialog* self,
                                                            const gchar* acc)
{
	AdwEntryRow* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (acc != NULL);
	_tmp0_ = self->priv->user_row;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, acc);
}

static void
tuba_views_search_advanced_search_dialog_on_account_errored (TubaViewsSearchAdvancedSearchDialog* self,
                                                             const gchar* msg)
{
	AdwToastOverlay* _tmp0_;
	AdwToast* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (msg != NULL);
	_tmp0_ = self->priv->toast_overlay;
	_tmp1_ = adw_toast_new (msg);
	adw_toast_set_timeout (_tmp1_, (guint) 5);
	adw_toast_overlay_add_toast (_tmp0_, _tmp1_);
}

static gchar*
string_splice (const gchar* self,
               glong start,
               glong end,
               const gchar* str)
{
	glong string_length = 0L;
	gint _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gsize str_size = 0UL;
	const gchar* _result_ = NULL;
	void* _tmp6_;
	gchar* dest = NULL;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	if (start < ((glong) 0)) {
		start = string_length + start;
	}
	if (end < ((glong) 0)) {
		end = string_length + end;
	}
	if (start >= ((glong) 0)) {
		_tmp2_ = start <= string_length;
	} else {
		_tmp2_ = FALSE;
	}
	g_return_val_if_fail (_tmp2_, NULL);
	if (end >= ((glong) 0)) {
		_tmp3_ = end <= string_length;
	} else {
		_tmp3_ = FALSE;
	}
	g_return_val_if_fail (_tmp3_, NULL);
	g_return_val_if_fail (start <= end, NULL);
	if (str == NULL) {
		str_size = (gsize) 0;
	} else {
		gint _tmp4_;
		gint _tmp5_;
		_tmp4_ = strlen ((const gchar*) str);
		_tmp5_ = _tmp4_;
		str_size = (gsize) _tmp5_;
	}
	_tmp6_ = g_malloc0 (((string_length - (end - start)) + str_size) + 1);
	_result_ = _tmp6_;
	_tmp7_ = _result_;
	dest = (gchar*) _tmp7_;
	_tmp8_ = dest;
	memcpy (_tmp8_, self, (gsize) start);
	_tmp9_ = dest;
	dest = _tmp9_ + start;
	if (str != NULL) {
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp10_ = dest;
		memcpy (_tmp10_, str, str_size);
		_tmp11_ = dest;
		dest = _tmp11_ + str_size;
	}
	_tmp12_ = dest;
	memcpy (_tmp12_, ((gchar*) self) + end, (gsize) (string_length - end));
	_tmp13_ = _result_;
	_result_ = NULL;
	result = (gchar*) _tmp13_;
	return result;
}

static gchar
string_get (const gchar* self,
            glong index)
{
	gchar _tmp0_;
	gchar result;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = ((gchar*) self)[index];
	result = _tmp0_;
	return result;
}

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

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

static TubaViewsSearchAdvancedSearchDialog*
tuba_views_search_advanced_search_dialog_construct (GType object_type,
                                                    const gchar* from_query)
{
	TubaViewsSearchAdvancedSearchDialog * self = NULL;
	gboolean _tmp0_ = FALSE;
	self = (TubaViewsSearchAdvancedSearchDialog*) g_object_new (object_type, NULL);
	if (from_query != NULL) {
		_tmp0_ = g_strcmp0 (from_query, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar** clean_query = NULL;
		gchar** _tmp1_;
		gint clean_query_length1;
		gint _clean_query_size_;
		gchar** words = NULL;
		gchar** _tmp2_;
		gchar** _tmp3_;
		gint words_length1;
		gint _words_size_;
		gchar** _tmp4_;
		gint _tmp4__length1;
		_tmp1_ = g_new0 (gchar*, 0 + 1);
		clean_query = _tmp1_;
		clean_query_length1 = 0;
		_clean_query_size_ = clean_query_length1;
		_tmp3_ = _tmp2_ = g_strsplit (from_query, " ", 0);
		words = _tmp3_;
		words_length1 = _vala_array_length (_tmp2_);
		_words_size_ = words_length1;
		_tmp4_ = words;
		_tmp4__length1 = words_length1;
		{
			gchar** word_collection = NULL;
			gint word_collection_length1 = 0;
			gint _word_collection_size_ = 0;
			gint word_it = 0;
			word_collection = _tmp4_;
			word_collection_length1 = _tmp4__length1;
			for (word_it = 0; word_it < word_collection_length1; word_it = word_it + 1) {
				gchar* _tmp5_;
				gchar* word = NULL;
				_tmp5_ = g_strdup (word_collection[word_it]);
				word = _tmp5_;
				{
					gchar* down_word = NULL;
					const gchar* _tmp6_;
					gchar* _tmp7_;
					const gchar* _tmp8_;
					const gchar* _tmp9_;
					GQuark _tmp11_ = 0U;
					static GQuark _tmp10_label0 = 0;
					static GQuark _tmp10_label1 = 0;
					static GQuark _tmp10_label2 = 0;
					static GQuark _tmp10_label3 = 0;
					static GQuark _tmp10_label4 = 0;
					static GQuark _tmp10_label5 = 0;
					static GQuark _tmp10_label6 = 0;
					static GQuark _tmp10_label7 = 0;
					AdwEntryRow* _tmp103_;
					gchar** _tmp104_;
					gint _tmp104__length1;
					gchar* _tmp105_;
					gchar* _tmp106_;
					_tmp6_ = word;
					_tmp7_ = g_utf8_strdown (_tmp6_, (gssize) -1);
					down_word = _tmp7_;
					_tmp8_ = down_word;
					_tmp9_ = _tmp8_;
					_tmp11_ = (NULL == _tmp9_) ? 0 : g_quark_from_string (_tmp9_);
					if (_tmp11_ == ((0 != _tmp10_label0) ? _tmp10_label0 : (_tmp10_label0 = g_quark_from_static_string ("is:reply")))) {
						switch (0) {
							default:
							{
								AdwSwitchRow* _tmp12_;
								_tmp12_ = self->priv->reply_switch_row;
								adw_switch_row_set_active (_tmp12_, TRUE);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label1) ? _tmp10_label1 : (_tmp10_label1 = g_quark_from_static_string ("is:sensitive")))) {
						switch (0) {
							default:
							{
								AdwSwitchRow* _tmp13_;
								_tmp13_ = self->priv->cw_switch_row;
								adw_switch_row_set_active (_tmp13_, TRUE);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label2) ? _tmp10_label2 : (_tmp10_label2 = g_quark_from_static_string ("has:media")))) {
						switch (0) {
							default:
							{
								AdwSwitchRow* _tmp14_;
								_tmp14_ = self->priv->media_switch_row;
								adw_switch_row_set_active (_tmp14_, TRUE);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label3) ? _tmp10_label3 : (_tmp10_label3 = g_quark_from_static_string ("has:poll")))) {
						switch (0) {
							default:
							{
								AdwSwitchRow* _tmp15_;
								_tmp15_ = self->priv->poll_switch_row;
								adw_switch_row_set_active (_tmp15_, TRUE);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label4) ? _tmp10_label4 : (_tmp10_label4 = g_quark_from_static_string ("has:embed")))) {
						switch (0) {
							default:
							{
								AdwSwitchRow* _tmp16_;
								_tmp16_ = self->priv->embed_switch_row;
								adw_switch_row_set_active (_tmp16_, TRUE);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label5) ? _tmp10_label5 : (_tmp10_label5 = g_quark_from_static_string ("in:all")))) {
						switch (0) {
							default:
							{
								GtkCheckButton* _tmp17_;
								_tmp17_ = self->priv->all_radio;
								gtk_check_button_set_active (_tmp17_, TRUE);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label6) ? _tmp10_label6 : (_tmp10_label6 = g_quark_from_static_string ("in:library")))) {
						switch (0) {
							default:
							{
								GtkCheckButton* _tmp18_;
								_tmp18_ = self->priv->library_radio;
								gtk_check_button_set_active (_tmp18_, TRUE);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label7) ? _tmp10_label7 : (_tmp10_label7 = g_quark_from_static_string ("in:public")))) {
						switch (0) {
							default:
							{
								GtkCheckButton* _tmp19_;
								_tmp19_ = self->priv->public_radio;
								gtk_check_button_set_active (_tmp19_, TRUE);
								break;
							}
						}
					} else {
						switch (0) {
							default:
							{
								const gchar* _tmp20_;
								_tmp20_ = down_word;
								if (g_str_has_prefix (_tmp20_, "from:")) {
									gchar* from_str = NULL;
									const gchar* _tmp21_;
									gchar* _tmp22_;
									const gchar* _tmp23_;
									AdwEntryRow* _tmp26_;
									const gchar* _tmp27_;
									_tmp21_ = word;
									_tmp22_ = string_splice (_tmp21_, (glong) 0, (glong) 5, NULL);
									from_str = _tmp22_;
									_tmp23_ = from_str;
									if (string_get (_tmp23_, (glong) 0) == '@') {
										const gchar* _tmp24_;
										gchar* _tmp25_;
										_tmp24_ = from_str;
										_tmp25_ = string_splice (_tmp24_, (glong) 0, (glong) 1, NULL);
										_g_free0 (from_str);
										from_str = _tmp25_;
									}
									_tmp26_ = self->priv->user_row;
									_tmp27_ = from_str;
									gtk_editable_set_text ((GtkEditable*) _tmp26_, _tmp27_);
									_g_free0 (from_str);
								} else {
									const gchar* _tmp28_;
									_tmp28_ = down_word;
									if (g_str_has_prefix (_tmp28_, "language:")) {
										gchar* locale_str = NULL;
										const gchar* _tmp29_;
										gchar* _tmp30_;
										guint default_lang_index = 0U;
										TubaApplication* _tmp31_;
										TubaUtilsLocales* _tmp32_;
										TubaUtilsLocales* _tmp33_;
										GListStore* _tmp34_;
										const gchar* _tmp35_;
										TubaUtilsLocalesLocale* _tmp36_;
										TubaUtilsLocalesLocale* _tmp37_;
										GEqualFunc _tmp38_;
										guint _tmp39_ = 0U;
										gboolean _tmp40_;
										gboolean _tmp41_;
										_tmp29_ = down_word;
										_tmp30_ = string_splice (_tmp29_, (glong) 0, (glong) 9, NULL);
										locale_str = _tmp30_;
										_tmp31_ = tuba_app;
										_tmp32_ = tuba_application_get_app_locales (_tmp31_);
										_tmp33_ = _tmp32_;
										_tmp34_ = _tmp33_->list_store;
										_tmp35_ = locale_str;
										_tmp36_ = tuba_utils_locales_locale_new (_tmp35_, NULL, NULL);
										_tmp37_ = _tmp36_;
										_tmp38_ = tuba_utils_locales_locale_compare;
										_tmp40_ = g_list_store_find_with_equal_func (_tmp34_, (GObject*) _tmp37_, _tmp38_, &_tmp39_);
										default_lang_index = _tmp39_;
										_tmp41_ = _tmp40_;
										_g_object_unref0 (_tmp37_);
										if (_tmp41_) {
											GtkSwitch* _tmp42_;
											GtkDropDown* _tmp43_;
											_tmp42_ = self->priv->lang_switch;
											gtk_switch_set_active (_tmp42_, TRUE);
											_tmp43_ = self->priv->lang_dropdown;
											gtk_drop_down_set_selected (_tmp43_, default_lang_index);
										}
										_g_free0 (locale_str);
									} else {
										const gchar* _tmp44_;
										_tmp44_ = down_word;
										if (g_str_has_prefix (_tmp44_, "before:")) {
											gchar* before_str = NULL;
											const gchar* _tmp45_;
											gchar* _tmp46_;
											gchar** date_split = NULL;
											const gchar* _tmp47_;
											gchar** _tmp48_;
											gchar** _tmp49_;
											gint date_split_length1;
											gint _date_split_size_;
											gchar** _tmp50_;
											gint _tmp50__length1;
											_tmp45_ = down_word;
											_tmp46_ = string_splice (_tmp45_, (glong) 0, (glong) 7, NULL);
											before_str = _tmp46_;
											_tmp47_ = before_str;
											_tmp49_ = _tmp48_ = g_strsplit (_tmp47_, "-", 0);
											date_split = _tmp49_;
											date_split_length1 = _vala_array_length (_tmp48_);
											_date_split_size_ = date_split_length1;
											_tmp50_ = date_split;
											_tmp50__length1 = date_split_length1;
											if (_tmp50__length1 == 3) {
												gint year = 0;
												gchar** _tmp51_;
												gint _tmp51__length1;
												const gchar* _tmp52_;
												gint month = 0;
												gchar** _tmp53_;
												gint _tmp53__length1;
												const gchar* _tmp54_;
												gint day = 0;
												gchar** _tmp55_;
												gint _tmp55__length1;
												const gchar* _tmp56_;
												gboolean _tmp57_ = FALSE;
												gboolean _tmp58_ = FALSE;
												_tmp51_ = date_split;
												_tmp51__length1 = date_split_length1;
												_tmp52_ = _tmp51_[0];
												year = atoi (_tmp52_);
												_tmp53_ = date_split;
												_tmp53__length1 = date_split_length1;
												_tmp54_ = _tmp53_[1];
												month = atoi (_tmp54_) - 1;
												_tmp55_ = date_split;
												_tmp55__length1 = date_split_length1;
												_tmp56_ = _tmp55_[2];
												day = atoi (_tmp56_);
												if (year > 0) {
													_tmp58_ = month > 0;
												} else {
													_tmp58_ = FALSE;
												}
												if (_tmp58_) {
													_tmp57_ = day > 0;
												} else {
													_tmp57_ = FALSE;
												}
												if (_tmp57_) {
													AdwExpanderRow* _tmp59_;
													GtkCalendar* _tmp60_;
													GtkCalendar* _tmp61_;
													GtkCalendar* _tmp62_;
													_tmp59_ = self->priv->before_expander_row;
													adw_expander_row_set_expanded (_tmp59_, TRUE);
													_tmp60_ = self->priv->before_calendar;
													gtk_calendar_set_year (_tmp60_, year);
													_tmp61_ = self->priv->before_calendar;
													gtk_calendar_set_month (_tmp61_, month);
													_tmp62_ = self->priv->before_calendar;
													gtk_calendar_set_day (_tmp62_, day);
												}
											}
											date_split = (_vala_array_free (date_split, date_split_length1, (GDestroyNotify) g_free), NULL);
											_g_free0 (before_str);
										} else {
											const gchar* _tmp63_;
											_tmp63_ = down_word;
											if (g_str_has_prefix (_tmp63_, "during:")) {
												gchar* during_str = NULL;
												const gchar* _tmp64_;
												gchar* _tmp65_;
												gchar** date_split = NULL;
												const gchar* _tmp66_;
												gchar** _tmp67_;
												gchar** _tmp68_;
												gint date_split_length1;
												gint _date_split_size_;
												gchar** _tmp69_;
												gint _tmp69__length1;
												_tmp64_ = down_word;
												_tmp65_ = string_splice (_tmp64_, (glong) 0, (glong) 7, NULL);
												during_str = _tmp65_;
												_tmp66_ = during_str;
												_tmp68_ = _tmp67_ = g_strsplit (_tmp66_, "-", 0);
												date_split = _tmp68_;
												date_split_length1 = _vala_array_length (_tmp67_);
												_date_split_size_ = date_split_length1;
												_tmp69_ = date_split;
												_tmp69__length1 = date_split_length1;
												if (_tmp69__length1 == 3) {
													gint year = 0;
													gchar** _tmp70_;
													gint _tmp70__length1;
													const gchar* _tmp71_;
													gint month = 0;
													gchar** _tmp72_;
													gint _tmp72__length1;
													const gchar* _tmp73_;
													gint day = 0;
													gchar** _tmp74_;
													gint _tmp74__length1;
													const gchar* _tmp75_;
													gboolean _tmp76_ = FALSE;
													gboolean _tmp77_ = FALSE;
													_tmp70_ = date_split;
													_tmp70__length1 = date_split_length1;
													_tmp71_ = _tmp70_[0];
													year = atoi (_tmp71_);
													_tmp72_ = date_split;
													_tmp72__length1 = date_split_length1;
													_tmp73_ = _tmp72_[1];
													month = atoi (_tmp73_) - 1;
													_tmp74_ = date_split;
													_tmp74__length1 = date_split_length1;
													_tmp75_ = _tmp74_[2];
													day = atoi (_tmp75_);
													if (year > 0) {
														_tmp77_ = month > 0;
													} else {
														_tmp77_ = FALSE;
													}
													if (_tmp77_) {
														_tmp76_ = day > 0;
													} else {
														_tmp76_ = FALSE;
													}
													if (_tmp76_) {
														AdwExpanderRow* _tmp78_;
														GtkCalendar* _tmp79_;
														GtkCalendar* _tmp80_;
														GtkCalendar* _tmp81_;
														_tmp78_ = self->priv->during_expander_row;
														adw_expander_row_set_expanded (_tmp78_, TRUE);
														_tmp79_ = self->priv->during_calendar;
														gtk_calendar_set_year (_tmp79_, year);
														_tmp80_ = self->priv->during_calendar;
														gtk_calendar_set_month (_tmp80_, month);
														_tmp81_ = self->priv->during_calendar;
														gtk_calendar_set_day (_tmp81_, day);
													}
												}
												date_split = (_vala_array_free (date_split, date_split_length1, (GDestroyNotify) g_free), NULL);
												_g_free0 (during_str);
											} else {
												const gchar* _tmp82_;
												_tmp82_ = down_word;
												if (g_str_has_prefix (_tmp82_, "after:")) {
													gchar* after_str = NULL;
													const gchar* _tmp83_;
													gchar* _tmp84_;
													gchar** date_split = NULL;
													const gchar* _tmp85_;
													gchar** _tmp86_;
													gchar** _tmp87_;
													gint date_split_length1;
													gint _date_split_size_;
													gchar** _tmp88_;
													gint _tmp88__length1;
													_tmp83_ = down_word;
													_tmp84_ = string_splice (_tmp83_, (glong) 0, (glong) 6, NULL);
													after_str = _tmp84_;
													_tmp85_ = after_str;
													_tmp87_ = _tmp86_ = g_strsplit (_tmp85_, "-", 0);
													date_split = _tmp87_;
													date_split_length1 = _vala_array_length (_tmp86_);
													_date_split_size_ = date_split_length1;
													_tmp88_ = date_split;
													_tmp88__length1 = date_split_length1;
													if (_tmp88__length1 == 3) {
														gint year = 0;
														gchar** _tmp89_;
														gint _tmp89__length1;
														const gchar* _tmp90_;
														gint month = 0;
														gchar** _tmp91_;
														gint _tmp91__length1;
														const gchar* _tmp92_;
														gint day = 0;
														gchar** _tmp93_;
														gint _tmp93__length1;
														const gchar* _tmp94_;
														gboolean _tmp95_ = FALSE;
														gboolean _tmp96_ = FALSE;
														_tmp89_ = date_split;
														_tmp89__length1 = date_split_length1;
														_tmp90_ = _tmp89_[0];
														year = atoi (_tmp90_);
														_tmp91_ = date_split;
														_tmp91__length1 = date_split_length1;
														_tmp92_ = _tmp91_[1];
														month = atoi (_tmp92_) - 1;
														_tmp93_ = date_split;
														_tmp93__length1 = date_split_length1;
														_tmp94_ = _tmp93_[2];
														day = atoi (_tmp94_);
														if (year > 0) {
															_tmp96_ = month > 0;
														} else {
															_tmp96_ = FALSE;
														}
														if (_tmp96_) {
															_tmp95_ = day > 0;
														} else {
															_tmp95_ = FALSE;
														}
														if (_tmp95_) {
															AdwExpanderRow* _tmp97_;
															GtkCalendar* _tmp98_;
															GtkCalendar* _tmp99_;
															GtkCalendar* _tmp100_;
															_tmp97_ = self->priv->after_expander_row;
															adw_expander_row_set_expanded (_tmp97_, TRUE);
															_tmp98_ = self->priv->after_calendar;
															gtk_calendar_set_year (_tmp98_, year);
															_tmp99_ = self->priv->after_calendar;
															gtk_calendar_set_month (_tmp99_, month);
															_tmp100_ = self->priv->after_calendar;
															gtk_calendar_set_day (_tmp100_, day);
														}
													}
													date_split = (_vala_array_free (date_split, date_split_length1, (GDestroyNotify) g_free), NULL);
													_g_free0 (after_str);
												} else {
													const gchar* _tmp101_;
													gchar* _tmp102_;
													_tmp101_ = word;
													_tmp102_ = g_strdup (_tmp101_);
													_vala_array_add97 (&clean_query, &clean_query_length1, &_clean_query_size_, _tmp102_);
												}
											}
										}
									}
								}
								break;
							}
						}
					}
					_tmp103_ = self->priv->query_row;
					_tmp104_ = clean_query;
					_tmp104__length1 = clean_query_length1;
					_tmp105_ = _vala_g_strjoinv (" ", _tmp104_, (gint) _tmp104__length1);
					_tmp106_ = _tmp105_;
					gtk_editable_set_text ((GtkEditable*) _tmp103_, _tmp106_);
					_g_free0 (_tmp106_);
					_g_free0 (down_word);
					_g_free0 (word);
				}
			}
		}
		words = (_vala_array_free (words, words_length1, (GDestroyNotify) g_free), NULL);
		clean_query = (_vala_array_free (clean_query, clean_query_length1, (GDestroyNotify) g_free), NULL);
	}
	return self;
}

static TubaViewsSearchAdvancedSearchDialog*
tuba_views_search_advanced_search_dialog_new (const gchar* from_query)
{
	return tuba_views_search_advanced_search_dialog_construct (TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG, from_query);
}

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

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

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

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

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

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

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

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

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

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

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

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

static void
_vala_array_add110 (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_search_advanced_search_dialog_on_search (TubaViewsSearchAdvancedSearchDialog* self)
{
	gchar* final_query = NULL;
	AdwEntryRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** props = NULL;
	gchar** _tmp4_;
	gint props_length1;
	gint _props_size_;
	AdwEntryRow* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	AdwSwitchRow* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	AdwSwitchRow* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	AdwSwitchRow* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	AdwSwitchRow* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	AdwSwitchRow* _tmp34_;
	gboolean _tmp35_;
	gboolean _tmp36_;
	GtkCheckButton* _tmp38_;
	gboolean _tmp39_;
	gboolean _tmp40_;
	AdwExpanderRow* _tmp50_;
	gboolean _tmp51_;
	gboolean _tmp52_;
	AdwExpanderRow* _tmp60_;
	gboolean _tmp61_;
	gboolean _tmp62_;
	AdwExpanderRow* _tmp70_;
	gboolean _tmp71_;
	gboolean _tmp72_;
	GtkDropDown* _tmp80_;
	gboolean _tmp81_;
	gboolean _tmp82_;
	const gchar* _tmp90_;
	const gchar* _tmp91_;
	gchar** _tmp92_;
	gint _tmp92__length1;
	gchar* _tmp93_;
	gchar* _tmp94_;
	const gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* _tmp97_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->query_row;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	final_query = _tmp3_;
	_tmp4_ = g_new0 (gchar*, 0 + 1);
	props = _tmp4_;
	props_length1 = 0;
	_props_size_ = props_length1;
	_tmp5_ = self->priv->user_row;
	_tmp6_ = gtk_editable_get_text ((GtkEditable*) _tmp5_);
	_tmp7_ = _tmp6_;
	if (g_strcmp0 (_tmp7_, "") != 0) {
		gchar* from_str = NULL;
		AdwEntryRow* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		_tmp8_ = self->priv->user_row;
		_tmp9_ = gtk_editable_get_text ((GtkEditable*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = string_replace (_tmp10_, " ", "");
		from_str = _tmp11_;
		_tmp12_ = from_str;
		if (string_get (_tmp12_, (glong) 0) == '@') {
			const gchar* _tmp13_;
			gchar* _tmp14_;
			_tmp13_ = from_str;
			_tmp14_ = string_splice (_tmp13_, (glong) 0, (glong) 1, NULL);
			_g_free0 (from_str);
			from_str = _tmp14_;
		}
		_tmp15_ = from_str;
		_tmp16_ = string_to_string (_tmp15_);
		_tmp17_ = g_strconcat ("from:", _tmp16_, NULL);
		_vala_array_add98 (&props, &props_length1, &_props_size_, _tmp17_);
		_g_free0 (from_str);
	}
	_tmp18_ = self->priv->reply_switch_row;
	_tmp19_ = adw_switch_row_get_active (_tmp18_);
	_tmp20_ = _tmp19_;
	if (_tmp20_) {
		gchar* _tmp21_;
		_tmp21_ = g_strdup ("is:reply");
		_vala_array_add99 (&props, &props_length1, &_props_size_, _tmp21_);
	}
	_tmp22_ = self->priv->cw_switch_row;
	_tmp23_ = adw_switch_row_get_active (_tmp22_);
	_tmp24_ = _tmp23_;
	if (_tmp24_) {
		gchar* _tmp25_;
		_tmp25_ = g_strdup ("is:sensitive");
		_vala_array_add100 (&props, &props_length1, &_props_size_, _tmp25_);
	}
	_tmp26_ = self->priv->media_switch_row;
	_tmp27_ = adw_switch_row_get_active (_tmp26_);
	_tmp28_ = _tmp27_;
	if (_tmp28_) {
		gchar* _tmp29_;
		_tmp29_ = g_strdup ("has:media");
		_vala_array_add101 (&props, &props_length1, &_props_size_, _tmp29_);
	}
	_tmp30_ = self->priv->poll_switch_row;
	_tmp31_ = adw_switch_row_get_active (_tmp30_);
	_tmp32_ = _tmp31_;
	if (_tmp32_) {
		gchar* _tmp33_;
		_tmp33_ = g_strdup ("has:poll");
		_vala_array_add102 (&props, &props_length1, &_props_size_, _tmp33_);
	}
	_tmp34_ = self->priv->embed_switch_row;
	_tmp35_ = adw_switch_row_get_active (_tmp34_);
	_tmp36_ = _tmp35_;
	if (_tmp36_) {
		gchar* _tmp37_;
		_tmp37_ = g_strdup ("has:embed");
		_vala_array_add103 (&props, &props_length1, &_props_size_, _tmp37_);
	}
	_tmp38_ = self->priv->all_radio;
	_tmp39_ = gtk_check_button_get_active (_tmp38_);
	_tmp40_ = _tmp39_;
	if (_tmp40_) {
		gchar* _tmp41_;
		_tmp41_ = g_strdup ("in:all");
		_vala_array_add104 (&props, &props_length1, &_props_size_, _tmp41_);
	} else {
		GtkCheckButton* _tmp42_;
		gboolean _tmp43_;
		gboolean _tmp44_;
		_tmp42_ = self->priv->library_radio;
		_tmp43_ = gtk_check_button_get_active (_tmp42_);
		_tmp44_ = _tmp43_;
		if (_tmp44_) {
			gchar* _tmp45_;
			_tmp45_ = g_strdup ("in:library");
			_vala_array_add105 (&props, &props_length1, &_props_size_, _tmp45_);
		} else {
			GtkCheckButton* _tmp46_;
			gboolean _tmp47_;
			gboolean _tmp48_;
			_tmp46_ = self->priv->public_radio;
			_tmp47_ = gtk_check_button_get_active (_tmp46_);
			_tmp48_ = _tmp47_;
			if (_tmp48_) {
				gchar* _tmp49_;
				_tmp49_ = g_strdup ("in:public");
				_vala_array_add106 (&props, &props_length1, &_props_size_, _tmp49_);
			}
		}
	}
	_tmp50_ = self->priv->before_expander_row;
	_tmp51_ = adw_expander_row_get_expanded (_tmp50_);
	_tmp52_ = _tmp51_;
	if (_tmp52_) {
		GtkCalendar* _tmp53_;
		GDateTime* _tmp54_;
		GDateTime* _tmp55_;
		gchar* _tmp56_;
		gchar* _tmp57_;
		const gchar* _tmp58_;
		gchar* _tmp59_;
		_tmp53_ = self->priv->before_calendar;
		_tmp54_ = gtk_calendar_get_date (_tmp53_);
		_tmp55_ = _tmp54_;
		_tmp56_ = g_date_time_format (_tmp55_, "%F");
		_tmp57_ = _tmp56_;
		_tmp58_ = string_to_string (_tmp57_);
		_tmp59_ = g_strconcat ("before:", _tmp58_, NULL);
		_vala_array_add107 (&props, &props_length1, &_props_size_, _tmp59_);
		_g_free0 (_tmp57_);
		_g_date_time_unref0 (_tmp55_);
	}
	_tmp60_ = self->priv->during_expander_row;
	_tmp61_ = adw_expander_row_get_expanded (_tmp60_);
	_tmp62_ = _tmp61_;
	if (_tmp62_) {
		GtkCalendar* _tmp63_;
		GDateTime* _tmp64_;
		GDateTime* _tmp65_;
		gchar* _tmp66_;
		gchar* _tmp67_;
		const gchar* _tmp68_;
		gchar* _tmp69_;
		_tmp63_ = self->priv->during_calendar;
		_tmp64_ = gtk_calendar_get_date (_tmp63_);
		_tmp65_ = _tmp64_;
		_tmp66_ = g_date_time_format (_tmp65_, "%F");
		_tmp67_ = _tmp66_;
		_tmp68_ = string_to_string (_tmp67_);
		_tmp69_ = g_strconcat ("during:", _tmp68_, NULL);
		_vala_array_add108 (&props, &props_length1, &_props_size_, _tmp69_);
		_g_free0 (_tmp67_);
		_g_date_time_unref0 (_tmp65_);
	}
	_tmp70_ = self->priv->after_expander_row;
	_tmp71_ = adw_expander_row_get_expanded (_tmp70_);
	_tmp72_ = _tmp71_;
	if (_tmp72_) {
		GtkCalendar* _tmp73_;
		GDateTime* _tmp74_;
		GDateTime* _tmp75_;
		gchar* _tmp76_;
		gchar* _tmp77_;
		const gchar* _tmp78_;
		gchar* _tmp79_;
		_tmp73_ = self->priv->after_calendar;
		_tmp74_ = gtk_calendar_get_date (_tmp73_);
		_tmp75_ = _tmp74_;
		_tmp76_ = g_date_time_format (_tmp75_, "%F");
		_tmp77_ = _tmp76_;
		_tmp78_ = string_to_string (_tmp77_);
		_tmp79_ = g_strconcat ("after:", _tmp78_, NULL);
		_vala_array_add109 (&props, &props_length1, &_props_size_, _tmp79_);
		_g_free0 (_tmp77_);
		_g_date_time_unref0 (_tmp75_);
	}
	_tmp80_ = self->priv->lang_dropdown;
	_tmp81_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp80_);
	_tmp82_ = _tmp81_;
	if (_tmp82_) {
		GtkDropDown* _tmp83_;
		GObject* _tmp84_;
		GObject* _tmp85_;
		const gchar* _tmp86_;
		const gchar* _tmp87_;
		const gchar* _tmp88_;
		gchar* _tmp89_;
		_tmp83_ = self->priv->lang_dropdown;
		_tmp84_ = gtk_drop_down_get_selected_item (_tmp83_);
		_tmp85_ = _tmp84_;
		_tmp86_ = tuba_utils_locales_locale_get_locale (G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocale));
		_tmp87_ = _tmp86_;
		_tmp88_ = string_to_string (_tmp87_);
		_tmp89_ = g_strconcat ("language:", _tmp88_, NULL);
		_vala_array_add110 (&props, &props_length1, &_props_size_, _tmp89_);
	}
	_tmp90_ = final_query;
	_tmp91_ = string_to_string (_tmp90_);
	_tmp92_ = props;
	_tmp92__length1 = props_length1;
	_tmp93_ = _vala_g_strjoinv (" ", _tmp92_, (gint) _tmp92__length1);
	_tmp94_ = _tmp93_;
	_tmp95_ = string_to_string (_tmp94_);
	_tmp96_ = g_strconcat (_tmp91_, " ", _tmp95_, NULL);
	_tmp97_ = _tmp96_;
	g_signal_emit (self, tuba_views_search_advanced_search_dialog_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_RESULT_SIGNAL], 0, _tmp97_);
	_g_free0 (_tmp97_);
	_g_free0 (_tmp94_);
	tuba_views_search_advanced_search_dialog_on_exit (self);
	props = (_vala_array_free (props, props_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (final_query);
}

static void
_tuba_views_search_advanced_search_dialog_on_search_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self)
{
	tuba_views_search_advanced_search_dialog_on_search ((TubaViewsSearchAdvancedSearchDialog*) self);
}

static void
tuba_views_search_advanced_search_dialog_on_exit (TubaViewsSearchAdvancedSearchDialog* self)
{
	g_return_if_fail (self != NULL);
	adw_dialog_force_close ((AdwDialog*) self);
}

static void
_tuba_views_search_advanced_search_dialog_on_exit_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	tuba_views_search_advanced_search_dialog_on_exit ((TubaViewsSearchAdvancedSearchDialog*) self);
}

static inline gpointer
tuba_views_search_advanced_search_dialog_account_search_popover_get_instance_private (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsSearchAdvancedSearchDialogAccountSearchPopover_private_offset);
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_on_close (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self)
{
	g_return_if_fail (self != NULL);
	gtk_popover_popdown ((GtkPopover*) self);
}

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

static void
tuba_views_search_advanced_search_dialog_account_search_popover_search (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self)
{
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_strip (_tmp2_);
	_tmp4_ = _tmp3_;
	tuba_views_search_advanced_search_dialog_account_search_popover_search_real (self, _tmp4_, NULL, NULL);
	_g_free0 (_tmp4_);
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_search_real_data_free (gpointer _data)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->query);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData, _data_);
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_search_real (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self,
                                                                             const gchar* query,
                                                                             GAsyncReadyCallback _callback_,
                                                                             gpointer _user_data_)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData* _data_;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (query != NULL);
	_data_ = g_slice_new0 (TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_search_advanced_search_dialog_account_search_popover_search_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (query);
	_g_free0 (_data_->query);
	_data_->query = _tmp1_;
	tuba_views_search_advanced_search_dialog_account_search_popover_search_real_co (_data_);
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_search_real_finish (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self,
                                                                                    GAsyncResult* _res_)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block78Data*
block78_data_ref (Block78Data* _data78_)
{
	g_atomic_int_inc (&_data78_->_ref_count_);
	return _data78_;
}

static void
block78_data_unref (void * _userdata_)
{
	Block78Data* _data78_;
	_data78_ = (Block78Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data78_->_ref_count_)) {
		TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self;
		self = _data78_->self;
		_g_object_unref0 (self);
		g_slice_free (Block78Data, _data78_);
	}
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_search_real_ready (GObject* source_object,
                                                                                   GAsyncResult* _res_,
                                                                                   gpointer _user_data_)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_search_advanced_search_dialog_account_search_popover_search_real_co (_data_);
}

static void
___lambda185_ (Block78Data* _data78_,
               JsonNode* node,
               GError** error)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self;
	TubaAPIAccount* _tmp0_ = NULL;
	TubaAPIAccount* _tmp1_;
	TubaWidgetsAccountRow* widget = NULL;
	gchar* _tmp2_;
	gchar** _tmp3_;
	TubaWidgetsAccountRow* _tmp4_ = NULL;
	TubaWidgetsAccountRow* _tmp5_;
	GtkListBox* _tmp6_;
	TubaWidgetsAccountRow* _tmp7_;
	GError* _inner_error0_ = NULL;
	self = _data78_->self;
	g_return_if_fail (node != NULL);
	_tmp1_ = tuba_api_account_from (node, &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp2_ = g_strdup ("border-radius-6");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = tuba_widgets_account_row_new (_tmp0_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	widget = _tmp4_;
	_tmp5_ = widget;
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _tmp5_, TRUE);
	_tmp6_ = self->priv->result_box;
	_tmp7_ = widget;
	gtk_list_box_append (_tmp6_, (GtkWidget*) _tmp7_);
	_data78_->i += 1;
	if (_data78_->i < 4) {
		_g_object_unref0 (widget);
		_g_object_unref0 (_tmp0_);
		return;
	}
	_g_object_unref0 (widget);
	_g_object_unref0 (_tmp0_);
}

static void
____lambda185__tuba_network_node_callback (JsonNode* node,
                                           gpointer self,
                                           GError** error)
{
	___lambda185_ (self, node, error);
}

static gboolean
tuba_views_search_advanced_search_dialog_account_search_popover_search_real_co (TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverSearchRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->result_box;
	gtk_list_box_remove_all (_data_->_tmp0_);
	_data_->_tmp1_ = _data_->self->priv->sw;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp1_, FALSE);
	_data_->_tmp2_ = _data_->self->priv->last_req;
	if (_data_->_tmp2_ != NULL) {
		_data_->_tmp3_ = _data_->self->priv->last_req;
		_data_->_tmp4_ = tuba_request_v2_get_cancellable (_data_->_tmp3_);
		_data_->_tmp5_ = _data_->_tmp4_;
		g_cancellable_cancel (_data_->_tmp5_);
		_g_object_unref0 (_data_->self->priv->last_req);
		_data_->self->priv->last_req = NULL;
	}
	if (g_strcmp0 (_data_->query, "") == 0) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_data78_ = g_slice_new0 (Block78Data);
		_data_->_data78_->_ref_count_ = 1;
		_data_->_data78_->self = g_object_ref (_data_->self);
		_data_->_tmp7_ = tuba_api_account_search (_data_->query, &_data_->_inner_error0_);
		_data_->_tmp6_ = _data_->_tmp7_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			block78_data_unref (_data_->_data78_);
			_data_->_data78_ = NULL;
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp8_ = _data_->_tmp6_;
		_data_->_tmp6_ = NULL;
		_g_object_unref0 (_data_->self->priv->last_req);
		_data_->self->priv->last_req = _data_->_tmp8_;
		_data_->_tmp9_ = _data_->self->priv->last_req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp9_, tuba_views_search_advanced_search_dialog_account_search_popover_search_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp10_ = tuba_request_v2_exec_finish (_data_->_tmp9_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp10_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->_tmp6_);
			block78_data_unref (_data_->_data78_);
			_data_->_data78_ = NULL;
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp12_ = _data_->self->priv->last_req;
		if (_data_->_tmp12_ == NULL) {
			_data_->_tmp11_ = TRUE;
		} else {
			_data_->_tmp13_ = _data_->self->priv->last_req;
			_data_->_tmp14_ = tuba_request_v2_get_cancellable (_data_->_tmp13_);
			_data_->_tmp15_ = _data_->_tmp14_;
			_data_->_tmp11_ = g_cancellable_is_cancelled (_data_->_tmp15_);
		}
		if (_data_->_tmp11_) {
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->_tmp6_);
			block78_data_unref (_data_->_data78_);
			_data_->_data78_ = NULL;
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp16_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp16_, NULL, tuba_views_search_advanced_search_dialog_account_search_popover_search_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp17_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp17_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->_tmp6_);
			block78_data_unref (_data_->_data78_);
			_data_->_data78_ = NULL;
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_data78_->i = 0;
		_data_->_tmp18_ = _data_->parser;
		tuba_network_parse_array (_data_->_tmp18_, ____lambda185__tuba_network_node_callback, block78_data_ref (_data_->_data78_), block78_data_unref, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->_tmp6_);
			block78_data_unref (_data_->_data78_);
			_data_->_data78_ = NULL;
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp19_ = _data_->self->priv->sw;
		gtk_widget_set_visible ((GtkWidget*) _data_->_tmp19_, _data_->_data78_->i > 0);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->_tmp6_);
		block78_data_unref (_data_->_data78_);
		_data_->_data78_ = NULL;
	}
	goto __finally0;
	__catch0_g_io_error_cancelled:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_debug ("Search.vala:396: Message is cancelled.");
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp20_ = _data_->e;
		_data_->_tmp21_ = _data_->_tmp20_->message;
		g_signal_emit (_data_->self, tuba_views_search_advanced_search_dialog_account_search_popover_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_ERRORED_SIGNAL], 0, _data_->_tmp21_);
		_data_->_tmp22_ = string_to_string (_data_->query);
		_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 search account ", _data_->_tmp22_, ": ", _data_->_tmp25_, " ", _data_->_tmp28_, NULL);
		_data_->_tmp30_ = _data_->_tmp29_;
		g_warning ("Search.vala:399: %s", _data_->_tmp30_);
		_g_free0 (_data_->_tmp30_);
		_g_free0 (_data_->_tmp25_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->self->priv->last_req);
	_data_->self->priv->last_req = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_on_account_chosen (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* self,
                                                                                   GtkListBoxRow* row)
{
	TubaAPIAccount* _tmp0_;
	TubaAPIAccount* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	tuba_views_search_advanced_search_dialog_account_search_popover_on_close (self);
	_tmp0_ = tuba_widgets_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (row, TUBA_WIDGETS_TYPE_ACCOUNT_ROW, TubaWidgetsAccountRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = tuba_api_account_get_full_handle (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	g_signal_emit (self, tuba_views_search_advanced_search_dialog_account_search_popover_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_ACCOUNT_PICKED_SIGNAL], 0, _tmp4_);
	_g_free0 (_tmp4_);
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_real_show (GtkWidget* base)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover * self;
	GtkSearchEntry* _tmp0_;
	self = (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*) base;
	GTK_WIDGET_CLASS (tuba_views_search_advanced_search_dialog_account_search_popover_parent_class)->show ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_popover_get_type (), GtkPopover));
	_tmp0_ = self->priv->entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
}

static TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*
tuba_views_search_advanced_search_dialog_account_search_popover_construct (GType object_type)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover * self = NULL;
	self = (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*) g_object_new (object_type, NULL);
	return self;
}

static TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*
tuba_views_search_advanced_search_dialog_account_search_popover_new (void)
{
	return tuba_views_search_advanced_search_dialog_account_search_popover_construct (TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER);
}

static void
_tuba_views_search_advanced_search_dialog_account_search_popover_on_account_chosen_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                                               GtkListBoxRow* row,
                                                                                                               gpointer self)
{
	tuba_views_search_advanced_search_dialog_account_search_popover_on_account_chosen ((TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*) self, row);
}

static void
_tuba_views_search_advanced_search_dialog_account_search_popover_search_gtk_search_entry_activate (GtkSearchEntry* _sender,
                                                                                                   gpointer self)
{
	tuba_views_search_advanced_search_dialog_account_search_popover_search ((TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*) self);
}

static void
_tuba_views_search_advanced_search_dialog_account_search_popover_search_gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                                                                         gpointer self)
{
	tuba_views_search_advanced_search_dialog_account_search_popover_search ((TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*) self);
}

static void
_tuba_views_search_advanced_search_dialog_account_search_popover_on_close_gtk_search_entry_stop_search (GtkSearchEntry* _sender,
                                                                                                        gpointer self)
{
	tuba_views_search_advanced_search_dialog_account_search_popover_on_close ((TubaViewsSearchAdvancedSearchDialogAccountSearchPopover*) self);
}

static GObject *
tuba_views_search_advanced_search_dialog_account_search_popover_constructor (GType type,
                                                                             guint n_construct_properties,
                                                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover * self;
	GtkListBox* _tmp0_ = NULL;
	GtkListBox* _tmp1_;
	GtkListBox* _tmp2_;
	GtkWidget* _tmp3_;
	GtkScrolledWindow* _tmp4_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkScrolledWindow* _tmp7_;
	GtkBox* _tmp8_;
	gchar* _tmp9_;
	GtkSearchEntry* _tmp10_ = NULL;
	AdwBin* entry_bin = NULL;
	gchar* _tmp11_;
	gchar** _tmp12_;
	GtkSearchEntry* _tmp13_;
	GtkWidget* _tmp14_;
	AdwBin* _tmp15_ = NULL;
	GtkBox* _tmp16_;
	AdwBin* _tmp17_;
	GtkSearchEntry* _tmp18_;
	GtkSearchEntry* _tmp19_;
	GtkSearchEntry* _tmp20_;
	parent_class = G_OBJECT_CLASS (tuba_views_search_advanced_search_dialog_account_search_popover_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER, TubaViewsSearchAdvancedSearchDialogAccountSearchPopover);
	gtk_widget_add_css_class ((GtkWidget*) self, "emoji-picker");
	_tmp0_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp0_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 6);
	gtk_list_box_set_selection_mode (_tmp0_, GTK_SELECTION_NONE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->result_box);
	self->priv->result_box = _tmp0_;
	_tmp1_ = self->priv->result_box;
	g_signal_connect_object (_tmp1_, "row-activated", (GCallback) _tuba_views_search_advanced_search_dialog_account_search_popover_on_account_chosen_gtk_list_box_row_activated, self, 0);
	_tmp2_ = self->priv->result_box;
	_tmp3_ = _g_object_ref0 ((GtkWidget*) _tmp2_);
	_tmp4_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_scrolled_window_set_max_content_width (_tmp4_, 360);
	gtk_scrolled_window_set_propagate_natural_height (_tmp4_, TRUE);
	gtk_scrolled_window_set_child (_tmp4_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, FALSE);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->sw);
	self->priv->sw = _tmp4_;
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp5_);
	content_box = _tmp5_;
	_tmp6_ = content_box;
	_tmp7_ = self->priv->sw;
	gtk_box_append (_tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = content_box;
	gtk_popover_set_child ((GtkPopover*) self, (GtkWidget*) _tmp8_);
	_tmp9_ = g_strdup ("@GTK@floss.social");
	_tmp10_ = (GtkSearchEntry*) gtk_search_entry_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp10_, TRUE);
	g_object_set (_tmp10_, "placeholder-text", _tmp9_, NULL);
	_g_free0 (_tmp9_);
	gtk_search_entry_set_search_delay (_tmp10_, (guint) 300);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->entry);
	self->priv->entry = _tmp10_;
	_tmp11_ = g_strdup ("emoji-searchbar");
	_tmp12_ = g_new0 (gchar*, 1 + 1);
	_tmp12_[0] = _tmp11_;
	_tmp13_ = self->priv->entry;
	_tmp14_ = _g_object_ref0 ((GtkWidget*) _tmp13_);
	_tmp15_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp15_, _tmp12_);
	_tmp12_ = (_vala_array_free (_tmp12_, 1, (GDestroyNotify) g_free), NULL);
	adw_bin_set_child (_tmp15_, _tmp14_);
	_g_object_unref0 (_tmp14_);
	g_object_ref_sink (_tmp15_);
	entry_bin = _tmp15_;
	_tmp16_ = content_box;
	_tmp17_ = entry_bin;
	gtk_box_prepend (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->entry;
	g_signal_connect_object (_tmp18_, "activate", (GCallback) _tuba_views_search_advanced_search_dialog_account_search_popover_search_gtk_search_entry_activate, self, 0);
	_tmp19_ = self->priv->entry;
	g_signal_connect_object (_tmp19_, "search-changed", (GCallback) _tuba_views_search_advanced_search_dialog_account_search_popover_search_gtk_search_entry_search_changed, self, 0);
	_tmp20_ = self->priv->entry;
	g_signal_connect_object (_tmp20_, "stop-search", (GCallback) _tuba_views_search_advanced_search_dialog_account_search_popover_on_close_gtk_search_entry_stop_search, self, 0);
	_g_object_unref0 (entry_bin);
	_g_object_unref0 (content_box);
	return obj;
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_class_init (TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverClass * klass,
                                                                            gpointer klass_data)
{
	tuba_views_search_advanced_search_dialog_account_search_popover_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsSearchAdvancedSearchDialogAccountSearchPopover_private_offset);
	((GtkWidgetClass *) klass)->show = (void (*) (GtkWidget*)) tuba_views_search_advanced_search_dialog_account_search_popover_real_show;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_search_advanced_search_dialog_account_search_popover_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_search_advanced_search_dialog_account_search_popover_finalize;
	tuba_views_search_advanced_search_dialog_account_search_popover_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_ACCOUNT_PICKED_SIGNAL] = g_signal_new ("account-picked", TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	tuba_views_search_advanced_search_dialog_account_search_popover_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_ACCOUNT_SEARCH_POPOVER_ERRORED_SIGNAL] = g_signal_new ("errored", TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_instance_init (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover * self,
                                                                               gpointer klass)
{
	self->priv = tuba_views_search_advanced_search_dialog_account_search_popover_get_instance_private (self);
	self->priv->last_req = NULL;
}

static void
tuba_views_search_advanced_search_dialog_account_search_popover_finalize (GObject * obj)
{
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_TYPE_ACCOUNT_SEARCH_POPOVER, TubaViewsSearchAdvancedSearchDialogAccountSearchPopover);
	_g_object_unref0 (self->priv->entry);
	_g_object_unref0 (self->priv->result_box);
	_g_object_unref0 (self->priv->sw);
	_g_object_unref0 (self->priv->last_req);
	G_OBJECT_CLASS (tuba_views_search_advanced_search_dialog_account_search_popover_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_search_advanced_search_dialog_account_search_popover_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_search_advanced_search_dialog_account_search_popover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover), 0, (GInstanceInitFunc) tuba_views_search_advanced_search_dialog_account_search_popover_instance_init, NULL };
	GType tuba_views_search_advanced_search_dialog_account_search_popover_type_id;
	tuba_views_search_advanced_search_dialog_account_search_popover_type_id = g_type_register_static (gtk_popover_get_type (), "TubaViewsSearchAdvancedSearchDialogAccountSearchPopover", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover_private_offset = g_type_add_instance_private (tuba_views_search_advanced_search_dialog_account_search_popover_type_id, sizeof (TubaViewsSearchAdvancedSearchDialogAccountSearchPopoverPrivate));
	return tuba_views_search_advanced_search_dialog_account_search_popover_type_id;
}

GType
tuba_views_search_advanced_search_dialog_account_search_popover_get_type (void)
{
	static GType tuba_views_search_advanced_search_dialog_account_search_popover_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_search_advanced_search_dialog_account_search_popover_type_id__once)) {
		GType tuba_views_search_advanced_search_dialog_account_search_popover_type_id;
		tuba_views_search_advanced_search_dialog_account_search_popover_type_id = tuba_views_search_advanced_search_dialog_account_search_popover_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_search_advanced_search_dialog_account_search_popover_type_id__once, tuba_views_search_advanced_search_dialog_account_search_popover_type_id);
	}
	return tuba_views_search_advanced_search_dialog_account_search_popover_type_id__once;
}

static void
_tuba_views_search_advanced_search_dialog_on_account_picked_tuba_views_search_advanced_search_dialog_account_search_popover_account_picked (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _sender,
                                                                                                                                            const gchar* account,
                                                                                                                                            gpointer self)
{
	tuba_views_search_advanced_search_dialog_on_account_picked ((TubaViewsSearchAdvancedSearchDialog*) self, account);
}

static void
_tuba_views_search_advanced_search_dialog_on_account_errored_tuba_views_search_advanced_search_dialog_account_search_popover_errored (TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _sender,
                                                                                                                                      const gchar* error_msg,
                                                                                                                                      gpointer self)
{
	tuba_views_search_advanced_search_dialog_on_account_errored ((TubaViewsSearchAdvancedSearchDialog*) self, error_msg);
}

static GObject *
tuba_views_search_advanced_search_dialog_constructor (GType type,
                                                      guint n_construct_properties,
                                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsSearchAdvancedSearchDialog * self;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* acc_search = NULL;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _tmp0_;
	GtkMenuButton* _tmp1_;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _tmp2_;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _tmp3_;
	TubaViewsSearchAdvancedSearchDialogAccountSearchPopover* _tmp4_;
	GtkCalendar* _tmp5_;
	GtkCalendar* _tmp6_;
	GtkCalendar* _tmp7_;
	AdwActionRow* lang_row = NULL;
	gchar* _tmp8_;
	AdwActionRow* _tmp9_ = NULL;
	GtkListBox* _tmp10_;
	AdwActionRow* _tmp11_;
	GtkSwitch* _tmp12_ = NULL;
	TubaApplication* _tmp13_;
	TubaUtilsLocales* _tmp14_;
	TubaUtilsLocales* _tmp15_;
	GListStore* _tmp16_;
	GListModel* _tmp17_;
	GtkPropertyExpression* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	GtkBuilderListItemFactory* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GtkBuilderListItemFactory* _tmp26_;
	GtkDropDown* _tmp27_ = NULL;
	AdwActionRow* _tmp28_;
	GtkSwitch* _tmp29_;
	AdwActionRow* _tmp30_;
	GtkDropDown* _tmp31_;
	GtkSwitch* _tmp32_;
	GtkDropDown* _tmp33_;
	parent_class = G_OBJECT_CLASS (tuba_views_search_advanced_search_dialog_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG, TubaViewsSearchAdvancedSearchDialog);
	_tmp0_ = tuba_views_search_advanced_search_dialog_account_search_popover_new ();
	g_object_ref_sink (_tmp0_);
	acc_search = _tmp0_;
	_tmp1_ = self->priv->acc_search_button;
	_tmp2_ = acc_search;
	gtk_menu_button_set_popover (_tmp1_, (GtkPopover*) _tmp2_);
	_tmp3_ = acc_search;
	g_signal_connect_object (_tmp3_, "account-picked", (GCallback) _tuba_views_search_advanced_search_dialog_on_account_picked_tuba_views_search_advanced_search_dialog_account_search_popover_account_picked, self, 0);
	_tmp4_ = acc_search;
	g_signal_connect_object (_tmp4_, "errored", (GCallback) _tuba_views_search_advanced_search_dialog_on_account_errored_tuba_views_search_advanced_search_dialog_account_search_popover_errored, self, 0);
	_tmp5_ = self->priv->before_calendar;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp5_, "view");
	_tmp6_ = self->priv->during_calendar;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp6_, "view");
	_tmp7_ = self->priv->after_calendar;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp7_, "view");
	_tmp8_ = g_strdup (_ ("Language"));
	_tmp9_ = (AdwActionRow*) adw_action_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp9_, _tmp8_);
	_g_free0 (_tmp8_);
	g_object_ref_sink (_tmp9_);
	lang_row = _tmp9_;
	_tmp10_ = self->priv->main_list;
	_tmp11_ = lang_row;
	gtk_list_box_append (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp12_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->lang_switch);
	self->priv->lang_switch = _tmp12_;
	_tmp13_ = tuba_app;
	_tmp14_ = tuba_application_get_app_locales (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = _tmp15_->list_store;
	_tmp17_ = _g_object_ref0 ((GListModel*) _tmp16_);
	_tmp18_ = (GtkPropertyExpression*) gtk_property_expression_new (TUBA_UTILS_LOCALES_TYPE_LOCALE, NULL, "en-name");
	_tmp19_ = string_to_string (BUILD_RESOURCES);
	_tmp20_ = g_strconcat (_tmp19_, "gtk/dropdown/language_title.ui", NULL);
	_tmp21_ = _tmp20_;
	_tmp22_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp21_);
	_tmp23_ = string_to_string (BUILD_RESOURCES);
	_tmp24_ = g_strconcat (_tmp23_, "gtk/dropdown/language.ui", NULL);
	_tmp25_ = _tmp24_;
	_tmp26_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp25_);
	_tmp27_ = (GtkDropDown*) gtk_drop_down_new (_tmp17_, NULL);
	gtk_drop_down_set_expression (_tmp27_, (GtkExpression*) _tmp18_);
	_gtk_expression_unref0 (_tmp18_);
	gtk_drop_down_set_factory (_tmp27_, (GtkListItemFactory*) _tmp22_);
	_g_object_unref0 (_tmp22_);
	gtk_drop_down_set_list_factory (_tmp27_, (GtkListItemFactory*) _tmp26_);
	_g_object_unref0 (_tmp26_);
	gtk_drop_down_set_enable_search (_tmp27_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp27_, GTK_ALIGN_CENTER);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp27_, FALSE);
	g_object_ref_sink (_tmp27_);
	_g_object_unref0 (self->priv->lang_dropdown);
	self->priv->lang_dropdown = _tmp27_;
	_g_free0 (_tmp25_);
	_g_free0 (_tmp21_);
	_tmp28_ = lang_row;
	_tmp29_ = self->priv->lang_switch;
	adw_action_row_add_suffix (_tmp28_, (GtkWidget*) _tmp29_);
	_tmp30_ = lang_row;
	_tmp31_ = self->priv->lang_dropdown;
	adw_action_row_add_suffix (_tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = self->priv->lang_switch;
	_tmp33_ = self->priv->lang_dropdown;
	g_object_bind_property_with_closures ((GObject*) _tmp32_, "active", (GObject*) _tmp33_, "sensitive", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_g_object_unref0 (lang_row);
	_g_object_unref0 (acc_search);
	return obj;
}

static void
tuba_views_search_advanced_search_dialog_class_init (TubaViewsSearchAdvancedSearchDialogClass * klass,
                                                     gpointer klass_data)
{
	tuba_views_search_advanced_search_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsSearchAdvancedSearchDialog_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_views_search_advanced_search_dialog_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_search_advanced_search_dialog_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/dev/geopjr/Tuba/ui/dialogs/advanced_search.ui");
	tuba_views_search_advanced_search_dialog_signals[TUBA_VIEWS_SEARCH_ADVANCED_SEARCH_DIALOG_RESULT_SIGNAL] = g_signal_new ("result", TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_list", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, main_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "toast_overlay", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, toast_overlay));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "query_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, query_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "user_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, user_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "acc_search_button", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, acc_search_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "reply_switch_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, reply_switch_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cw_switch_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, cw_switch_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "media_switch_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, media_switch_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "poll_switch_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, poll_switch_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "embed_switch_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, embed_switch_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "all_radio", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, all_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "library_radio", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, library_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "public_radio", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, public_radio));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "before_expander_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, before_expander_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "before_calendar", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, before_calendar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "during_expander_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, during_expander_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "during_calendar", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, during_calendar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "after_expander_row", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, after_expander_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "after_calendar", FALSE, TubaViewsSearchAdvancedSearchDialog_private_offset + G_STRUCT_OFFSET (TubaViewsSearchAdvancedSearchDialogPrivate, after_calendar));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search", G_CALLBACK(_tuba_views_search_advanced_search_dialog_on_search_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_exit", G_CALLBACK(_tuba_views_search_advanced_search_dialog_on_exit_gtk_button_clicked));
}

static void
tuba_views_search_advanced_search_dialog_instance_init (TubaViewsSearchAdvancedSearchDialog * self,
                                                        gpointer klass)
{
	self->priv = tuba_views_search_advanced_search_dialog_get_instance_private (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tuba_views_search_advanced_search_dialog_finalize (GObject * obj)
{
	TubaViewsSearchAdvancedSearchDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_SEARCH_TYPE_ADVANCED_SEARCH_DIALOG, TubaViewsSearchAdvancedSearchDialog);
	g_debug ("Search.vala:442: Destroying AdvancedSearchDialog");
	_g_object_unref0 (self->priv->lang_dropdown);
	_g_object_unref0 (self->priv->lang_switch);
	G_OBJECT_CLASS (tuba_views_search_advanced_search_dialog_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_search_advanced_search_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsSearchAdvancedSearchDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_search_advanced_search_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsSearchAdvancedSearchDialog), 0, (GInstanceInitFunc) tuba_views_search_advanced_search_dialog_instance_init, NULL };
	GType tuba_views_search_advanced_search_dialog_type_id;
	tuba_views_search_advanced_search_dialog_type_id = g_type_register_static (adw_dialog_get_type (), "TubaViewsSearchAdvancedSearchDialog", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsSearchAdvancedSearchDialog_private_offset = g_type_add_instance_private (tuba_views_search_advanced_search_dialog_type_id, sizeof (TubaViewsSearchAdvancedSearchDialogPrivate));
	return tuba_views_search_advanced_search_dialog_type_id;
}

static GType
tuba_views_search_advanced_search_dialog_get_type (void)
{
	static GType tuba_views_search_advanced_search_dialog_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_search_advanced_search_dialog_type_id__once)) {
		GType tuba_views_search_advanced_search_dialog_type_id;
		tuba_views_search_advanced_search_dialog_type_id = tuba_views_search_advanced_search_dialog_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_search_advanced_search_dialog_type_id__once, tuba_views_search_advanced_search_dialog_type_id);
	}
	return tuba_views_search_advanced_search_dialog_type_id__once;
}

static Block79Data*
block79_data_ref (Block79Data* _data79_)
{
	g_atomic_int_inc (&_data79_->_ref_count_);
	return _data79_;
}

static void
block79_data_unref (void * _userdata_)
{
	Block79Data* _data79_;
	_data79_ = (Block79Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data79_->_ref_count_)) {
		TubaViewsSearch* self;
		self = _data79_->self;
		_g_object_unref0 (self);
		g_slice_free (Block79Data, _data79_);
	}
}

static void
_tuba_views_search_open_advanced_search_dialog_tuba_views_search_search_entry_on_advanced_search_clicked (TubaViewsSearchSearchEntry* _sender,
                                                                                                          gpointer self)
{
	tuba_views_search_open_advanced_search_dialog ((TubaViewsSearch*) self);
}

static void
_tuba_views_search_request_tuba_views_search_search_entry_on_entry_activate (TubaViewsSearchSearchEntry* _sender,
                                                                             gpointer self)
{
	tuba_views_search_request ((TubaViewsSearch*) self);
}

static void
_tuba_views_search_request_gtk_button_clicked (GtkButton* _sender,
                                               gpointer self)
{
	tuba_views_search_request ((TubaViewsSearch*) self);
}

static gboolean
_tuba_views_search___lambda186_ (Block79Data* _data79_)
{
	TubaViewsSearch* self;
	TubaViewsSearchSearchEntry* _tmp0_;
	gboolean result;
	self = _data79_->self;
	_tmp0_ = self->entry;
	tuba_views_search_search_entry_gather_focus (_tmp0_);
	g_source_remove (_data79_->timeout);
	result = TRUE;
	return result;
}

static gboolean
__tuba_views_search___lambda186__gsource_func (gpointer self)
{
	gboolean result;
	result = _tuba_views_search___lambda186_ (self);
	return result;
}

static GObject *
tuba_views_search_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsSearch * self;
	Block79Data* _data79_;
	GtkSearchBar* _tmp0_ = NULL;
	AdwToolbarView* _tmp1_;
	GtkSearchBar* _tmp2_;
	TubaViewsSearchSearchEntry* _tmp3_;
	TubaViewsSearchSearchEntry* _tmp4_;
	GtkSearchBar* _tmp5_;
	TubaViewsSearchSearchEntry* _tmp6_;
	GtkWidget* _tmp7_;
	AdwClamp* _tmp8_ = NULL;
	AdwClamp* _tmp9_;
	GtkSearchBar* _tmp10_;
	TubaViewsSearchSearchEntry* _tmp11_;
	GtkText* _tmp12_;
	GtkText* _tmp13_;
	TubaViewsSearchSearchEntry* _tmp14_;
	GtkButton* _tmp15_;
	TubaViewsContentBase* _tmp16_;
	TubaViewsContentBase* _tmp17_;
	TubaViewsContentBase* _tmp18_;
	TubaViewsContentBase* _tmp19_;
	TubaAccountStore* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaAPIInstanceV2APIVersions* _tmp23_;
	TubaAPIInstanceV2APIVersions* _tmp24_;
	gint8 _tmp25_;
	gint8 _tmp26_;
	parent_class = G_OBJECT_CLASS (tuba_views_search_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearch);
	_data79_ = g_slice_new0 (Block79Data);
	_data79_->_ref_count_ = 1;
	_data79_->self = g_object_ref (self);
	tuba_views_base_set_uid ((TubaViewsBase*) self, 1);
	tuba_views_base_set_label ((TubaViewsBase*) self, _ ("Search"));
	tuba_views_base_set_empty_timeline_icon ((TubaViewsBase*) self, "system-search");
	tuba_views_base_set_empty_state_title ((TubaViewsBase*) self, _ ("Search"));
	_tmp0_ = (GtkSearchBar*) gtk_search_bar_new ();
	g_object_set (_tmp0_, "search-mode-enabled", TRUE, NULL);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->bar);
	self->bar = _tmp0_;
	_tmp1_ = ((TubaViewsBase*) self)->toolbar_view;
	_tmp2_ = self->bar;
	adw_toolbar_view_add_top_bar (_tmp1_, (GtkWidget*) _tmp2_);
	_tmp3_ = tuba_views_search_search_entry_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->entry);
	self->entry = _tmp3_;
	_tmp4_ = self->entry;
	g_signal_connect_object (_tmp4_, "on-advanced-search-clicked", (GCallback) _tuba_views_search_open_advanced_search_dialog_tuba_views_search_search_entry_on_advanced_search_clicked, self, 0);
	_tmp5_ = self->bar;
	_tmp6_ = self->entry;
	_tmp7_ = _g_object_ref0 ((GtkWidget*) _tmp6_);
	_tmp8_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_child (_tmp8_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	adw_clamp_set_maximum_size (_tmp8_, 300);
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	gtk_search_bar_set_child (_tmp5_, (GtkWidget*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = self->bar;
	_tmp11_ = self->entry;
	_tmp12_ = tuba_views_search_search_entry_get_entry (_tmp11_);
	_tmp13_ = _tmp12_;
	gtk_search_bar_connect_entry (_tmp10_, (GtkEditable*) _tmp13_);
	_tmp14_ = self->entry;
	g_signal_connect_object (_tmp14_, "on-entry-activate", (GCallback) _tuba_views_search_request_tuba_views_search_search_entry_on_entry_activate, self, 0);
	_tmp15_ = ((TubaViewsBase*) self)->status_button;
	g_signal_connect_object (_tmp15_, "clicked", (GCallback) _tuba_views_search_request_gtk_button_clicked, self, 0);
	_tmp16_ = tuba_views_tabbed_base_add_list_tab ((TubaViewsTabbedBase*) self, _ ("All"), "tuba-loupe-large-symbolic", _ ("No Results"));
	_g_object_unref0 (self->priv->all_tab);
	self->priv->all_tab = _tmp16_;
	_tmp17_ = tuba_views_tabbed_base_add_list_tab ((TubaViewsTabbedBase*) self, _ ("Accounts"), "tuba-people-symbolic", _ ("No Results"));
	_g_object_unref0 (self->priv->accounts_tab);
	self->priv->accounts_tab = _tmp17_;
	_tmp18_ = tuba_views_tabbed_base_add_list_tab ((TubaViewsTabbedBase*) self, _ ("Posts"), "tuba-chat-symbolic", _ ("No Results"));
	_g_object_unref0 (self->priv->statuses_tab);
	self->priv->statuses_tab = _tmp18_;
	_tmp19_ = tuba_views_tabbed_base_add_list_tab ((TubaViewsTabbedBase*) self, _ ("Hashtags"), "tuba-hashtag-symbolic", _ ("No Results"));
	_g_object_unref0 (self->priv->hashtags_tab);
	self->priv->hashtags_tab = _tmp19_;
	_tmp20_ = tuba_accounts;
	_tmp21_ = tuba_account_store_get_active (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = tuba_instance_account_get_tuba_api_versions (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp24_);
	_tmp26_ = _tmp25_;
	if (((gint) _tmp26_) >= 10) {
		TubaViewsContentBase* _tmp27_;
		_tmp27_ = tuba_views_tabbed_base_add_list_tab ((TubaViewsTabbedBase*) self, _ ("Collections"), "tuba-shapes-symbolic", _ ("No Results"));
		_g_object_unref0 (self->priv->collections_tab);
		self->priv->collections_tab = _tmp27_;
	}
	_data79_->timeout = (guint) 0;
	_data79_->timeout = g_timeout_add_full (G_PRIORITY_LOW, (guint) 510, __tuba_views_search___lambda186__gsource_func, block79_data_ref (_data79_), block79_data_unref);
	tuba_views_search_request (self);
	block79_data_unref (_data79_);
	_data79_ = NULL;
	return obj;
}

static void
tuba_views_search_class_init (TubaViewsSearchClass * klass,
                              gpointer klass_data)
{
	tuba_views_search_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsSearch_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_search_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_search_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_search_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_search_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_SEARCH_QUERY_PROPERTY, tuba_views_search_properties[TUBA_VIEWS_SEARCH_QUERY_PROPERTY] = g_param_spec_string ("query", "query", "query", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_views_search_instance_init (TubaViewsSearch * self,
                                 gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tuba_views_search_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_query = _tmp0_;
	self->priv->collections_tab = NULL;
	self->priv->search_query_regex = NULL;
}

static void
tuba_views_search_finalize (GObject * obj)
{
	TubaViewsSearch * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearch);
	_g_free0 (self->priv->_query);
	_g_object_unref0 (self->bar);
	_g_object_unref0 (self->entry);
	_g_object_unref0 (self->priv->all_tab);
	_g_object_unref0 (self->priv->accounts_tab);
	_g_object_unref0 (self->priv->statuses_tab);
	_g_object_unref0 (self->priv->hashtags_tab);
	_g_object_unref0 (self->priv->collections_tab);
	_g_regex_unref0 (self->priv->search_query_regex);
	G_OBJECT_CLASS (tuba_views_search_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_search_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsSearchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_search_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsSearch), 0, (GInstanceInitFunc) tuba_views_search_instance_init, NULL };
	GType tuba_views_search_type_id;
	tuba_views_search_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TABBED_BASE, "TubaViewsSearch", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsSearch_private_offset = g_type_add_instance_private (tuba_views_search_type_id, sizeof (TubaViewsSearchPrivate));
	return tuba_views_search_type_id;
}

GType
tuba_views_search_get_type (void)
{
	static GType tuba_views_search_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_search_type_id__once)) {
		GType tuba_views_search_type_id;
		tuba_views_search_type_id = tuba_views_search_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_search_type_id__once, tuba_views_search_type_id);
	}
	return tuba_views_search_type_id__once;
}

static void
_vala_tuba_views_search_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	TubaViewsSearch * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearch);
	switch (property_id) {
		case TUBA_VIEWS_SEARCH_QUERY_PROPERTY:
		g_value_set_string (value, tuba_views_search_get_query (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_search_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	TubaViewsSearch * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_SEARCH, TubaViewsSearch);
	switch (property_id) {
		case TUBA_VIEWS_SEARCH_QUERY_PROPERTY:
		tuba_views_search_set_query (self, g_value_get_string (value));
		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);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

