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

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

#define TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW "follow"
#define TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW_REQUEST "follow_request"
#define TUBA_INSTANCE_ACCOUNT_KIND_FAVOURITE "favourite"
#define TUBA_INSTANCE_ACCOUNT_KIND_MENTION "mention"
#define TUBA_INSTANCE_ACCOUNT_KIND_REBLOG "reblog"
#define TUBA_INSTANCE_ACCOUNT_KIND_POLL "poll"
#define TUBA_INSTANCE_ACCOUNT_KIND_EDITED "update"
#define TUBA_INSTANCE_ACCOUNT_KIND_QUOTE "quote"
#define TUBA_INSTANCE_ACCOUNT_KIND_QUOTE_UPDATE "quoted_update"
#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_DIALOGS_TYPE_PREFERENCES (tuba_dialogs_preferences_get_type ())
#define TUBA_DIALOGS_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_PREFERENCES, TubaDialogsPreferences))
#define TUBA_DIALOGS_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_PREFERENCES, TubaDialogsPreferencesClass))
#define TUBA_DIALOGS_IS_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_PREFERENCES))
#define TUBA_DIALOGS_IS_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_PREFERENCES))
#define TUBA_DIALOGS_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_PREFERENCES, TubaDialogsPreferencesClass))

typedef struct _TubaDialogsPreferences TubaDialogsPreferences;
typedef struct _TubaDialogsPreferencesClass TubaDialogsPreferencesClass;
typedef struct _TubaDialogsPreferencesPrivate TubaDialogsPreferencesPrivate;

#define TUBA_DIALOGS_PREFERENCES_TYPE_NOTIFICATION_TYPE_MUTE (tuba_dialogs_preferences_notification_type_mute_get_type ())
typedef struct _TubaDialogsPreferencesNotificationTypeMute TubaDialogsPreferencesNotificationTypeMute;
enum  {
	TUBA_DIALOGS_PREFERENCES_0_PROPERTY,
	TUBA_DIALOGS_PREFERENCES_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_preferences_properties[TUBA_DIALOGS_PREFERENCES_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

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

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

#define TUBA_REQUEST_V2_TYPE_METHOD (tuba_request_v2_method_get_type ())

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

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

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

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

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

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

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

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

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

#define TUBA_API_FILTERS_TYPE_FILTER (tuba_api_filters_filter_get_type ())
#define TUBA_API_FILTERS_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_FILTERS_TYPE_FILTER, TubaAPIFiltersFilter))
#define TUBA_API_FILTERS_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_FILTERS_TYPE_FILTER, TubaAPIFiltersFilterClass))
#define TUBA_API_FILTERS_IS_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_FILTERS_TYPE_FILTER))
#define TUBA_API_FILTERS_IS_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_FILTERS_TYPE_FILTER))
#define TUBA_API_FILTERS_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_FILTERS_TYPE_FILTER, TubaAPIFiltersFilterClass))

typedef struct _TubaAPIFiltersFilter TubaAPIFiltersFilter;
typedef struct _TubaAPIFiltersFilterClass TubaAPIFiltersFilterClass;

#define TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW (tuba_dialogs_preferences_filter_row_get_type ())
#define TUBA_DIALOGS_PREFERENCES_FILTER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW, TubaDialogsPreferencesFilterRow))
#define TUBA_DIALOGS_PREFERENCES_FILTER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW, TubaDialogsPreferencesFilterRowClass))
#define TUBA_DIALOGS_PREFERENCES_IS_FILTER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW))
#define TUBA_DIALOGS_PREFERENCES_IS_FILTER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW))
#define TUBA_DIALOGS_PREFERENCES_FILTER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW, TubaDialogsPreferencesFilterRowClass))

typedef struct _TubaDialogsPreferencesFilterRow TubaDialogsPreferencesFilterRow;
typedef struct _TubaDialogsPreferencesFilterRowClass TubaDialogsPreferencesFilterRowClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaDialogsPreferencesSetupFiltersData TubaDialogsPreferencesSetupFiltersData;

#define TUBA_DIALOGS_TYPE_FILTER_EDIT (tuba_dialogs_filter_edit_get_type ())
#define TUBA_DIALOGS_FILTER_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_FILTER_EDIT, TubaDialogsFilterEdit))
#define TUBA_DIALOGS_FILTER_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_FILTER_EDIT, TubaDialogsFilterEditClass))
#define TUBA_DIALOGS_IS_FILTER_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_FILTER_EDIT))
#define TUBA_DIALOGS_IS_FILTER_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_FILTER_EDIT))
#define TUBA_DIALOGS_FILTER_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_FILTER_EDIT, TubaDialogsFilterEditClass))

typedef struct _TubaDialogsFilterEdit TubaDialogsFilterEdit;
typedef struct _TubaDialogsFilterEditClass TubaDialogsFilterEditClass;

#define TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY (tuba_instance_account_visibility_get_type ())
#define TUBA_INSTANCE_ACCOUNT_VISIBILITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibility))
#define TUBA_INSTANCE_ACCOUNT_VISIBILITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibilityClass))
#define TUBA_INSTANCE_ACCOUNT_IS_VISIBILITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY))
#define TUBA_INSTANCE_ACCOUNT_IS_VISIBILITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY))
#define TUBA_INSTANCE_ACCOUNT_VISIBILITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibilityClass))

typedef struct _TubaInstanceAccountVisibility TubaInstanceAccountVisibility;
typedef struct _TubaInstanceAccountVisibilityClass TubaInstanceAccountVisibilityClass;

#define TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY (tuba_dialogs_preferences_quotation_policy_get_type ())
#define TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicy))
#define TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicyClass))
#define TUBA_DIALOGS_PREFERENCES_IS_QUOTATION_POLICY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY))
#define TUBA_DIALOGS_PREFERENCES_IS_QUOTATION_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY))
#define TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicyClass))

typedef struct _TubaDialogsPreferencesQuotationPolicy TubaDialogsPreferencesQuotationPolicy;
typedef struct _TubaDialogsPreferencesQuotationPolicyClass TubaDialogsPreferencesQuotationPolicyClass;
typedef enum  {
	TUBA_API_STATUS_QUOTE_POLICY_PUBLIC,
	TUBA_API_STATUS_QUOTE_POLICY_FOLLOWERS,
	TUBA_API_STATUS_QUOTE_POLICY_NOBODY
} TubaAPIStatusQuotePolicy;

#define TUBA_API_STATUS_TYPE_QUOTE_POLICY (tuba_api_status_quote_policy_get_type ())

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

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

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

typedef struct _TubaStreamable TubaStreamable;
typedef struct _TubaStreamableIface TubaStreamableIface;
typedef struct _TubaInstanceAccountPrivate TubaInstanceAccountPrivate;

#define TUBA_INSTANCE_ACCOUNT_TYPE_KIND (tuba_instance_account_kind_get_type ())
typedef struct _TubaInstanceAccountKind TubaInstanceAccountKind;

#define TUBA_TYPE_PLACE (tuba_place_get_type ())
#define TUBA_PLACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_PLACE, TubaPlace))
#define TUBA_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_PLACE, TubaPlaceClass))
#define TUBA_IS_PLACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_PLACE))
#define TUBA_IS_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_PLACE))
#define TUBA_PLACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_PLACE, TubaPlaceClass))

typedef struct _TubaPlace TubaPlace;
typedef struct _TubaPlaceClass TubaPlaceClass;

#define TUBA_API_TYPE_NOTIFICATION (tuba_api_notification_get_type ())
#define TUBA_API_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotification))
#define TUBA_API_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))
#define TUBA_API_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))

typedef struct _TubaAPINotification TubaAPINotification;
typedef struct _TubaAPINotificationClass TubaAPINotificationClass;

#define TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE (tuba_instance_account_status_content_type_get_type ())
#define TUBA_INSTANCE_ACCOUNT_STATUS_CONTENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE, TubaInstanceAccountStatusContentType))
#define TUBA_INSTANCE_ACCOUNT_STATUS_CONTENT_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE, TubaInstanceAccountStatusContentTypeClass))
#define TUBA_INSTANCE_ACCOUNT_IS_STATUS_CONTENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE))
#define TUBA_INSTANCE_ACCOUNT_IS_STATUS_CONTENT_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE))
#define TUBA_INSTANCE_ACCOUNT_STATUS_CONTENT_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE, TubaInstanceAccountStatusContentTypeClass))

typedef struct _TubaInstanceAccountStatusContentType TubaInstanceAccountStatusContentType;
typedef struct _TubaInstanceAccountStatusContentTypeClass TubaInstanceAccountStatusContentTypeClass;

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

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

#define TUBA_API_TYPE_ACCOUNT_SOURCE (tuba_api_account_source_get_type ())
#define TUBA_API_ACCOUNT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT_SOURCE, TubaAPIAccountSource))
#define TUBA_API_ACCOUNT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT_SOURCE, TubaAPIAccountSourceClass))
#define TUBA_API_IS_ACCOUNT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT_SOURCE))
#define TUBA_API_IS_ACCOUNT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT_SOURCE))
#define TUBA_API_ACCOUNT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT_SOURCE, TubaAPIAccountSourceClass))

typedef struct _TubaAPIAccountSource TubaAPIAccountSource;
typedef struct _TubaAPIAccountSourceClass TubaAPIAccountSourceClass;
typedef struct _TubaDialogsPreferencesUpdateCredentialsLanguageRealData TubaDialogsPreferencesUpdateCredentialsLanguageRealData;
typedef struct _TubaDialogsPreferencesUpdateCredentialsPrivacyRealData TubaDialogsPreferencesUpdateCredentialsPrivacyRealData;

#define TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG (tuba_dialogs_preferences_analytics_dialog_get_type ())
#define TUBA_DIALOGS_PREFERENCES_ANALYTICS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG, TubaDialogsPreferencesAnalyticsDialog))
#define TUBA_DIALOGS_PREFERENCES_ANALYTICS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG, TubaDialogsPreferencesAnalyticsDialogClass))
#define TUBA_DIALOGS_PREFERENCES_IS_ANALYTICS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG))
#define TUBA_DIALOGS_PREFERENCES_IS_ANALYTICS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG))
#define TUBA_DIALOGS_PREFERENCES_ANALYTICS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG, TubaDialogsPreferencesAnalyticsDialogClass))

typedef struct _TubaDialogsPreferencesAnalyticsDialog TubaDialogsPreferencesAnalyticsDialog;
typedef struct _TubaDialogsPreferencesAnalyticsDialogClass TubaDialogsPreferencesAnalyticsDialogClass;
typedef struct _TubaDialogsPreferencesFilterRowPrivate TubaDialogsPreferencesFilterRowPrivate;
enum  {
	TUBA_DIALOGS_PREFERENCES_FILTER_ROW_0_PROPERTY,
	TUBA_DIALOGS_PREFERENCES_FILTER_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_preferences_filter_row_properties[TUBA_DIALOGS_PREFERENCES_FILTER_ROW_NUM_PROPERTIES];

#define TUBA_API_FILTERS_TYPE_FILTER_KEYWORD (tuba_api_filters_filter_keyword_get_type ())
#define TUBA_API_FILTERS_FILTER_KEYWORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_FILTERS_TYPE_FILTER_KEYWORD, TubaAPIFiltersFilterKeyword))
#define TUBA_API_FILTERS_FILTER_KEYWORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_FILTERS_TYPE_FILTER_KEYWORD, TubaAPIFiltersFilterKeywordClass))
#define TUBA_API_FILTERS_IS_FILTER_KEYWORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_FILTERS_TYPE_FILTER_KEYWORD))
#define TUBA_API_FILTERS_IS_FILTER_KEYWORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_FILTERS_TYPE_FILTER_KEYWORD))
#define TUBA_API_FILTERS_FILTER_KEYWORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_FILTERS_TYPE_FILTER_KEYWORD, TubaAPIFiltersFilterKeywordClass))

typedef struct _TubaAPIFiltersFilterKeyword TubaAPIFiltersFilterKeyword;
typedef struct _TubaAPIFiltersFilterKeywordClass TubaAPIFiltersFilterKeywordClass;
typedef enum  {
	TUBA_APPLICATION_QUESTION_ANSWER_YES,
	TUBA_APPLICATION_QUESTION_ANSWER_NO,
	TUBA_APPLICATION_QUESTION_ANSWER_CLOSE
} TubaApplicationQuestionAnswer;

#define TUBA_APPLICATION_TYPE_QUESTION_ANSWER (tuba_application_question_answer_get_type ())

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

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

#define TUBA_APPLICATION_TYPE_QUESTION_BUTTON (tuba_application_question_button_get_type ())
typedef struct _TubaApplicationQuestionButton TubaApplicationQuestionButton;
typedef struct _TubaDialogsPreferencesFilterRowOnDeleteRealData TubaDialogsPreferencesFilterRowOnDeleteRealData;
enum  {
	TUBA_DIALOGS_PREFERENCES_FILTER_ROW_FILTER_DELETED_SIGNAL,
	TUBA_DIALOGS_PREFERENCES_FILTER_ROW_NUM_SIGNALS
};
static guint tuba_dialogs_preferences_filter_row_signals[TUBA_DIALOGS_PREFERENCES_FILTER_ROW_NUM_SIGNALS] = {0};
typedef struct _TubaDialogsPreferencesQuotationPolicyPrivate TubaDialogsPreferencesQuotationPolicyPrivate;
enum  {
	TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_0_PROPERTY,
	TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_POLICY_PROPERTY,
	TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_TITLE_PROPERTY,
	TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_preferences_quotation_policy_properties[TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_NUM_PROPERTIES];
typedef struct _TubaDialogsPreferencesAnalyticsDialogPrivate TubaDialogsPreferencesAnalyticsDialogPrivate;
enum  {
	TUBA_DIALOGS_PREFERENCES_ANALYTICS_DIALOG_0_PROPERTY,
	TUBA_DIALOGS_PREFERENCES_ANALYTICS_DIALOG_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_preferences_analytics_dialog_properties[TUBA_DIALOGS_PREFERENCES_ANALYTICS_DIALOG_NUM_PROPERTIES];

#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;
#define _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))

#define TUBA_TYPE_COLOR_SCHEME_LIST_MODEL (tuba_color_scheme_list_model_get_type ())
#define TUBA_COLOR_SCHEME_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_COLOR_SCHEME_LIST_MODEL, TubaColorSchemeListModel))
#define TUBA_COLOR_SCHEME_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_COLOR_SCHEME_LIST_MODEL, TubaColorSchemeListModelClass))
#define TUBA_IS_COLOR_SCHEME_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_COLOR_SCHEME_LIST_MODEL))
#define TUBA_IS_COLOR_SCHEME_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_COLOR_SCHEME_LIST_MODEL))
#define TUBA_COLOR_SCHEME_LIST_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_COLOR_SCHEME_LIST_MODEL, TubaColorSchemeListModelClass))

typedef struct _TubaColorSchemeListModel TubaColorSchemeListModel;
typedef struct _TubaColorSchemeListModelClass TubaColorSchemeListModelClass;
typedef struct _TubaColorSchemeListModelPrivate TubaColorSchemeListModelPrivate;

#define TUBA_TYPE_COLOR_SCHEME_LIST_ITEM (tuba_color_scheme_list_item_get_type ())
#define TUBA_COLOR_SCHEME_LIST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, TubaColorSchemeListItem))
#define TUBA_COLOR_SCHEME_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, TubaColorSchemeListItemClass))
#define TUBA_IS_COLOR_SCHEME_LIST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_COLOR_SCHEME_LIST_ITEM))
#define TUBA_IS_COLOR_SCHEME_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_COLOR_SCHEME_LIST_ITEM))
#define TUBA_COLOR_SCHEME_LIST_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, TubaColorSchemeListItemClass))

typedef struct _TubaColorSchemeListItem TubaColorSchemeListItem;
typedef struct _TubaColorSchemeListItemClass TubaColorSchemeListItemClass;
enum  {
	TUBA_COLOR_SCHEME_LIST_MODEL_0_PROPERTY,
	TUBA_COLOR_SCHEME_LIST_MODEL_NUM_PROPERTIES
};
static GParamSpec* tuba_color_scheme_list_model_properties[TUBA_COLOR_SCHEME_LIST_MODEL_NUM_PROPERTIES];
typedef enum  {
	TUBA_COLOR_SCHEME_SYSTEM,
	TUBA_COLOR_SCHEME_LIGHT,
	TUBA_COLOR_SCHEME_DARK
} TubaColorScheme;

#define TUBA_TYPE_COLOR_SCHEME (tuba_color_scheme_get_type ())
typedef struct _TubaColorSchemeListItemPrivate TubaColorSchemeListItemPrivate;
enum  {
	TUBA_COLOR_SCHEME_LIST_ITEM_0_PROPERTY,
	TUBA_COLOR_SCHEME_LIST_ITEM_COLOR_SCHEME_PROPERTY,
	TUBA_COLOR_SCHEME_LIST_ITEM_NAME_PROPERTY,
	TUBA_COLOR_SCHEME_LIST_ITEM_ADWAITA_SCHEME_PROPERTY,
	TUBA_COLOR_SCHEME_LIST_ITEM_NUM_PROPERTIES
};
static GParamSpec* tuba_color_scheme_list_item_properties[TUBA_COLOR_SCHEME_LIST_ITEM_NUM_PROPERTIES];
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _TubaDialogsPreferences {
	AdwPreferencesDialog parent_instance;
	TubaDialogsPreferencesPrivate * priv;
};

struct _TubaDialogsPreferencesClass {
	AdwPreferencesDialogClass parent_class;
};

struct _TubaDialogsPreferencesNotificationTypeMute {
	AdwSwitchRow* switch_widget;
	gchar* event;
};

struct _TubaDialogsPreferencesPrivate {
	AdwComboRow* post_visibility_combo_row;
	AdwComboRow* default_language_combo_row;
	AdwComboRow* default_content_type_combo_row;
	AdwComboRow* default_quotation_policy_combo_row;
	AdwSwitchRow* work_in_background;
	AdwSwitchRow* live_updates;
	AdwSwitchRow* public_live_updates;
	AdwSwitchRow* show_spoilers;
	AdwSwitchRow* show_preview_cards;
	GtkAdjustment* font_adjustment;
	AdwSwitchRow* larger_line_height;
	AdwSwitchRow* scale_emoji_hover;
	AdwSwitchRow* strip_tracking;
	AdwSwitchRow* letterbox_media;
	AdwSwitchRow* enlarge_custom_emojis;
	AdwSwitchRow* show_sensitive_media;
	AdwSwitchRow* group_push_notifications;
	AdwSwitchRow* advanced_boost_dialog;
	AdwSwitchRow* darken_images_on_dark_mode;
	AdwSwitchRow* reply_to_old_post_reminder;
	AdwSwitchRow* boost_alt_text_reminder;
	AdwSwitchRow* fetch_remote_media_reminder;
	AdwSwitchRow* copy_private_link_reminder;
	AdwEntryRow* proxy_entry;
	AdwSwitchRow* dim_trivial_notifications;
	AdwSwitchRow* collapse_long_posts;
	AdwSwitchRow* in_app_browser_switch;
	AdwPreferencesGroup* up_group;
	AdwSwitchRow* new_followers_notifications_switch;
	AdwSwitchRow* new_follower_requests_notifications_switch;
	AdwSwitchRow* favorites_notifications_switch;
	AdwSwitchRow* mentions_notifications_switch;
	AdwSwitchRow* boosts_notifications_switch;
	AdwSwitchRow* poll_results_notifications_switch;
	AdwSwitchRow* edits_notifications_switch;
	AdwSwitchRow* quotes_notifications_switch;
	AdwSwitchRow* quote_edited_notifications_switch;
	GtkSwitch* analytics_switch;
	AdwSwitchRow* update_contributors;
	AdwPreferencesGroup* keywords_group;
	AdwButtonRow* filter_row;
	TubaDialogsPreferencesNotificationTypeMute* notification_type_mutes;
	gint notification_type_mutes_length1;
	gint _notification_type_mutes_size_;
	gboolean _lang_changed;
	gboolean _privacy_changed;
	gboolean _quote_policy_changed;
	gulong dlcr_id;
	guint font_timeout;
};

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 _TubaDialogsPreferencesSetupFiltersData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsPreferences* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	AdwButtonRow* _tmp2_;
	AdwButtonRow* _tmp3_;
	AdwPreferencesGroup* _tmp4_;
	AdwButtonRow* _tmp5_;
	TubaRequestV2* req;
	TubaAccountStore* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaRequestV2* _tmp10_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp11_;
	GInputStream* _tmp12_;
	JsonParser* parser;
	GInputStream* _tmp13_;
	JsonParser* _tmp14_;
	AdwPreferencesGroup* _tmp15_;
	AdwButtonRow* _tmp16_;
	JsonParser* _tmp17_;
	AdwPreferencesGroup* _tmp18_;
	AdwButtonRow* _tmp19_;
	GError* e;
	GError* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	GError* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	GError* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	GError* _inner_error0_;
};

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

struct _TubaUtilsLocalesClass {
	GObjectClass 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 _TubaAPISearchResultIface {
	GTypeInterface parent_iface;
	GRegex* (*get_tuba_search_query_regex) (TubaAPISearchResult* self);
	void (*set_tuba_search_query_regex) (TubaAPISearchResult* self, GRegex* value);
};

struct _TubaAPIAccount {
	TubaEntity parent_instance;
	TubaAPIAccountPrivate * priv;
};

struct _TubaAPIAccountClass {
	TubaEntityClass parent_class;
};

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

struct _TubaInstanceAccountKind {
	gchar* icon;
	gchar* description;
	gchar* url;
};

struct _TubaInstanceAccount {
	TubaAPIAccount parent_instance;
	TubaInstanceAccountPrivate * priv;
	GListStore* known_places;
	GListStore* list_places;
	GListStore* tags_places;
	GeeHashMap* type_overrides;
	GeeHashMap* visibility;
	GListStore* visibility_list;
	GListStore* supported_mime_types;
};

struct _TubaInstanceAccountClass {
	TubaAPIAccountClass parent_class;
	void (*describe_kind) (TubaInstanceAccount* self, const gchar* kind, TubaInstanceAccountKind* _result_, const gchar* actor_name, const gchar* callback_url, const gchar* other_data);
	void (*register_known_places) (TubaInstanceAccount* self, GListStore* places);
	void (*register_extra) (TubaInstanceAccount* self, GListStore* places, TubaPlace** extra, gint extra_length1);
	void (*bump_sidebar_items) (TubaInstanceAccount* self);
	void (*check_notifications) (TubaInstanceAccount* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*check_notifications_finish) (TubaInstanceAccount* self, GAsyncResult* _res_);
	gchar* (*get_stream_url) (TubaInstanceAccount* self);
	void (*on_notification_received) (TubaInstanceAccount* self, TubaAPINotification* entity);
	void (*open_status_url) (TubaInstanceAccount* self, const gchar* url);
	void (*answer_follow_request) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* fr_id, gboolean accept);
	void (*follow_back) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* acc_id);
	void (*reply_to_status_uri) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* uri);
	void (*remove_from_followers) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* acc_id);
	void (*activated) (TubaInstanceAccount* self);
	void (*deactivated) (TubaInstanceAccount* self);
	void (*added) (TubaInstanceAccount* self);
	void (*removed) (TubaInstanceAccount* self);
};

struct _TubaDialogsPreferencesUpdateCredentialsLanguageRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsPreferences* self;
	gchar* new_lang;
	TubaRequestV2* req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	TubaRequestV2* _tmp5_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp6_;
	GInputStream* _tmp7_;
	JsonParser* parser;
	GInputStream* _tmp8_;
	JsonParser* _tmp9_;
	JsonNode* node;
	TubaNetwork* _tmp10_;
	JsonParser* _tmp11_;
	JsonNode* _tmp12_;
	TubaAPIAccount* updated;
	JsonNode* _tmp13_;
	TubaAPIAccount* _tmp14_;
	TubaSettings* _tmp15_;
	TubaAPIAccount* _tmp16_;
	TubaAPIAccountSource* _tmp17_;
	TubaAPIAccountSource* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GError* e;
	GError* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	GError* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	TubaApplication* _tmp29_;
	GError* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	GError* _inner_error0_;
};

struct _TubaDialogsPreferencesUpdateCredentialsPrivacyRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsPreferences* self;
	gchar* new_priv;
	gchar* new_qpol;
	TubaRequestV2* req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	TubaRequestV2* _tmp5_;
	TubaRequestV2* _tmp6_;
	TubaRequestV2* _tmp7_;
	GInputStream* _tmp8_;
	GInputStream* _tmp9_;
	GError* e;
	GError* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GError* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	TubaApplication* _tmp18_;
	GError* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	GError* _inner_error0_;
};

struct _TubaDialogsPreferencesFilterRow {
	AdwExpanderRow parent_instance;
	TubaDialogsPreferencesFilterRowPrivate * priv;
};

struct _TubaDialogsPreferencesFilterRowClass {
	AdwExpanderRowClass parent_class;
};

struct _TubaDialogsPreferencesFilterRowPrivate {
	TubaAPIFiltersFilter* filter;
	TubaDialogsPreferences* win;
	GtkWidget** labels;
	gint labels_length1;
	gint _labels_size_;
};

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

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

struct _TubaApplicationQuestionButtons {
	TubaApplicationQuestionButton yes;
	TubaApplicationQuestionButton no;
};

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

struct _TubaDialogsPreferencesQuotationPolicy {
	GObject parent_instance;
	TubaDialogsPreferencesQuotationPolicyPrivate * priv;
};

struct _TubaDialogsPreferencesQuotationPolicyClass {
	GObjectClass parent_class;
};

struct _TubaDialogsPreferencesQuotationPolicyPrivate {
	TubaAPIStatusQuotePolicy _policy;
	gchar* _title;
};

struct _TubaDialogsPreferencesAnalyticsDialog {
	AdwDialog parent_instance;
	TubaDialogsPreferencesAnalyticsDialogPrivate * priv;
};

struct _TubaDialogsPreferencesAnalyticsDialogClass {
	AdwDialogClass parent_class;
};

struct _TubaDialogsPreferencesAnalyticsDialogPrivate {
	GtkSourceView* source_view;
};

struct _TubaColorSchemeListModel {
	GObject parent_instance;
	TubaColorSchemeListModelPrivate * priv;
};

struct _TubaColorSchemeListModelClass {
	GObjectClass parent_class;
};

struct _TubaColorSchemeListModelPrivate {
	GeeArrayList* array;
};

struct _TubaColorSchemeListItem {
	GObject parent_instance;
	TubaColorSchemeListItemPrivate * priv;
};

struct _TubaColorSchemeListItemClass {
	GObjectClass parent_class;
};

struct _TubaColorSchemeListItemPrivate {
	TubaColorScheme _color_scheme;
};

static gint TubaDialogsPreferences_private_offset;
static gpointer tuba_dialogs_preferences_parent_class = NULL;
VALA_EXTERN TubaSettings* tuba_settings;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaApplication* tuba_app;
VALA_EXTERN GEqualFunc tuba_utils_locales_locale_compare;
VALA_EXTERN GEqualFunc tuba_dialogs_preferences_quotation_policy_compare;
VALA_EXTERN GEqualFunc tuba_instance_account_status_content_type_compare;
VALA_EXTERN TubaNetwork* tuba_network;
static gint TubaDialogsPreferencesFilterRow_private_offset;
static gpointer tuba_dialogs_preferences_filter_row_parent_class = NULL;
static gint TubaDialogsPreferencesQuotationPolicy_private_offset;
static gpointer tuba_dialogs_preferences_quotation_policy_parent_class = NULL;
GEqualFunc tuba_dialogs_preferences_quotation_policy_compare = NULL;
static gint TubaDialogsPreferencesAnalyticsDialog_private_offset;
static gpointer tuba_dialogs_preferences_analytics_dialog_parent_class = NULL;
static gint TubaColorSchemeListModel_private_offset;
static gpointer tuba_color_scheme_list_model_parent_class = NULL;
static GListModelInterface * tuba_color_scheme_list_model_g_list_model_parent_iface = NULL;
static gint TubaColorSchemeListItem_private_offset;
static gpointer tuba_color_scheme_list_item_parent_class = NULL;

VALA_EXTERN GType tuba_dialogs_preferences_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsPreferences, g_object_unref)
static GType tuba_dialogs_preferences_notification_type_mute_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static TubaDialogsPreferencesNotificationTypeMute* tuba_dialogs_preferences_notification_type_mute_dup (const TubaDialogsPreferencesNotificationTypeMute* self);
static void tuba_dialogs_preferences_notification_type_mute_free (TubaDialogsPreferencesNotificationTypeMute* self);
static void tuba_dialogs_preferences_notification_type_mute_copy (const TubaDialogsPreferencesNotificationTypeMute* self,
                                                           TubaDialogsPreferencesNotificationTypeMute* dest);
static void tuba_dialogs_preferences_notification_type_mute_destroy (TubaDialogsPreferencesNotificationTypeMute* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaDialogsPreferencesNotificationTypeMute, tuba_dialogs_preferences_notification_type_mute_destroy)
static void _vala_TubaDialogsPreferencesNotificationTypeMute_array_free (TubaDialogsPreferencesNotificationTypeMute * array,
                                                                  gssize array_length);
static void tuba_dialogs_preferences_update_notification_mutes (TubaDialogsPreferences* self);
static void _vala_array_add34 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN void tuba_settings_set_muted_notification_types (TubaSettings* self,
                                                 gchar** value,
                                                 gint value_length1);
static void tuba_dialogs_preferences_update_notification_mutes_switches (TubaDialogsPreferences* self);
VALA_EXTERN gchar** tuba_settings_get_muted_notification_types (TubaSettings* self,
                                                    gint* result_length1);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static void tuba_dialogs_preferences_app_sent_toast (TubaDialogsPreferences* self,
                                              const gchar* content,
                                              guint timeout,
                                              const gchar* action_name,
                                              GVariant* action_target,
                                              const gchar* action_label);
static void tuba_dialogs_preferences_setup_filters_data_free (gpointer _data);
static void tuba_dialogs_preferences_setup_filters (TubaDialogsPreferences* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static void tuba_dialogs_preferences_setup_filters_finish (TubaDialogsPreferences* self,
                                                    GAsyncResult* _res_);
static gboolean tuba_dialogs_preferences_setup_filters_co (TubaDialogsPreferencesSetupFiltersData* _data_);
static void tuba_dialogs_preferences_add_keyword_row (TubaDialogsPreferences* self);
static void _tuba_dialogs_preferences_add_keyword_row_adw_button_row_activated (AdwButtonRow* _sender,
                                                                         gpointer self);
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_dialogs_preferences_setup_filters_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 ___lambda217_ (TubaDialogsPreferences* self,
                    JsonNode* node,
                    GError** error);
VALA_EXTERN GType tuba_api_filters_filter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIFiltersFilter, g_object_unref)
VALA_EXTERN TubaAPIFiltersFilter* tuba_api_filters_filter_from (JsonNode* node,
                                                    GError** error);
static GType tuba_dialogs_preferences_filter_row_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsPreferencesFilterRow, g_object_unref)
static TubaDialogsPreferencesFilterRow* tuba_dialogs_preferences_filter_row_new (TubaAPIFiltersFilter* filter,
                                                                          TubaDialogsPreferences* win);
static TubaDialogsPreferencesFilterRow* tuba_dialogs_preferences_filter_row_construct (GType object_type,
                                                                                TubaAPIFiltersFilter* filter,
                                                                                TubaDialogsPreferences* win);
static void tuba_dialogs_preferences_on_filter_delete (TubaDialogsPreferences* self,
                                                TubaDialogsPreferencesFilterRow* row);
static void _tuba_dialogs_preferences_on_filter_delete_tuba_dialogs_preferences_filter_row_filter_deleted (TubaDialogsPreferencesFilterRow* _sender,
                                                                                                    TubaDialogsPreferencesFilterRow* _self_,
                                                                                                    gpointer self);
static void ____lambda217__tuba_network_node_callback (JsonNode* node,
                                                gpointer self,
                                                GError** error);
VALA_EXTERN void tuba_dialogs_preferences_on_toast (TubaDialogsPreferences* self,
                                        const gchar* toast_content,
                                        gint dismiss_time);
static void tuba_dialogs_preferences_setup_notification_mutes (TubaDialogsPreferences* self);
static void tuba_dialogs_preferences_bind (TubaDialogsPreferences* self);
static void tuba_dialogs_preferences_on_post_visibility_changed (TubaDialogsPreferences* self);
static void _tuba_dialogs_preferences_on_post_visibility_changed_g_object_notify (GObject* _sender,
                                                                           GParamSpec* pspec,
                                                                           gpointer self);
static void tuba_dialogs_preferences_on_default_quotation_policy_changed (TubaDialogsPreferences* self);
static void _tuba_dialogs_preferences_on_default_quotation_policy_changed_g_object_notify (GObject* _sender,
                                                                                    GParamSpec* pspec,
                                                                                    gpointer self);
static void tuba_dialogs_preferences_dlcr_cb (TubaDialogsPreferences* self);
static void _tuba_dialogs_preferences_dlcr_cb_g_object_notify (GObject* _sender,
                                                        GParamSpec* pspec,
                                                        gpointer self);
static void tuba_dialogs_preferences_on_font_adjustment_value_changed (TubaDialogsPreferences* self,
                                                                GtkAdjustment* adj);
static gboolean tuba_dialogs_preferences_update_font_size (TubaDialogsPreferences* self);
static gboolean _tuba_dialogs_preferences_update_font_size_gsource_func (gpointer self);
static void _tuba_dialogs_preferences_on_font_adjustment_value_changed_gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                                                              gpointer self);
VALA_EXTERN void tuba_settings_set_status_font_size (TubaSettings* self,
                                         gdouble value);
static void tuba_dialogs_preferences_set_lang_changed (TubaDialogsPreferences* self,
                                                gboolean value);
VALA_EXTERN GType tuba_dialogs_filter_edit_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsFilterEdit, g_object_unref)
VALA_EXTERN TubaDialogsFilterEdit* tuba_dialogs_filter_edit_new (TubaAPIFiltersFilter* filter);
VALA_EXTERN TubaDialogsFilterEdit* tuba_dialogs_filter_edit_construct (GType object_type,
                                                           TubaAPIFiltersFilter* filter);
static void tuba_dialogs_preferences_on_filter_save (TubaDialogsPreferences* self,
                                              TubaAPIFiltersFilter* filter);
static void _tuba_dialogs_preferences_on_filter_save_tuba_dialogs_filter_edit_saved (TubaDialogsFilterEdit* _sender,
                                                                              TubaAPIFiltersFilter* filter,
                                                                              gpointer self);
static void _tuba_dialogs_preferences_on_toast_tuba_dialogs_filter_edit_toast (TubaDialogsFilterEdit* _sender,
                                                                        const gchar* toast_content,
                                                                        gint dismiss_time,
                                                                        gpointer self);
VALA_EXTERN GType tuba_instance_account_visibility_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccountVisibility, g_object_unref)
VALA_EXTERN const gchar* tuba_instance_account_visibility_get_id (TubaInstanceAccountVisibility* self);
VALA_EXTERN void tuba_settings_set_default_post_visibility (TubaSettings* self,
                                                const gchar* value);
static void tuba_dialogs_preferences_set_privacy_changed (TubaDialogsPreferences* self,
                                                   gboolean value);
VALA_EXTERN GType tuba_dialogs_preferences_quotation_policy_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsPreferencesQuotationPolicy, g_object_unref)
VALA_EXTERN GType tuba_api_status_quote_policy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaAPIStatusQuotePolicy tuba_dialogs_preferences_quotation_policy_get_policy (TubaDialogsPreferencesQuotationPolicy* self);
VALA_EXTERN gchar* tuba_api_status_quote_policy_to_string (TubaAPIStatusQuotePolicy self);
VALA_EXTERN void tuba_settings_set_default_quote_policy (TubaSettings* self,
                                             const gchar* value);
static void tuba_dialogs_preferences_set_quote_policy_changed (TubaDialogsPreferences* self,
                                                        gboolean value);
static void tuba_dialogs_preferences_setup_languages_combo_row (TubaDialogsPreferences* 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_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 const gchar* tuba_settings_get_default_language (TubaSettings* 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 tuba_dialogs_preferences_setup_quote_policy_combo_row (TubaDialogsPreferences* self);
VALA_EXTERN TubaDialogsPreferencesQuotationPolicy* tuba_dialogs_preferences_quotation_policy_new_from_policy (TubaAPIStatusQuotePolicy policy);
VALA_EXTERN TubaDialogsPreferencesQuotationPolicy* tuba_dialogs_preferences_quotation_policy_construct_from_policy (GType object_type,
                                                                                                        TubaAPIStatusQuotePolicy policy);
VALA_EXTERN const gchar* tuba_settings_get_default_quote_policy (TubaSettings* self);
VALA_EXTERN TubaDialogsPreferencesQuotationPolicy* tuba_dialogs_preferences_quotation_policy_new (const gchar* policy_name);
VALA_EXTERN TubaDialogsPreferencesQuotationPolicy* tuba_dialogs_preferences_quotation_policy_construct (GType object_type,
                                                                                            const gchar* policy_name);
static void tuba_dialogs_preferences_setup_content_type_combo_row (TubaDialogsPreferences* self);
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN GType tuba_api_search_result_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPISearchResult, g_object_unref)
VALA_EXTERN GType tuba_streamable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaStreamable, g_object_unref)
VALA_EXTERN GType tuba_instance_account_kind_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccountKind* tuba_instance_account_kind_dup (const TubaInstanceAccountKind* self);
VALA_EXTERN void tuba_instance_account_kind_free (TubaInstanceAccountKind* self);
VALA_EXTERN void tuba_instance_account_kind_copy (const TubaInstanceAccountKind* self,
                                      TubaInstanceAccountKind* dest);
VALA_EXTERN void tuba_instance_account_kind_destroy (TubaInstanceAccountKind* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaInstanceAccountKind, tuba_instance_account_kind_destroy)
VALA_EXTERN GType tuba_place_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaPlace, g_object_unref)
VALA_EXTERN GType tuba_api_notification_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINotification, g_object_unref)
VALA_EXTERN const gchar* tuba_settings_get_default_content_type (TubaSettings* self);
VALA_EXTERN TubaInstanceAccountStatusContentType* tuba_instance_account_status_content_type_new (const gchar* content_type);
VALA_EXTERN TubaInstanceAccountStatusContentType* tuba_instance_account_status_content_type_construct (GType object_type,
                                                                                           const gchar* content_type);
VALA_EXTERN GType tuba_instance_account_status_content_type_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccountStatusContentType, g_object_unref)
static void tuba_dialogs_preferences_update_credentials_language_real_data_free (gpointer _data);
static void tuba_dialogs_preferences_update_credentials_language_real (TubaDialogsPreferences* self,
                                                                const gchar* new_lang,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_);
static void tuba_dialogs_preferences_update_credentials_language_real_finish (TubaDialogsPreferences* self,
                                                                       GAsyncResult* _res_);
static gboolean tuba_dialogs_preferences_update_credentials_language_real_co (TubaDialogsPreferencesUpdateCredentialsLanguageRealData* _data_);
VALA_EXTERN void tuba_request_v2_add_form_data (TubaRequestV2* self,
                                    const gchar* name,
                                    const gchar* val);
static void tuba_dialogs_preferences_update_credentials_language_real_ready (GObject* source_object,
                                                                      GAsyncResult* _res_,
                                                                      gpointer _user_data_);
VALA_EXTERN GType tuba_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaNetwork, g_object_unref)
VALA_EXTERN JsonNode* tuba_network_parse_node (TubaNetwork* self,
                                   JsonParser* parser);
VALA_EXTERN TubaAPIAccount* tuba_api_account_from (JsonNode* node,
                                       GError** error);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN GType tuba_api_account_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccountSource, g_object_unref)
VALA_EXTERN TubaAPIAccountSource* tuba_api_account_get_source (TubaAPIAccount* self);
VALA_EXTERN const gchar* tuba_api_account_source_get_language (TubaAPIAccountSource* self);
VALA_EXTERN void tuba_settings_set_default_language (TubaSettings* self,
                                         const gchar* value);
static void tuba_dialogs_preferences_update_credentials_privacy_real_data_free (gpointer _data);
static void tuba_dialogs_preferences_update_credentials_privacy_real (TubaDialogsPreferences* self,
                                                               const gchar* new_priv,
                                                               const gchar* new_qpol,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_);
static void tuba_dialogs_preferences_update_credentials_privacy_real_finish (TubaDialogsPreferences* self,
                                                                      GAsyncResult* _res_);
static gboolean tuba_dialogs_preferences_update_credentials_privacy_real_co (TubaDialogsPreferencesUpdateCredentialsPrivacyRealData* _data_);
static void tuba_dialogs_preferences_update_credentials_privacy_real_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_);
static void tuba_dialogs_preferences_on_window_closed (TubaDialogsPreferences* self);
static gboolean tuba_dialogs_preferences_get_lang_changed (TubaDialogsPreferences* self);
VALA_EXTERN const gchar* tuba_utils_locales_locale_get_locale (TubaUtilsLocalesLocale* self);
static gboolean tuba_dialogs_preferences_get_privacy_changed (TubaDialogsPreferences* self);
VALA_EXTERN const gchar* tuba_settings_get_default_post_visibility (TubaSettings* self);
static gboolean tuba_dialogs_preferences_get_quote_policy_changed (TubaDialogsPreferences* self);
VALA_EXTERN const gchar* tuba_instance_account_status_content_type_get_mime (TubaInstanceAccountStatusContentType* self);
VALA_EXTERN void tuba_settings_set_default_content_type (TubaSettings* self,
                                             const gchar* value);
VALA_EXTERN void tuba_settings_set_proxy (TubaSettings* self,
                              const gchar* value);
VALA_EXTERN const gchar* tuba_settings_get_proxy (TubaSettings* self);
VALA_EXTERN gboolean tuba_settings_get_analytics (TubaSettings* self);
VALA_EXTERN void tuba_application_update_analytics (TubaApplication* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN void tuba_application_update_analytics_finish (TubaApplication* self,
                                               GAsyncResult* _res_);
VALA_EXTERN void tuba_application_update_contributors (TubaApplication* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void tuba_application_update_contributors_finish (TubaApplication* self,
                                                  GAsyncResult* _res_);
VALA_EXTERN void tuba_dialogs_preferences_on_analytics_preview (TubaDialogsPreferences* self);
VALA_EXTERN TubaDialogsPreferencesAnalyticsDialog* tuba_dialogs_preferences_analytics_dialog_new (void);
VALA_EXTERN TubaDialogsPreferencesAnalyticsDialog* tuba_dialogs_preferences_analytics_dialog_construct (GType object_type);
VALA_EXTERN GType tuba_dialogs_preferences_analytics_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsPreferencesAnalyticsDialog, g_object_unref)
static void _tuba_dialogs_preferences_on_analytics_preview_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self);
VALA_EXTERN TubaDialogsPreferences* tuba_dialogs_preferences_new (void);
VALA_EXTERN TubaDialogsPreferences* tuba_dialogs_preferences_construct (GType object_type);
static void tuba_dialogs_preferences_filter_row_on_delete (TubaDialogsPreferencesFilterRow* self);
static void _tuba_dialogs_preferences_filter_row_on_delete_gtk_button_clicked (GtkButton* _sender,
                                                                        gpointer self);
static void tuba_dialogs_preferences_filter_row_on_edit (TubaDialogsPreferencesFilterRow* self);
static void _tuba_dialogs_preferences_filter_row_on_edit_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self);
static void tuba_dialogs_preferences_filter_row_populate_from_filter (TubaDialogsPreferencesFilterRow* self);
VALA_EXTERN const gchar* tuba_api_filters_filter_get_title (TubaAPIFiltersFilter* self);
VALA_EXTERN GType tuba_api_filters_filter_keyword_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIFiltersFilterKeyword, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_filters_filter_get_keywords (TubaAPIFiltersFilter* self);
static gboolean __lambda216_ (TubaDialogsPreferencesFilterRow* self,
                       TubaAPIFiltersFilterKeyword* e);
VALA_EXTERN const gchar* tuba_api_filters_filter_keyword_get_keyword (TubaAPIFiltersFilterKeyword* self);
static void _vala_array_add35 (GtkWidget** * array,
                        gint* length,
                        gint* size,
                        GtkWidget* value);
static gboolean ___lambda216__gee_forall_func (gpointer g,
                                        gpointer self);
static void tuba_dialogs_preferences_filter_row_on_save (TubaDialogsPreferencesFilterRow* self,
                                                  TubaAPIFiltersFilter* filter);
static void _tuba_dialogs_preferences_filter_row_on_save_tuba_dialogs_filter_edit_saved (TubaDialogsFilterEdit* _sender,
                                                                                  TubaAPIFiltersFilter* filter,
                                                                                  gpointer self);
static void tuba_dialogs_preferences_filter_row_on_delete_real (TubaDialogsPreferencesFilterRow* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static void tuba_dialogs_preferences_filter_row_on_delete_real_finish (TubaDialogsPreferencesFilterRow* self,
                                                                GAsyncResult* _res_);
static void tuba_dialogs_preferences_filter_row_on_delete_real_data_free (gpointer _data);
static gboolean tuba_dialogs_preferences_filter_row_on_delete_real_co (TubaDialogsPreferencesFilterRowOnDeleteRealData* _data_);
VALA_EXTERN GType tuba_application_question_answer_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_text_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionText* tuba_application_question_text_dup (const TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_free (TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_copy (const TubaApplicationQuestionText* self,
                                          TubaApplicationQuestionText* dest);
VALA_EXTERN void tuba_application_question_text_destroy (TubaApplicationQuestionText* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionText, tuba_application_question_text_destroy)
VALA_EXTERN GType tuba_application_question_buttons_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_button_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionButton* tuba_application_question_button_dup (const TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_free (TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_copy (const TubaApplicationQuestionButton* self,
                                            TubaApplicationQuestionButton* dest);
VALA_EXTERN void tuba_application_question_button_destroy (TubaApplicationQuestionButton* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButton, tuba_application_question_button_destroy)
VALA_EXTERN TubaApplicationQuestionButtons* tuba_application_question_buttons_dup (const TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_free (TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_copy (const TubaApplicationQuestionButtons* self,
                                             TubaApplicationQuestionButtons* dest);
VALA_EXTERN void tuba_application_question_buttons_destroy (TubaApplicationQuestionButtons* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButtons, tuba_application_question_buttons_destroy)
VALA_EXTERN void tuba_application_question (TubaApplication* self,
                                TubaApplicationQuestionText* title,
                                TubaApplicationQuestionText* msg,
                                GtkWidget* win,
                                TubaApplicationQuestionButtons* buttons,
                                GtkWidget* child,
                                gboolean skip,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN TubaApplicationQuestionAnswer tuba_application_question_finish (TubaApplication* self,
                                                                GAsyncResult* _res_);
static void tuba_dialogs_preferences_filter_row_on_delete_real_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_);
VALA_EXTERN gboolean tuba_application_question_answer_truthy (TubaApplicationQuestionAnswer self);
VALA_EXTERN const gchar* tuba_api_filters_filter_get_id (TubaAPIFiltersFilter* self);
static void tuba_dialogs_preferences_filter_row_finalize (GObject * obj);
static GType tuba_dialogs_preferences_filter_row_get_type_once (void);
static gboolean _tuba_dialogs_preferences_quotation_policy_compare_lambda218_ (const gchar* a,
                                                                        const gchar* b);
static gboolean __tuba_dialogs_preferences_quotation_policy_compare_lambda218__gequal_func (gconstpointer a,
                                                                                     gconstpointer b);
VALA_EXTERN TubaAPIStatusQuotePolicy tuba_api_status_quote_policy_from_string (const gchar* policy);
VALA_EXTERN void tuba_dialogs_preferences_quotation_policy_set_policy (TubaDialogsPreferencesQuotationPolicy* self,
                                                           TubaAPIStatusQuotePolicy value);
VALA_EXTERN gchar* tuba_api_status_quote_policy_to_title (TubaAPIStatusQuotePolicy self);
VALA_EXTERN void tuba_dialogs_preferences_quotation_policy_set_title (TubaDialogsPreferencesQuotationPolicy* self,
                                                          const gchar* value);
VALA_EXTERN const gchar* tuba_dialogs_preferences_quotation_policy_get_title (TubaDialogsPreferencesQuotationPolicy* self);
static void tuba_dialogs_preferences_quotation_policy_finalize (GObject * obj);
static GType tuba_dialogs_preferences_quotation_policy_get_type_once (void);
static void _vala_tuba_dialogs_preferences_quotation_policy_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec);
static void _vala_tuba_dialogs_preferences_quotation_policy_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec);
VALA_EXTERN void tuba_dialogs_preferences_analytics_dialog_update_style_scheme (TubaDialogsPreferencesAnalyticsDialog* self);
static GObject * tuba_dialogs_preferences_analytics_dialog_constructor (GType type,
                                                                 guint n_construct_properties,
                                                                 GObjectConstructParam * construct_properties);
VALA_EXTERN gchar* tuba_application_generate_analytics_object (TubaApplication* self,
                                                   gboolean pretty);
static void _tuba_dialogs_preferences_analytics_dialog_update_style_scheme_g_object_notify (GObject* _sender,
                                                                                     GParamSpec* pspec,
                                                                                     gpointer self);
static void tuba_dialogs_preferences_analytics_dialog_finalize (GObject * obj);
static GType tuba_dialogs_preferences_analytics_dialog_get_type_once (void);
static GObject * tuba_dialogs_preferences_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties);
VALA_EXTERN gdouble tuba_settings_get_status_font_size (TubaSettings* self);
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 void _tuba_dialogs_preferences_on_window_closed_adw_dialog_closed (AdwDialog* _sender,
                                                                   gpointer self);
static void _tuba_dialogs_preferences_app_sent_toast_tuba_application_toast (TubaApplication* _sender,
                                                                      const gchar* title,
                                                                      guint timeout,
                                                                      const gchar* action_name,
                                                                      GVariant* action_target,
                                                                      const gchar* action_label,
                                                                      gpointer self);
VALA_EXTERN GType tuba_color_scheme_list_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaColorSchemeListModel, g_object_unref)
static void tuba_dialogs_preferences_finalize (GObject * obj);
static GType tuba_dialogs_preferences_get_type_once (void);
static void _vala_tuba_dialogs_preferences_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_tuba_dialogs_preferences_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);
VALA_EXTERN GType tuba_color_scheme_list_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaColorSchemeListItem, g_object_unref)
static GObject* tuba_color_scheme_list_model_real_get_item (GListModel* base,
                                                     guint position);
static GType tuba_color_scheme_list_model_real_get_item_type (GListModel* base);
static guint tuba_color_scheme_list_model_real_get_n_items (GListModel* base);
VALA_EXTERN GObject* tuba_color_scheme_list_model_get_object (TubaColorSchemeListModel* self,
                                                  guint position);
VALA_EXTERN TubaColorSchemeListModel* tuba_color_scheme_list_model_new (void);
VALA_EXTERN TubaColorSchemeListModel* tuba_color_scheme_list_model_construct (GType object_type);
static GObject * tuba_color_scheme_list_model_constructor (GType type,
                                                    guint n_construct_properties,
                                                    GObjectConstructParam * construct_properties);
VALA_EXTERN GType tuba_color_scheme_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaColorSchemeListItem* tuba_color_scheme_list_item_new (TubaColorScheme color_scheme);
VALA_EXTERN TubaColorSchemeListItem* tuba_color_scheme_list_item_construct (GType object_type,
                                                                TubaColorScheme color_scheme);
static void tuba_color_scheme_list_model_finalize (GObject * obj);
static GType tuba_color_scheme_list_model_get_type_once (void);
VALA_EXTERN TubaColorScheme tuba_color_scheme_list_item_get_color_scheme (TubaColorSchemeListItem* self);
static void tuba_color_scheme_list_item_set_color_scheme (TubaColorSchemeListItem* self,
                                                   TubaColorScheme value);
VALA_EXTERN gchar* tuba_color_scheme_list_item_get_name (TubaColorSchemeListItem* self);
VALA_EXTERN gchar* tuba_color_scheme_to_string (TubaColorScheme self);
VALA_EXTERN AdwColorScheme tuba_color_scheme_list_item_get_adwaita_scheme (TubaColorSchemeListItem* self);
VALA_EXTERN AdwColorScheme tuba_color_scheme_to_adwaita_scheme (TubaColorScheme self);
static void tuba_color_scheme_list_item_finalize (GObject * obj);
static GType tuba_color_scheme_list_item_get_type_once (void);
static void _vala_tuba_color_scheme_list_item_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_tuba_color_scheme_list_item_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
tuba_dialogs_preferences_get_instance_private (TubaDialogsPreferences* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsPreferences_private_offset);
}

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

static void
_vala_array_add34 (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_dialogs_preferences_update_notification_mutes (TubaDialogsPreferences* self)
{
	gchar** res = NULL;
	gchar** _tmp0_;
	gint res_length1;
	gint _res_size_;
	TubaDialogsPreferencesNotificationTypeMute* _tmp1_;
	gint _tmp1__length1;
	TubaSettings* _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	res = _tmp0_;
	res_length1 = 0;
	_res_size_ = res_length1;
	_tmp1_ = self->priv->notification_type_mutes;
	_tmp1__length1 = self->priv->notification_type_mutes_length1;
	{
		TubaDialogsPreferencesNotificationTypeMute* notification_type_mute_collection = NULL;
		gint notification_type_mute_collection_length1 = 0;
		gint _notification_type_mute_collection_size_ = 0;
		gint notification_type_mute_it = 0;
		notification_type_mute_collection = _tmp1_;
		notification_type_mute_collection_length1 = _tmp1__length1;
		for (notification_type_mute_it = 0; notification_type_mute_it < notification_type_mute_collection_length1; notification_type_mute_it = notification_type_mute_it + 1) {
			TubaDialogsPreferencesNotificationTypeMute _tmp2_;
			TubaDialogsPreferencesNotificationTypeMute _tmp3_ = {0};
			TubaDialogsPreferencesNotificationTypeMute notification_type_mute = {0};
			_tmp2_ = notification_type_mute_collection[notification_type_mute_it];
			tuba_dialogs_preferences_notification_type_mute_copy (&_tmp2_, &_tmp3_);
			notification_type_mute = _tmp3_;
			{
				TubaDialogsPreferencesNotificationTypeMute _tmp4_;
				AdwSwitchRow* _tmp5_;
				gboolean _tmp6_;
				gboolean _tmp7_;
				_tmp4_ = notification_type_mute;
				_tmp5_ = _tmp4_.switch_widget;
				_tmp6_ = adw_switch_row_get_active (_tmp5_);
				_tmp7_ = _tmp6_;
				if (!_tmp7_) {
					TubaDialogsPreferencesNotificationTypeMute _tmp8_;
					const gchar* _tmp9_;
					gchar* _tmp10_;
					_tmp8_ = notification_type_mute;
					_tmp9_ = _tmp8_.event;
					_tmp10_ = g_strdup (_tmp9_);
					_vala_array_add34 (&res, &res_length1, &_res_size_, _tmp10_);
				}
				tuba_dialogs_preferences_notification_type_mute_destroy (&notification_type_mute);
			}
		}
	}
	_tmp11_ = tuba_settings;
	_tmp12_ = res;
	_tmp12__length1 = res_length1;
	tuba_settings_set_muted_notification_types (_tmp11_, _tmp12_, _tmp12__length1);
	res = (_vala_array_free (res, res_length1, (GDestroyNotify) g_free), NULL);
}

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

static void
tuba_dialogs_preferences_update_notification_mutes_switches (TubaDialogsPreferences* self)
{
	TubaDialogsPreferencesNotificationTypeMute* _tmp0_;
	gint _tmp0__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->notification_type_mutes;
	_tmp0__length1 = self->priv->notification_type_mutes_length1;
	{
		TubaDialogsPreferencesNotificationTypeMute* notification_type_mute_collection = NULL;
		gint notification_type_mute_collection_length1 = 0;
		gint _notification_type_mute_collection_size_ = 0;
		gint notification_type_mute_it = 0;
		notification_type_mute_collection = _tmp0_;
		notification_type_mute_collection_length1 = _tmp0__length1;
		for (notification_type_mute_it = 0; notification_type_mute_it < notification_type_mute_collection_length1; notification_type_mute_it = notification_type_mute_it + 1) {
			TubaDialogsPreferencesNotificationTypeMute _tmp1_;
			TubaDialogsPreferencesNotificationTypeMute _tmp2_ = {0};
			TubaDialogsPreferencesNotificationTypeMute notification_type_mute = {0};
			_tmp1_ = notification_type_mute_collection[notification_type_mute_it];
			tuba_dialogs_preferences_notification_type_mute_copy (&_tmp1_, &_tmp2_);
			notification_type_mute = _tmp2_;
			{
				TubaDialogsPreferencesNotificationTypeMute _tmp3_;
				AdwSwitchRow* _tmp4_;
				TubaDialogsPreferencesNotificationTypeMute _tmp5_;
				const gchar* _tmp6_;
				TubaSettings* _tmp7_;
				gchar** _tmp8_;
				gint _tmp8__length1;
				gint _tmp9_ = 0;
				gchar** _tmp10_;
				gint _tmp10__length1;
				_tmp3_ = notification_type_mute;
				_tmp4_ = _tmp3_.switch_widget;
				_tmp5_ = notification_type_mute;
				_tmp6_ = _tmp5_.event;
				_tmp7_ = tuba_settings;
				_tmp8_ = tuba_settings_get_muted_notification_types (_tmp7_, &_tmp9_);
				_tmp8__length1 = _tmp9_;
				_tmp10_ = _tmp8_;
				_tmp10__length1 = _tmp8__length1;
				adw_switch_row_set_active (_tmp4_, !_vala_string_array_contains (_tmp10_, _tmp10__length1, _tmp6_));
				tuba_dialogs_preferences_notification_type_mute_destroy (&notification_type_mute);
			}
		}
	}
}

static gpointer
_g_variant_ref0 (gpointer self)
{
	return self ? g_variant_ref (self) : NULL;
}

static void
tuba_dialogs_preferences_app_sent_toast (TubaDialogsPreferences* self,
                                         const gchar* content,
                                         guint timeout,
                                         const gchar* action_name,
                                         GVariant* action_target,
                                         const gchar* action_label)
{
	gchar* _tmp0_;
	GVariant* _tmp1_;
	gchar* _tmp2_;
	AdwToast* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (content != NULL);
	_tmp0_ = g_strdup (action_name);
	_tmp1_ = _g_variant_ref0 (action_target);
	_tmp2_ = g_strdup (action_label);
	_tmp3_ = adw_toast_new (content);
	adw_toast_set_timeout (_tmp3_, timeout);
	adw_toast_set_action_name (_tmp3_, _tmp0_);
	_g_free0 (_tmp0_);
	g_object_set (_tmp3_, "action-target", _tmp1_, NULL);
	_g_variant_unref0 (_tmp1_);
	adw_toast_set_button_label (_tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	adw_preferences_dialog_add_toast ((AdwPreferencesDialog*) self, _tmp3_);
}

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

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

static void
tuba_dialogs_preferences_setup_filters (TubaDialogsPreferences* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	TubaDialogsPreferencesSetupFiltersData* _data_;
	TubaDialogsPreferences* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsPreferencesSetupFiltersData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_preferences_setup_filters_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_preferences_setup_filters_co (_data_);
}

static void
tuba_dialogs_preferences_setup_filters_finish (TubaDialogsPreferences* self,
                                               GAsyncResult* _res_)
{
	TubaDialogsPreferencesSetupFiltersData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
_tuba_dialogs_preferences_add_keyword_row_adw_button_row_activated (AdwButtonRow* _sender,
                                                                    gpointer self)
{
	tuba_dialogs_preferences_add_keyword_row ((TubaDialogsPreferences*) self);
}

static void
tuba_dialogs_preferences_setup_filters_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	TubaDialogsPreferencesSetupFiltersData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_preferences_setup_filters_co (_data_);
}

static void
_tuba_dialogs_preferences_on_filter_delete_tuba_dialogs_preferences_filter_row_filter_deleted (TubaDialogsPreferencesFilterRow* _sender,
                                                                                               TubaDialogsPreferencesFilterRow* _self_,
                                                                                               gpointer self)
{
	tuba_dialogs_preferences_on_filter_delete ((TubaDialogsPreferences*) self, _self_);
}

static void
___lambda217_ (TubaDialogsPreferences* self,
               JsonNode* node,
               GError** error)
{
	TubaAPIFiltersFilter* _tmp0_ = NULL;
	TubaAPIFiltersFilter* _tmp1_;
	TubaDialogsPreferencesFilterRow* row = NULL;
	TubaDialogsPreferencesFilterRow* _tmp2_;
	TubaDialogsPreferencesFilterRow* _tmp3_;
	AdwPreferencesGroup* _tmp4_;
	TubaDialogsPreferencesFilterRow* _tmp5_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (node != NULL);
	_tmp1_ = tuba_api_filters_filter_from (node, &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp2_ = tuba_dialogs_preferences_filter_row_new (_tmp0_, self);
	g_object_ref_sink (_tmp2_);
	row = _tmp2_;
	_tmp3_ = row;
	g_signal_connect_object (_tmp3_, "filter-deleted", (GCallback) _tuba_dialogs_preferences_on_filter_delete_tuba_dialogs_preferences_filter_row_filter_deleted, self, 0);
	_tmp4_ = self->priv->keywords_group;
	_tmp5_ = row;
	adw_preferences_group_add (_tmp4_, (GtkWidget*) _tmp5_);
	_g_object_unref0 (row);
	_g_object_unref0 (_tmp0_);
}

static void
____lambda217__tuba_network_node_callback (JsonNode* node,
                                           gpointer self,
                                           GError** error)
{
	___lambda217_ ((TubaDialogsPreferences*) self, node, error);
}

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

static gboolean
tuba_dialogs_preferences_setup_filters_co (TubaDialogsPreferencesSetupFiltersData* _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_ = g_strdup (_ ("Add Filter…"));
	_data_->_tmp1_ = g_strdup ("tuba-plus-large-symbolic");
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = (AdwButtonRow*) adw_button_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _data_->_tmp2_, _data_->_tmp0_);
	_g_free0 (_data_->_tmp0_);
	adw_button_row_set_start_icon_name (_data_->_tmp2_, _data_->_tmp1_);
	_g_free0 (_data_->_tmp1_);
	g_object_ref_sink (_data_->_tmp2_);
	_g_object_unref0 (_data_->self->priv->filter_row);
	_data_->self->priv->filter_row = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->self->priv->filter_row;
	g_signal_connect_object (_data_->_tmp3_, "activated", (GCallback) _tuba_dialogs_preferences_add_keyword_row_adw_button_row_activated, _data_->self, 0);
	_data_->_tmp4_ = _data_->self->priv->keywords_group;
	_data_->_tmp5_ = _data_->self->priv->filter_row;
	adw_preferences_group_add (_data_->_tmp4_, (GtkWidget*) _data_->_tmp5_);
	_data_->_tmp6_ = tuba_accounts;
	_data_->_tmp7_ = tuba_account_store_get_active (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = _g_object_ref0 (_data_->_tmp8_);
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = tuba_request_v2_new ("/api/v2/filters", TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp10_, _data_->_tmp9_);
	_g_object_unref0 (_data_->_tmp9_);
	_data_->req = _data_->_tmp10_;
	{
		_data_->_tmp11_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp11_, tuba_dialogs_preferences_setup_filters_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp12_ = tuba_request_v2_exec_finish (_data_->_tmp11_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp12_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp13_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp13_, NULL, tuba_dialogs_preferences_setup_filters_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp14_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp14_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp15_ = _data_->self->priv->keywords_group;
		_data_->_tmp16_ = _data_->self->priv->filter_row;
		adw_preferences_group_remove (_data_->_tmp15_, (GtkWidget*) _data_->_tmp16_);
		_data_->_tmp17_ = _data_->parser;
		tuba_network_parse_array (_data_->_tmp17_, ____lambda217__tuba_network_node_callback, g_object_ref (_data_->self), g_object_unref, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp18_ = _data_->self->priv->keywords_group;
		_data_->_tmp19_ = _data_->self->priv->filter_row;
		adw_preferences_group_add (_data_->_tmp18_, (GtkWidget*) _data_->_tmp19_);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp20_ = _data_->e;
		_data_->_tmp21_ = g_strdup_printf ("%i", _data_->_tmp20_->code);
		_data_->_tmp22_ = _data_->_tmp21_;
		_data_->_tmp23_ = _data_->e;
		_data_->_tmp24_ = _data_->_tmp23_->message;
		_data_->_tmp25_ = string_to_string (_data_->_tmp24_);
		_data_->_tmp26_ = g_strconcat ("Couldn't retrieve filters: ", _data_->_tmp22_, " ", _data_->_tmp25_, NULL);
		_data_->_tmp27_ = _data_->_tmp26_;
		g_warning ("Preferences.vala:369: %s", _data_->_tmp27_);
		_g_free0 (_data_->_tmp27_);
		_g_free0 (_data_->_tmp22_);
		_data_->_tmp28_ = _data_->e;
		_data_->_tmp29_ = _data_->_tmp28_->message;
		_data_->_tmp30_ = g_strdup_printf (_ ("Couldn't retrieve filters: %s"), _data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		tuba_dialogs_preferences_on_toast (_data_->self, _data_->_tmp31_, 5);
		_g_free0 (_data_->_tmp31_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_dialogs_preferences_on_filter_delete (TubaDialogsPreferences* self,
                                           TubaDialogsPreferencesFilterRow* row)
{
	AdwPreferencesGroup* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = self->priv->keywords_group;
	adw_preferences_group_remove (_tmp0_, (GtkWidget*) row);
}

static void
tuba_dialogs_preferences_setup_notification_mutes (TubaDialogsPreferences* self)
{
	AdwSwitchRow* _tmp0_;
	AdwSwitchRow* _tmp1_;
	gchar* _tmp2_;
	TubaDialogsPreferencesNotificationTypeMute _tmp3_ = {0};
	AdwSwitchRow* _tmp4_;
	AdwSwitchRow* _tmp5_;
	gchar* _tmp6_;
	TubaDialogsPreferencesNotificationTypeMute _tmp7_ = {0};
	AdwSwitchRow* _tmp8_;
	AdwSwitchRow* _tmp9_;
	gchar* _tmp10_;
	TubaDialogsPreferencesNotificationTypeMute _tmp11_ = {0};
	AdwSwitchRow* _tmp12_;
	AdwSwitchRow* _tmp13_;
	gchar* _tmp14_;
	TubaDialogsPreferencesNotificationTypeMute _tmp15_ = {0};
	AdwSwitchRow* _tmp16_;
	AdwSwitchRow* _tmp17_;
	gchar* _tmp18_;
	TubaDialogsPreferencesNotificationTypeMute _tmp19_ = {0};
	AdwSwitchRow* _tmp20_;
	AdwSwitchRow* _tmp21_;
	gchar* _tmp22_;
	TubaDialogsPreferencesNotificationTypeMute _tmp23_ = {0};
	AdwSwitchRow* _tmp24_;
	AdwSwitchRow* _tmp25_;
	gchar* _tmp26_;
	TubaDialogsPreferencesNotificationTypeMute _tmp27_ = {0};
	AdwSwitchRow* _tmp28_;
	AdwSwitchRow* _tmp29_;
	gchar* _tmp30_;
	TubaDialogsPreferencesNotificationTypeMute _tmp31_ = {0};
	AdwSwitchRow* _tmp32_;
	AdwSwitchRow* _tmp33_;
	gchar* _tmp34_;
	TubaDialogsPreferencesNotificationTypeMute _tmp35_ = {0};
	TubaDialogsPreferencesNotificationTypeMute* _tmp36_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->new_followers_notifications_switch;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_tmp2_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW);
	memset (&_tmp3_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp3_.switch_widget);
	_tmp3_.switch_widget = _tmp1_;
	_g_free0 (_tmp3_.event);
	_tmp3_.event = _tmp2_;
	_tmp4_ = self->priv->new_follower_requests_notifications_switch;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_tmp6_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_FOLLOW_REQUEST);
	memset (&_tmp7_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp7_.switch_widget);
	_tmp7_.switch_widget = _tmp5_;
	_g_free0 (_tmp7_.event);
	_tmp7_.event = _tmp6_;
	_tmp8_ = self->priv->favorites_notifications_switch;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	_tmp10_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_FAVOURITE);
	memset (&_tmp11_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp11_.switch_widget);
	_tmp11_.switch_widget = _tmp9_;
	_g_free0 (_tmp11_.event);
	_tmp11_.event = _tmp10_;
	_tmp12_ = self->priv->mentions_notifications_switch;
	_tmp13_ = _g_object_ref0 (_tmp12_);
	_tmp14_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_MENTION);
	memset (&_tmp15_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp15_.switch_widget);
	_tmp15_.switch_widget = _tmp13_;
	_g_free0 (_tmp15_.event);
	_tmp15_.event = _tmp14_;
	_tmp16_ = self->priv->boosts_notifications_switch;
	_tmp17_ = _g_object_ref0 (_tmp16_);
	_tmp18_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_REBLOG);
	memset (&_tmp19_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp19_.switch_widget);
	_tmp19_.switch_widget = _tmp17_;
	_g_free0 (_tmp19_.event);
	_tmp19_.event = _tmp18_;
	_tmp20_ = self->priv->poll_results_notifications_switch;
	_tmp21_ = _g_object_ref0 (_tmp20_);
	_tmp22_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_POLL);
	memset (&_tmp23_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp23_.switch_widget);
	_tmp23_.switch_widget = _tmp21_;
	_g_free0 (_tmp23_.event);
	_tmp23_.event = _tmp22_;
	_tmp24_ = self->priv->edits_notifications_switch;
	_tmp25_ = _g_object_ref0 (_tmp24_);
	_tmp26_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_EDITED);
	memset (&_tmp27_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp27_.switch_widget);
	_tmp27_.switch_widget = _tmp25_;
	_g_free0 (_tmp27_.event);
	_tmp27_.event = _tmp26_;
	_tmp28_ = self->priv->quotes_notifications_switch;
	_tmp29_ = _g_object_ref0 (_tmp28_);
	_tmp30_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_QUOTE);
	memset (&_tmp31_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp31_.switch_widget);
	_tmp31_.switch_widget = _tmp29_;
	_g_free0 (_tmp31_.event);
	_tmp31_.event = _tmp30_;
	_tmp32_ = self->priv->quote_edited_notifications_switch;
	_tmp33_ = _g_object_ref0 (_tmp32_);
	_tmp34_ = g_strdup (TUBA_INSTANCE_ACCOUNT_KIND_QUOTE_UPDATE);
	memset (&_tmp35_, 0, sizeof (TubaDialogsPreferencesNotificationTypeMute));
	_g_object_unref0 (_tmp35_.switch_widget);
	_tmp35_.switch_widget = _tmp33_;
	_g_free0 (_tmp35_.event);
	_tmp35_.event = _tmp34_;
	_tmp36_ = g_new0 (TubaDialogsPreferencesNotificationTypeMute, 9);
	_tmp36_[0] = _tmp3_;
	_tmp36_[1] = _tmp7_;
	_tmp36_[2] = _tmp11_;
	_tmp36_[3] = _tmp15_;
	_tmp36_[4] = _tmp19_;
	_tmp36_[5] = _tmp23_;
	_tmp36_[6] = _tmp27_;
	_tmp36_[7] = _tmp31_;
	_tmp36_[8] = _tmp35_;
	self->priv->notification_type_mutes = (_vala_TubaDialogsPreferencesNotificationTypeMute_array_free (self->priv->notification_type_mutes, self->priv->notification_type_mutes_length1), NULL);
	self->priv->notification_type_mutes = _tmp36_;
	self->priv->notification_type_mutes_length1 = 9;
	self->priv->_notification_type_mutes_size_ = self->priv->notification_type_mutes_length1;
	tuba_dialogs_preferences_update_notification_mutes_switches (self);
}

static void
_tuba_dialogs_preferences_on_post_visibility_changed_g_object_notify (GObject* _sender,
                                                                      GParamSpec* pspec,
                                                                      gpointer self)
{
	tuba_dialogs_preferences_on_post_visibility_changed ((TubaDialogsPreferences*) self);
}

static void
_tuba_dialogs_preferences_on_default_quotation_policy_changed_g_object_notify (GObject* _sender,
                                                                               GParamSpec* pspec,
                                                                               gpointer self)
{
	tuba_dialogs_preferences_on_default_quotation_policy_changed ((TubaDialogsPreferences*) self);
}

static void
_tuba_dialogs_preferences_dlcr_cb_g_object_notify (GObject* _sender,
                                                   GParamSpec* pspec,
                                                   gpointer self)
{
	tuba_dialogs_preferences_dlcr_cb ((TubaDialogsPreferences*) self);
}

static void
tuba_dialogs_preferences_bind (TubaDialogsPreferences* self)
{
	TubaSettings* _tmp0_;
	AdwSwitchRow* _tmp1_;
	TubaSettings* _tmp2_;
	AdwSwitchRow* _tmp3_;
	TubaSettings* _tmp4_;
	AdwSwitchRow* _tmp5_;
	TubaSettings* _tmp6_;
	AdwSwitchRow* _tmp7_;
	TubaSettings* _tmp8_;
	AdwSwitchRow* _tmp9_;
	TubaSettings* _tmp10_;
	AdwSwitchRow* _tmp11_;
	TubaSettings* _tmp12_;
	AdwSwitchRow* _tmp13_;
	TubaSettings* _tmp14_;
	AdwSwitchRow* _tmp15_;
	TubaSettings* _tmp16_;
	AdwSwitchRow* _tmp17_;
	TubaSettings* _tmp18_;
	AdwSwitchRow* _tmp19_;
	TubaSettings* _tmp20_;
	AdwSwitchRow* _tmp21_;
	TubaSettings* _tmp22_;
	AdwSwitchRow* _tmp23_;
	TubaSettings* _tmp24_;
	AdwSwitchRow* _tmp25_;
	TubaSettings* _tmp26_;
	AdwSwitchRow* _tmp27_;
	TubaSettings* _tmp28_;
	AdwSwitchRow* _tmp29_;
	TubaSettings* _tmp30_;
	AdwSwitchRow* _tmp31_;
	TubaSettings* _tmp32_;
	AdwSwitchRow* _tmp33_;
	TubaSettings* _tmp34_;
	AdwSwitchRow* _tmp35_;
	TubaSettings* _tmp36_;
	AdwSwitchRow* _tmp37_;
	TubaSettings* _tmp38_;
	GtkSwitch* _tmp39_;
	TubaSettings* _tmp40_;
	AdwSwitchRow* _tmp41_;
	TubaSettings* _tmp42_;
	AdwSwitchRow* _tmp43_;
	TubaSettings* _tmp44_;
	AdwSwitchRow* _tmp45_;
	AdwComboRow* _tmp46_;
	AdwComboRow* _tmp47_;
	AdwComboRow* _tmp48_;
	gulong _tmp49_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_settings;
	_tmp1_ = self->priv->work_in_background;
	g_settings_bind ((GSettings*) _tmp0_, "work-in-background", (GObject*) _tmp1_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp2_ = tuba_settings;
	_tmp3_ = self->priv->live_updates;
	g_settings_bind ((GSettings*) _tmp2_, "live-updates", (GObject*) _tmp3_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp4_ = tuba_settings;
	_tmp5_ = self->priv->public_live_updates;
	g_settings_bind ((GSettings*) _tmp4_, "public-live-updates", (GObject*) _tmp5_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp6_ = tuba_settings;
	_tmp7_ = self->priv->show_spoilers;
	g_settings_bind ((GSettings*) _tmp6_, "show-spoilers", (GObject*) _tmp7_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp8_ = tuba_settings;
	_tmp9_ = self->priv->show_preview_cards;
	g_settings_bind ((GSettings*) _tmp8_, "show-preview-cards", (GObject*) _tmp9_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp10_ = tuba_settings;
	_tmp11_ = self->priv->larger_line_height;
	g_settings_bind ((GSettings*) _tmp10_, "larger-line-height", (GObject*) _tmp11_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp12_ = tuba_settings;
	_tmp13_ = self->priv->scale_emoji_hover;
	g_settings_bind ((GSettings*) _tmp12_, "scale-emoji-hover", (GObject*) _tmp13_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp14_ = tuba_settings;
	_tmp15_ = self->priv->strip_tracking;
	g_settings_bind ((GSettings*) _tmp14_, "strip-tracking", (GObject*) _tmp15_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp16_ = tuba_settings;
	_tmp17_ = self->priv->letterbox_media;
	g_settings_bind ((GSettings*) _tmp16_, "letterbox-media", (GObject*) _tmp17_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp18_ = tuba_settings;
	_tmp19_ = self->priv->enlarge_custom_emojis;
	g_settings_bind ((GSettings*) _tmp18_, "enlarge-custom-emojis", (GObject*) _tmp19_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp20_ = tuba_settings;
	_tmp21_ = self->priv->show_sensitive_media;
	g_settings_bind ((GSettings*) _tmp20_, "show-sensitive-media", (GObject*) _tmp21_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp22_ = tuba_settings;
	_tmp23_ = self->priv->group_push_notifications;
	g_settings_bind ((GSettings*) _tmp22_, "group-push-notifications", (GObject*) _tmp23_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp24_ = tuba_settings;
	_tmp25_ = self->priv->advanced_boost_dialog;
	g_settings_bind ((GSettings*) _tmp24_, "advanced-boost-dialog", (GObject*) _tmp25_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp26_ = tuba_settings;
	_tmp27_ = self->priv->darken_images_on_dark_mode;
	g_settings_bind ((GSettings*) _tmp26_, "darken-images-on-dark-mode", (GObject*) _tmp27_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp28_ = tuba_settings;
	_tmp29_ = self->priv->reply_to_old_post_reminder;
	g_settings_bind ((GSettings*) _tmp28_, "reply-to-old-post-reminder", (GObject*) _tmp29_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp30_ = tuba_settings;
	_tmp31_ = self->priv->boost_alt_text_reminder;
	g_settings_bind ((GSettings*) _tmp30_, "boost-alt-text-reminder", (GObject*) _tmp31_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp32_ = tuba_settings;
	_tmp33_ = self->priv->fetch_remote_media_reminder;
	g_settings_bind ((GSettings*) _tmp32_, "fetch-remote-media-reminder", (GObject*) _tmp33_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp34_ = tuba_settings;
	_tmp35_ = self->priv->copy_private_link_reminder;
	g_settings_bind ((GSettings*) _tmp34_, "copy-private-link-reminder", (GObject*) _tmp35_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp36_ = tuba_settings;
	_tmp37_ = self->priv->dim_trivial_notifications;
	g_settings_bind ((GSettings*) _tmp36_, "dim-trivial-notifications", (GObject*) _tmp37_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp38_ = tuba_settings;
	_tmp39_ = self->priv->analytics_switch;
	g_settings_bind ((GSettings*) _tmp38_, "analytics", (GObject*) _tmp39_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp40_ = tuba_settings;
	_tmp41_ = self->priv->update_contributors;
	g_settings_bind ((GSettings*) _tmp40_, "update-contributors", (GObject*) _tmp41_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp42_ = tuba_settings;
	_tmp43_ = self->priv->collapse_long_posts;
	g_settings_bind ((GSettings*) _tmp42_, "collapse-long-posts", (GObject*) _tmp43_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp44_ = tuba_settings;
	_tmp45_ = self->priv->in_app_browser_switch;
	g_settings_bind ((GSettings*) _tmp44_, "use-in-app-browser-if-available", (GObject*) _tmp45_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp46_ = self->priv->post_visibility_combo_row;
	g_signal_connect_object ((GObject*) _tmp46_, "notify::selected-item", (GCallback) _tuba_dialogs_preferences_on_post_visibility_changed_g_object_notify, self, 0);
	_tmp47_ = self->priv->default_quotation_policy_combo_row;
	g_signal_connect_object ((GObject*) _tmp47_, "notify::selected-item", (GCallback) _tuba_dialogs_preferences_on_default_quotation_policy_changed_g_object_notify, self, 0);
	_tmp48_ = self->priv->default_language_combo_row;
	_tmp49_ = g_signal_connect_object ((GObject*) _tmp48_, "notify::selected-item", (GCallback) _tuba_dialogs_preferences_dlcr_cb_g_object_notify, self, 0);
	self->priv->dlcr_id = _tmp49_;
}

static gboolean
_tuba_dialogs_preferences_update_font_size_gsource_func (gpointer self)
{
	gboolean result;
	result = tuba_dialogs_preferences_update_font_size ((TubaDialogsPreferences*) self);
	return result;
}

static void
tuba_dialogs_preferences_on_font_adjustment_value_changed (TubaDialogsPreferences* self,
                                                           GtkAdjustment* adj)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (adj != NULL);
	if (self->priv->font_timeout > ((guint) 0)) {
		g_source_remove (self->priv->font_timeout);
		self->priv->font_timeout = (guint) 0;
	}
	self->priv->font_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, _tuba_dialogs_preferences_update_font_size_gsource_func, g_object_ref (self), g_object_unref);
}

static void
_tuba_dialogs_preferences_on_font_adjustment_value_changed_gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                                                         gpointer self)
{
	tuba_dialogs_preferences_on_font_adjustment_value_changed ((TubaDialogsPreferences*) self, _sender);
}

static gboolean
tuba_dialogs_preferences_update_font_size (TubaDialogsPreferences* self)
{
	TubaSettings* _tmp0_;
	GtkAdjustment* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = tuba_settings;
	_tmp1_ = self->priv->font_adjustment;
	_tmp2_ = gtk_adjustment_get_value (_tmp1_);
	_tmp3_ = _tmp2_;
	tuba_settings_set_status_font_size (_tmp0_, _tmp3_);
	self->priv->font_timeout = (guint) 0;
	result = G_SOURCE_REMOVE;
	return result;
}

static void
tuba_dialogs_preferences_dlcr_cb (TubaDialogsPreferences* self)
{
	AdwComboRow* _tmp0_;
	g_return_if_fail (self != NULL);
	tuba_dialogs_preferences_set_lang_changed (self, TRUE);
	_tmp0_ = self->priv->default_language_combo_row;
	g_signal_handler_disconnect ((GObject*) _tmp0_, self->priv->dlcr_id);
}

static void
_tuba_dialogs_preferences_on_filter_save_tuba_dialogs_filter_edit_saved (TubaDialogsFilterEdit* _sender,
                                                                         TubaAPIFiltersFilter* filter,
                                                                         gpointer self)
{
	tuba_dialogs_preferences_on_filter_save ((TubaDialogsPreferences*) self, filter);
}

static void
_tuba_dialogs_preferences_on_toast_tuba_dialogs_filter_edit_toast (TubaDialogsFilterEdit* _sender,
                                                                   const gchar* toast_content,
                                                                   gint dismiss_time,
                                                                   gpointer self)
{
	tuba_dialogs_preferences_on_toast ((TubaDialogsPreferences*) self, toast_content, dismiss_time);
}

static void
tuba_dialogs_preferences_add_keyword_row (TubaDialogsPreferences* self)
{
	TubaDialogsFilterEdit* dlg = NULL;
	TubaDialogsFilterEdit* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_dialogs_filter_edit_new (NULL);
	g_object_ref_sink (_tmp0_);
	dlg = _tmp0_;
	g_signal_connect_object (dlg, "saved", (GCallback) _tuba_dialogs_preferences_on_filter_save_tuba_dialogs_filter_edit_saved, self, 0);
	g_signal_connect_object (dlg, "toast", (GCallback) _tuba_dialogs_preferences_on_toast_tuba_dialogs_filter_edit_toast, self, 0);
	adw_preferences_dialog_push_subpage ((AdwPreferencesDialog*) self, (AdwNavigationPage*) dlg);
	_g_object_unref0 (dlg);
}

void
tuba_dialogs_preferences_on_toast (TubaDialogsPreferences* self,
                                   const gchar* toast_content,
                                   gint dismiss_time)
{
	AdwToast* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (toast_content != NULL);
	_tmp0_ = adw_toast_new (toast_content);
	adw_toast_set_timeout (_tmp0_, (guint) dismiss_time);
	adw_preferences_dialog_add_toast ((AdwPreferencesDialog*) self, _tmp0_);
}

static void
tuba_dialogs_preferences_on_filter_save (TubaDialogsPreferences* self,
                                         TubaAPIFiltersFilter* filter)
{
	TubaDialogsPreferencesFilterRow* row = NULL;
	TubaDialogsPreferencesFilterRow* _tmp0_;
	AdwPreferencesGroup* _tmp1_;
	AdwButtonRow* _tmp2_;
	AdwPreferencesGroup* _tmp3_;
	AdwPreferencesGroup* _tmp4_;
	AdwButtonRow* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (filter != NULL);
	_tmp0_ = tuba_dialogs_preferences_filter_row_new (filter, self);
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	g_signal_connect_object (row, "filter-deleted", (GCallback) _tuba_dialogs_preferences_on_filter_delete_tuba_dialogs_preferences_filter_row_filter_deleted, self, 0);
	_tmp1_ = self->priv->keywords_group;
	_tmp2_ = self->priv->filter_row;
	adw_preferences_group_remove (_tmp1_, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->keywords_group;
	adw_preferences_group_add (_tmp3_, (GtkWidget*) row);
	_tmp4_ = self->priv->keywords_group;
	_tmp5_ = self->priv->filter_row;
	adw_preferences_group_add (_tmp4_, (GtkWidget*) _tmp5_);
	_g_object_unref0 (row);
}

static void
tuba_dialogs_preferences_on_post_visibility_changed (TubaDialogsPreferences* self)
{
	TubaSettings* _tmp0_;
	AdwComboRow* _tmp1_;
	GObject* _tmp2_;
	GObject* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_settings;
	_tmp1_ = self->priv->post_visibility_combo_row;
	_tmp2_ = adw_combo_row_get_selected_item (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = tuba_instance_account_visibility_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibility));
	_tmp5_ = _tmp4_;
	tuba_settings_set_default_post_visibility (_tmp0_, (const gchar*) _tmp5_);
	tuba_dialogs_preferences_set_privacy_changed (self, TRUE);
}

static void
tuba_dialogs_preferences_on_default_quotation_policy_changed (TubaDialogsPreferences* self)
{
	TubaSettings* _tmp0_;
	AdwComboRow* _tmp1_;
	GObject* _tmp2_;
	GObject* _tmp3_;
	TubaAPIStatusQuotePolicy _tmp4_;
	TubaAPIStatusQuotePolicy _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_settings;
	_tmp1_ = self->priv->default_quotation_policy_combo_row;
	_tmp2_ = adw_combo_row_get_selected_item (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = tuba_dialogs_preferences_quotation_policy_get_policy (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicy));
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_api_status_quote_policy_to_string (_tmp5_);
	_tmp7_ = _tmp6_;
	tuba_settings_set_default_quote_policy (_tmp0_, _tmp7_);
	_g_free0 (_tmp7_);
	tuba_dialogs_preferences_set_quote_policy_changed (self, TRUE);
}

static void
tuba_dialogs_preferences_setup_languages_combo_row (TubaDialogsPreferences* self)
{
	AdwComboRow* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkBuilderListItemFactory* _tmp4_;
	GtkBuilderListItemFactory* _tmp5_;
	AdwComboRow* _tmp6_;
	TubaApplication* _tmp7_;
	TubaUtilsLocales* _tmp8_;
	TubaUtilsLocales* _tmp9_;
	GListStore* _tmp10_;
	const gchar* _tmp11_ = NULL;
	TubaSettings* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* default_language = NULL;
	gchar* _tmp18_;
	guint default_lang_index = 0U;
	TubaApplication* _tmp19_;
	TubaUtilsLocales* _tmp20_;
	TubaUtilsLocales* _tmp21_;
	GListStore* _tmp22_;
	const gchar* _tmp23_;
	TubaUtilsLocalesLocale* _tmp24_;
	TubaUtilsLocalesLocale* _tmp25_;
	GEqualFunc _tmp26_;
	guint _tmp27_ = 0U;
	gboolean _tmp28_;
	gboolean _tmp29_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->default_language_combo_row;
	_tmp1_ = string_to_string (BUILD_RESOURCES);
	_tmp2_ = g_strconcat (_tmp1_, "gtk/dropdown/language.ui", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp3_);
	_tmp5_ = _tmp4_;
	adw_combo_row_set_list_factory (_tmp0_, (GtkListItemFactory*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	_g_free0 (_tmp3_);
	_tmp6_ = self->priv->default_language_combo_row;
	_tmp7_ = tuba_app;
	_tmp8_ = tuba_application_get_app_locales (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp9_->list_store;
	adw_combo_row_set_model (_tmp6_, (GListModel*) _tmp10_);
	_tmp12_ = tuba_settings;
	_tmp13_ = tuba_settings_get_default_language (_tmp12_);
	_tmp14_ = _tmp13_;
	if (g_strcmp0 (_tmp14_, "") == 0) {
		_tmp11_ = "en";
	} else {
		TubaSettings* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		_tmp15_ = tuba_settings;
		_tmp16_ = tuba_settings_get_default_language (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp11_ = _tmp17_;
	}
	_tmp18_ = g_strdup (_tmp11_);
	default_language = _tmp18_;
	_tmp19_ = tuba_app;
	_tmp20_ = tuba_application_get_app_locales (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = _tmp21_->list_store;
	_tmp23_ = default_language;
	_tmp24_ = tuba_utils_locales_locale_new (_tmp23_, NULL, NULL);
	_tmp25_ = _tmp24_;
	_tmp26_ = tuba_utils_locales_locale_compare;
	_tmp28_ = g_list_store_find_with_equal_func (_tmp22_, (GObject*) _tmp25_, _tmp26_, &_tmp27_);
	default_lang_index = _tmp27_;
	_tmp29_ = _tmp28_;
	_g_object_unref0 (_tmp25_);
	if (_tmp29_) {
		AdwComboRow* _tmp30_;
		_tmp30_ = self->priv->default_language_combo_row;
		adw_combo_row_set_selected (_tmp30_, default_lang_index);
	}
	_g_free0 (default_language);
}

static void
tuba_dialogs_preferences_setup_quote_policy_combo_row (TubaDialogsPreferences* self)
{
	GListStore* supported_quotation_policies = NULL;
	GListStore* _tmp0_;
	GListStore* _tmp1_;
	TubaDialogsPreferencesQuotationPolicy* _tmp2_;
	TubaDialogsPreferencesQuotationPolicy* _tmp3_;
	GListStore* _tmp4_;
	TubaDialogsPreferencesQuotationPolicy* _tmp5_;
	TubaDialogsPreferencesQuotationPolicy* _tmp6_;
	GListStore* _tmp7_;
	TubaDialogsPreferencesQuotationPolicy* _tmp8_;
	TubaDialogsPreferencesQuotationPolicy* _tmp9_;
	AdwComboRow* _tmp10_;
	GListStore* _tmp11_;
	guint default_quote_policy_index = 0U;
	GListStore* _tmp12_;
	TubaSettings* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	TubaDialogsPreferencesQuotationPolicy* _tmp16_;
	TubaDialogsPreferencesQuotationPolicy* _tmp17_;
	GEqualFunc _tmp18_;
	guint _tmp19_ = 0U;
	gboolean _tmp20_;
	gboolean _tmp21_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_list_store_new (TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY);
	supported_quotation_policies = _tmp0_;
	_tmp1_ = supported_quotation_policies;
	_tmp2_ = tuba_dialogs_preferences_quotation_policy_new_from_policy (TUBA_API_STATUS_QUOTE_POLICY_PUBLIC);
	_tmp3_ = _tmp2_;
	g_list_store_append (_tmp1_, (GObject*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = supported_quotation_policies;
	_tmp5_ = tuba_dialogs_preferences_quotation_policy_new_from_policy (TUBA_API_STATUS_QUOTE_POLICY_FOLLOWERS);
	_tmp6_ = _tmp5_;
	g_list_store_append (_tmp4_, (GObject*) _tmp6_);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = supported_quotation_policies;
	_tmp8_ = tuba_dialogs_preferences_quotation_policy_new_from_policy (TUBA_API_STATUS_QUOTE_POLICY_NOBODY);
	_tmp9_ = _tmp8_;
	g_list_store_append (_tmp7_, (GObject*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = self->priv->default_quotation_policy_combo_row;
	_tmp11_ = supported_quotation_policies;
	adw_combo_row_set_model (_tmp10_, (GListModel*) _tmp11_);
	_tmp12_ = supported_quotation_policies;
	_tmp13_ = tuba_settings;
	_tmp14_ = tuba_settings_get_default_quote_policy (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = tuba_dialogs_preferences_quotation_policy_new (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = tuba_dialogs_preferences_quotation_policy_compare;
	_tmp20_ = g_list_store_find_with_equal_func (_tmp12_, (GObject*) _tmp17_, _tmp18_, &_tmp19_);
	default_quote_policy_index = _tmp19_;
	_tmp21_ = _tmp20_;
	_g_object_unref0 (_tmp17_);
	if (_tmp21_) {
		AdwComboRow* _tmp22_;
		_tmp22_ = self->priv->default_quotation_policy_combo_row;
		adw_combo_row_set_selected (_tmp22_, default_quote_policy_index);
	}
	_g_object_unref0 (supported_quotation_policies);
}

static void
tuba_dialogs_preferences_setup_content_type_combo_row (TubaDialogsPreferences* self)
{
	AdwComboRow* _tmp0_;
	TubaAccountStore* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	GListStore* _tmp4_;
	guint default_content_type_index = 0U;
	TubaAccountStore* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	GListStore* _tmp8_;
	TubaSettings* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	TubaInstanceAccountStatusContentType* _tmp12_;
	TubaInstanceAccountStatusContentType* _tmp13_;
	GEqualFunc _tmp14_;
	guint _tmp15_ = 0U;
	gboolean _tmp16_;
	gboolean _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->default_content_type_combo_row;
	_tmp1_ = tuba_accounts;
	_tmp2_ = tuba_account_store_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_->supported_mime_types;
	adw_combo_row_set_model (_tmp0_, (GListModel*) _tmp4_);
	_tmp5_ = tuba_accounts;
	_tmp6_ = tuba_account_store_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_->supported_mime_types;
	_tmp9_ = tuba_settings;
	_tmp10_ = tuba_settings_get_default_content_type (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = tuba_instance_account_status_content_type_new (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = tuba_instance_account_status_content_type_compare;
	_tmp16_ = g_list_store_find_with_equal_func (_tmp8_, (GObject*) _tmp13_, _tmp14_, &_tmp15_);
	default_content_type_index = _tmp15_;
	_tmp17_ = _tmp16_;
	_g_object_unref0 (_tmp13_);
	if (_tmp17_) {
		AdwComboRow* _tmp18_;
		_tmp18_ = self->priv->default_content_type_combo_row;
		adw_combo_row_set_selected (_tmp18_, default_content_type_index);
	}
}

static void
tuba_dialogs_preferences_update_credentials_language_real_data_free (gpointer _data)
{
	TubaDialogsPreferencesUpdateCredentialsLanguageRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->new_lang);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsPreferencesUpdateCredentialsLanguageRealData, _data_);
}

static void
tuba_dialogs_preferences_update_credentials_language_real (TubaDialogsPreferences* self,
                                                           const gchar* new_lang,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_)
{
	TubaDialogsPreferencesUpdateCredentialsLanguageRealData* _data_;
	TubaDialogsPreferences* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_lang != NULL);
	_data_ = g_slice_new0 (TubaDialogsPreferencesUpdateCredentialsLanguageRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_preferences_update_credentials_language_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (new_lang);
	_g_free0 (_data_->new_lang);
	_data_->new_lang = _tmp1_;
	tuba_dialogs_preferences_update_credentials_language_real_co (_data_);
}

static void
tuba_dialogs_preferences_update_credentials_language_real_finish (TubaDialogsPreferences* self,
                                                                  GAsyncResult* _res_)
{
	TubaDialogsPreferencesUpdateCredentialsLanguageRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_preferences_update_credentials_language_real_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_)
{
	TubaDialogsPreferencesUpdateCredentialsLanguageRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_preferences_update_credentials_language_real_co (_data_);
}

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

static gboolean
tuba_dialogs_preferences_update_credentials_language_real_co (TubaDialogsPreferencesUpdateCredentialsLanguageRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_accounts;
	_data_->_tmp1_ = tuba_account_store_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = tuba_request_v2_new ("/api/v1/accounts/update_credentials", TUBA_REQUEST_V2_METHOD_PATCH);
	tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->req;
	tuba_request_v2_add_form_data (_data_->_tmp5_, "source[language]", _data_->new_lang);
	{
		_data_->_tmp6_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp6_, tuba_dialogs_preferences_update_credentials_language_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp7_ = tuba_request_v2_exec_finish (_data_->_tmp6_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp7_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp8_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp8_, NULL, tuba_dialogs_preferences_update_credentials_language_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp9_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp9_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp10_ = tuba_network;
		_data_->_tmp11_ = _data_->parser;
		_data_->_tmp12_ = tuba_network_parse_node (_data_->_tmp10_, _data_->_tmp11_);
		_data_->node = _data_->_tmp12_;
		_data_->_tmp13_ = _data_->node;
		_data_->_tmp14_ = tuba_api_account_from (_data_->_tmp13_, &_data_->_inner_error0_);
		_data_->updated = _data_->_tmp14_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp15_ = tuba_settings;
		_data_->_tmp16_ = _data_->updated;
		_data_->_tmp17_ = tuba_api_account_get_source (_data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		_data_->_tmp19_ = tuba_api_account_source_get_language (_data_->_tmp18_);
		_data_->_tmp20_ = _data_->_tmp19_;
		tuba_settings_set_default_language (_data_->_tmp15_, _data_->_tmp20_);
		_g_object_unref0 (_data_->updated);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp21_ = _data_->e;
		_data_->_tmp22_ = g_strdup_printf ("%i", _data_->_tmp21_->code);
		_data_->_tmp23_ = _data_->_tmp22_;
		_data_->_tmp24_ = _data_->e;
		_data_->_tmp25_ = _data_->_tmp24_->message;
		_data_->_tmp26_ = string_to_string (_data_->_tmp25_);
		_data_->_tmp27_ = g_strconcat ("Couldn't update language: ", _data_->_tmp23_, " ", _data_->_tmp26_, NULL);
		_data_->_tmp28_ = _data_->_tmp27_;
		g_warning ("Preferences.vala:562: %s", _data_->_tmp28_);
		_g_free0 (_data_->_tmp28_);
		_g_free0 (_data_->_tmp23_);
		_data_->_tmp29_ = tuba_app;
		_data_->_tmp30_ = _data_->e;
		_data_->_tmp31_ = _data_->_tmp30_->message;
		_data_->_tmp32_ = g_strdup_printf (_ ("Couldn't update language: %s"), _data_->_tmp31_);
		_data_->_tmp33_ = _data_->_tmp32_;
		g_signal_emit_by_name (_data_->_tmp29_, "toast", _data_->_tmp33_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp33_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_dialogs_preferences_update_credentials_privacy_real_data_free (gpointer _data)
{
	TubaDialogsPreferencesUpdateCredentialsPrivacyRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->new_priv);
	_g_free0 (_data_->new_qpol);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsPreferencesUpdateCredentialsPrivacyRealData, _data_);
}

static void
tuba_dialogs_preferences_update_credentials_privacy_real (TubaDialogsPreferences* self,
                                                          const gchar* new_priv,
                                                          const gchar* new_qpol,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_)
{
	TubaDialogsPreferencesUpdateCredentialsPrivacyRealData* _data_;
	TubaDialogsPreferences* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_priv != NULL);
	_data_ = g_slice_new0 (TubaDialogsPreferencesUpdateCredentialsPrivacyRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_preferences_update_credentials_privacy_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (new_priv);
	_g_free0 (_data_->new_priv);
	_data_->new_priv = _tmp1_;
	_tmp2_ = g_strdup (new_qpol);
	_g_free0 (_data_->new_qpol);
	_data_->new_qpol = _tmp2_;
	tuba_dialogs_preferences_update_credentials_privacy_real_co (_data_);
}

static void
tuba_dialogs_preferences_update_credentials_privacy_real_finish (TubaDialogsPreferences* self,
                                                                 GAsyncResult* _res_)
{
	TubaDialogsPreferencesUpdateCredentialsPrivacyRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_preferences_update_credentials_privacy_real_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_)
{
	TubaDialogsPreferencesUpdateCredentialsPrivacyRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_preferences_update_credentials_privacy_real_co (_data_);
}

static gboolean
tuba_dialogs_preferences_update_credentials_privacy_real_co (TubaDialogsPreferencesUpdateCredentialsPrivacyRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_accounts;
	_data_->_tmp1_ = tuba_account_store_get_active (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = tuba_request_v2_new ("/api/v1/accounts/update_credentials", TUBA_REQUEST_V2_METHOD_PATCH);
	tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->req;
	tuba_request_v2_add_form_data (_data_->_tmp5_, "source[privacy]", _data_->new_priv);
	if (_data_->new_qpol != NULL) {
		_data_->_tmp6_ = _data_->req;
		tuba_request_v2_add_form_data (_data_->_tmp6_, "source[quote_policy]", _data_->new_qpol);
	}
	{
		_data_->_tmp7_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp7_, tuba_dialogs_preferences_update_credentials_privacy_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp8_ = tuba_request_v2_exec_finish (_data_->_tmp7_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp9_ = _data_->_tmp8_;
		_g_object_unref0 (_data_->_tmp9_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp10_ = _data_->e;
		_data_->_tmp11_ = g_strdup_printf ("%i", _data_->_tmp10_->code);
		_data_->_tmp12_ = _data_->_tmp11_;
		_data_->_tmp13_ = _data_->e;
		_data_->_tmp14_ = _data_->_tmp13_->message;
		_data_->_tmp15_ = string_to_string (_data_->_tmp14_);
		_data_->_tmp16_ = g_strconcat ("Couldn't update visibility: ", _data_->_tmp12_, " ", _data_->_tmp15_, NULL);
		_data_->_tmp17_ = _data_->_tmp16_;
		g_warning ("Preferences.vala:576: %s", _data_->_tmp17_);
		_g_free0 (_data_->_tmp17_);
		_g_free0 (_data_->_tmp12_);
		_data_->_tmp18_ = tuba_app;
		_data_->_tmp19_ = _data_->e;
		_data_->_tmp20_ = _data_->_tmp19_->message;
		_data_->_tmp21_ = g_strdup_printf (_ ("Couldn't update visibility: %s"), _data_->_tmp20_);
		_data_->_tmp22_ = _data_->_tmp21_;
		g_signal_emit_by_name (_data_->_tmp18_, "toast", _data_->_tmp22_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp22_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->req);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_dialogs_preferences_on_window_closed (TubaDialogsPreferences* self)
{
	gboolean _tmp0_;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_;
	AdwComboRow* _tmp31_;
	gboolean _tmp32_;
	gboolean _tmp33_;
	AdwEntryRow* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	TubaSettings* _tmp58_;
	gboolean _tmp59_;
	gboolean _tmp60_;
	TubaApplication* _tmp62_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_lang_changed;
	if (_tmp0_) {
		gchar* new_lang = NULL;
		AdwComboRow* _tmp1_;
		GObject* _tmp2_;
		GObject* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		TubaSettings* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		AdwComboRow* _tmp10_;
		GObject* _tmp11_;
		GObject* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp1_ = self->priv->default_language_combo_row;
		_tmp2_ = adw_combo_row_get_selected_item (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = tuba_utils_locales_locale_get_locale (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocale));
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strdup (_tmp5_);
		new_lang = _tmp6_;
		_tmp7_ = tuba_settings;
		_tmp8_ = tuba_settings_get_default_language (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = self->priv->default_language_combo_row;
		_tmp11_ = adw_combo_row_get_selected_item (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = tuba_utils_locales_locale_get_locale (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocale));
		_tmp14_ = _tmp13_;
		if (g_strcmp0 (_tmp9_, _tmp14_) != 0) {
			const gchar* _tmp15_;
			_tmp15_ = new_lang;
			tuba_dialogs_preferences_update_credentials_language_real (self, _tmp15_, NULL, NULL);
		}
		_g_free0 (new_lang);
	}
	_tmp18_ = self->priv->_privacy_changed;
	if (_tmp18_) {
		TubaSettings* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		_tmp19_ = tuba_settings;
		_tmp20_ = tuba_settings_get_default_post_visibility (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp17_ = g_strcmp0 (_tmp21_, "direct") != 0;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		_tmp16_ = TRUE;
	} else {
		gboolean _tmp22_;
		_tmp22_ = self->priv->_quote_policy_changed;
		_tmp16_ = _tmp22_;
	}
	if (_tmp16_) {
		const gchar* _tmp23_ = NULL;
		gboolean _tmp24_;
		TubaSettings* _tmp28_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		_tmp24_ = self->priv->_quote_policy_changed;
		if (_tmp24_) {
			TubaSettings* _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			_tmp25_ = tuba_settings;
			_tmp26_ = tuba_settings_get_default_quote_policy (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp23_ = _tmp27_;
		} else {
			_tmp23_ = NULL;
		}
		_tmp28_ = tuba_settings;
		_tmp29_ = tuba_settings_get_default_post_visibility (_tmp28_);
		_tmp30_ = _tmp29_;
		tuba_dialogs_preferences_update_credentials_privacy_real (self, _tmp30_, _tmp23_, NULL, NULL);
	}
	_tmp31_ = self->priv->default_content_type_combo_row;
	_tmp32_ = gtk_widget_get_visible ((GtkWidget*) _tmp31_);
	_tmp33_ = _tmp32_;
	if (_tmp33_) {
		TubaSettings* _tmp34_;
		AdwComboRow* _tmp35_;
		GObject* _tmp36_;
		GObject* _tmp37_;
		const gchar* _tmp38_;
		const gchar* _tmp39_;
		_tmp34_ = tuba_settings;
		_tmp35_ = self->priv->default_content_type_combo_row;
		_tmp36_ = adw_combo_row_get_selected_item (_tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = tuba_instance_account_status_content_type_get_mime (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE, TubaInstanceAccountStatusContentType));
		_tmp39_ = _tmp38_;
		tuba_settings_set_default_content_type (_tmp34_, _tmp39_);
	}
	tuba_dialogs_preferences_update_notification_mutes (self);
	_tmp40_ = self->priv->proxy_entry;
	_tmp41_ = gtk_editable_get_text ((GtkEditable*) _tmp40_);
	_tmp42_ = _tmp41_;
	if (g_strcmp0 (_tmp42_, "") != 0) {
		{
			gboolean _tmp43_ = FALSE;
			AdwEntryRow* _tmp44_;
			const gchar* _tmp45_;
			const gchar* _tmp46_;
			_tmp44_ = self->priv->proxy_entry;
			_tmp45_ = gtk_editable_get_text ((GtkEditable*) _tmp44_);
			_tmp46_ = _tmp45_;
			_tmp43_ = g_uri_is_valid (_tmp46_, G_URI_FLAGS_NONE, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			if (_tmp43_) {
				TubaSettings* _tmp47_;
				AdwEntryRow* _tmp48_;
				const gchar* _tmp49_;
				const gchar* _tmp50_;
				_tmp47_ = tuba_settings;
				_tmp48_ = self->priv->proxy_entry;
				_tmp49_ = gtk_editable_get_text ((GtkEditable*) _tmp48_);
				_tmp50_ = _tmp49_;
				tuba_settings_set_proxy (_tmp47_, _tmp50_);
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			TubaApplication* _tmp51_;
			GError* _tmp52_;
			const gchar* _tmp53_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp51_ = tuba_app;
			g_signal_emit_by_name (_tmp51_, "toast", _ ("Invalid Proxy URL"), (guint) 5, NULL, NULL, NULL);
			_tmp52_ = e;
			_tmp53_ = _tmp52_->message;
			g_warning ("Preferences.vala:614: %s", _tmp53_);
			_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;
		}
	} else {
		TubaSettings* _tmp54_;
		const gchar* _tmp55_;
		const gchar* _tmp56_;
		_tmp54_ = tuba_settings;
		_tmp55_ = tuba_settings_get_proxy (_tmp54_);
		_tmp56_ = _tmp55_;
		if (g_strcmp0 (_tmp56_, "") != 0) {
			TubaSettings* _tmp57_;
			_tmp57_ = tuba_settings;
			tuba_settings_set_proxy (_tmp57_, "");
		}
	}
	_tmp58_ = tuba_settings;
	_tmp59_ = tuba_settings_get_analytics (_tmp58_);
	_tmp60_ = _tmp59_;
	if (_tmp60_) {
		TubaApplication* _tmp61_;
		_tmp61_ = tuba_app;
		tuba_application_update_analytics (_tmp61_, NULL, NULL);
	}
	_tmp62_ = tuba_app;
	tuba_application_update_contributors (_tmp62_, NULL, NULL);
}

void
tuba_dialogs_preferences_on_analytics_preview (TubaDialogsPreferences* self)
{
	TubaDialogsPreferencesAnalyticsDialog* _tmp0_;
	TubaDialogsPreferencesAnalyticsDialog* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_dialogs_preferences_analytics_dialog_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	adw_dialog_present ((AdwDialog*) _tmp1_, (GtkWidget*) self);
	_g_object_unref0 (_tmp1_);
}

static void
_tuba_dialogs_preferences_on_analytics_preview_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self)
{
	tuba_dialogs_preferences_on_analytics_preview ((TubaDialogsPreferences*) self);
}

TubaDialogsPreferences*
tuba_dialogs_preferences_construct (GType object_type)
{
	TubaDialogsPreferences * self = NULL;
	self = (TubaDialogsPreferences*) g_object_new (object_type, NULL);
	return self;
}

TubaDialogsPreferences*
tuba_dialogs_preferences_new (void)
{
	return tuba_dialogs_preferences_construct (TUBA_DIALOGS_TYPE_PREFERENCES);
}

static gboolean
tuba_dialogs_preferences_get_lang_changed (TubaDialogsPreferences* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_lang_changed;
	return result;
}

static void
tuba_dialogs_preferences_set_lang_changed (TubaDialogsPreferences* self,
                                           gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_lang_changed = value;
}

static gboolean
tuba_dialogs_preferences_get_privacy_changed (TubaDialogsPreferences* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_privacy_changed;
	return result;
}

static void
tuba_dialogs_preferences_set_privacy_changed (TubaDialogsPreferences* self,
                                              gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_privacy_changed = value;
}

static gboolean
tuba_dialogs_preferences_get_quote_policy_changed (TubaDialogsPreferences* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_quote_policy_changed;
	return result;
}

static void
tuba_dialogs_preferences_set_quote_policy_changed (TubaDialogsPreferences* self,
                                                   gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_quote_policy_changed = value;
}

static inline gpointer
tuba_dialogs_preferences_filter_row_get_instance_private (TubaDialogsPreferencesFilterRow* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsPreferencesFilterRow_private_offset);
}

static void
_tuba_dialogs_preferences_filter_row_on_delete_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self)
{
	tuba_dialogs_preferences_filter_row_on_delete ((TubaDialogsPreferencesFilterRow*) self);
}

static void
_tuba_dialogs_preferences_filter_row_on_edit_gtk_button_clicked (GtkButton* _sender,
                                                                 gpointer self)
{
	tuba_dialogs_preferences_filter_row_on_edit ((TubaDialogsPreferencesFilterRow*) self);
}

static TubaDialogsPreferencesFilterRow*
tuba_dialogs_preferences_filter_row_construct (GType object_type,
                                               TubaAPIFiltersFilter* filter,
                                               TubaDialogsPreferences* win)
{
	TubaDialogsPreferencesFilterRow * self = NULL;
	TubaAPIFiltersFilter* _tmp0_;
	TubaDialogsPreferences* _tmp1_;
	GtkButton* delete_btn = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gchar* _tmp6_;
	GtkButton* _tmp7_ = NULL;
	GtkButton* edit_btn = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	gchar* _tmp11_;
	GtkButton* _tmp12_ = NULL;
	g_return_val_if_fail (filter != NULL, NULL);
	g_return_val_if_fail (win != NULL, NULL);
	self = (TubaDialogsPreferencesFilterRow*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (filter);
	_g_object_unref0 (self->priv->filter);
	self->priv->filter = _tmp0_;
	_tmp1_ = _g_object_ref0 (win);
	_g_object_unref0 (self->priv->win);
	self->priv->win = _tmp1_;
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) self, FALSE);
	adw_preferences_row_set_use_markup ((AdwPreferencesRow*) self, FALSE);
	_tmp2_ = g_strdup ("circular");
	_tmp3_ = g_strdup ("flat");
	_tmp4_ = g_strdup ("error");
	_tmp5_ = g_new0 (gchar*, 3 + 1);
	_tmp5_[0] = _tmp2_;
	_tmp5_[1] = _tmp3_;
	_tmp5_[2] = _tmp4_;
	_tmp6_ = g_strdup (_ ("Delete"));
	_tmp7_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp7_, _tmp6_);
	_g_free0 (_tmp6_);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp7_);
	delete_btn = _tmp7_;
	g_signal_connect_object (delete_btn, "clicked", (GCallback) _tuba_dialogs_preferences_filter_row_on_delete_gtk_button_clicked, self, 0);
	adw_expander_row_add_suffix ((AdwExpanderRow*) self, (GtkWidget*) delete_btn);
	_tmp8_ = g_strdup ("circular");
	_tmp9_ = g_strdup ("flat");
	_tmp10_ = g_new0 (gchar*, 2 + 1);
	_tmp10_[0] = _tmp8_;
	_tmp10_[1] = _tmp9_;
	_tmp11_ = g_strdup (_ ("Edit"));
	_tmp12_ = (GtkButton*) gtk_button_new_from_icon_name ("document-edit-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp12_, _tmp10_);
	_tmp10_ = (_vala_array_free (_tmp10_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp12_, _tmp11_);
	_g_free0 (_tmp11_);
	gtk_widget_set_valign ((GtkWidget*) _tmp12_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp12_);
	edit_btn = _tmp12_;
	g_signal_connect_object (edit_btn, "clicked", (GCallback) _tuba_dialogs_preferences_filter_row_on_edit_gtk_button_clicked, self, 0);
	adw_expander_row_add_suffix ((AdwExpanderRow*) self, (GtkWidget*) edit_btn);
	tuba_dialogs_preferences_filter_row_populate_from_filter (self);
	_g_object_unref0 (edit_btn);
	_g_object_unref0 (delete_btn);
	return self;
}

static TubaDialogsPreferencesFilterRow*
tuba_dialogs_preferences_filter_row_new (TubaAPIFiltersFilter* filter,
                                         TubaDialogsPreferences* win)
{
	return tuba_dialogs_preferences_filter_row_construct (TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW, filter, win);
}

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

static gboolean
__lambda216_ (TubaDialogsPreferencesFilterRow* self,
              TubaAPIFiltersFilterKeyword* e)
{
	GtkLabel* label = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GtkLabel* _tmp2_ = NULL;
	GtkWidget* _tmp3_;
	gboolean result;
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp0_ = tuba_api_filters_filter_keyword_get_keyword (e);
	_tmp1_ = _tmp0_;
	_tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
	gtk_label_set_ellipsize (_tmp2_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_START);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp2_, 8);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, 8);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp2_, 8);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 8);
	g_object_ref_sink (_tmp2_);
	label = _tmp2_;
	_tmp3_ = _g_object_ref0 ((GtkWidget*) label);
	_vala_array_add35 (&self->priv->labels, &self->priv->labels_length1, &self->priv->_labels_size_, _tmp3_);
	adw_expander_row_add_row ((AdwExpanderRow*) self, (GtkWidget*) label);
	result = TRUE;
	_g_object_unref0 (label);
	_g_object_unref0 (e);
	return result;
}

static gboolean
___lambda216__gee_forall_func (gpointer g,
                               gpointer self)
{
	gboolean result;
	result = __lambda216_ ((TubaDialogsPreferencesFilterRow*) self, (TubaAPIFiltersFilterKeyword*) g);
	return result;
}

static void
tuba_dialogs_preferences_filter_row_populate_from_filter (TubaDialogsPreferencesFilterRow* self)
{
	TubaAPIFiltersFilter* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TubaAPIFiltersFilter* _tmp3_;
	GeeArrayList* _tmp4_;
	GeeArrayList* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	TubaAPIFiltersFilter* _tmp8_;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	GtkWidget** _tmp15_;
	gint _tmp15__length1;
	GtkWidget** _tmp19_;
	TubaAPIFiltersFilter* _tmp20_;
	GeeArrayList* _tmp21_;
	GeeArrayList* _tmp22_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->filter;
	_tmp1_ = tuba_api_filters_filter_get_title (_tmp0_);
	_tmp2_ = _tmp1_;
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _tmp2_);
	_tmp3_ = self->priv->filter;
	_tmp4_ = tuba_api_filters_filter_get_keywords (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->filter;
	_tmp9_ = tuba_api_filters_filter_get_keywords (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_strdup_printf (ngettext ("%d keyword", "%d keywords", (gulong) _tmp7_), _tmp12_);
	_tmp14_ = _tmp13_;
	adw_expander_row_set_subtitle ((AdwExpanderRow*) self, _tmp14_);
	_g_free0 (_tmp14_);
	_tmp15_ = self->priv->labels;
	_tmp15__length1 = self->priv->labels_length1;
	{
		GtkWidget** label_collection = NULL;
		gint label_collection_length1 = 0;
		gint _label_collection_size_ = 0;
		gint label_it = 0;
		label_collection = _tmp15_;
		label_collection_length1 = _tmp15__length1;
		for (label_it = 0; label_it < label_collection_length1; label_it = label_it + 1) {
			GtkWidget* _tmp16_;
			GtkWidget* label = NULL;
			_tmp16_ = _g_object_ref0 (label_collection[label_it]);
			label = _tmp16_;
			{
				GtkWidget* _tmp17_;
				GtkWidget* _tmp18_;
				_tmp17_ = label;
				_tmp18_ = gtk_widget_get_parent (_tmp17_);
				adw_expander_row_remove ((AdwExpanderRow*) self, _tmp18_);
				_g_object_unref0 (label);
			}
		}
	}
	_tmp19_ = g_new0 (GtkWidget*, 0 + 1);
	self->priv->labels = (_vala_array_free (self->priv->labels, self->priv->labels_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->labels = _tmp19_;
	self->priv->labels_length1 = 0;
	self->priv->_labels_size_ = self->priv->labels_length1;
	_tmp20_ = self->priv->filter;
	_tmp21_ = tuba_api_filters_filter_get_keywords (_tmp20_);
	_tmp22_ = _tmp21_;
	gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp22_, ___lambda216__gee_forall_func, self);
}

static void
_tuba_dialogs_preferences_filter_row_on_save_tuba_dialogs_filter_edit_saved (TubaDialogsFilterEdit* _sender,
                                                                             TubaAPIFiltersFilter* filter,
                                                                             gpointer self)
{
	tuba_dialogs_preferences_filter_row_on_save ((TubaDialogsPreferencesFilterRow*) self, filter);
}

static void
tuba_dialogs_preferences_filter_row_on_edit (TubaDialogsPreferencesFilterRow* self)
{
	TubaDialogsFilterEdit* dlg = NULL;
	TubaAPIFiltersFilter* _tmp0_;
	TubaDialogsFilterEdit* _tmp1_;
	TubaDialogsPreferences* _tmp2_;
	TubaDialogsPreferences* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->filter;
	_tmp1_ = tuba_dialogs_filter_edit_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dlg = _tmp1_;
	g_signal_connect_object (dlg, "saved", (GCallback) _tuba_dialogs_preferences_filter_row_on_save_tuba_dialogs_filter_edit_saved, self, 0);
	_tmp2_ = self->priv->win;
	g_signal_connect_object (dlg, "toast", (GCallback) _tuba_dialogs_preferences_on_toast_tuba_dialogs_filter_edit_toast, _tmp2_, 0);
	_tmp3_ = self->priv->win;
	adw_preferences_dialog_push_subpage ((AdwPreferencesDialog*) _tmp3_, (AdwNavigationPage*) dlg);
	_g_object_unref0 (dlg);
}

static void
tuba_dialogs_preferences_filter_row_on_save (TubaDialogsPreferencesFilterRow* self,
                                             TubaAPIFiltersFilter* filter)
{
	TubaAPIFiltersFilter* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (filter != NULL);
	_tmp0_ = _g_object_ref0 (filter);
	_g_object_unref0 (self->priv->filter);
	self->priv->filter = _tmp0_;
	tuba_dialogs_preferences_filter_row_populate_from_filter (self);
}

static void
tuba_dialogs_preferences_filter_row_on_delete (TubaDialogsPreferencesFilterRow* self)
{
	g_return_if_fail (self != NULL);
	tuba_dialogs_preferences_filter_row_on_delete_real (self, NULL, NULL);
}

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

static void
tuba_dialogs_preferences_filter_row_on_delete_real (TubaDialogsPreferencesFilterRow* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	TubaDialogsPreferencesFilterRowOnDeleteRealData* _data_;
	TubaDialogsPreferencesFilterRow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsPreferencesFilterRowOnDeleteRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_preferences_filter_row_on_delete_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_preferences_filter_row_on_delete_real_co (_data_);
}

static void
tuba_dialogs_preferences_filter_row_on_delete_real_finish (TubaDialogsPreferencesFilterRow* self,
                                                           GAsyncResult* _res_)
{
	TubaDialogsPreferencesFilterRowOnDeleteRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_preferences_filter_row_on_delete_real_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	TubaDialogsPreferencesFilterRowOnDeleteRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_preferences_filter_row_on_delete_real_co (_data_);
}

static gboolean
tuba_dialogs_preferences_filter_row_on_delete_real_co (TubaDialogsPreferencesFilterRowOnDeleteRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_app;
	_data_->_tmp1_ = _data_->self->priv->filter;
	_data_->_tmp2_ = tuba_api_filters_filter_get_title (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_strdup_printf (_ ("Delete %s?"), _data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	memset (&_data_->_tmp6_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp6_.text);
	_data_->_tmp6_.text = _data_->_tmp5_;
	_data_->_tmp6_.use_markup = FALSE;
	_data_->_tmp7_ = _data_->self->priv->win;
	memset (&_data_->_tmp8_, 0, sizeof (TubaApplicationQuestionButtons));
	tuba_application_question_button_destroy (&_data_->_tmp8_.yes);
	_data_->_tmp8_.yes = (TubaApplicationQuestionButton) {_ ("Delete"), ADW_RESPONSE_DESTRUCTIVE};
	tuba_application_question_button_destroy (&_data_->_tmp8_.no);
	_data_->_tmp8_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
	_data_->_state_ = 1;
	tuba_application_question (_data_->_tmp0_, &_data_->_tmp6_, NULL, (GtkWidget*) _data_->_tmp7_, &_data_->_tmp8_, NULL, FALSE, tuba_dialogs_preferences_filter_row_on_delete_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp9_ = tuba_application_question_finish (_data_->_tmp0_, _data_->_res_);
	_g_free0 (_data_->_tmp5_);
	_data_->qs = _data_->_tmp9_;
	if (tuba_application_question_answer_truthy (_data_->qs)) {
		_data_->_tmp10_ = _data_->self->priv->filter;
		_data_->_tmp11_ = tuba_api_filters_filter_get_id (_data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		_data_->_tmp13_ = string_to_string (_data_->_tmp12_);
		_data_->_tmp14_ = g_strconcat ("/api/v2/filters/", _data_->_tmp13_, NULL);
		_data_->_tmp15_ = _data_->_tmp14_;
		_data_->_tmp16_ = tuba_accounts;
		_data_->_tmp17_ = tuba_account_store_get_active (_data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		_data_->_tmp19_ = _g_object_ref0 (_data_->_tmp18_);
		_data_->_tmp20_ = NULL;
		_data_->_tmp20_ = tuba_request_v2_new (_data_->_tmp15_, TUBA_REQUEST_V2_METHOD_DELETE);
		tuba_request_v2_set_account (_data_->_tmp20_, _data_->_tmp19_);
		_g_object_unref0 (_data_->_tmp19_);
		_data_->_tmp21_ = _data_->_tmp20_;
		_g_free0 (_data_->_tmp15_);
		_data_->req = _data_->_tmp21_;
		{
			_data_->_tmp22_ = _data_->req;
			_data_->_state_ = 2;
			tuba_request_v2_exec (_data_->_tmp22_, tuba_dialogs_preferences_filter_row_on_delete_real_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp23_ = tuba_request_v2_exec_finish (_data_->_tmp22_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp24_ = _data_->_tmp23_;
			_g_object_unref0 (_data_->_tmp24_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			g_signal_emit (_data_->self, tuba_dialogs_preferences_filter_row_signals[TUBA_DIALOGS_PREFERENCES_FILTER_ROW_FILTER_DELETED_SIGNAL], 0, _data_->self);
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp25_ = _data_->self->priv->win;
			_data_->_tmp26_ = _data_->e;
			_data_->_tmp27_ = _data_->_tmp26_->message;
			_data_->_tmp28_ = g_strdup_printf (_ ("Couldn't delete filter: %s"), _data_->_tmp27_);
			_data_->_tmp29_ = _data_->_tmp28_;
			_data_->_tmp30_ = NULL;
			_data_->_tmp30_ = adw_toast_new (_data_->_tmp29_);
			adw_toast_set_timeout (_data_->_tmp30_, (guint) 0);
			adw_preferences_dialog_add_toast ((AdwPreferencesDialog*) _data_->_tmp25_, _data_->_tmp30_);
			_g_free0 (_data_->_tmp29_);
			_data_->_tmp31_ = _data_->self->priv->filter;
			_data_->_tmp32_ = tuba_api_filters_filter_get_id (_data_->_tmp31_);
			_data_->_tmp33_ = _data_->_tmp32_;
			_data_->_tmp34_ = string_to_string (_data_->_tmp33_);
			_data_->_tmp35_ = _data_->e;
			_data_->_tmp36_ = g_strdup_printf ("%i", _data_->_tmp35_->code);
			_data_->_tmp37_ = _data_->_tmp36_;
			_data_->_tmp38_ = _data_->e;
			_data_->_tmp39_ = _data_->_tmp38_->message;
			_data_->_tmp40_ = string_to_string (_data_->_tmp39_);
			_data_->_tmp41_ = g_strconcat ("Couldn't delete filter ", _data_->_tmp34_, ": ", _data_->_tmp37_, " ", _data_->_tmp40_, NULL);
			_data_->_tmp42_ = _data_->_tmp41_;
			g_warning ("Preferences.vala:107: %s", _data_->_tmp42_);
			_g_free0 (_data_->_tmp42_);
			_g_free0 (_data_->_tmp37_);
			_g_error_free0 (_data_->e);
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->req);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->req);
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_dialogs_preferences_filter_row_class_init (TubaDialogsPreferencesFilterRowClass * klass,
                                                gpointer klass_data)
{
	tuba_dialogs_preferences_filter_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsPreferencesFilterRow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_preferences_filter_row_finalize;
	tuba_dialogs_preferences_filter_row_signals[TUBA_DIALOGS_PREFERENCES_FILTER_ROW_FILTER_DELETED_SIGNAL] = g_signal_new ("filter-deleted", TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW);
}

static void
tuba_dialogs_preferences_filter_row_instance_init (TubaDialogsPreferencesFilterRow * self,
                                                   gpointer klass)
{
	GtkWidget** _tmp0_;
	self->priv = tuba_dialogs_preferences_filter_row_get_instance_private (self);
	_tmp0_ = g_new0 (GtkWidget*, 0 + 1);
	self->priv->labels = _tmp0_;
	self->priv->labels_length1 = 0;
	self->priv->_labels_size_ = self->priv->labels_length1;
}

static void
tuba_dialogs_preferences_filter_row_finalize (GObject * obj)
{
	TubaDialogsPreferencesFilterRow * self;
	GtkWidget** _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_PREFERENCES_TYPE_FILTER_ROW, TubaDialogsPreferencesFilterRow);
	_tmp0_ = g_new0 (GtkWidget*, 0 + 1);
	self->priv->labels = (_vala_array_free (self->priv->labels, self->priv->labels_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->labels = _tmp0_;
	self->priv->labels_length1 = 0;
	self->priv->_labels_size_ = self->priv->labels_length1;
	_g_object_unref0 (self->priv->filter);
	_g_object_unref0 (self->priv->win);
	self->priv->labels = (_vala_array_free (self->priv->labels, self->priv->labels_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (tuba_dialogs_preferences_filter_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_preferences_filter_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsPreferencesFilterRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_preferences_filter_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsPreferencesFilterRow), 0, (GInstanceInitFunc) tuba_dialogs_preferences_filter_row_instance_init, NULL };
	GType tuba_dialogs_preferences_filter_row_type_id;
	tuba_dialogs_preferences_filter_row_type_id = g_type_register_static (adw_expander_row_get_type (), "TubaDialogsPreferencesFilterRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsPreferencesFilterRow_private_offset = g_type_add_instance_private (tuba_dialogs_preferences_filter_row_type_id, sizeof (TubaDialogsPreferencesFilterRowPrivate));
	return tuba_dialogs_preferences_filter_row_type_id;
}

static GType
tuba_dialogs_preferences_filter_row_get_type (void)
{
	static GType tuba_dialogs_preferences_filter_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_preferences_filter_row_type_id__once)) {
		GType tuba_dialogs_preferences_filter_row_type_id;
		tuba_dialogs_preferences_filter_row_type_id = tuba_dialogs_preferences_filter_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_preferences_filter_row_type_id__once, tuba_dialogs_preferences_filter_row_type_id);
	}
	return tuba_dialogs_preferences_filter_row_type_id__once;
}

static inline gpointer
tuba_dialogs_preferences_quotation_policy_get_instance_private (TubaDialogsPreferencesQuotationPolicy* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsPreferencesQuotationPolicy_private_offset);
}

static gboolean
_tuba_dialogs_preferences_quotation_policy_compare_lambda218_ (const gchar* a,
                                                               const gchar* b)
{
	TubaAPIStatusQuotePolicy _tmp0_;
	TubaAPIStatusQuotePolicy _tmp1_;
	gboolean result;
	g_return_val_if_fail (a != NULL, FALSE);
	g_return_val_if_fail (b != NULL, FALSE);
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (a, TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicy)->priv->_policy;
	_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (b, TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicy)->priv->_policy;
	result = _tmp0_ == _tmp1_;
	return result;
}

static gboolean
__tuba_dialogs_preferences_quotation_policy_compare_lambda218__gequal_func (gconstpointer a,
                                                                            gconstpointer b)
{
	gboolean result;
	result = _tuba_dialogs_preferences_quotation_policy_compare_lambda218_ ((const gchar*) a, (const gchar*) b);
	return result;
}

TubaDialogsPreferencesQuotationPolicy*
tuba_dialogs_preferences_quotation_policy_construct (GType object_type,
                                                     const gchar* policy_name)
{
	TubaDialogsPreferencesQuotationPolicy * self = NULL;
	TubaAPIStatusQuotePolicy _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (policy_name != NULL, NULL);
	self = (TubaDialogsPreferencesQuotationPolicy*) g_object_new (object_type, NULL);
	tuba_dialogs_preferences_quotation_policy_set_policy (self, tuba_api_status_quote_policy_from_string (policy_name));
	_tmp0_ = self->priv->_policy;
	_tmp1_ = tuba_api_status_quote_policy_to_title (_tmp0_);
	_tmp2_ = _tmp1_;
	tuba_dialogs_preferences_quotation_policy_set_title (self, _tmp2_);
	_g_free0 (_tmp2_);
	return self;
}

TubaDialogsPreferencesQuotationPolicy*
tuba_dialogs_preferences_quotation_policy_new (const gchar* policy_name)
{
	return tuba_dialogs_preferences_quotation_policy_construct (TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, policy_name);
}

TubaDialogsPreferencesQuotationPolicy*
tuba_dialogs_preferences_quotation_policy_construct_from_policy (GType object_type,
                                                                 TubaAPIStatusQuotePolicy policy)
{
	TubaDialogsPreferencesQuotationPolicy * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	self = (TubaDialogsPreferencesQuotationPolicy*) g_object_new (object_type, NULL);
	tuba_dialogs_preferences_quotation_policy_set_policy (self, policy);
	_tmp0_ = tuba_api_status_quote_policy_to_title (policy);
	_tmp1_ = _tmp0_;
	tuba_dialogs_preferences_quotation_policy_set_title (self, _tmp1_);
	_g_free0 (_tmp1_);
	return self;
}

TubaDialogsPreferencesQuotationPolicy*
tuba_dialogs_preferences_quotation_policy_new_from_policy (TubaAPIStatusQuotePolicy policy)
{
	return tuba_dialogs_preferences_quotation_policy_construct_from_policy (TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, policy);
}

TubaAPIStatusQuotePolicy
tuba_dialogs_preferences_quotation_policy_get_policy (TubaDialogsPreferencesQuotationPolicy* self)
{
	TubaAPIStatusQuotePolicy result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_policy;
	return result;
}

void
tuba_dialogs_preferences_quotation_policy_set_policy (TubaDialogsPreferencesQuotationPolicy* self,
                                                      TubaAPIStatusQuotePolicy value)
{
	TubaAPIStatusQuotePolicy old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_preferences_quotation_policy_get_policy (self);
	if (old_value != value) {
		self->priv->_policy = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_preferences_quotation_policy_properties[TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_POLICY_PROPERTY]);
	}
}

const gchar*
tuba_dialogs_preferences_quotation_policy_get_title (TubaDialogsPreferencesQuotationPolicy* 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_dialogs_preferences_quotation_policy_set_title (TubaDialogsPreferencesQuotationPolicy* self,
                                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_preferences_quotation_policy_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_dialogs_preferences_quotation_policy_properties[TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_TITLE_PROPERTY]);
	}
}

static void
tuba_dialogs_preferences_quotation_policy_class_init (TubaDialogsPreferencesQuotationPolicyClass * klass,
                                                      gpointer klass_data)
{
	tuba_dialogs_preferences_quotation_policy_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsPreferencesQuotationPolicy_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_preferences_quotation_policy_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_preferences_quotation_policy_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_preferences_quotation_policy_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_POLICY_PROPERTY, tuba_dialogs_preferences_quotation_policy_properties[TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_POLICY_PROPERTY] = g_param_spec_enum ("policy", "policy", "policy", TUBA_API_STATUS_TYPE_QUOTE_POLICY, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_TITLE_PROPERTY, tuba_dialogs_preferences_quotation_policy_properties[TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	tuba_dialogs_preferences_quotation_policy_compare = __tuba_dialogs_preferences_quotation_policy_compare_lambda218__gequal_func;
}

static void
tuba_dialogs_preferences_quotation_policy_instance_init (TubaDialogsPreferencesQuotationPolicy * self,
                                                         gpointer klass)
{
	self->priv = tuba_dialogs_preferences_quotation_policy_get_instance_private (self);
}

static void
tuba_dialogs_preferences_quotation_policy_finalize (GObject * obj)
{
	TubaDialogsPreferencesQuotationPolicy * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicy);
	_g_free0 (self->priv->_title);
	G_OBJECT_CLASS (tuba_dialogs_preferences_quotation_policy_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_preferences_quotation_policy_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsPreferencesQuotationPolicyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_preferences_quotation_policy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsPreferencesQuotationPolicy), 0, (GInstanceInitFunc) tuba_dialogs_preferences_quotation_policy_instance_init, NULL };
	GType tuba_dialogs_preferences_quotation_policy_type_id;
	tuba_dialogs_preferences_quotation_policy_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaDialogsPreferencesQuotationPolicy", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsPreferencesQuotationPolicy_private_offset = g_type_add_instance_private (tuba_dialogs_preferences_quotation_policy_type_id, sizeof (TubaDialogsPreferencesQuotationPolicyPrivate));
	return tuba_dialogs_preferences_quotation_policy_type_id;
}

GType
tuba_dialogs_preferences_quotation_policy_get_type (void)
{
	static GType tuba_dialogs_preferences_quotation_policy_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_preferences_quotation_policy_type_id__once)) {
		GType tuba_dialogs_preferences_quotation_policy_type_id;
		tuba_dialogs_preferences_quotation_policy_type_id = tuba_dialogs_preferences_quotation_policy_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_preferences_quotation_policy_type_id__once, tuba_dialogs_preferences_quotation_policy_type_id);
	}
	return tuba_dialogs_preferences_quotation_policy_type_id__once;
}

static void
_vala_tuba_dialogs_preferences_quotation_policy_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec)
{
	TubaDialogsPreferencesQuotationPolicy * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicy);
	switch (property_id) {
		case TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_POLICY_PROPERTY:
		g_value_set_enum (value, tuba_dialogs_preferences_quotation_policy_get_policy (self));
		break;
		case TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_TITLE_PROPERTY:
		g_value_set_string (value, tuba_dialogs_preferences_quotation_policy_get_title (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_preferences_quotation_policy_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec)
{
	TubaDialogsPreferencesQuotationPolicy * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, TubaDialogsPreferencesQuotationPolicy);
	switch (property_id) {
		case TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_POLICY_PROPERTY:
		tuba_dialogs_preferences_quotation_policy_set_policy (self, g_value_get_enum (value));
		break;
		case TUBA_DIALOGS_PREFERENCES_QUOTATION_POLICY_TITLE_PROPERTY:
		tuba_dialogs_preferences_quotation_policy_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_dialogs_preferences_analytics_dialog_get_instance_private (TubaDialogsPreferencesAnalyticsDialog* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsPreferencesAnalyticsDialog_private_offset);
}

void
tuba_dialogs_preferences_analytics_dialog_update_style_scheme (TubaDialogsPreferencesAnalyticsDialog* self)
{
	GtkSourceStyleSchemeManager* manager = NULL;
	GtkSourceStyleSchemeManager* _tmp0_;
	GtkSourceStyleSchemeManager* _tmp1_;
	gchar* scheme_name = NULL;
	gchar* _tmp2_;
	AdwStyleManager* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GtkSourceView* _tmp8_;
	GtkTextBuffer* _tmp9_;
	GtkTextBuffer* _tmp10_;
	GtkSourceStyleSchemeManager* _tmp11_;
	const gchar* _tmp12_;
	GtkSourceStyleScheme* _tmp13_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_source_style_scheme_manager_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	manager = _tmp1_;
	_tmp2_ = g_strdup ("Adwaita");
	scheme_name = _tmp2_;
	_tmp3_ = adw_style_manager_get_default ();
	_tmp4_ = adw_style_manager_get_dark (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = scheme_name;
		_tmp7_ = g_strconcat (_tmp6_, "-dark", NULL);
		_g_free0 (scheme_name);
		scheme_name = _tmp7_;
	}
	_tmp8_ = self->priv->source_view;
	_tmp9_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = manager;
	_tmp12_ = scheme_name;
	_tmp13_ = gtk_source_style_scheme_manager_get_scheme (_tmp11_, _tmp12_);
	gtk_source_buffer_set_style_scheme (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_source_buffer_get_type (), GtkSourceBuffer), _tmp13_);
	_g_free0 (scheme_name);
	_g_object_unref0 (manager);
}

TubaDialogsPreferencesAnalyticsDialog*
tuba_dialogs_preferences_analytics_dialog_construct (GType object_type)
{
	TubaDialogsPreferencesAnalyticsDialog * self = NULL;
	self = (TubaDialogsPreferencesAnalyticsDialog*) g_object_new (object_type, NULL);
	return self;
}

TubaDialogsPreferencesAnalyticsDialog*
tuba_dialogs_preferences_analytics_dialog_new (void)
{
	return tuba_dialogs_preferences_analytics_dialog_construct (TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG);
}

static void
_tuba_dialogs_preferences_analytics_dialog_update_style_scheme_g_object_notify (GObject* _sender,
                                                                                GParamSpec* pspec,
                                                                                gpointer self)
{
	tuba_dialogs_preferences_analytics_dialog_update_style_scheme ((TubaDialogsPreferencesAnalyticsDialog*) self);
}

static GObject *
tuba_dialogs_preferences_analytics_dialog_constructor (GType type,
                                                       guint n_construct_properties,
                                                       GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsPreferencesAnalyticsDialog * self;
	GtkSourceView* _tmp0_ = NULL;
	GtkSourceView* _tmp1_;
	GtkTextBuffer* _tmp2_;
	GtkTextBuffer* _tmp3_;
	GtkSourceView* _tmp4_;
	GtkTextBuffer* _tmp5_;
	GtkTextBuffer* _tmp6_;
	GtkSourceLanguageManager* lang_manager = NULL;
	GtkSourceLanguageManager* _tmp7_;
	GtkSourceView* _tmp8_;
	GtkTextBuffer* _tmp9_;
	GtkTextBuffer* _tmp10_;
	GtkSourceLanguageManager* _tmp11_;
	GtkSourceLanguage* _tmp12_;
	GtkSourceView* _tmp13_;
	GtkTextBuffer* _tmp14_;
	GtkTextBuffer* _tmp15_;
	TubaApplication* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	AdwStyleManager* _tmp19_;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp20_;
	AdwHeaderBar* headerbar = NULL;
	AdwHeaderBar* _tmp21_;
	AdwToolbarView* _tmp22_;
	AdwHeaderBar* _tmp23_;
	AdwToolbarView* _tmp24_;
	GtkSourceView* _tmp25_;
	GtkWidget* _tmp26_;
	GtkScrolledWindow* _tmp27_ = NULL;
	GtkScrolledWindow* _tmp28_;
	AdwToolbarView* _tmp29_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_preferences_analytics_dialog_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG, TubaDialogsPreferencesAnalyticsDialog);
	adw_dialog_set_title ((AdwDialog*) self, _ ("Analytics Preview"));
	adw_dialog_set_content_width ((AdwDialog*) self, 460);
	adw_dialog_set_content_height ((AdwDialog*) self, 640);
	_tmp0_ = (GtkSourceView*) gtk_source_view_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_text_view_set_top_margin ((GtkTextView*) _tmp0_, 6);
	gtk_text_view_set_right_margin ((GtkTextView*) _tmp0_, 6);
	gtk_text_view_set_bottom_margin ((GtkTextView*) _tmp0_, 6);
	gtk_text_view_set_left_margin ((GtkTextView*) _tmp0_, 6);
	gtk_text_view_set_pixels_below_lines ((GtkTextView*) _tmp0_, 6);
	gtk_text_view_set_accepts_tab ((GtkTextView*) _tmp0_, FALSE);
	gtk_text_view_set_wrap_mode ((GtkTextView*) _tmp0_, GTK_WRAP_WORD_CHAR);
	gtk_text_view_set_editable ((GtkTextView*) _tmp0_, FALSE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->source_view);
	self->priv->source_view = _tmp0_;
	_tmp1_ = self->priv->source_view;
	_tmp2_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_source_buffer_set_highlight_matching_brackets (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_source_buffer_get_type (), GtkSourceBuffer), TRUE);
	_tmp4_ = self->priv->source_view;
	_tmp5_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp4_);
	_tmp6_ = _tmp5_;
	gtk_source_buffer_set_highlight_syntax (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_source_buffer_get_type (), GtkSourceBuffer), TRUE);
	_tmp7_ = gtk_source_language_manager_new ();
	lang_manager = _tmp7_;
	_tmp8_ = self->priv->source_view;
	_tmp9_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = lang_manager;
	_tmp12_ = gtk_source_language_manager_get_language (_tmp11_, "json");
	gtk_source_buffer_set_language (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_source_buffer_get_type (), GtkSourceBuffer), _tmp12_);
	_tmp13_ = self->priv->source_view;
	_tmp14_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = tuba_app;
	_tmp17_ = tuba_application_generate_analytics_object (_tmp16_, TRUE);
	_tmp18_ = _tmp17_;
	g_object_set (_tmp15_, "text", _tmp18_, NULL);
	_g_free0 (_tmp18_);
	_tmp19_ = adw_style_manager_get_default ();
	g_signal_connect_object ((GObject*) _tmp19_, "notify::dark", (GCallback) _tuba_dialogs_preferences_analytics_dialog_update_style_scheme_g_object_notify, self, 0);
	tuba_dialogs_preferences_analytics_dialog_update_style_scheme (self);
	_tmp20_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp20_);
	toolbar_view = _tmp20_;
	_tmp21_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp21_);
	headerbar = _tmp21_;
	_tmp22_ = toolbar_view;
	_tmp23_ = headerbar;
	adw_toolbar_view_add_top_bar (_tmp22_, (GtkWidget*) _tmp23_);
	_tmp24_ = toolbar_view;
	_tmp25_ = self->priv->source_view;
	_tmp26_ = _g_object_ref0 ((GtkWidget*) _tmp25_);
	_tmp27_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp27_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp27_, TRUE);
	gtk_scrolled_window_set_child (_tmp27_, _tmp26_);
	_g_object_unref0 (_tmp26_);
	g_object_ref_sink (_tmp27_);
	_tmp28_ = _tmp27_;
	adw_toolbar_view_set_content (_tmp24_, (GtkWidget*) _tmp28_);
	_g_object_unref0 (_tmp28_);
	_tmp29_ = toolbar_view;
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) _tmp29_);
	_g_object_unref0 (headerbar);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (lang_manager);
	return obj;
}

static void
tuba_dialogs_preferences_analytics_dialog_class_init (TubaDialogsPreferencesAnalyticsDialogClass * klass,
                                                      gpointer klass_data)
{
	tuba_dialogs_preferences_analytics_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsPreferencesAnalyticsDialog_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_preferences_analytics_dialog_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_preferences_analytics_dialog_finalize;
}

static void
tuba_dialogs_preferences_analytics_dialog_instance_init (TubaDialogsPreferencesAnalyticsDialog * self,
                                                         gpointer klass)
{
	self->priv = tuba_dialogs_preferences_analytics_dialog_get_instance_private (self);
}

static void
tuba_dialogs_preferences_analytics_dialog_finalize (GObject * obj)
{
	TubaDialogsPreferencesAnalyticsDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_PREFERENCES_TYPE_ANALYTICS_DIALOG, TubaDialogsPreferencesAnalyticsDialog);
	_g_object_unref0 (self->priv->source_view);
	G_OBJECT_CLASS (tuba_dialogs_preferences_analytics_dialog_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_preferences_analytics_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsPreferencesAnalyticsDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_preferences_analytics_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsPreferencesAnalyticsDialog), 0, (GInstanceInitFunc) tuba_dialogs_preferences_analytics_dialog_instance_init, NULL };
	GType tuba_dialogs_preferences_analytics_dialog_type_id;
	tuba_dialogs_preferences_analytics_dialog_type_id = g_type_register_static (adw_dialog_get_type (), "TubaDialogsPreferencesAnalyticsDialog", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsPreferencesAnalyticsDialog_private_offset = g_type_add_instance_private (tuba_dialogs_preferences_analytics_dialog_type_id, sizeof (TubaDialogsPreferencesAnalyticsDialogPrivate));
	return tuba_dialogs_preferences_analytics_dialog_type_id;
}

GType
tuba_dialogs_preferences_analytics_dialog_get_type (void)
{
	static GType tuba_dialogs_preferences_analytics_dialog_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_preferences_analytics_dialog_type_id__once)) {
		GType tuba_dialogs_preferences_analytics_dialog_type_id;
		tuba_dialogs_preferences_analytics_dialog_type_id = tuba_dialogs_preferences_analytics_dialog_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_preferences_analytics_dialog_type_id__once, tuba_dialogs_preferences_analytics_dialog_type_id);
	}
	return tuba_dialogs_preferences_analytics_dialog_type_id__once;
}

static void
tuba_dialogs_preferences_notification_type_mute_copy (const TubaDialogsPreferencesNotificationTypeMute* self,
                                                      TubaDialogsPreferencesNotificationTypeMute* dest)
{
	AdwSwitchRow* _tmp0_;
	AdwSwitchRow* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	_tmp0_ = (*self).switch_widget;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 ((*dest).switch_widget);
	(*dest).switch_widget = _tmp1_;
	_tmp2_ = (*self).event;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).event);
	(*dest).event = _tmp3_;
}

static void
tuba_dialogs_preferences_notification_type_mute_destroy (TubaDialogsPreferencesNotificationTypeMute* self)
{
	_g_object_unref0 ((*self).switch_widget);
	_g_free0 ((*self).event);
}

static TubaDialogsPreferencesNotificationTypeMute*
tuba_dialogs_preferences_notification_type_mute_dup (const TubaDialogsPreferencesNotificationTypeMute* self)
{
	TubaDialogsPreferencesNotificationTypeMute* dup;
	dup = g_new0 (TubaDialogsPreferencesNotificationTypeMute, 1);
	tuba_dialogs_preferences_notification_type_mute_copy (self, dup);
	return dup;
}

static void
tuba_dialogs_preferences_notification_type_mute_free (TubaDialogsPreferencesNotificationTypeMute* self)
{
	tuba_dialogs_preferences_notification_type_mute_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_preferences_notification_type_mute_get_type_once (void)
{
	GType tuba_dialogs_preferences_notification_type_mute_type_id;
	tuba_dialogs_preferences_notification_type_mute_type_id = g_boxed_type_register_static ("TubaDialogsPreferencesNotificationTypeMute", (GBoxedCopyFunc) tuba_dialogs_preferences_notification_type_mute_dup, (GBoxedFreeFunc) tuba_dialogs_preferences_notification_type_mute_free);
	return tuba_dialogs_preferences_notification_type_mute_type_id;
}

static GType
tuba_dialogs_preferences_notification_type_mute_get_type (void)
{
	static GType tuba_dialogs_preferences_notification_type_mute_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_preferences_notification_type_mute_type_id__once)) {
		GType tuba_dialogs_preferences_notification_type_mute_type_id;
		tuba_dialogs_preferences_notification_type_mute_type_id = tuba_dialogs_preferences_notification_type_mute_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_preferences_notification_type_mute_type_id__once, tuba_dialogs_preferences_notification_type_mute_type_id);
	}
	return tuba_dialogs_preferences_notification_type_mute_type_id__once;
}

static void
_tuba_dialogs_preferences_on_window_closed_adw_dialog_closed (AdwDialog* _sender,
                                                              gpointer self)
{
	tuba_dialogs_preferences_on_window_closed ((TubaDialogsPreferences*) self);
}

static void
_tuba_dialogs_preferences_app_sent_toast_tuba_application_toast (TubaApplication* _sender,
                                                                 const gchar* title,
                                                                 guint timeout,
                                                                 const gchar* action_name,
                                                                 GVariant* action_target,
                                                                 const gchar* action_label,
                                                                 gpointer self)
{
	tuba_dialogs_preferences_app_sent_toast ((TubaDialogsPreferences*) self, title, timeout, action_name, action_target, action_label);
}

static GObject *
tuba_dialogs_preferences_constructor (GType type,
                                      guint n_construct_properties,
                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsPreferences * self;
	AdwEntryRow* _tmp0_;
	TubaSettings* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	AdwComboRow* _tmp4_;
	TubaAccountStore* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	GListStore* _tmp8_;
	GtkAdjustment* _tmp9_;
	TubaSettings* _tmp10_;
	gdouble _tmp11_;
	gdouble _tmp12_;
	AdwPreferencesGroup* _tmp13_;
	guint default_visibility_index = 0U;
	gboolean _tmp14_ = FALSE;
	TubaAccountStore* _tmp15_;
	TubaInstanceAccount* _tmp16_;
	TubaInstanceAccount* _tmp17_;
	GeeHashMap* _tmp18_;
	TubaSettings* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	TubaAccountStore* _tmp39_;
	TubaInstanceAccount* _tmp40_;
	TubaInstanceAccount* _tmp41_;
	GListStore* _tmp42_;
	guint _tmp43_;
	guint _tmp44_;
	TubaAccountStore* _tmp46_;
	TubaInstanceAccount* _tmp47_;
	TubaInstanceAccount* _tmp48_;
	TubaAPIInstanceV2APIVersions* _tmp49_;
	TubaAPIInstanceV2APIVersions* _tmp50_;
	gint8 _tmp51_;
	gint8 _tmp52_;
	TubaApplication* _tmp57_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_preferences_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_TYPE_PREFERENCES, TubaDialogsPreferences);
	_tmp0_ = self->priv->proxy_entry;
	_tmp1_ = tuba_settings;
	_tmp2_ = tuba_settings_get_proxy (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, _tmp3_);
	_tmp4_ = self->priv->post_visibility_combo_row;
	_tmp5_ = tuba_accounts;
	_tmp6_ = tuba_account_store_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_->visibility_list;
	adw_combo_row_set_model (_tmp4_, (GListModel*) _tmp8_);
	_tmp9_ = self->priv->font_adjustment;
	_tmp10_ = tuba_settings;
	_tmp11_ = tuba_settings_get_status_font_size (_tmp10_);
	_tmp12_ = _tmp11_;
	gtk_adjustment_set_value (_tmp9_, _tmp12_);
	_tmp13_ = self->priv->up_group;
	gtk_widget_set_visible ((GtkWidget*) _tmp13_, FALSE);
	_tmp15_ = tuba_accounts;
	_tmp16_ = tuba_account_store_get_active (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_->visibility;
	_tmp19_ = tuba_settings;
	_tmp20_ = tuba_settings_get_default_post_visibility (_tmp19_);
	_tmp21_ = _tmp20_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp18_, _tmp21_)) {
		TubaAccountStore* _tmp22_;
		TubaInstanceAccount* _tmp23_;
		TubaInstanceAccount* _tmp24_;
		GListStore* _tmp25_;
		TubaAccountStore* _tmp26_;
		TubaInstanceAccount* _tmp27_;
		TubaInstanceAccount* _tmp28_;
		GeeHashMap* _tmp29_;
		TubaSettings* _tmp30_;
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		gpointer _tmp33_;
		TubaInstanceAccountVisibility* _tmp34_;
		guint _tmp35_ = 0U;
		gboolean _tmp36_;
		_tmp22_ = tuba_accounts;
		_tmp23_ = tuba_account_store_get_active (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = _tmp24_->visibility_list;
		_tmp26_ = tuba_accounts;
		_tmp27_ = tuba_account_store_get_active (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = _tmp28_->visibility;
		_tmp30_ = tuba_settings;
		_tmp31_ = tuba_settings_get_default_post_visibility (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp29_, _tmp32_);
		_tmp34_ = (TubaInstanceAccountVisibility*) _tmp33_;
		_tmp36_ = g_list_store_find (_tmp25_, (GObject*) _tmp34_, &_tmp35_);
		default_visibility_index = _tmp35_;
		_tmp14_ = _tmp36_;
		_g_object_unref0 (_tmp34_);
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		AdwComboRow* _tmp37_;
		_tmp37_ = self->priv->post_visibility_combo_row;
		adw_combo_row_set_selected (_tmp37_, default_visibility_index);
	} else {
		AdwComboRow* _tmp38_;
		_tmp38_ = self->priv->post_visibility_combo_row;
		adw_combo_row_set_selected (_tmp38_, (guint) 0);
		tuba_dialogs_preferences_on_post_visibility_changed (self);
	}
	_tmp39_ = tuba_accounts;
	_tmp40_ = tuba_account_store_get_active (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = _tmp41_->supported_mime_types;
	g_object_get (_tmp42_, "n-items", &_tmp43_, NULL);
	_tmp44_ = _tmp43_;
	if (_tmp44_ > ((guint) 1)) {
		AdwComboRow* _tmp45_;
		_tmp45_ = self->priv->default_content_type_combo_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp45_, TRUE);
		tuba_dialogs_preferences_setup_content_type_combo_row (self);
	}
	_tmp46_ = tuba_accounts;
	_tmp47_ = tuba_account_store_get_active (_tmp46_);
	_tmp48_ = _tmp47_;
	_tmp49_ = tuba_instance_account_get_tuba_api_versions (_tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp50_);
	_tmp52_ = _tmp51_;
	if (((gint) _tmp52_) >= 7) {
		AdwComboRow* _tmp53_;
		AdwComboRow* _tmp54_;
		GtkPropertyExpression* _tmp55_;
		GtkPropertyExpression* _tmp56_;
		_tmp53_ = self->priv->default_quotation_policy_combo_row;
		gtk_widget_set_visible ((GtkWidget*) _tmp53_, TRUE);
		_tmp54_ = self->priv->default_quotation_policy_combo_row;
		_tmp55_ = (GtkPropertyExpression*) gtk_property_expression_new (TUBA_DIALOGS_PREFERENCES_TYPE_QUOTATION_POLICY, NULL, "title");
		_tmp56_ = _tmp55_;
		adw_combo_row_set_expression (_tmp54_, (GtkExpression*) _tmp56_);
		_gtk_expression_unref0 (_tmp56_);
		tuba_dialogs_preferences_setup_quote_policy_combo_row (self);
	}
	tuba_dialogs_preferences_setup_languages_combo_row (self);
	tuba_dialogs_preferences_setup_notification_mutes (self);
	tuba_dialogs_preferences_setup_filters (self, NULL, NULL);
	tuba_dialogs_preferences_bind (self);
	g_signal_connect_object ((AdwDialog*) self, "closed", (GCallback) _tuba_dialogs_preferences_on_window_closed_adw_dialog_closed, self, 0);
	_tmp57_ = tuba_app;
	g_signal_connect_object (_tmp57_, "toast", (GCallback) _tuba_dialogs_preferences_app_sent_toast_tuba_application_toast, self, 0);
	return obj;
}

static void
tuba_dialogs_preferences_class_init (TubaDialogsPreferencesClass * klass,
                                     gpointer klass_data)
{
	tuba_dialogs_preferences_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsPreferences_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_preferences_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_preferences_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_preferences_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_preferences_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/dev/geopjr/Tuba/ui/dialogs/preferences.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "post_visibility_combo_row", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, post_visibility_combo_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "default_language_combo_row", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, default_language_combo_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "default_content_type_combo_row", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, default_content_type_combo_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "default_quotation_policy_combo_row", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, default_quotation_policy_combo_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "work_in_background", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, work_in_background));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "live_updates", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, live_updates));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "public_live_updates", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, public_live_updates));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_spoilers", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, show_spoilers));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_preview_cards", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, show_preview_cards));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "font_adjustment", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, font_adjustment));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "larger_line_height", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, larger_line_height));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scale_emoji_hover", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, scale_emoji_hover));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "strip_tracking", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, strip_tracking));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "letterbox_media", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, letterbox_media));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "enlarge_custom_emojis", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, enlarge_custom_emojis));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_sensitive_media", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, show_sensitive_media));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "group_push_notifications", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, group_push_notifications));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "advanced_boost_dialog", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, advanced_boost_dialog));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "darken_images_on_dark_mode", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, darken_images_on_dark_mode));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "reply_to_old_post_reminder", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, reply_to_old_post_reminder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "boost_alt_text_reminder", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, boost_alt_text_reminder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "fetch_remote_media_reminder", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, fetch_remote_media_reminder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "copy_private_link_reminder", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, copy_private_link_reminder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "proxy_entry", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, proxy_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "dim_trivial_notifications", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, dim_trivial_notifications));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "collapse_long_posts", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, collapse_long_posts));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "in_app_browser_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, in_app_browser_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "up_group", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, up_group));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "new_followers_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, new_followers_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "new_follower_requests_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, new_follower_requests_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "favorites_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, favorites_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "mentions_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, mentions_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "boosts_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, boosts_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "poll_results_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, poll_results_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "edits_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, edits_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "quotes_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, quotes_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "quote_edited_notifications_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, quote_edited_notifications_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "analytics_switch", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, analytics_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "update_contributors", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, update_contributors));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "keywords_group", FALSE, TubaDialogsPreferences_private_offset + G_STRUCT_OFFSET (TubaDialogsPreferencesPrivate, keywords_group));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_font_adjustment_value_changed", G_CALLBACK(_tuba_dialogs_preferences_on_font_adjustment_value_changed_gtk_adjustment_value_changed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_analytics_preview", G_CALLBACK(_tuba_dialogs_preferences_on_analytics_preview_gtk_button_clicked));
	g_type_ensure (TUBA_TYPE_COLOR_SCHEME_LIST_MODEL);
}

static void
tuba_dialogs_preferences_instance_init (TubaDialogsPreferences * self,
                                        gpointer klass)
{
	self->priv = tuba_dialogs_preferences_get_instance_private (self);
	self->priv->_lang_changed = FALSE;
	self->priv->_privacy_changed = FALSE;
	self->priv->_quote_policy_changed = FALSE;
	self->priv->dlcr_id = (gulong) 0;
	self->priv->font_timeout = (guint) 0;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tuba_dialogs_preferences_finalize (GObject * obj)
{
	TubaDialogsPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_TYPE_PREFERENCES, TubaDialogsPreferences);
	g_debug ("Preferences.vala:4: Destroying Preferences");
	if (self->priv->font_timeout > ((guint) 0)) {
		g_source_remove (self->priv->font_timeout);
		self->priv->font_timeout = (guint) 0;
	}
	_g_object_unref0 (self->priv->filter_row);
	self->priv->notification_type_mutes = (_vala_TubaDialogsPreferencesNotificationTypeMute_array_free (self->priv->notification_type_mutes, self->priv->notification_type_mutes_length1), NULL);
	G_OBJECT_CLASS (tuba_dialogs_preferences_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_preferences_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsPreferencesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_preferences_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsPreferences), 0, (GInstanceInitFunc) tuba_dialogs_preferences_instance_init, NULL };
	GType tuba_dialogs_preferences_type_id;
	tuba_dialogs_preferences_type_id = g_type_register_static (adw_preferences_dialog_get_type (), "TubaDialogsPreferences", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsPreferences_private_offset = g_type_add_instance_private (tuba_dialogs_preferences_type_id, sizeof (TubaDialogsPreferencesPrivate));
	return tuba_dialogs_preferences_type_id;
}

GType
tuba_dialogs_preferences_get_type (void)
{
	static GType tuba_dialogs_preferences_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_preferences_type_id__once)) {
		GType tuba_dialogs_preferences_type_id;
		tuba_dialogs_preferences_type_id = tuba_dialogs_preferences_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_preferences_type_id__once, tuba_dialogs_preferences_type_id);
	}
	return tuba_dialogs_preferences_type_id__once;
}

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

static void
_vala_tuba_dialogs_preferences_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	TubaDialogsPreferences * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_TYPE_PREFERENCES, TubaDialogsPreferences);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_color_scheme_list_model_get_instance_private (TubaColorSchemeListModel* self)
{
	return G_STRUCT_MEMBER_P (self, TubaColorSchemeListModel_private_offset);
}

static GObject*
tuba_color_scheme_list_model_real_get_item (GListModel* base,
                                            guint position)
{
	TubaColorSchemeListModel * self;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GeeArrayList* _tmp3_;
	gpointer _tmp4_;
	GObject* result;
	self = (TubaColorSchemeListModel*) base;
	_tmp0_ = self->priv->array;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	_vala_return_val_if_fail (position < ((guint) _tmp2_), "position < array.size", NULL);
	_tmp3_ = self->priv->array;
	_tmp4_ = gee_abstract_list_get ((GeeAbstractList*) _tmp3_, (gint) position);
	result = (GObject*) ((TubaColorSchemeListItem*) _tmp4_);
	return result;
}

static GType
tuba_color_scheme_list_model_real_get_item_type (GListModel* base)
{
	TubaColorSchemeListModel * self;
	GType result;
	self = (TubaColorSchemeListModel*) base;
	result = TUBA_TYPE_COLOR_SCHEME_LIST_ITEM;
	return result;
}

static guint
tuba_color_scheme_list_model_real_get_n_items (GListModel* base)
{
	TubaColorSchemeListModel * self;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	guint result;
	self = (TubaColorSchemeListModel*) base;
	_tmp0_ = self->priv->array;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = (guint) _tmp2_;
	return result;
}

GObject*
tuba_color_scheme_list_model_get_object (TubaColorSchemeListModel* self,
                                         guint position)
{
	GObject* _tmp0_;
	GObject* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_list_model_get_item ((GListModel*) self, position);
	result = _tmp0_;
	return result;
}

TubaColorSchemeListModel*
tuba_color_scheme_list_model_construct (GType object_type)
{
	TubaColorSchemeListModel * self = NULL;
	self = (TubaColorSchemeListModel*) g_object_new (object_type, NULL);
	return self;
}

TubaColorSchemeListModel*
tuba_color_scheme_list_model_new (void)
{
	return tuba_color_scheme_list_model_construct (TUBA_TYPE_COLOR_SCHEME_LIST_MODEL);
}

static GObject *
tuba_color_scheme_list_model_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaColorSchemeListModel * self;
	GeeArrayList* _tmp0_;
	TubaColorSchemeListItem* _tmp1_;
	TubaColorSchemeListItem* _tmp2_;
	GeeArrayList* _tmp3_;
	TubaColorSchemeListItem* _tmp4_;
	TubaColorSchemeListItem* _tmp5_;
	GeeArrayList* _tmp6_;
	TubaColorSchemeListItem* _tmp7_;
	TubaColorSchemeListItem* _tmp8_;
	parent_class = G_OBJECT_CLASS (tuba_color_scheme_list_model_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_TYPE_COLOR_SCHEME_LIST_MODEL, TubaColorSchemeListModel);
	_tmp0_ = self->priv->array;
	_tmp1_ = tuba_color_scheme_list_item_new (TUBA_COLOR_SCHEME_SYSTEM);
	_tmp2_ = _tmp1_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = self->priv->array;
	_tmp4_ = tuba_color_scheme_list_item_new (TUBA_COLOR_SCHEME_LIGHT);
	_tmp5_ = _tmp4_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = self->priv->array;
	_tmp7_ = tuba_color_scheme_list_item_new (TUBA_COLOR_SCHEME_DARK);
	_tmp8_ = _tmp7_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp6_, _tmp8_);
	_g_object_unref0 (_tmp8_);
	return obj;
}

static void
tuba_color_scheme_list_model_class_init (TubaColorSchemeListModelClass * klass,
                                         gpointer klass_data)
{
	tuba_color_scheme_list_model_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaColorSchemeListModel_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_color_scheme_list_model_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_color_scheme_list_model_finalize;
}

static void
tuba_color_scheme_list_model_g_list_model_interface_init (GListModelInterface * iface,
                                                          gpointer iface_data)
{
	tuba_color_scheme_list_model_g_list_model_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_item = (GObject* (*) (GListModel*, guint)) tuba_color_scheme_list_model_real_get_item;
	iface->get_item_type = (GType (*) (GListModel*)) tuba_color_scheme_list_model_real_get_item_type;
	iface->get_n_items = (guint (*) (GListModel*)) tuba_color_scheme_list_model_real_get_n_items;
}

static void
tuba_color_scheme_list_model_instance_init (TubaColorSchemeListModel * self,
                                            gpointer klass)
{
	GeeArrayList* _tmp0_;
	self->priv = tuba_color_scheme_list_model_get_instance_private (self);
	_tmp0_ = gee_array_list_new (TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->array = _tmp0_;
}

static void
tuba_color_scheme_list_model_finalize (GObject * obj)
{
	TubaColorSchemeListModel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_TYPE_COLOR_SCHEME_LIST_MODEL, TubaColorSchemeListModel);
	_g_object_unref0 (self->priv->array);
	G_OBJECT_CLASS (tuba_color_scheme_list_model_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_color_scheme_list_model_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaColorSchemeListModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_color_scheme_list_model_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaColorSchemeListModel), 0, (GInstanceInitFunc) tuba_color_scheme_list_model_instance_init, NULL };
	static const GInterfaceInfo g_list_model_info = { (GInterfaceInitFunc) tuba_color_scheme_list_model_g_list_model_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_color_scheme_list_model_type_id;
	tuba_color_scheme_list_model_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaColorSchemeListModel", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_color_scheme_list_model_type_id, g_list_model_get_type (), &g_list_model_info);
	TubaColorSchemeListModel_private_offset = g_type_add_instance_private (tuba_color_scheme_list_model_type_id, sizeof (TubaColorSchemeListModelPrivate));
	return tuba_color_scheme_list_model_type_id;
}

GType
tuba_color_scheme_list_model_get_type (void)
{
	static GType tuba_color_scheme_list_model_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_color_scheme_list_model_type_id__once)) {
		GType tuba_color_scheme_list_model_type_id;
		tuba_color_scheme_list_model_type_id = tuba_color_scheme_list_model_get_type_once ();
		g_once_init_leave_pointer (&tuba_color_scheme_list_model_type_id__once, tuba_color_scheme_list_model_type_id);
	}
	return tuba_color_scheme_list_model_type_id__once;
}

static inline gpointer
tuba_color_scheme_list_item_get_instance_private (TubaColorSchemeListItem* self)
{
	return G_STRUCT_MEMBER_P (self, TubaColorSchemeListItem_private_offset);
}

TubaColorSchemeListItem*
tuba_color_scheme_list_item_construct (GType object_type,
                                       TubaColorScheme color_scheme)
{
	TubaColorSchemeListItem * self = NULL;
	self = (TubaColorSchemeListItem*) g_object_new (object_type, "color-scheme", color_scheme, NULL);
	return self;
}

TubaColorSchemeListItem*
tuba_color_scheme_list_item_new (TubaColorScheme color_scheme)
{
	return tuba_color_scheme_list_item_construct (TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, color_scheme);
}

TubaColorScheme
tuba_color_scheme_list_item_get_color_scheme (TubaColorSchemeListItem* self)
{
	TubaColorScheme result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_color_scheme;
	return result;
}

static void
tuba_color_scheme_list_item_set_color_scheme (TubaColorSchemeListItem* self,
                                              TubaColorScheme value)
{
	TubaColorScheme old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_color_scheme_list_item_get_color_scheme (self);
	if (old_value != value) {
		self->priv->_color_scheme = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_color_scheme_list_item_properties[TUBA_COLOR_SCHEME_LIST_ITEM_COLOR_SCHEME_PROPERTY]);
	}
}

gchar*
tuba_color_scheme_list_item_get_name (TubaColorSchemeListItem* self)
{
	gchar* result;
	TubaColorScheme _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_color_scheme;
	_tmp1_ = tuba_color_scheme_to_string (_tmp0_);
	result = _tmp1_;
	return result;
}

AdwColorScheme
tuba_color_scheme_list_item_get_adwaita_scheme (TubaColorSchemeListItem* self)
{
	AdwColorScheme result;
	TubaColorScheme _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_color_scheme;
	result = tuba_color_scheme_to_adwaita_scheme (_tmp0_);
	return result;
}

static void
tuba_color_scheme_list_item_class_init (TubaColorSchemeListItemClass * klass,
                                        gpointer klass_data)
{
	tuba_color_scheme_list_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaColorSchemeListItem_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_color_scheme_list_item_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_color_scheme_list_item_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_color_scheme_list_item_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_COLOR_SCHEME_LIST_ITEM_COLOR_SCHEME_PROPERTY, tuba_color_scheme_list_item_properties[TUBA_COLOR_SCHEME_LIST_ITEM_COLOR_SCHEME_PROPERTY] = g_param_spec_enum ("color-scheme", "color-scheme", "color-scheme", TUBA_TYPE_COLOR_SCHEME, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_COLOR_SCHEME_LIST_ITEM_NAME_PROPERTY, tuba_color_scheme_list_item_properties[TUBA_COLOR_SCHEME_LIST_ITEM_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_COLOR_SCHEME_LIST_ITEM_ADWAITA_SCHEME_PROPERTY, tuba_color_scheme_list_item_properties[TUBA_COLOR_SCHEME_LIST_ITEM_ADWAITA_SCHEME_PROPERTY] = g_param_spec_enum ("adwaita-scheme", "adwaita-scheme", "adwaita-scheme", adw_color_scheme_get_type (), 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
tuba_color_scheme_list_item_instance_init (TubaColorSchemeListItem * self,
                                           gpointer klass)
{
	self->priv = tuba_color_scheme_list_item_get_instance_private (self);
}

static void
tuba_color_scheme_list_item_finalize (GObject * obj)
{
	TubaColorSchemeListItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, TubaColorSchemeListItem);
	G_OBJECT_CLASS (tuba_color_scheme_list_item_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_color_scheme_list_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaColorSchemeListItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_color_scheme_list_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaColorSchemeListItem), 0, (GInstanceInitFunc) tuba_color_scheme_list_item_instance_init, NULL };
	GType tuba_color_scheme_list_item_type_id;
	tuba_color_scheme_list_item_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaColorSchemeListItem", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaColorSchemeListItem_private_offset = g_type_add_instance_private (tuba_color_scheme_list_item_type_id, sizeof (TubaColorSchemeListItemPrivate));
	return tuba_color_scheme_list_item_type_id;
}

GType
tuba_color_scheme_list_item_get_type (void)
{
	static GType tuba_color_scheme_list_item_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_color_scheme_list_item_type_id__once)) {
		GType tuba_color_scheme_list_item_type_id;
		tuba_color_scheme_list_item_type_id = tuba_color_scheme_list_item_get_type_once ();
		g_once_init_leave_pointer (&tuba_color_scheme_list_item_type_id__once, tuba_color_scheme_list_item_type_id);
	}
	return tuba_color_scheme_list_item_type_id__once;
}

static void
_vala_tuba_color_scheme_list_item_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	TubaColorSchemeListItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, TubaColorSchemeListItem);
	switch (property_id) {
		case TUBA_COLOR_SCHEME_LIST_ITEM_COLOR_SCHEME_PROPERTY:
		g_value_set_enum (value, tuba_color_scheme_list_item_get_color_scheme (self));
		break;
		case TUBA_COLOR_SCHEME_LIST_ITEM_NAME_PROPERTY:
		g_value_take_string (value, tuba_color_scheme_list_item_get_name (self));
		break;
		case TUBA_COLOR_SCHEME_LIST_ITEM_ADWAITA_SCHEME_PROPERTY:
		g_value_set_enum (value, tuba_color_scheme_list_item_get_adwaita_scheme (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_color_scheme_list_item_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	TubaColorSchemeListItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_TYPE_COLOR_SCHEME_LIST_ITEM, TubaColorSchemeListItem);
	switch (property_id) {
		case TUBA_COLOR_SCHEME_LIST_ITEM_COLOR_SCHEME_PROPERTY:
		tuba_color_scheme_list_item_set_color_scheme (self, g_value_get_enum (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);
}

