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

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

#define TUBA_DIALOGS_COMPOSER_DIALOG_LOCAL_ONLY_GLITCH_SUFFIX " 👁️"
#define TUBA_DIALOGS_COMPOSER_DIALOG_DEFAULT_EMPTY_STATE ((guint) 2395400144LL)
#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_COMPOSER_TYPE_DIALOG (tuba_dialogs_composer_dialog_get_type ())
#define TUBA_DIALOGS_COMPOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, TubaDialogsComposerDialog))
#define TUBA_DIALOGS_COMPOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, TubaDialogsComposerDialogClass))
#define TUBA_DIALOGS_COMPOSER_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_TYPE_DIALOG))
#define TUBA_DIALOGS_COMPOSER_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_TYPE_DIALOG))
#define TUBA_DIALOGS_COMPOSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, TubaDialogsComposerDialogClass))

typedef struct _TubaDialogsComposerDialog TubaDialogsComposerDialog;
typedef struct _TubaDialogsComposerDialogClass TubaDialogsComposerDialogClass;
typedef struct _TubaDialogsComposerDialogPrivate TubaDialogsComposerDialogPrivate;

#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_STATUS (tuba_api_status_get_type ())
#define TUBA_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatus))
#define TUBA_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))
#define TUBA_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_STATUS))
#define TUBA_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_STATUS))
#define TUBA_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_STATUS, TubaAPIStatusClass))

typedef struct _TubaAPIStatus TubaAPIStatus;
typedef struct _TubaAPIStatusClass TubaAPIStatusClass;
typedef void (*TubaDialogsComposerDialogSuccessCallback) (TubaAPIStatus* cb_status, gpointer user_data);

#define TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON (tuba_dialogs_composer_dialog_post_button_get_type ())
#define TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON, TubaDialogsComposerDialogPostButton))
#define TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON, TubaDialogsComposerDialogPostButtonClass))
#define TUBA_DIALOGS_COMPOSER_DIALOG_IS_POST_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON))
#define TUBA_DIALOGS_COMPOSER_DIALOG_IS_POST_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON))
#define TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON, TubaDialogsComposerDialogPostButtonClass))

typedef struct _TubaDialogsComposerDialogPostButton TubaDialogsComposerDialogPostButton;
typedef struct _TubaDialogsComposerDialogPostButtonClass TubaDialogsComposerDialogPostButtonClass;

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

typedef struct _TubaDialogsComposerComponentsDropOverlay TubaDialogsComposerComponentsDropOverlay;
typedef struct _TubaDialogsComposerComponentsDropOverlayClass TubaDialogsComposerComponentsDropOverlayClass;

#define TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW (tuba_widgets_sandwich_source_view_get_type ())
#define TUBA_WIDGETS_SANDWICH_SOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceView))
#define TUBA_WIDGETS_SANDWICH_SOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceViewClass))
#define TUBA_WIDGETS_IS_SANDWICH_SOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW))
#define TUBA_WIDGETS_IS_SANDWICH_SOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW))
#define TUBA_WIDGETS_SANDWICH_SOURCE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceViewClass))

typedef struct _TubaWidgetsSandwichSourceView TubaWidgetsSandwichSourceView;
typedef struct _TubaWidgetsSandwichSourceViewClass TubaWidgetsSandwichSourceViewClass;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR (tuba_dialogs_composer_components_editor_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditor))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditorClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditorClass))

typedef struct _TubaDialogsComposerComponentsEditor TubaDialogsComposerComponentsEditor;
typedef struct _TubaDialogsComposerComponentsEditorClass TubaDialogsComposerComponentsEditorClass;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS (tuba_dialogs_composer_components_polls_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, TubaDialogsComposerComponentsPolls))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, TubaDialogsComposerComponentsPollsClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_POLLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_POLLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, TubaDialogsComposerComponentsPollsClass))

typedef struct _TubaDialogsComposerComponentsPolls TubaDialogsComposerComponentsPolls;
typedef struct _TubaDialogsComposerComponentsPollsClass TubaDialogsComposerComponentsPollsClass;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHMENTS_BIN (tuba_dialogs_composer_components_attachments_bin_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHMENTS_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHMENTS_BIN, TubaDialogsComposerComponentsAttachmentsBin))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHMENTS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHMENTS_BIN, TubaDialogsComposerComponentsAttachmentsBinClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHMENTS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHMENTS_BIN))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHMENTS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHMENTS_BIN))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHMENTS_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHMENTS_BIN, TubaDialogsComposerComponentsAttachmentsBinClass))

typedef struct _TubaDialogsComposerComponentsAttachmentsBin TubaDialogsComposerComponentsAttachmentsBin;
typedef struct _TubaDialogsComposerComponentsAttachmentsBinClass TubaDialogsComposerComponentsAttachmentsBinClass;
enum  {
	TUBA_DIALOGS_COMPOSER_DIALOG_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_IS_NARROW_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_CHAR_LIMIT_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_CW_COUNT_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_RESERVED_CHARS_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_REMAINING_CHARS_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_QUOTE_ID_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_SCHEDULED_ID_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_EDIT_STATUS_ID_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

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

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

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

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

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

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_API_TYPE_EMOJI (tuba_api_emoji_get_type ())
#define TUBA_API_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_EMOJI, TubaAPIEmoji))
#define TUBA_API_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_EMOJI, TubaAPIEmojiClass))
#define TUBA_API_IS_EMOJI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_EMOJI))
#define TUBA_API_IS_EMOJI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_EMOJI))
#define TUBA_API_EMOJI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_EMOJI, TubaAPIEmojiClass))

typedef struct _TubaAPIEmoji TubaAPIEmoji;
typedef struct _TubaAPIEmojiClass TubaAPIEmojiClass;

#define TUBA_WIDGETS_TYPE_CUSTOM_EMOJI_CHOOSER_V2 (tuba_widgets_custom_emoji_chooser_v2_get_type ())
#define TUBA_WIDGETS_CUSTOM_EMOJI_CHOOSER_V2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_CUSTOM_EMOJI_CHOOSER_V2, TubaWidgetsCustomEmojiChooserV2))
#define TUBA_WIDGETS_CUSTOM_EMOJI_CHOOSER_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_CUSTOM_EMOJI_CHOOSER_V2, TubaWidgetsCustomEmojiChooserV2Class))
#define TUBA_WIDGETS_IS_CUSTOM_EMOJI_CHOOSER_V2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_CUSTOM_EMOJI_CHOOSER_V2))
#define TUBA_WIDGETS_IS_CUSTOM_EMOJI_CHOOSER_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_CUSTOM_EMOJI_CHOOSER_V2))
#define TUBA_WIDGETS_CUSTOM_EMOJI_CHOOSER_V2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_CUSTOM_EMOJI_CHOOSER_V2, TubaWidgetsCustomEmojiChooserV2Class))

typedef struct _TubaWidgetsCustomEmojiChooserV2 TubaWidgetsCustomEmojiChooserV2;
typedef struct _TubaWidgetsCustomEmojiChooserV2Class TubaWidgetsCustomEmojiChooserV2Class;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE (tuba_dialogs_composer_components_attachable_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, TubaDialogsComposerComponentsAttachable))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, TubaDialogsComposerComponentsAttachableIface))

typedef struct _TubaDialogsComposerComponentsAttachable TubaDialogsComposerComponentsAttachable;
typedef struct _TubaDialogsComposerComponentsAttachableIface TubaDialogsComposerComponentsAttachableIface;

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

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

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;

#define 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_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY (tuba_dialogs_composer_dialog_quotation_policy_get_type ())
#define TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicy))
#define TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicyClass))
#define TUBA_DIALOGS_COMPOSER_DIALOG_IS_QUOTATION_POLICY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY))
#define TUBA_DIALOGS_COMPOSER_DIALOG_IS_QUOTATION_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY))
#define TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicyClass))

typedef struct _TubaDialogsComposerDialogQuotationPolicy TubaDialogsComposerDialogQuotationPolicy;
typedef struct _TubaDialogsComposerDialogQuotationPolicyClass TubaDialogsComposerDialogQuotationPolicyClass;
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_API_TYPE_INSTANCE (tuba_api_instance_get_type ())
#define TUBA_API_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_INSTANCE, TubaAPIInstance))
#define TUBA_API_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_INSTANCE, TubaAPIInstanceClass))
#define TUBA_API_IS_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_INSTANCE))
#define TUBA_API_IS_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_INSTANCE))
#define TUBA_API_INSTANCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_INSTANCE, TubaAPIInstanceClass))

typedef struct _TubaAPIInstance TubaAPIInstance;
typedef struct _TubaAPIInstanceClass TubaAPIInstanceClass;

#define TUBA_API_PLEROMA_TYPE_INSTANCE (tuba_api_pleroma_instance_get_type ())
#define TUBA_API_PLEROMA_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_PLEROMA_TYPE_INSTANCE, TubaAPIPleromaInstance))
#define TUBA_API_PLEROMA_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_PLEROMA_TYPE_INSTANCE, TubaAPIPleromaInstanceClass))
#define TUBA_API_PLEROMA_IS_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_PLEROMA_TYPE_INSTANCE))
#define TUBA_API_PLEROMA_IS_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_PLEROMA_TYPE_INSTANCE))
#define TUBA_API_PLEROMA_INSTANCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_PLEROMA_TYPE_INSTANCE, TubaAPIPleromaInstanceClass))

typedef struct _TubaAPIPleromaInstance TubaAPIPleromaInstance;
typedef struct _TubaAPIPleromaInstanceClass TubaAPIPleromaInstanceClass;
typedef enum  {
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_NONE = 1 << 0,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_QUOTE = 1 << 1,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_EMOJI_REACTIONS = 1 << 2,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_BUBBLE = 1 << 3,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS = 1 << 4,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_FEATURE_TAGS = 1 << 5,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ENDORSE_USERS = 1 << 6,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_MUTUALS = 1 << 7,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_TRANSLATION = 1 << 8,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP = 1 << 9,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH = 1 << 10,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_LOCAL_ONLY = 1 << 11,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL = 1 << 12
} TubaInstanceAccountInstanceFeatures;

#define TUBA_INSTANCE_ACCOUNT_TYPE_INSTANCE_FEATURES (tuba_instance_account_instance_features_get_type ())

#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 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_DIALOGS_COMPOSER_DIALOG_TYPE_PRECOMPOSE (tuba_dialogs_composer_dialog_precompose_get_type ())
typedef struct _TubaDialogsComposerDialogPrecompose TubaDialogsComposerDialogPrecompose;

#define TUBA_API_TYPE_POLL (tuba_api_poll_get_type ())
#define TUBA_API_POLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_POLL, TubaAPIPoll))
#define TUBA_API_POLL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_POLL, TubaAPIPollClass))
#define TUBA_API_IS_POLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_POLL))
#define TUBA_API_IS_POLL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_POLL))
#define TUBA_API_POLL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_POLL, TubaAPIPollClass))

typedef struct _TubaAPIPoll TubaAPIPoll;
typedef struct _TubaAPIPollClass TubaAPIPollClass;

#define TUBA_API_TYPE_ATTACHMENT (tuba_api_attachment_get_type ())
#define TUBA_API_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ATTACHMENT, TubaAPIAttachment))
#define TUBA_API_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ATTACHMENT, TubaAPIAttachmentClass))
#define TUBA_API_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ATTACHMENT))
#define TUBA_API_IS_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ATTACHMENT))
#define TUBA_API_ATTACHMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ATTACHMENT, TubaAPIAttachmentClass))

typedef struct _TubaAPIAttachment TubaAPIAttachment;
typedef struct _TubaAPIAttachmentClass TubaAPIAttachmentClass;

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

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;

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

typedef struct _TubaDialogsMainWindow TubaDialogsMainWindow;
typedef struct _TubaDialogsMainWindowClass TubaDialogsMainWindowClass;
typedef enum  {
	TUBA_API_STATUS_VISIBILITY_PUBLIC,
	TUBA_API_STATUS_VISIBILITY_UNLISTED,
	TUBA_API_STATUS_VISIBILITY_PRIVATE,
	TUBA_API_STATUS_VISIBILITY_DIRECT,
	TUBA_API_STATUS_VISIBILITY_LOCAL
} TubaAPIStatusVisibility;

#define TUBA_API_STATUS_TYPE_VISIBILITY (tuba_api_status_visibility_get_type ())

#define TUBA_API_TYPE_QUOTE (tuba_api_quote_get_type ())
#define TUBA_API_QUOTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_QUOTE, TubaAPIQuote))
#define TUBA_API_QUOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_QUOTE, TubaAPIQuoteClass))
#define TUBA_API_IS_QUOTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_QUOTE))
#define TUBA_API_IS_QUOTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_QUOTE))
#define TUBA_API_QUOTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_QUOTE, TubaAPIQuoteClass))

typedef struct _TubaAPIQuote TubaAPIQuote;
typedef struct _TubaAPIQuoteClass TubaAPIQuoteClass;

#define TUBA_WIDGETS_TYPE_STATUS (tuba_widgets_status_get_type ())
#define TUBA_WIDGETS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatus))
#define TUBA_WIDGETS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatusClass))
#define TUBA_WIDGETS_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_STATUS))
#define TUBA_WIDGETS_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_STATUS))
#define TUBA_WIDGETS_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatusClass))

typedef struct _TubaWidgetsStatus TubaWidgetsStatus;
typedef struct _TubaWidgetsStatusClass TubaWidgetsStatusClass;

#define TUBA_API_TYPE_STATUS_SOURCE (tuba_api_status_source_get_type ())
#define TUBA_API_STATUS_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_STATUS_SOURCE, TubaAPIStatusSource))
#define TUBA_API_STATUS_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_STATUS_SOURCE, TubaAPIStatusSourceClass))
#define TUBA_API_IS_STATUS_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_STATUS_SOURCE))
#define TUBA_API_IS_STATUS_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_STATUS_SOURCE))
#define TUBA_API_STATUS_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_STATUS_SOURCE, TubaAPIStatusSourceClass))

typedef struct _TubaAPIStatusSource TubaAPIStatusSource;
typedef struct _TubaAPIStatusSourceClass TubaAPIStatusSourceClass;

#define TUBA_API_STATUS_TYPE_QUOTE_APPROVAL (tuba_api_status_quote_approval_get_type ())
#define TUBA_API_STATUS_QUOTE_APPROVAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_STATUS_TYPE_QUOTE_APPROVAL, TubaAPIStatusQuoteApproval))
#define TUBA_API_STATUS_QUOTE_APPROVAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_STATUS_TYPE_QUOTE_APPROVAL, TubaAPIStatusQuoteApprovalClass))
#define TUBA_API_STATUS_IS_QUOTE_APPROVAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_STATUS_TYPE_QUOTE_APPROVAL))
#define TUBA_API_STATUS_IS_QUOTE_APPROVAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_STATUS_TYPE_QUOTE_APPROVAL))
#define TUBA_API_STATUS_QUOTE_APPROVAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_STATUS_TYPE_QUOTE_APPROVAL, TubaAPIStatusQuoteApprovalClass))

typedef struct _TubaAPIStatusQuoteApproval TubaAPIStatusQuoteApproval;
typedef struct _TubaAPIStatusQuoteApprovalClass TubaAPIStatusQuoteApprovalClass;

#define TUBA_API_TYPE_SCHEDULED_STATUS (tuba_api_scheduled_status_get_type ())
#define TUBA_API_SCHEDULED_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_SCHEDULED_STATUS, TubaAPIScheduledStatus))
#define TUBA_API_SCHEDULED_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_SCHEDULED_STATUS, TubaAPIScheduledStatusClass))
#define TUBA_API_IS_SCHEDULED_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_SCHEDULED_STATUS))
#define TUBA_API_IS_SCHEDULED_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_SCHEDULED_STATUS))
#define TUBA_API_SCHEDULED_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_SCHEDULED_STATUS, TubaAPIScheduledStatusClass))

typedef struct _TubaAPIScheduledStatus TubaAPIScheduledStatus;
typedef struct _TubaAPIScheduledStatusClass TubaAPIScheduledStatusClass;

#define TUBA_API_SCHEDULED_STATUS_TYPE_PARAMS (tuba_api_scheduled_status_params_get_type ())
#define TUBA_API_SCHEDULED_STATUS_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_SCHEDULED_STATUS_TYPE_PARAMS, TubaAPIScheduledStatusParams))
#define TUBA_API_SCHEDULED_STATUS_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_SCHEDULED_STATUS_TYPE_PARAMS, TubaAPIScheduledStatusParamsClass))
#define TUBA_API_SCHEDULED_STATUS_IS_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_SCHEDULED_STATUS_TYPE_PARAMS))
#define TUBA_API_SCHEDULED_STATUS_IS_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_SCHEDULED_STATUS_TYPE_PARAMS))
#define TUBA_API_SCHEDULED_STATUS_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_SCHEDULED_STATUS_TYPE_PARAMS, TubaAPIScheduledStatusParamsClass))

typedef struct _TubaAPIScheduledStatusParams TubaAPIScheduledStatusParams;
typedef struct _TubaAPIScheduledStatusParamsClass TubaAPIScheduledStatusParamsClass;

#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_OOPSIE (tuba_oopsie_get_type ())

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

typedef struct _TubaNetwork TubaNetwork;
typedef struct _TubaNetworkClass TubaNetworkClass;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData;
#define __vala_GdkFileList_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkFileList_free (var), NULL)))
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
typedef struct _TubaDialogsComposerDialogOnClipboardPasteAsyncData TubaDialogsComposerDialogOnClipboardPasteAsyncData;
#define _g_uri_unref0(var) ((var == NULL) ? NULL : (var = (g_uri_unref (var), NULL)))

#define TUBA_API_TYPE_SEARCH_RESULTS (tuba_api_search_results_get_type ())
#define TUBA_API_SEARCH_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_SEARCH_RESULTS, TubaAPISearchResults))
#define TUBA_API_SEARCH_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_SEARCH_RESULTS, TubaAPISearchResultsClass))
#define TUBA_API_IS_SEARCH_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_SEARCH_RESULTS))
#define TUBA_API_IS_SEARCH_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_SEARCH_RESULTS))
#define TUBA_API_SEARCH_RESULTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_SEARCH_RESULTS, TubaAPISearchResultsClass))

typedef struct _TubaAPISearchResults TubaAPISearchResults;
typedef struct _TubaAPISearchResultsClass TubaAPISearchResultsClass;
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 _TubaDialogsComposerDialogHandlePotentialQuotePasteRealData TubaDialogsComposerDialogHandlePotentialQuotePasteRealData;
typedef struct _TubaWidgetsStatusPrivate TubaWidgetsStatusPrivate;

#define TUBA_WIDGETS_TYPE_RICH_LABEL (tuba_widgets_rich_label_get_type ())
#define TUBA_WIDGETS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabel))
#define TUBA_WIDGETS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabelClass))
#define TUBA_WIDGETS_IS_RICH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL))
#define TUBA_WIDGETS_IS_RICH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_RICH_LABEL))
#define TUBA_WIDGETS_RICH_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_RICH_LABEL, TubaWidgetsRichLabelClass))

typedef struct _TubaWidgetsRichLabel TubaWidgetsRichLabel;
typedef struct _TubaWidgetsRichLabelClass TubaWidgetsRichLabelClass;

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

typedef struct _TubaWidgetsAvatar TubaWidgetsAvatar;
typedef struct _TubaWidgetsAvatarClass TubaWidgetsAvatarClass;

#define TUBA_WIDGETS_TYPE_MARKUP_VIEW (tuba_widgets_markup_view_get_type ())
#define TUBA_WIDGETS_MARKUP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_MARKUP_VIEW, TubaWidgetsMarkupView))
#define TUBA_WIDGETS_MARKUP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_MARKUP_VIEW, TubaWidgetsMarkupViewClass))
#define TUBA_WIDGETS_IS_MARKUP_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_MARKUP_VIEW))
#define TUBA_WIDGETS_IS_MARKUP_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_MARKUP_VIEW))
#define TUBA_WIDGETS_MARKUP_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_MARKUP_VIEW, TubaWidgetsMarkupViewClass))

typedef struct _TubaWidgetsMarkupView TubaWidgetsMarkupView;
typedef struct _TubaWidgetsMarkupViewClass TubaWidgetsMarkupViewClass;

#define TUBA_WIDGETS_TYPE_FADE_BIN (tuba_widgets_fade_bin_get_type ())
#define TUBA_WIDGETS_FADE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_FADE_BIN, TubaWidgetsFadeBin))
#define TUBA_WIDGETS_FADE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_FADE_BIN, TubaWidgetsFadeBinClass))
#define TUBA_WIDGETS_IS_FADE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_FADE_BIN))
#define TUBA_WIDGETS_IS_FADE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_FADE_BIN))
#define TUBA_WIDGETS_FADE_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_FADE_BIN, TubaWidgetsFadeBinClass))

typedef struct _TubaWidgetsFadeBin TubaWidgetsFadeBin;
typedef struct _TubaWidgetsFadeBinClass TubaWidgetsFadeBinClass;

#define TUBA_WIDGETS_TYPE_PREVIEW_CARD (tuba_widgets_preview_card_get_type ())
#define TUBA_WIDGETS_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD, TubaWidgetsPreviewCard))
#define TUBA_WIDGETS_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD, TubaWidgetsPreviewCardClass))
#define TUBA_WIDGETS_IS_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD))
#define TUBA_WIDGETS_IS_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD))
#define TUBA_WIDGETS_PREVIEW_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD, TubaWidgetsPreviewCardClass))

typedef struct _TubaWidgetsPreviewCard TubaWidgetsPreviewCard;
typedef struct _TubaWidgetsPreviewCardClass TubaWidgetsPreviewCardClass;

#define TUBA_WIDGETS_TYPE_VOTE_BOX (tuba_widgets_vote_box_get_type ())
#define TUBA_WIDGETS_VOTE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_VOTE_BOX, TubaWidgetsVoteBox))
#define TUBA_WIDGETS_VOTE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_VOTE_BOX, TubaWidgetsVoteBoxClass))
#define TUBA_WIDGETS_IS_VOTE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_VOTE_BOX))
#define TUBA_WIDGETS_IS_VOTE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_VOTE_BOX))
#define TUBA_WIDGETS_VOTE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_VOTE_BOX, TubaWidgetsVoteBoxClass))

typedef struct _TubaWidgetsVoteBox TubaWidgetsVoteBox;
typedef struct _TubaWidgetsVoteBoxClass TubaWidgetsVoteBoxClass;
typedef struct _Block40Data Block40Data;
#define _gdk_content_formats_unref0(var) ((var == NULL) ? NULL : (var = (gdk_content_formats_unref (var), NULL)))

#define TUBA_DIALOGS_TYPE_SCHEDULE (tuba_dialogs_schedule_get_type ())
#define TUBA_DIALOGS_SCHEDULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_SCHEDULE, TubaDialogsSchedule))
#define TUBA_DIALOGS_SCHEDULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_SCHEDULE, TubaDialogsScheduleClass))
#define TUBA_DIALOGS_IS_SCHEDULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_SCHEDULE))
#define TUBA_DIALOGS_IS_SCHEDULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_SCHEDULE))
#define TUBA_DIALOGS_SCHEDULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_SCHEDULE, TubaDialogsScheduleClass))

typedef struct _TubaDialogsSchedule TubaDialogsSchedule;
typedef struct _TubaDialogsScheduleClass TubaDialogsScheduleClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_time_zone_unref0(var) ((var == NULL) ? NULL : (var = (g_time_zone_unref (var), NULL)))

#define TUBA_DIALOGS_TYPE_DRAFTS (tuba_dialogs_drafts_get_type ())
#define TUBA_DIALOGS_DRAFTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_DRAFTS, TubaDialogsDrafts))
#define TUBA_DIALOGS_DRAFTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_DRAFTS, TubaDialogsDraftsClass))
#define TUBA_DIALOGS_IS_DRAFTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_DRAFTS))
#define TUBA_DIALOGS_IS_DRAFTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_DRAFTS))
#define TUBA_DIALOGS_DRAFTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_DRAFTS, TubaDialogsDraftsClass))

typedef struct _TubaDialogsDrafts TubaDialogsDrafts;
typedef struct _TubaDialogsDraftsClass TubaDialogsDraftsClass;

#define TUBA_WIDGETS_TYPE_SCHEDULED_STATUS (tuba_widgets_scheduled_status_get_type ())
#define TUBA_WIDGETS_SCHEDULED_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_SCHEDULED_STATUS, TubaWidgetsScheduledStatus))
#define TUBA_WIDGETS_SCHEDULED_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_SCHEDULED_STATUS, TubaWidgetsScheduledStatusClass))
#define TUBA_WIDGETS_IS_SCHEDULED_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_SCHEDULED_STATUS))
#define TUBA_WIDGETS_IS_SCHEDULED_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_SCHEDULED_STATUS))
#define TUBA_WIDGETS_SCHEDULED_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_SCHEDULED_STATUS, TubaWidgetsScheduledStatusClass))

typedef struct _TubaWidgetsScheduledStatus TubaWidgetsScheduledStatus;
typedef struct _TubaWidgetsScheduledStatusClass TubaWidgetsScheduledStatusClass;
typedef struct _Block41Data Block41Data;

#define TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE (tuba_dialogs_composer_preferred_sizeable_get_type ())
#define TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE, TubaDialogsComposerPreferredSizeable))
#define TUBA_DIALOGS_COMPOSER_IS_PREFERRED_SIZEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE))
#define TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE, TubaDialogsComposerPreferredSizeableIface))

typedef struct _TubaDialogsComposerPreferredSizeable TubaDialogsComposerPreferredSizeable;
typedef struct _TubaDialogsComposerPreferredSizeableIface TubaDialogsComposerPreferredSizeableIface;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHMENTS_BIN_TYPE_METADATA (tuba_dialogs_composer_components_attachments_bin_metadata_get_type ())
typedef struct _TubaDialogsComposerComponentsAttachmentsBinMetadata TubaDialogsComposerComponentsAttachmentsBinMetadata;
typedef struct _TubaDialogsComposerDialogTransactionData TubaDialogsComposerDialogTransactionData;
typedef struct _TubaDialogsComposerDialogDeleteScheduledPostData TubaDialogsComposerDialogDeleteScheduledPostData;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _TubaDialogsComposerDialogPostButtonPrivate TubaDialogsComposerDialogPostButtonPrivate;
enum  {
	TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_ALLOW_DYNAMIC_NAME_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_dialog_post_button_properties[TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_NUM_PROPERTIES];
enum  {
	TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_CLICKED_SIGNAL,
	TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_NUM_SIGNALS
};
static guint tuba_dialogs_composer_dialog_post_button_signals[TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_NUM_SIGNALS] = {0};
typedef struct _TubaDialogsComposerDialogQuotationPolicyPrivate TubaDialogsComposerDialogQuotationPolicyPrivate;
enum  {
	TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_POLICY_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_TITLE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_SUBTITLE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_ICON_PROPERTY,
	TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_dialog_quotation_policy_properties[TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_NUM_PROPERTIES];
#define _adw_breakpoint_condition_free0(var) ((var == NULL) ? NULL : (var = (adw_breakpoint_condition_free (var), NULL)))

struct _TubaDialogsComposerDialog {
	AdwDialog parent_instance;
	TubaDialogsComposerDialogPrivate * priv;
	GtkDropDown* visibility_button;
	GtkDropDown* language_button;
	GtkDropDown* content_type_button;
	GtkDropDown* quote_policy_button;
	GtkToggleButton* local_only_button;
	TubaDialogsComposerDialogSuccessCallback cb;
	gpointer cb_target;
	GDestroyNotify cb_target_destroy_notify;
};

struct _TubaDialogsComposerDialogClass {
	AdwDialogClass parent_class;
};

struct _TubaDialogsComposerDialogPrivate {
	GtkLabel* counter_label;
	TubaDialogsComposerDialogPostButton* post_btn;
	GtkBox* btns_box;
	GtkBox* dropdowns_box;
	GtkGrid* grid;
	AdwToastOverlay* toast_overlay;
	AdwNavigationView* nav_view;
	AdwToolbarView* toolbar_view;
	TubaDialogsComposerComponentsDropOverlay* drop_overlay;
	AdwNavigationPage* nav_page;
	GtkScrolledWindow* scroller;
	AdwHeaderBar* headerbar;
	GtkRevealer* main_title_revealer;
	GtkRevealer* cw_revealer;
	GtkMenuButton* native_emojis_button;
	GtkMenuButton* custom_emojis_button;
	GtkToggleButton* cw_button;
	GtkEntry* cw_entry;
	GtkToggleButton* poll_button;
	GtkToggleButton* sensitive_media_button;
	GtkButton* add_media_button;
	gboolean _is_narrow;
	gint64 _char_limit;
	gint64 _cw_count;
	gint8 _reserved_chars;
	gint64 _remaining_chars;
	gboolean _edit_mode;
	gchar* _schedule_iso8601;
	gchar* _in_reply_to_id;
	gchar* _quote_id;
	gchar* _scheduled_id;
	gchar* _edit_status_id;
	gboolean _quote_limited;
	TubaDialogsComposerComponentsEditor* editor;
	guint unique_state;
	TubaDialogsComposerComponentsPolls* polls_component;
	AdwTimedAnimation* polls_animation;
	TubaDialogsComposerComponentsAttachmentsBin* attachmentsbin_component;
	GCancellable* quote_paste_cancellable;
	GtkWidget* inline_quote_widget;
	AdwTimedAnimation* inline_quote_widget_animation;
};

struct _TubaDialogsComposerComponentsAttachableIface {
	GTypeInterface parent_iface;
	gboolean (*get_edit_mode) (TubaDialogsComposerComponentsAttachable* self);
	void (*set_edit_mode) (TubaDialogsComposerComponentsAttachable* self, gboolean value);
};

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 _TubaUtilsLocales {
	GObject parent_instance;
	TubaUtilsLocalesPrivate * priv;
	GListStore* list_store;
};

struct _TubaUtilsLocalesClass {
	GObjectClass parent_class;
};

struct _TubaDialogsComposerDialogPrecompose {
	gchar* content;
	gchar* spoiler;
	gchar* quote_id;
	gchar* scheduled_id;
	gchar* in_reply_to_id;
	TubaAPIPoll* poll;
	GeeArrayList* media_attachments;
	gboolean sensitive_media;
	gboolean local_only;
	gboolean force_cursor_at_start;
};

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 _TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsComposerDialog* self;
	gboolean editing;
	gboolean _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gboolean is_reply;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* status_id;
	gchar* _tmp7_;
	TubaRequestV2* req;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaRequestV2* _tmp16_;
	TubaRequestV2* _tmp17_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp18_;
	GInputStream* _tmp19_;
	JsonParser* parser;
	GInputStream* _tmp20_;
	JsonParser* _tmp21_;
	JsonNode* node;
	TubaNetwork* _tmp22_;
	JsonParser* _tmp23_;
	JsonNode* _tmp24_;
	TubaAPIStatus* api_status;
	JsonNode* _tmp25_;
	TubaAPIStatus* _tmp26_;
	TubaAPIStatus* _tmp27_;
	TubaAPIStatus* _tmp28_;
	TubaAPIStatus* _tmp29_;
	TubaAPIStatus* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	TubaAPIStatus* _tmp33_;
	TubaAPIStatus* _tmp34_;
	TubaAPIStatus* _tmp35_;
	GeeArrayList* _tmp36_;
	GeeArrayList* _tmp37_;
	TubaWidgetsStatus* widget_status;
	TubaAPIStatus* _tmp38_;
	GtkWidget* _tmp39_;
	TubaWidgetsStatus* _tmp40_;
	TubaWidgetsStatus* _tmp41_;
	TubaWidgetsStatus* _tmp42_;
	TubaWidgetsStatus* _tmp43_;
	TubaWidgetsStatus* _tmp44_;
	GtkListBox* lbox;
	GtkListBox* _tmp45_;
	GtkListBox* _tmp46_;
	TubaWidgetsStatus* _tmp47_;
	const gchar* _tmp48_;
	gchar* composer_title;
	TubaAPIStatus* _tmp49_;
	TubaAPIAccount* _tmp50_;
	TubaAPIAccount* _tmp51_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	gchar* _tmp54_;
	const gchar* _tmp55_;
	const gchar* _tmp56_;
	gchar* _tmp57_;
	const gchar* _tmp58_;
	GtkListBox* _tmp59_;
	GtkScrolledWindow* _tmp60_;
	guint _tmp61_;
	GtkScrolledWindow* _tmp62_;
	GError* e;
	const gchar* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	const gchar* _tmp66_;
	GError* _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	gchar* _tmp70_;
	gchar* _tmp71_;
	gboolean _tmp72_;
	const gchar* _tmp73_;
	const gchar* _tmp74_;
	const gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	TubaAccountStore* _tmp78_;
	TubaInstanceAccount* _tmp79_;
	TubaInstanceAccount* _tmp80_;
	TubaInstanceAccount* _tmp81_;
	TubaRequestV2* _tmp82_;
	GInputStream* _vala1_in_stream;
	TubaRequestV2* _tmp83_;
	GInputStream* _tmp84_;
	JsonParser* _vala1_parser;
	GInputStream* _tmp85_;
	JsonParser* _tmp86_;
	JsonNode* _vala1_node;
	TubaNetwork* _tmp87_;
	JsonParser* _tmp88_;
	JsonNode* _tmp89_;
	TubaAPIStatus* _vala1_api_status;
	JsonNode* _tmp90_;
	TubaAPIStatus* _tmp91_;
	TubaAPIStatus* _tmp92_;
	GError* _vala1_e;
	const gchar* _tmp93_;
	const gchar* _tmp94_;
	GError* _tmp95_;
	const gchar* _tmp96_;
	const gchar* _tmp97_;
	gchar* _tmp98_;
	gchar* _tmp99_;
	GError* _inner_error0_;
};

struct _TubaDialogsComposerDialogOnClipboardPasteAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsComposerDialog* self;
	GdkClipboard* clipboard;
	GFile** files;
	GFile** _tmp0_;
	gint files_length1;
	gint _files_size_;
	GValue* copied_value;
	GValue* _tmp1_;
	GValue* _tmp2_;
	GFile* copied_file;
	GValue* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GFile** _tmp8_;
	gint _tmp8__length1;
	GdkTexture* copied_texture;
	GdkTexture* _tmp9_;
	GdkTexture* _tmp10_;
	GFileIOStream* stream;
	GFile* _tmp11_;
	GFileIOStream* _tmp12_;
	GFile* _tmp13_;
	GFile* _tmp14_;
	GOutputStream* ostream;
	GFileIOStream* _tmp15_;
	GOutputStream* _tmp16_;
	GOutputStream* _tmp17_;
	GOutputStream* _tmp18_;
	GOutputStream* _tmp19_;
	GdkTexture* _tmp20_;
	GBytes* _tmp21_;
	GBytes* _tmp22_;
	GError* e;
	GError* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp28_;
	GFile** _tmp29_;
	gint _tmp29__length1;
	GFile** _tmp30_;
	gint _tmp30__length1;
	GError* _inner_error0_;
};

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

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

struct _TubaApplicationQuestionButtons {
	TubaApplicationQuestionButton yes;
	TubaApplicationQuestionButton no;
};

struct _TubaDialogsComposerDialogHandlePotentialQuotePasteRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsComposerDialog* self;
	gchar* original_text;
	GdkClipboard* clipboard;
	gchar* clipboard_text;
	GCancellable* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	GUri* uri;
	GUri* _tmp6_;
	const gchar* _tmp7_;
	GUri* _tmp8_;
	GUri* _tmp9_;
	gboolean _tmp10_;
	GUri* _tmp11_;
	const gchar* _tmp12_;
	GUri* _tmp13_;
	const gchar* _tmp14_;
	gchar* path;
	GUri* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gboolean _tmp18_;
	const gchar* _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	TubaRequestV2* req;
	TubaAccountStore* _tmp27_;
	TubaInstanceAccount* _tmp28_;
	TubaInstanceAccount* _tmp29_;
	TubaInstanceAccount* _tmp30_;
	GCancellable* _tmp31_;
	GCancellable* _tmp32_;
	TubaRequestV2* _tmp33_;
	TubaRequestV2* _tmp34_;
	TubaRequestV2* _tmp35_;
	TubaRequestV2* _tmp36_;
	TubaRequestV2* _tmp37_;
	GUri* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp41_;
	GInputStream* _tmp42_;
	JsonParser* parser;
	GInputStream* _tmp43_;
	JsonParser* _tmp44_;
	TubaAPISearchResults* results;
	TubaNetwork* _tmp45_;
	JsonParser* _tmp46_;
	JsonNode* _tmp47_;
	JsonNode* _tmp48_;
	TubaAPISearchResults* _tmp49_;
	TubaAPISearchResults* _tmp50_;
	TubaAPISearchResults* _tmp51_;
	GeeArrayList* _tmp52_;
	GeeArrayList* _tmp53_;
	gint _tmp54_;
	gint _tmp55_;
	TubaAPIStatus* status;
	TubaAPISearchResults* _tmp56_;
	GeeArrayList* _tmp57_;
	GeeArrayList* _tmp58_;
	gpointer _tmp59_;
	TubaAPIStatus* _tmp60_;
	gboolean _tmp61_;
	gboolean _tmp62_;
	TubaWidgetsStatus* status_widget;
	TubaAPIStatus* _tmp63_;
	GtkWidget* _tmp64_;
	TubaWidgetsStatus* _tmp65_;
	TubaWidgetsStatus* _tmp66_;
	TubaWidgetsStatus* _tmp67_;
	TubaWidgetsStatus* _tmp68_;
	TubaWidgetsStatus* _tmp69_;
	TubaWidgetsStatus* _tmp70_;
	TubaApplicationQuestionAnswer qs;
	TubaApplication* _tmp71_;
	const gchar* _tmp72_;
	gchar* _tmp73_;
	gchar* _tmp74_;
	TubaApplicationQuestionText _tmp75_;
	TubaApplicationQuestionButtons _tmp76_;
	TubaWidgetsStatus* _tmp77_;
	TubaApplicationQuestionAnswer _tmp78_;
	TubaDialogsComposerComponentsEditor* _tmp79_;
	GtkTextBuffer* _tmp80_;
	GtkTextBuffer* _tmp81_;
	TubaAPIStatus* _tmp82_;
	const gchar* _tmp83_;
	const gchar* _tmp84_;
	TubaAPIStatus* _tmp85_;
	GError* e;
	GError* _tmp86_;
	const gchar* _tmp87_;
	const gchar* _tmp88_;
	gchar* _tmp89_;
	gchar* _tmp90_;
	GError* _inner_error0_;
};

struct _TubaWidgetsStatus {
	GtkListBoxRow parent_instance;
	TubaWidgetsStatusPrivate * priv;
	TubaDialogsComposerDialogSuccessCallback reply_cb;
	gpointer reply_cb_target;
	GDestroyNotify reply_cb_target_destroy_notify;
	GtkBox* status_box;
	GtkBox* avatar_side;
	GtkBox* title_box;
	GtkBox* content_side;
	AdwWrapBox* name_wrapbox;
	GtkMenuButton* menu_button;
	GtkImage* header_icon;
	TubaWidgetsRichLabel* header_label;
	GtkButton* header_button;
	TubaWidgetsAvatar* avatar;
	GtkOverlay* avatar_overlay;
	GtkButton* name_button;
	TubaWidgetsRichLabel* name_label;
	GtkLabel* handle_label;
	GtkBox* indicators;
	GtkLabel* date_label;
	GtkImage* pin_indicator;
	GtkImage* edited_indicator;
	GtkImage* visibility_indicator;
	GtkBox* content_column;
	GtkStack* spoiler_stack;
	GtkBox* content_box;
	TubaWidgetsMarkupView* content;
	GtkButton* spoiler_button;
	GtkLabel* spoiler_label;
	GtkLabel* spoiler_label_rev;
	GtkBox* spoiler_status_con;
	TubaWidgetsFadeBin* fade_bin;
	GtkStack* filter_stack;
	GtkLabel* filter_label;
	GtkLabel* filter_author_label;
	TubaWidgetsPreviewCard* prev_card;
	TubaWidgetsVoteBox* poll;
};

struct _TubaWidgetsStatusClass {
	GtkListBoxRowClass parent_class;
	void (*on_open) (TubaWidgetsStatus* self);
	void (*change_kind) (TubaWidgetsStatus* self);
	void (*bind) (TubaWidgetsStatus* self);
};

struct _Block40Data {
	int _ref_count_;
	TubaDialogsComposerDialog* self;
	GdkClipboard* clipboard;
};

struct _Block41Data {
	int _ref_count_;
	TubaDialogsComposerDialog* self;
	TubaWidgetsScheduledStatus* draft_status_widget;
};

struct _TubaDialogsComposerPreferredSizeableIface {
	GTypeInterface parent_iface;
	gint (*get_preferred_height) (TubaDialogsComposerPreferredSizeable* self);
	void (*set_preferred_height) (TubaDialogsComposerPreferredSizeable* self, gint value);
	gint (*get_preferred_width) (TubaDialogsComposerPreferredSizeable* self);
	void (*set_preferred_width) (TubaDialogsComposerPreferredSizeable* self, gint value);
};

struct _TubaDialogsComposerComponentsAttachmentsBinMetadata {
	gchar* id;
	gchar* description;
	gchar* focus;
};

struct _TubaDialogsComposerDialogTransactionData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsComposerDialog* self;
	TubaRequestV2* publish_req;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaRequestV2* _tmp4_;
	gboolean _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaInstanceAccount* _tmp15_;
	TubaRequestV2* _tmp16_;
	TubaRequestV2* _tmp17_;
	JsonBuilder* _tmp18_;
	JsonBuilder* _tmp19_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp20_;
	GInputStream* _tmp21_;
	JsonParser* parser;
	GInputStream* _tmp22_;
	JsonParser* _tmp23_;
	JsonNode* node;
	TubaNetwork* _tmp24_;
	JsonParser* _tmp25_;
	JsonNode* _tmp26_;
	TubaAPIStatus* status;
	const gchar* _tmp27_;
	TubaAPIScheduledStatus* scheduled_status;
	JsonNode* _tmp28_;
	TubaAPIScheduledStatus* _tmp29_;
	TubaAPIScheduledStatus* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	TubaAPIScheduledStatus* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	TubaAPIStatus* _tmp40_;
	JsonNode* _tmp41_;
	TubaAPIStatus* _tmp42_;
	TubaAPIStatus* _tmp43_;
	TubaAPIStatus* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	const gchar* _tmp50_;
	TubaDialogsComposerDialogSuccessCallback _tmp51_;
	gpointer _tmp51__target;
	TubaDialogsComposerDialogSuccessCallback _tmp52_;
	gpointer _tmp52__target;
	TubaAPIStatus* _tmp53_;
	const gchar* _tmp54_;
	TubaApplication* _tmp55_;
	GError* _inner_error0_;
};

struct _TubaDialogsComposerDialogDeleteScheduledPostData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaDialogsComposerDialog* self;
	TubaRequestV2* req;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	TubaAccountStore* _tmp4_;
	TubaInstanceAccount* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaRequestV2* _tmp8_;
	TubaRequestV2* _tmp9_;
	GInputStream* _tmp10_;
	GInputStream* _tmp11_;
	TubaDialogsComposerDialogSuccessCallback _tmp12_;
	gpointer _tmp12__target;
	TubaDialogsComposerDialogSuccessCallback _tmp13_;
	gpointer _tmp13__target;
	GError* e;
	GError* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GError* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	TubaApplication* _tmp22_;
	GError* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GError* _inner_error0_;
};

struct _TubaDialogsComposerDialogPostButton {
	AdwBin parent_instance;
	TubaDialogsComposerDialogPostButtonPrivate * priv;
};

struct _TubaDialogsComposerDialogPostButtonClass {
	AdwBinClass parent_class;
};

struct _TubaDialogsComposerDialogPostButtonPrivate {
	gboolean _allow_dynamic_name;
	gchar* original_label;
	GtkWidget* label_widget;
	gboolean drafts_default;
};

struct _TubaDialogsComposerDialogQuotationPolicy {
	GObject parent_instance;
	TubaDialogsComposerDialogQuotationPolicyPrivate * priv;
};

struct _TubaDialogsComposerDialogQuotationPolicyClass {
	GObjectClass parent_class;
};

struct _TubaDialogsComposerDialogQuotationPolicyPrivate {
	TubaAPIStatusQuotePolicy _policy;
};

static gint TubaDialogsComposerDialog_private_offset;
static gpointer tuba_dialogs_composer_dialog_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaApplication* tuba_app;
VALA_EXTERN GEqualFunc tuba_utils_locales_locale_compare;
VALA_EXTERN GEqualFunc tuba_dialogs_composer_dialog_quotation_policy_compare;
VALA_EXTERN GEqualFunc tuba_instance_account_status_content_type_compare;
VALA_EXTERN TubaSettings* tuba_settings;
VALA_EXTERN TubaNetwork* tuba_network;
static gint TubaDialogsComposerDialogPostButton_private_offset;
static gpointer tuba_dialogs_composer_dialog_post_button_parent_class = NULL;
static gint TubaDialogsComposerDialogQuotationPolicy_private_offset;
static gpointer tuba_dialogs_composer_dialog_quotation_policy_parent_class = NULL;
GEqualFunc tuba_dialogs_composer_dialog_quotation_policy_compare = NULL;

VALA_EXTERN GType tuba_dialogs_composer_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerDialog, 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_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatus, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_dialog_post_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerDialogPostButton, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_drop_overlay_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsDropOverlay, g_object_unref)
VALA_EXTERN GType tuba_widgets_sandwich_source_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsSandwichSourceView, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_editor_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsEditor, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_polls_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsPolls, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_attachments_bin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsAttachmentsBin, g_object_unref)
static void tuba_dialogs_composer_dialog_install_emoji_pickers (TubaDialogsComposerDialog* self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_insert_string_at_cursor (TubaDialogsComposerComponentsEditor* self,
                                                                      const gchar* text);
static void _tuba_dialogs_composer_components_editor_insert_string_at_cursor_gtk_emoji_chooser_emoji_picked (GtkEmojiChooser* _sender,
                                                                                                      const gchar* text,
                                                                                                      gpointer self);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN GType tuba_api_emoji_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIEmoji, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_instance_account_get_instance_emojis (TubaInstanceAccount* self);
VALA_EXTERN GType tuba_widgets_custom_emoji_chooser_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsCustomEmojiChooserV2, g_object_unref)
VALA_EXTERN TubaWidgetsCustomEmojiChooserV2* tuba_widgets_custom_emoji_chooser_v2_new (void);
VALA_EXTERN TubaWidgetsCustomEmojiChooserV2* tuba_widgets_custom_emoji_chooser_v2_construct (GType object_type);
static void _tuba_dialogs_composer_components_editor_insert_string_at_cursor_tuba_widgets_custom_emoji_chooser_v2_emoji_picked (TubaWidgetsCustomEmojiChooserV2* _sender,
                                                                                                                         const gchar* shortcode,
                                                                                                                         gpointer self);
static void tuba_dialogs_composer_dialog_install_editor (TubaDialogsComposerDialog* self);
VALA_EXTERN TubaDialogsComposerComponentsEditor* tuba_dialogs_composer_components_editor_new (void);
VALA_EXTERN TubaDialogsComposerComponentsEditor* tuba_dialogs_composer_components_editor_construct (GType object_type);
VALA_EXTERN GType tuba_dialogs_composer_components_attachable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsAttachable, g_object_unref)
static gboolean tuba_dialogs_composer_dialog_get_edit_mode (TubaDialogsComposerDialog* self);
VALA_EXTERN void tuba_dialogs_composer_components_attachable_set_edit_mode (TubaDialogsComposerComponentsAttachable* self,
                                                                gboolean value);
static void tuba_dialogs_composer_dialog_on_toast (TubaDialogsComposerDialog* self,
                                            AdwToast* toast);
static void _tuba_dialogs_composer_dialog_on_toast_tuba_dialogs_composer_components_attachable_toast (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                               AdwToast* toast,
                                                                                               gpointer self);
static void tuba_dialogs_composer_dialog_on_push_subpage (TubaDialogsComposerDialog* self,
                                                   AdwNavigationPage* page);
static void _tuba_dialogs_composer_dialog_on_push_subpage_tuba_dialogs_composer_components_attachable_push_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                             AdwNavigationPage* page,
                                                                                                             gpointer self);
static void tuba_dialogs_composer_dialog_on_pop_subpage (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_on_pop_subpage_tuba_dialogs_composer_components_attachable_pop_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                           gpointer self);
static void tuba_dialogs_composer_dialog_on_paste (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_on_paste_gtk_text_view_paste_clipboard (GtkTextView* _sender,
                                                                           gpointer self);
static void tuba_dialogs_composer_dialog_on_commit (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_on_commit_tuba_dialogs_composer_components_editor_ctrl_return_pressed (TubaDialogsComposerComponentsEditor* _sender,
                                                                                                          gpointer self);
static void tuba_dialogs_composer_dialog_update_remaining_chars (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_update_remaining_chars_g_object_notify (GObject* _sender,
                                                                           GParamSpec* pspec,
                                                                           gpointer self);
VALA_EXTERN gint64 tuba_dialogs_composer_dialog_get_char_limit (TubaDialogsComposerDialog* self);
VALA_EXTERN gint64 tuba_dialogs_composer_components_editor_get_char_count (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN gint64 tuba_dialogs_composer_dialog_get_cw_count (TubaDialogsComposerDialog* self);
VALA_EXTERN gint8 tuba_dialogs_composer_dialog_get_reserved_chars (TubaDialogsComposerDialog* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_remaining_chars (TubaDialogsComposerDialog* self,
                                                       gint64 value);
static void tuba_dialogs_composer_dialog_append_dropdown (TubaDialogsComposerDialog* self,
                                                   GtkDropDown* dropdown);
VALA_EXTERN void tuba_dialogs_composer_dialog_install_visibility (TubaDialogsComposerDialog* self,
                                                      const gchar* default_visibility);
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 GType tuba_instance_account_visibility_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccountVisibility, g_object_unref)
static void tuba_dialogs_composer_dialog_visibility_changed (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_visibility_changed_g_object_notify (GObject* _sender,
                                                                       GParamSpec* pspec,
                                                                       gpointer self);
VALA_EXTERN const gchar* tuba_instance_account_visibility_get_id (TubaInstanceAccountVisibility* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_post_button_update_label (TubaDialogsComposerDialogPostButton* self,
                                                            const gchar* new_label);
static void tuba_dialogs_composer_dialog_install_languages (TubaDialogsComposerDialog* self,
                                                     const gchar* locale_iso);
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 GType tuba_utils_locales_locale_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaUtilsLocalesLocale, g_object_unref)
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);
static void tuba_dialogs_composer_dialog_on_language_changed (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_on_language_changed_g_object_notify (GObject* _sender,
                                                                        GParamSpec* pspec,
                                                                        gpointer self);
VALA_EXTERN const gchar* tuba_utils_locales_locale_get_locale (TubaUtilsLocalesLocale* self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_locale (TubaDialogsComposerComponentsEditor* self,
                                                         const gchar* value);
static void tuba_dialogs_composer_dialog_cw_changed_with_locale (TubaDialogsComposerDialog* self,
                                                          const gchar* locale);
static void tuba_dialogs_composer_dialog_cw_changed (TubaDialogsComposerDialog* self);
VALA_EXTERN gint tuba_utils_counting_chars (const gchar* content,
                                const gchar* language);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_cw_count (TubaDialogsComposerDialog* self,
                                                gint64 value);
static void tuba_dialogs_composer_dialog_install_quote_policy_button (TubaDialogsComposerDialog* self,
                                                               const gchar* quote_policy,
                                                               gboolean sensitive);
VALA_EXTERN GType tuba_dialogs_composer_dialog_quotation_policy_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerDialogQuotationPolicy, g_object_unref)
VALA_EXTERN GType tuba_api_status_quote_policy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaDialogsComposerDialogQuotationPolicy* tuba_dialogs_composer_dialog_quotation_policy_new_from_policy (TubaAPIStatusQuotePolicy policy);
VALA_EXTERN TubaDialogsComposerDialogQuotationPolicy* tuba_dialogs_composer_dialog_quotation_policy_construct_from_policy (GType object_type,
                                                                                                               TubaAPIStatusQuotePolicy policy);
VALA_EXTERN TubaDialogsComposerDialogQuotationPolicy* tuba_dialogs_composer_dialog_quotation_policy_new (const gchar* policy_name);
VALA_EXTERN TubaDialogsComposerDialogQuotationPolicy* tuba_dialogs_composer_dialog_quotation_policy_construct (GType object_type,
                                                                                                   const gchar* policy_name);
static void tuba_dialogs_composer_dialog_install_local_only_button (TubaDialogsComposerDialog* self,
                                                             gboolean active);
static void tuba_dialogs_composer_dialog_local_only_button_toggled (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_local_only_button_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                        gpointer self);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_reserved_chars (TubaDialogsComposerDialog* self,
                                                      gint8 value);
static void tuba_dialogs_composer_dialog_update_local_only_button_state (TubaDialogsComposerDialog* self,
                                                                  gboolean skip_remaining_char_recalc);
VALA_EXTERN GType tuba_api_instance_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstance, g_object_unref)
VALA_EXTERN TubaAPIInstance* tuba_instance_account_get_instance_info (TubaInstanceAccount* self);
VALA_EXTERN GType tuba_api_pleroma_instance_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPleromaInstance, g_object_unref)
VALA_EXTERN TubaAPIPleromaInstance* tuba_api_instance_get_pleroma (TubaAPIInstance* self);
VALA_EXTERN GType tuba_instance_account_instance_features_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccountInstanceFeatures tuba_instance_account_get_tuba_instance_features (TubaInstanceAccount* 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_composer_dialog_install_content_types (TubaDialogsComposerDialog* self,
                                                         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)
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);
static void tuba_dialogs_composer_dialog_on_content_type_changed (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_on_content_type_changed_g_object_notify (GObject* _sender,
                                                                            GParamSpec* pspec,
                                                                            gpointer self);
VALA_EXTERN const gchar* tuba_instance_account_status_content_type_get_syntax (TubaInstanceAccountStatusContentType* self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_content_type (TubaDialogsComposerComponentsEditor* self,
                                                               const gchar* value);
static void tuba_dialogs_composer_dialog_on_vadjustment_value_changed (TubaDialogsComposerDialog* self);
VALA_EXTERN GType tuba_dialogs_composer_dialog_precompose_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_api_poll_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPoll, g_object_unref)
VALA_EXTERN GType tuba_api_attachment_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAttachment, g_object_unref)
VALA_EXTERN TubaDialogsComposerDialogPrecompose* tuba_dialogs_composer_dialog_precompose_dup (const TubaDialogsComposerDialogPrecompose* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_precompose_free (TubaDialogsComposerDialogPrecompose* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_precompose_copy (const TubaDialogsComposerDialogPrecompose* self,
                                                   TubaDialogsComposerDialogPrecompose* dest);
VALA_EXTERN void tuba_dialogs_composer_dialog_precompose_destroy (TubaDialogsComposerDialogPrecompose* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaDialogsComposerDialogPrecompose, tuba_dialogs_composer_dialog_precompose_destroy)
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_new (TubaDialogsComposerDialogPrecompose* precompose,
                                                             const gchar* default_visibility,
                                                             const gchar* default_language,
                                                             const gchar* post_button_label,
                                                             gboolean edit_mode,
                                                             gboolean can_schedule,
                                                             const gchar* default_quote_policy,
                                                             gboolean can_update_draft);
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_construct (GType object_type,
                                                                   TubaDialogsComposerDialogPrecompose* precompose,
                                                                   const gchar* default_visibility,
                                                                   const gchar* default_language,
                                                                   const gchar* post_button_label,
                                                                   gboolean edit_mode,
                                                                   gboolean can_schedule,
                                                                   const gchar* default_quote_policy,
                                                                   gboolean can_update_draft);
static void tuba_dialogs_composer_dialog_set_edit_mode (TubaDialogsComposerDialog* self,
                                                 gboolean value);
VALA_EXTERN void tuba_dialogs_composer_dialog_post_button_install (TubaDialogsComposerDialogPostButton* self,
                                                       const gchar* label,
                                                       gboolean with_menu,
                                                       gboolean can_update_draft,
                                                       gboolean can_schedule,
                                                       gboolean can_have_drafts);
static void _tuba_dialogs_composer_dialog_on_commit_tuba_dialogs_composer_dialog_post_button_clicked (TubaDialogsComposerDialogPostButton* _sender,
                                                                                               gpointer self);
VALA_EXTERN void tuba_dialogs_composer_dialog_post_button_set_allow_dynamic_name (TubaDialogsComposerDialogPostButton* self,
                                                                      gboolean value);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN const gchar* tuba_settings_get_default_content_type (TubaSettings* self);
static void _tuba_dialogs_composer_dialog_cw_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                    gpointer self);
static void _tuba_dialogs_composer_dialog_cw_changed_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                         gpointer self);
static void _tuba_dialogs_composer_dialog_on_vadjustment_value_changed_gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                                                              gpointer self);
static void tuba_dialogs_composer_dialog_toggle_poll_component (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_toggle_poll_component_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                    gpointer self);
static void tuba_dialogs_composer_dialog_on_add_media_clicked (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_on_add_media_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static inline void tuba_dialogs_composer_dialog_set_editor_title (TubaDialogsComposerDialog* self,
                                                    const gchar* new_title,
                                                    GtkWidget* widget_status);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_quote_id (TubaDialogsComposerDialog* self,
                                                const gchar* value);
static void tuba_dialogs_composer_dialog_update_quote_id_state (TubaDialogsComposerDialog* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_scheduled_id (TubaDialogsComposerDialog* self,
                                                    const gchar* value);
static void tuba_dialogs_composer_dialog_set_in_reply_to_id (TubaDialogsComposerDialog* self,
                                                      const gchar* value);
static void tuba_dialogs_composer_dialog_init_polls_component (TubaDialogsComposerDialog* self,
                                                        TubaAPIPoll* poll_obj);
static void tuba_dialogs_composer_dialog_create_attachmentsbin (TubaDialogsComposerDialog* self,
                                                         GeeArrayList* attachments_obj);
VALA_EXTERN void tuba_widgets_sandwich_source_view_add_bottom_child (TubaWidgetsSandwichSourceView* self,
                                                         GtkWidget* new_bottom_child,
                                                         gboolean append);
VALA_EXTERN gboolean tuba_dialogs_composer_dialog_post_button_get_allow_dynamic_name (TubaDialogsComposerDialogPostButton* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_post_button_show_drafts_default (TubaDialogsComposerDialogPostButton* self);
static guint tuba_dialogs_composer_dialog_generate_unique_state (TubaDialogsComposerDialog* self);
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaDialogsMainWindow* tuba_application_get_main_window (TubaApplication* self);
static gboolean tuba_dialogs_composer_dialog_ensure_focus_and_vadjustment (TubaDialogsComposerDialog* self);
static void tuba_dialogs_composer_dialog_scroller_mapped (TubaDialogsComposerDialog* self);
static gboolean tuba_dialogs_composer_dialog_real_grab_focus (GtkWidget* base);
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_new_reply (TubaAPIStatus* to,
                                                                   TubaDialogsComposerDialogSuccessCallback t_cb,
                                                                   gpointer t_cb_target,
                                                                   GDestroyNotify t_cb_target_destroy_notify);
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_construct_reply (GType object_type,
                                                                         TubaAPIStatus* to,
                                                                         TubaDialogsComposerDialogSuccessCallback t_cb,
                                                                         gpointer t_cb_target,
                                                                         GDestroyNotify t_cb_target_destroy_notify);
VALA_EXTERN const gchar* tuba_api_status_get_visibility (TubaAPIStatus* self);
VALA_EXTERN GType tuba_api_status_visibility_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaAPIStatusVisibility* tuba_api_status_visibility_from_string (const gchar* id);
VALA_EXTERN const gchar* tuba_settings_get_default_post_visibility (TubaSettings* self);
VALA_EXTERN gint tuba_api_status_visibility_privacy_rate (TubaAPIStatusVisibility self);
VALA_EXTERN TubaAPIStatus* tuba_api_status_get_formal (TubaAPIStatus* self);
VALA_EXTERN gboolean tuba_api_status_get_reply_mentions (TubaAPIStatus* self,
                                             gchar** joined_mentions);
VALA_EXTERN const gchar* tuba_api_status_get_spoiler_text (TubaAPIStatus* self);
VALA_EXTERN const gchar* tuba_api_status_get_id (TubaAPIStatus* self);
VALA_EXTERN gboolean tuba_api_status_get_local_only (TubaAPIStatus* self);
VALA_EXTERN const gchar* tuba_api_status_get_language (TubaAPIStatus* self);
VALA_EXTERN const gchar* tuba_settings_get_default_quote_policy (TubaSettings* self);
VALA_EXTERN TubaAPIPoll* tuba_api_status_get_poll (TubaAPIStatus* self);
VALA_EXTERN gboolean tuba_api_status_get_sensitive (TubaAPIStatus* self);
VALA_EXTERN GeeArrayList* tuba_api_status_get_media_attachments (TubaAPIStatus* self);
VALA_EXTERN const gchar* tuba_api_status_get_content (TubaAPIStatus* self);
VALA_EXTERN TubaAPIAccount* tuba_api_status_get_account (TubaAPIStatus* self);
VALA_EXTERN const gchar* tuba_api_status_get_created_at (TubaAPIStatus* self);
VALA_EXTERN GType tuba_api_quote_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIQuote, g_object_unref)
VALA_EXTERN TubaAPIQuote* tuba_api_status_get_quote (TubaAPIStatus* self);
VALA_EXTERN TubaAPIStatus* tuba_api_status_new_empty (void);
VALA_EXTERN TubaAPIStatus* tuba_api_status_construct_empty (GType object_type);
VALA_EXTERN void tuba_api_status_set_poll (TubaAPIStatus* self,
                               TubaAPIPoll* value);
VALA_EXTERN void tuba_api_status_set_sensitive (TubaAPIStatus* self,
                                    gboolean value);
VALA_EXTERN void tuba_api_status_set_media_attachments (TubaAPIStatus* self,
                                            GeeArrayList* value);
VALA_EXTERN void tuba_api_status_set_visibility (TubaAPIStatus* self,
                                     const gchar* value);
VALA_EXTERN void tuba_api_status_set_tuba_spoiler_revealed (TubaAPIStatus* self,
                                                gboolean value);
VALA_EXTERN void tuba_api_status_set_content (TubaAPIStatus* self,
                                  const gchar* value);
VALA_EXTERN void tuba_api_status_set_spoiler_text (TubaAPIStatus* self,
                                       const gchar* value);
VALA_EXTERN void tuba_api_status_set_account (TubaAPIStatus* self,
                                  TubaAPIAccount* value);
VALA_EXTERN void tuba_api_status_set_created_at (TubaAPIStatus* self,
                                     const gchar* value);
VALA_EXTERN void tuba_api_status_set_quote (TubaAPIStatus* self,
                                TubaAPIQuote* value);
VALA_EXTERN gboolean tuba_api_status_get_has_media (TubaAPIStatus* self);
static gboolean ___lambda84_ (TubaDialogsComposerDialog* self,
                       TubaAPIAttachment* e);
VALA_EXTERN void tuba_api_attachment_set_tuba_is_report (TubaAPIAttachment* self,
                                             gboolean value);
static gboolean ____lambda84__gee_forall_func (gpointer g,
                                        gpointer self);
VALA_EXTERN GType tuba_widgets_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsStatus, g_object_unref)
VALA_EXTERN GtkWidget* tuba_widgetizable_to_widget (TubaWidgetizable* self);
VALA_EXTERN void tuba_widgets_status_to_display_only (TubaWidgetsStatus* self);
VALA_EXTERN const gchar* tuba_api_account_get_username (TubaAPIAccount* self);
static void _tuba_dialogs_composer_dialog_scroller_mapped_gtk_widget_map (GtkWidget* _sender,
                                                                   gpointer self);
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_new_quote (TubaAPIStatus* to,
                                                                   TubaAPIStatusVisibility* reblog_visibility,
                                                                   gboolean supports_quotes);
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_construct_quote (GType object_type,
                                                                         TubaAPIStatus* to,
                                                                         TubaAPIStatusVisibility* reblog_visibility,
                                                                         gboolean supports_quotes);
VALA_EXTERN gchar* tuba_api_status_visibility_to_string (TubaAPIStatusVisibility self);
VALA_EXTERN gchar* tuba_api_status_get_url (TubaAPIStatus* self);
VALA_EXTERN const gchar* tuba_api_account_get_url (TubaAPIAccount* self);
VALA_EXTERN gboolean tuba_api_status_get_compat_local_only (TubaAPIStatus* self);
static gboolean ___lambda85_ (TubaDialogsComposerDialog* self,
                       TubaAPIAttachment* e);
static gboolean ____lambda85__gee_forall_func (gpointer g,
                                        gpointer self);
VALA_EXTERN GType tuba_api_status_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatusSource, g_object_unref)
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_new_edit (TubaAPIStatus* t_status,
                                                                  TubaAPIStatusSource* source,
                                                                  TubaDialogsComposerDialogSuccessCallback t_cb,
                                                                  gpointer t_cb_target,
                                                                  GDestroyNotify t_cb_target_destroy_notify,
                                                                  gboolean redraft);
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_construct_edit (GType object_type,
                                                                        TubaAPIStatus* t_status,
                                                                        TubaAPIStatusSource* source,
                                                                        TubaDialogsComposerDialogSuccessCallback t_cb,
                                                                        gpointer t_cb_target,
                                                                        GDestroyNotify t_cb_target_destroy_notify,
                                                                        gboolean redraft);
VALA_EXTERN gchar* tuba_utils_htmlx_remove_tags (const gchar* content);
VALA_EXTERN const gchar* tuba_api_status_source_get_text (TubaAPIStatusSource* self);
VALA_EXTERN const gchar* tuba_api_status_source_get_spoiler_text (TubaAPIStatusSource* self);
VALA_EXTERN const gchar* tuba_api_status_get_in_reply_to_id (TubaAPIStatus* self);
VALA_EXTERN GType tuba_api_status_quote_approval_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIStatusQuoteApproval, g_object_unref)
VALA_EXTERN TubaAPIStatusQuoteApproval* tuba_api_status_get_quote_approval (TubaAPIStatus* self);
VALA_EXTERN TubaAPIStatusQuotePolicy tuba_api_status_quote_approval_to_quote_policy (TubaAPIStatusQuoteApproval* self);
VALA_EXTERN gchar* tuba_api_status_quote_policy_to_string (TubaAPIStatusQuotePolicy self);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_edit_status_id (TubaDialogsComposerDialog* self,
                                                      const gchar* value);
VALA_EXTERN GType tuba_api_scheduled_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIScheduledStatus, g_object_unref)
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_new_from_scheduled (TubaAPIScheduledStatus* scheduled_status,
                                                                            gboolean posting_draft,
                                                                            TubaAPIPoll* poll,
                                                                            TubaDialogsComposerDialogSuccessCallback t_cb,
                                                                            gpointer t_cb_target,
                                                                            GDestroyNotify t_cb_target_destroy_notify);
VALA_EXTERN TubaDialogsComposerDialog* tuba_dialogs_composer_dialog_construct_from_scheduled (GType object_type,
                                                                                  TubaAPIScheduledStatus* scheduled_status,
                                                                                  gboolean posting_draft,
                                                                                  TubaAPIPoll* poll,
                                                                                  TubaDialogsComposerDialogSuccessCallback t_cb,
                                                                                  gpointer t_cb_target,
                                                                                  GDestroyNotify t_cb_target_destroy_notify);
VALA_EXTERN GType tuba_api_scheduled_status_params_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIScheduledStatusParams, g_object_unref)
VALA_EXTERN TubaAPIScheduledStatusParams* tuba_api_scheduled_status_get_props (TubaAPIScheduledStatus* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_params_get_quoted_status_id (TubaAPIScheduledStatusParams* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_get_id (TubaAPIScheduledStatus* self);
VALA_EXTERN gint64 tuba_api_scheduled_status_params_get_in_reply_to_id (TubaAPIScheduledStatusParams* self);
VALA_EXTERN gboolean tuba_api_scheduled_status_params_get_local_only (TubaAPIScheduledStatusParams* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_params_get_visibility (TubaAPIScheduledStatusParams* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_params_get_text (TubaAPIScheduledStatusParams* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_params_get_spoiler_text (TubaAPIScheduledStatusParams* self);
VALA_EXTERN GeeArrayList* tuba_api_scheduled_status_get_media_attachments (TubaAPIScheduledStatus* self);
VALA_EXTERN gboolean tuba_api_scheduled_status_params_get_sensitive (TubaAPIScheduledStatusParams* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_params_get_language (TubaAPIScheduledStatusParams* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_params_get_quote_approval_policy (TubaAPIScheduledStatusParams* self);
VALA_EXTERN const gchar* tuba_api_scheduled_status_get_scheduled_at (TubaAPIScheduledStatus* self);
static void tuba_dialogs_composer_dialog_set_schedule_iso8601 (TubaDialogsComposerDialog* self,
                                                        const gchar* value);
static void tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async (TubaDialogsComposerDialog* self,
                                                                         gboolean editing,
                                                                         GAsyncReadyCallback _callback_,
                                                                         gpointer _user_data_);
static void tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_finish (TubaDialogsComposerDialog* self,
                                                                          GAsyncResult* _res_);
static void tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_data_free (gpointer _data);
static gboolean tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_co (TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData* _data_);
VALA_EXTERN const gchar* tuba_dialogs_composer_dialog_get_quote_id (TubaDialogsComposerDialog* self);
static const gchar* tuba_dialogs_composer_dialog_get_in_reply_to_id (TubaDialogsComposerDialog* 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 TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_set_ctx (TubaRequestV2* self,
                              GtkWidget* 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_composer_dialog_load_replied_to_or_quote_status_async_ready (GObject* source_object,
                                                                               GAsyncResult* _res_,
                                                                               gpointer _user_data_);
VALA_EXTERN void tuba_network_get_parser_from_inputstream_async (GInputStream* in_stream,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream_finish (GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN GType tuba_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaNetwork, g_object_unref)
VALA_EXTERN JsonNode* tuba_network_parse_node (TubaNetwork* self,
                                   JsonParser* parser);
VALA_EXTERN TubaAPIStatus* tuba_api_status_from (JsonNode* node,
                                     GError** error);
static void _vala_JsonNode_free (JsonNode* self);
static gboolean ____lambda82_ (TubaDialogsComposerDialog* self,
                        TubaAPIAttachment* e);
static gboolean _____lambda82__gee_forall_func (gpointer g,
                                         gpointer self);
static void tuba_dialogs_composer_dialog_add_quote_inline_widget (TubaDialogsComposerDialog* self,
                                                           TubaAPIStatus* quote_status);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_title (TubaDialogsComposerComponentsEditor* self,
                                                        const gchar* label,
                                                        GtkWidget* sub_widget);
VALA_EXTERN gboolean tuba_widgets_sandwich_source_view_has_bottom_child (TubaWidgetsSandwichSourceView* self,
                                                             GtkWidget* child);
VALA_EXTERN void tuba_widgets_sandwich_source_view_remove_bottom_child (TubaWidgetsSandwichSourceView* self,
                                                            GtkWidget* old_bottom_child);
VALA_EXTERN TubaDialogsComposerComponentsPolls* tuba_dialogs_composer_components_polls_new (TubaAPIPoll* poll_obj);
VALA_EXTERN TubaDialogsComposerComponentsPolls* tuba_dialogs_composer_components_polls_construct (GType object_type,
                                                                                      TubaAPIPoll* poll_obj);
static void tuba_dialogs_composer_dialog_validate_post_button (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_validate_post_button_g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void tuba_dialogs_composer_dialog_on_poll_component_animation_end (TubaDialogsComposerDialog* self,
                                                                   AdwAnimation* animation);
static void _tuba_dialogs_composer_dialog_on_poll_component_animation_end_adw_animation_done (AdwAnimation* _sender,
                                                                                       gpointer self);
VALA_EXTERN void tuba_dialogs_composer_components_attachments_bin_show_file_selector (TubaDialogsComposerComponentsAttachmentsBin* self);
static void tuba_dialogs_composer_dialog_update_attachmentsbin_meta (TubaDialogsComposerDialog* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_attachments_bin_get_working (TubaDialogsComposerComponentsAttachmentsBin* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_attachments_bin_get_is_empty (TubaDialogsComposerComponentsAttachmentsBin* self);
static gboolean tuba_dialogs_composer_dialog_get_quote_limited (TubaDialogsComposerDialog* self);
static void tuba_dialogs_composer_dialog_update_attachmentsbin_sensitivity (TubaDialogsComposerDialog* self);
static gboolean tuba_dialogs_composer_dialog_on_drag_drop (TubaDialogsComposerDialog* self,
                                                    GValue* val,
                                                    gdouble x,
                                                    gdouble y);
VALA_EXTERN void tuba_dialogs_composer_components_drop_overlay_set_dropping (TubaDialogsComposerComponentsDropOverlay* self,
                                                                 gboolean value);
static GdkFileList* _vala_GdkFileList_copy (GdkFileList* self);
static void _vala_GdkFileList_free (GdkFileList* self);
static void _vala_array_add40 (GFile** * array,
                        gint* length,
                        gint* size,
                        GFile* value);
VALA_EXTERN void tuba_dialogs_composer_components_attachments_bin_upload_files (TubaDialogsComposerComponentsAttachmentsBin* self,
                                                                    GFile** files,
                                                                    gint files_length1,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
VALA_EXTERN void tuba_dialogs_composer_components_attachments_bin_upload_files_finish (TubaDialogsComposerComponentsAttachmentsBin* self,
                                                                           GAsyncResult* _res_);
static GFile** _vala_array_dup18 (GFile** self,
                           gssize length);
static GdkDragAction tuba_dialogs_composer_dialog_on_drag_enter (TubaDialogsComposerDialog* self,
                                                          gdouble x,
                                                          gdouble y);
static void tuba_dialogs_composer_dialog_on_drag_leave (TubaDialogsComposerDialog* self);
static void tuba_dialogs_composer_dialog_on_clipboard_paste_async_data_free (gpointer _data);
static void tuba_dialogs_composer_dialog_on_clipboard_paste_async (TubaDialogsComposerDialog* self,
                                                            GdkClipboard* clipboard,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_);
static void tuba_dialogs_composer_dialog_on_clipboard_paste_finish (TubaDialogsComposerDialog* self,
                                                             GAsyncResult* _res_);
static gboolean tuba_dialogs_composer_dialog_on_clipboard_paste_async_co (TubaDialogsComposerDialogOnClipboardPasteAsyncData* _data_);
static void tuba_dialogs_composer_dialog_on_clipboard_paste_async_ready (GObject* source_object,
                                                                  GAsyncResult* _res_,
                                                                  gpointer _user_data_);
static GValue* _g_value_dup (GValue* self);
static void _vala_array_add41 (GFile** * array,
                        gint* length,
                        gint* size,
                        GFile* value);
static void _vala_GValue_free (GValue* self);
static void _vala_array_add42 (GFile** * array,
                        gint* length,
                        gint* size,
                        GFile* value);
static GFile** _vala_array_dup19 (GFile** self,
                           gssize length);
VALA_EXTERN TubaDialogsComposerComponentsAttachmentsBin* tuba_dialogs_composer_components_attachments_bin_new (void);
VALA_EXTERN TubaDialogsComposerComponentsAttachmentsBin* tuba_dialogs_composer_components_attachments_bin_construct (GType object_type);
static void _tuba_dialogs_composer_dialog_update_attachmentsbin_meta_g_object_notify (GObject* _sender,
                                                                               GParamSpec* pspec,
                                                                               gpointer self);
VALA_EXTERN void tuba_dialogs_composer_components_attachments_bin_preload_attachment (TubaDialogsComposerComponentsAttachmentsBin* self,
                                                                          TubaAPIAttachment* api_attachment,
                                                                          gboolean edit_mode);
static void tuba_dialogs_composer_dialog_handle_potential_quote_paste (TubaDialogsComposerDialog* self,
                                                                GdkClipboard* clipboard);
static void tuba_dialogs_composer_dialog_handle_potential_quote_paste_real (TubaDialogsComposerDialog* self,
                                                                     const gchar* original_text,
                                                                     GdkClipboard* clipboard,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
static void tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_finish (TubaDialogsComposerDialog* self,
                                                                            GAsyncResult* _res_);
static void tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_data_free (gpointer _data);
static gboolean tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_co (TubaDialogsComposerDialogHandlePotentialQuotePasteRealData* _data_);
static void tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_ready (GObject* source_object,
                                                                           GAsyncResult* _res_,
                                                                           gpointer _user_data_);
VALA_EXTERN void tuba_request_v2_set_cancellable (TubaRequestV2* self,
                                      GCancellable* value);
VALA_EXTERN void tuba_request_v2_add_parameter (TubaRequestV2* self,
                                    const gchar* key,
                                    const gchar* value);
VALA_EXTERN GType tuba_api_search_results_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPISearchResults, g_object_unref)
VALA_EXTERN TubaAPISearchResults* tuba_api_search_results_from (JsonNode* node,
                                                    GError** error);
VALA_EXTERN GeeArrayList* tuba_api_search_results_get_statuses (TubaAPISearchResults* self);
VALA_EXTERN gboolean tuba_api_status_get_can_be_quoted (TubaAPIStatus* self);
VALA_EXTERN GType tuba_application_question_answer_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_text_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionText* tuba_application_question_text_dup (const TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_free (TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_copy (const TubaApplicationQuestionText* self,
                                          TubaApplicationQuestionText* dest);
VALA_EXTERN void tuba_application_question_text_destroy (TubaApplicationQuestionText* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionText, tuba_application_question_text_destroy)
VALA_EXTERN GType tuba_application_question_buttons_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_button_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionButton* tuba_application_question_button_dup (const TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_free (TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_copy (const TubaApplicationQuestionButton* self,
                                            TubaApplicationQuestionButton* dest);
VALA_EXTERN void tuba_application_question_button_destroy (TubaApplicationQuestionButton* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButton, tuba_application_question_button_destroy)
VALA_EXTERN TubaApplicationQuestionButtons* tuba_application_question_buttons_dup (const TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_free (TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_copy (const TubaApplicationQuestionButtons* self,
                                             TubaApplicationQuestionButtons* dest);
VALA_EXTERN void tuba_application_question_buttons_destroy (TubaApplicationQuestionButtons* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButtons, tuba_application_question_buttons_destroy)
VALA_EXTERN void tuba_application_question (TubaApplication* self,
                                TubaApplicationQuestionText* title,
                                TubaApplicationQuestionText* msg,
                                GtkWidget* win,
                                TubaApplicationQuestionButtons* buttons,
                                GtkWidget* child,
                                gboolean skip,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN TubaApplicationQuestionAnswer tuba_application_question_finish (TubaApplication* self,
                                                                GAsyncResult* _res_);
VALA_EXTERN gboolean tuba_application_question_answer_truthy (TubaApplicationQuestionAnswer self);
static void tuba_dialogs_composer_dialog_set_quote_limited (TubaDialogsComposerDialog* self,
                                                     gboolean value);
static void tuba_dialogs_composer_dialog_remove_quote_inline_widget (TubaDialogsComposerDialog* self);
static void _tuba_dialogs_composer_dialog_remove_quote_inline_widget_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self);
VALA_EXTERN GType tuba_widgets_rich_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsRichLabel, g_object_unref)
VALA_EXTERN GType tuba_widgets_avatar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAvatar, g_object_unref)
VALA_EXTERN GType tuba_widgets_markup_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsMarkupView, g_object_unref)
VALA_EXTERN GType tuba_widgets_fade_bin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsFadeBin, g_object_unref)
VALA_EXTERN GType tuba_widgets_preview_card_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsPreviewCard, g_object_unref)
VALA_EXTERN GType tuba_widgets_vote_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsVoteBox, g_object_unref)
static void tuba_dialogs_composer_dialog_on_inline_quote_widget_animation_done (TubaDialogsComposerDialog* self,
                                                                         AdwAnimation* animation);
static void _tuba_dialogs_composer_dialog_on_inline_quote_widget_animation_done_adw_animation_done (AdwAnimation* _sender,
                                                                                             gpointer self);
static void tuba_dialogs_composer_dialog_remove_quote_inline_widget_real (TubaDialogsComposerDialog* self);
static Block40Data* block40_data_ref (Block40Data* _data40_);
static void block40_data_unref (void * _userdata_);
static gchar** _vala_array_dup20 (gchar** self,
                           gssize length);
static void __lambda78_ (Block40Data* _data40_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda78__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void tuba_dialogs_composer_dialog_on_schedule_action_activated (TubaDialogsComposerDialog* self);
VALA_EXTERN GType tuba_dialogs_schedule_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsSchedule, g_object_unref)
static const gchar* tuba_dialogs_composer_dialog_get_schedule_iso8601 (TubaDialogsComposerDialog* self);
VALA_EXTERN TubaDialogsSchedule* tuba_dialogs_schedule_new (const gchar* iso8601,
                                                const gchar* button_label);
VALA_EXTERN TubaDialogsSchedule* tuba_dialogs_schedule_construct (GType object_type,
                                                      const gchar* iso8601,
                                                      const gchar* button_label);
static void tuba_dialogs_composer_dialog_on_schedule_picked (TubaDialogsComposerDialog* self,
                                                      const gchar* iso8601);
static void _tuba_dialogs_composer_dialog_on_schedule_picked_tuba_dialogs_schedule_schedule_picked (TubaDialogsSchedule* _sender,
                                                                                             const gchar* iso8601,
                                                                                             gpointer self);
static void tuba_dialogs_composer_dialog_on_draft_action_activated (TubaDialogsComposerDialog* self);
static void tuba_dialogs_composer_dialog_on_drafted_posts_action_activated (TubaDialogsComposerDialog* self);
VALA_EXTERN GType tuba_dialogs_drafts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsDrafts, g_object_unref)
VALA_EXTERN TubaDialogsDrafts* tuba_dialogs_drafts_new (void);
VALA_EXTERN TubaDialogsDrafts* tuba_dialogs_drafts_construct (GType object_type);
VALA_EXTERN GType tuba_widgets_scheduled_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsScheduledStatus, g_object_unref)
static void tuba_dialogs_composer_dialog_on_draft_selected (TubaDialogsComposerDialog* self,
                                                     TubaWidgetsScheduledStatus* draft_status_widget);
static void _tuba_dialogs_composer_dialog_on_draft_selected_tuba_dialogs_drafts_draft_selected (TubaDialogsDrafts* _sender,
                                                                                         TubaWidgetsScheduledStatus* draft_status_widget,
                                                                                         gpointer self);
static Block41Data* block41_data_ref (Block41Data* _data41_);
static void block41_data_unref (void * _userdata_);
static gboolean tuba_dialogs_composer_dialog_state_changed (TubaDialogsComposerDialog* self);
static void __lambda122_ (Block41Data* _data41_,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN void tuba_widgets_scheduled_status_compose_draft (TubaWidgetsScheduledStatus* self);
static void ___lambda122__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_grab_first_row_focus (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN GType tuba_dialogs_composer_preferred_sizeable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerPreferredSizeable, g_object_unref)
VALA_EXTERN void tuba_dialogs_composer_preferred_sizeable_set_preferred_height (TubaDialogsComposerPreferredSizeable* self,
                                                                    gint value);
VALA_EXTERN void tuba_dialogs_composer_preferred_sizeable_set_preferred_width (TubaDialogsComposerPreferredSizeable* self,
                                                                   gint value);
VALA_EXTERN gint64 tuba_dialogs_composer_dialog_get_remaining_chars (TubaDialogsComposerDialog* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_is_valid (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_post_button_set_sensitive_real (TubaDialogsComposerDialogPostButton* self,
                                                                  gboolean val);
static JsonBuilder* tuba_dialogs_composer_dialog_populate_json_body (TubaDialogsComposerDialog* self);
VALA_EXTERN const gchar* tuba_dialogs_composer_components_editor_get_locale (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN const gchar* tuba_instance_account_status_content_type_get_mime (TubaInstanceAccountStatusContentType* self);
VALA_EXTERN TubaAPIStatusQuotePolicy tuba_dialogs_composer_dialog_quotation_policy_get_policy (TubaDialogsComposerDialogQuotationPolicy* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_has_rows (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_multiple_choice (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_hide_totals (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gint64 tuba_dialogs_composer_components_polls_get_expires_in (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gchar** tuba_dialogs_composer_components_polls_get_all_options (TubaDialogsComposerComponentsPolls* self,
                                                                gint* result_length1);
VALA_EXTERN gchar** tuba_dialogs_composer_components_attachments_bin_get_all_media_ids (TubaDialogsComposerComponentsAttachmentsBin* self,
                                                                            gint* result_length1);
VALA_EXTERN GType tuba_dialogs_composer_components_attachments_bin_metadata_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaDialogsComposerComponentsAttachmentsBinMetadata* tuba_dialogs_composer_components_attachments_bin_metadata_dup (const TubaDialogsComposerComponentsAttachmentsBinMetadata* self);
VALA_EXTERN void tuba_dialogs_composer_components_attachments_bin_metadata_free (TubaDialogsComposerComponentsAttachmentsBinMetadata* self);
VALA_EXTERN void tuba_dialogs_composer_components_attachments_bin_metadata_copy (const TubaDialogsComposerComponentsAttachmentsBinMetadata* self,
                                                                     TubaDialogsComposerComponentsAttachmentsBinMetadata* dest);
VALA_EXTERN void tuba_dialogs_composer_components_attachments_bin_metadata_destroy (TubaDialogsComposerComponentsAttachmentsBinMetadata* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaDialogsComposerComponentsAttachmentsBinMetadata, tuba_dialogs_composer_components_attachments_bin_metadata_destroy)
VALA_EXTERN TubaDialogsComposerComponentsAttachmentsBinMetadata* tuba_dialogs_composer_components_attachments_bin_get_all_metadata (TubaDialogsComposerComponentsAttachmentsBin* self,
                                                                                                                        gint* result_length1);
static void _vala_TubaDialogsComposerComponentsAttachmentsBinMetadata_array_free (TubaDialogsComposerComponentsAttachmentsBinMetadata * array,
                                                                           gssize array_length);
static void tuba_dialogs_composer_dialog_transaction (TubaDialogsComposerDialog* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static void tuba_dialogs_composer_dialog_transaction_finish (TubaDialogsComposerDialog* self,
                                                      GAsyncResult* _res_,
                                                      GError** error);
static void __lambda83_ (TubaDialogsComposerDialog* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda83__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void tuba_dialogs_composer_dialog_transaction_data_free (gpointer _data);
static gboolean tuba_dialogs_composer_dialog_transaction_co (TubaDialogsComposerDialogTransactionData* _data_);
VALA_EXTERN const gchar* tuba_dialogs_composer_dialog_get_edit_status_id (TubaDialogsComposerDialog* self);
VALA_EXTERN void tuba_request_v2_set_body_from_json (TubaRequestV2* self,
                                         JsonBuilder* json_builder);
static void tuba_dialogs_composer_dialog_transaction_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
VALA_EXTERN TubaAPIScheduledStatus* tuba_api_scheduled_status_from (JsonNode* node,
                                                        GError** error);
VALA_EXTERN const gchar* tuba_dialogs_composer_dialog_get_scheduled_id (TubaDialogsComposerDialog* self);
static void tuba_dialogs_composer_dialog_delete_scheduled_post (TubaDialogsComposerDialog* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static void tuba_dialogs_composer_dialog_delete_scheduled_post_finish (TubaDialogsComposerDialog* self,
                                                                GAsyncResult* _res_);
static void tuba_dialogs_composer_dialog_delete_scheduled_post_data_free (gpointer _data);
static gboolean tuba_dialogs_composer_dialog_delete_scheduled_post_co (TubaDialogsComposerDialogDeleteScheduledPostData* _data_);
static void tuba_dialogs_composer_dialog_delete_scheduled_post_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_);
static void tuba_dialogs_composer_dialog_on_exit (TubaDialogsComposerDialog* self);
static void ___lambda123_ (TubaDialogsComposerDialog* self,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda123__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void tuba_dialogs_composer_dialog_on_cw_revealed (TubaDialogsComposerDialog* self);
VALA_EXTERN gboolean tuba_dialogs_composer_dialog_get_is_narrow (TubaDialogsComposerDialog* self);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_is_narrow (TubaDialogsComposerDialog* self,
                                                 gboolean value);
VALA_EXTERN void tuba_dialogs_composer_dialog_set_char_limit (TubaDialogsComposerDialog* self,
                                                  gint64 value);
static void tuba_dialogs_composer_dialog_post_button_on_clicked (TubaDialogsComposerDialogPostButton* self);
static void _tuba_dialogs_composer_dialog_post_button_on_clicked_adw_split_button_clicked (AdwSplitButton* _sender,
                                                                                    gpointer self);
static void _tuba_dialogs_composer_dialog_post_button_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                              gpointer self);
static void tuba_dialogs_composer_dialog_post_button_on_sensitive_changed (TubaDialogsComposerDialogPostButton* self);
VALA_EXTERN TubaDialogsComposerDialogPostButton* tuba_dialogs_composer_dialog_post_button_new (void);
VALA_EXTERN TubaDialogsComposerDialogPostButton* tuba_dialogs_composer_dialog_post_button_construct (GType object_type);
static void tuba_dialogs_composer_dialog_post_button_finalize (GObject * obj);
static GType tuba_dialogs_composer_dialog_post_button_get_type_once (void);
static void _vala_tuba_dialogs_composer_dialog_post_button_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_dialog_post_button_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec);
static gboolean _tuba_dialogs_composer_dialog_quotation_policy_compare_lambda80_ (const gchar* a,
                                                                           const gchar* b);
static gboolean __tuba_dialogs_composer_dialog_quotation_policy_compare_lambda80__gequal_func (gconstpointer a,
                                                                                        gconstpointer b);
VALA_EXTERN TubaAPIStatusQuotePolicy tuba_api_status_quote_policy_from_string (const gchar* policy);
VALA_EXTERN void tuba_dialogs_composer_dialog_quotation_policy_set_policy (TubaDialogsComposerDialogQuotationPolicy* self,
                                                               TubaAPIStatusQuotePolicy value);
VALA_EXTERN gchar* tuba_dialogs_composer_dialog_quotation_policy_get_title (TubaDialogsComposerDialogQuotationPolicy* self);
VALA_EXTERN gchar* tuba_api_status_quote_policy_to_title (TubaAPIStatusQuotePolicy self);
VALA_EXTERN gchar* tuba_dialogs_composer_dialog_quotation_policy_get_subtitle (TubaDialogsComposerDialogQuotationPolicy* self);
VALA_EXTERN gchar* tuba_api_status_quote_policy_to_subtitle (TubaAPIStatusQuotePolicy self);
VALA_EXTERN const gchar* tuba_dialogs_composer_dialog_quotation_policy_get_icon (TubaDialogsComposerDialogQuotationPolicy* self);
static void tuba_dialogs_composer_dialog_quotation_policy_finalize (GObject * obj);
static GType tuba_dialogs_composer_dialog_quotation_policy_get_type_once (void);
static void _vala_tuba_dialogs_composer_dialog_quotation_policy_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_dialog_quotation_policy_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec);
static GObject * tuba_dialogs_composer_dialog_constructor (GType type,
                                                    guint n_construct_properties,
                                                    GObjectConstructParam * construct_properties);
static void _tuba_dialogs_composer_dialog_on_schedule_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                          GVariant* parameter,
                                                                                          gpointer self);
static void _tuba_dialogs_composer_dialog_on_draft_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                       GVariant* parameter,
                                                                                       gpointer self);
static void _tuba_dialogs_composer_dialog_on_drafted_posts_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                               GVariant* parameter,
                                                                                               gpointer self);
VALA_EXTERN gint64 tuba_api_instance_get_compat_status_max_characters (TubaAPIInstance* self);
static GdkDragAction _tuba_dialogs_composer_dialog_on_drag_enter_gtk_drop_target_enter (GtkDropTarget* _sender,
                                                                                 gdouble x,
                                                                                 gdouble y,
                                                                                 gpointer self);
static void _tuba_dialogs_composer_dialog_on_drag_leave_gtk_drop_target_leave (GtkDropTarget* _sender,
                                                                        gpointer self);
static gboolean _tuba_dialogs_composer_dialog_on_drag_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                                          GValue* value,
                                                                          gdouble x,
                                                                          gdouble y,
                                                                          gpointer self);
static void _tuba_dialogs_composer_dialog_update_attachmentsbin_sensitivity_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                                gpointer self);
static void _tuba_dialogs_composer_dialog_on_exit_adw_dialog_close_attempt (AdwDialog* _sender,
                                                                     gpointer self);
static void _tuba_dialogs_composer_dialog_on_cw_revealed_g_object_notify (GObject* _sender,
                                                                   GParamSpec* pspec,
                                                                   gpointer self);
static void tuba_dialogs_composer_dialog_finalize (GObject * obj);
static GType tuba_dialogs_composer_dialog_get_type_once (void);
static void _vala_tuba_dialogs_composer_dialog_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_dialog_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_composer_dialog_get_instance_private (TubaDialogsComposerDialog* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerDialog_private_offset);
}

static void
_tuba_dialogs_composer_components_editor_insert_string_at_cursor_gtk_emoji_chooser_emoji_picked (GtkEmojiChooser* _sender,
                                                                                                 const gchar* text,
                                                                                                 gpointer self)
{
	tuba_dialogs_composer_components_editor_insert_string_at_cursor ((TubaDialogsComposerComponentsEditor*) self, text);
}

static void
_tuba_dialogs_composer_components_editor_insert_string_at_cursor_tuba_widgets_custom_emoji_chooser_v2_emoji_picked (TubaWidgetsCustomEmojiChooserV2* _sender,
                                                                                                                    const gchar* shortcode,
                                                                                                                    gpointer self)
{
	tuba_dialogs_composer_components_editor_insert_string_at_cursor ((TubaDialogsComposerComponentsEditor*) self, shortcode);
}

static void
tuba_dialogs_composer_dialog_install_emoji_pickers (TubaDialogsComposerDialog* self)
{
	GtkEmojiChooser* emoji_picker = NULL;
	GtkEmojiChooser* _tmp0_;
	GtkMenuButton* _tmp1_;
	GtkEmojiChooser* _tmp2_;
	GtkEmojiChooser* _tmp3_;
	TubaDialogsComposerComponentsEditor* _tmp4_;
	gboolean _tmp5_ = FALSE;
	TubaAccountStore* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkEmojiChooser*) gtk_emoji_chooser_new ();
	g_object_ref_sink (_tmp0_);
	emoji_picker = _tmp0_;
	_tmp1_ = self->priv->native_emojis_button;
	_tmp2_ = emoji_picker;
	gtk_menu_button_set_popover (_tmp1_, (GtkPopover*) _tmp2_);
	_tmp3_ = emoji_picker;
	_tmp4_ = self->priv->editor;
	g_signal_connect_object (_tmp3_, "emoji-picked", (GCallback) _tuba_dialogs_composer_components_editor_insert_string_at_cursor_gtk_emoji_chooser_emoji_picked, _tmp4_, 0);
	_tmp6_ = tuba_accounts;
	_tmp7_ = tuba_account_store_get_active (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = tuba_instance_account_get_instance_emojis (_tmp8_);
	_tmp10_ = _tmp9_;
	if (_tmp10_ != NULL) {
		TubaAccountStore* _tmp11_;
		TubaInstanceAccount* _tmp12_;
		TubaInstanceAccount* _tmp13_;
		GeeArrayList* _tmp14_;
		GeeArrayList* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		_tmp11_ = tuba_accounts;
		_tmp12_ = tuba_account_store_get_active (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = tuba_instance_account_get_instance_emojis (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp15_);
		_tmp17_ = _tmp16_;
		_tmp5_ = _tmp17_ > 0;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		TubaWidgetsCustomEmojiChooserV2* custom_emoji_picker = NULL;
		TubaWidgetsCustomEmojiChooserV2* _tmp18_;
		GtkMenuButton* _tmp19_;
		TubaWidgetsCustomEmojiChooserV2* _tmp20_;
		TubaWidgetsCustomEmojiChooserV2* _tmp21_;
		TubaDialogsComposerComponentsEditor* _tmp22_;
		_tmp18_ = tuba_widgets_custom_emoji_chooser_v2_new ();
		g_object_ref_sink (_tmp18_);
		custom_emoji_picker = _tmp18_;
		_tmp19_ = self->priv->custom_emojis_button;
		_tmp20_ = custom_emoji_picker;
		gtk_menu_button_set_popover (_tmp19_, (GtkPopover*) _tmp20_);
		_tmp21_ = custom_emoji_picker;
		_tmp22_ = self->priv->editor;
		g_signal_connect_object (_tmp21_, "emoji-picked", (GCallback) _tuba_dialogs_composer_components_editor_insert_string_at_cursor_tuba_widgets_custom_emoji_chooser_v2_emoji_picked, _tmp22_, 0);
		_g_object_unref0 (custom_emoji_picker);
	}
	_g_object_unref0 (emoji_picker);
}

static void
_tuba_dialogs_composer_dialog_on_toast_tuba_dialogs_composer_components_attachable_toast (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                          AdwToast* toast,
                                                                                          gpointer self)
{
	tuba_dialogs_composer_dialog_on_toast ((TubaDialogsComposerDialog*) self, toast);
}

static void
_tuba_dialogs_composer_dialog_on_push_subpage_tuba_dialogs_composer_components_attachable_push_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                        AdwNavigationPage* page,
                                                                                                        gpointer self)
{
	tuba_dialogs_composer_dialog_on_push_subpage ((TubaDialogsComposerDialog*) self, page);
}

static void
_tuba_dialogs_composer_dialog_on_pop_subpage_tuba_dialogs_composer_components_attachable_pop_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                      gpointer self)
{
	tuba_dialogs_composer_dialog_on_pop_subpage ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_paste_gtk_text_view_paste_clipboard (GtkTextView* _sender,
                                                                      gpointer self)
{
	tuba_dialogs_composer_dialog_on_paste ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_commit_tuba_dialogs_composer_components_editor_ctrl_return_pressed (TubaDialogsComposerComponentsEditor* _sender,
                                                                                                     gpointer self)
{
	tuba_dialogs_composer_dialog_on_commit ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_update_remaining_chars_g_object_notify (GObject* _sender,
                                                                      GParamSpec* pspec,
                                                                      gpointer self)
{
	tuba_dialogs_composer_dialog_update_remaining_chars ((TubaDialogsComposerDialog*) self);
}

static void
tuba_dialogs_composer_dialog_install_editor (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerComponentsEditor* _tmp0_ = NULL;
	GtkScrolledWindow* _tmp1_;
	GtkScrolledWindow* _tmp2_;
	TubaDialogsComposerComponentsEditor* _tmp3_;
	TubaDialogsComposerComponentsEditor* _tmp4_;
	gboolean _tmp5_;
	TubaDialogsComposerComponentsEditor* _tmp6_;
	TubaDialogsComposerComponentsEditor* _tmp7_;
	TubaDialogsComposerComponentsEditor* _tmp8_;
	TubaDialogsComposerComponentsEditor* _tmp9_;
	TubaDialogsComposerComponentsEditor* _tmp10_;
	TubaDialogsComposerComponentsEditor* _tmp11_;
	TubaDialogsComposerComponentsEditor* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_dialogs_composer_components_editor_new ();
	gtk_widget_set_margin_end ((GtkWidget*) _tmp0_, 32);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp0_, 32);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->editor);
	self->priv->editor = _tmp0_;
	_tmp1_ = self->priv->scroller;
	gtk_widget_set_overflow ((GtkWidget*) _tmp1_, GTK_OVERFLOW_HIDDEN);
	_tmp2_ = self->priv->scroller;
	_tmp3_ = self->priv->editor;
	gtk_scrolled_window_set_child (_tmp2_, (GtkWidget*) _tmp3_);
	_tmp4_ = self->priv->editor;
	_tmp5_ = self->priv->_edit_mode;
	tuba_dialogs_composer_components_attachable_set_edit_mode ((TubaDialogsComposerComponentsAttachable*) _tmp4_, _tmp5_);
	_tmp6_ = self->priv->editor;
	g_signal_connect_object ((TubaDialogsComposerComponentsAttachable*) _tmp6_, "toast", (GCallback) _tuba_dialogs_composer_dialog_on_toast_tuba_dialogs_composer_components_attachable_toast, self, 0);
	_tmp7_ = self->priv->editor;
	g_signal_connect_object ((TubaDialogsComposerComponentsAttachable*) _tmp7_, "push-subpage", (GCallback) _tuba_dialogs_composer_dialog_on_push_subpage_tuba_dialogs_composer_components_attachable_push_subpage, self, 0);
	_tmp8_ = self->priv->editor;
	g_signal_connect_object ((TubaDialogsComposerComponentsAttachable*) _tmp8_, "pop-subpage", (GCallback) _tuba_dialogs_composer_dialog_on_pop_subpage_tuba_dialogs_composer_components_attachable_pop_subpage, self, 0);
	_tmp9_ = self->priv->editor;
	g_signal_connect_object ((GtkTextView*) _tmp9_, "paste-clipboard", (GCallback) _tuba_dialogs_composer_dialog_on_paste_gtk_text_view_paste_clipboard, self, 0);
	_tmp10_ = self->priv->editor;
	g_signal_connect_object (_tmp10_, "ctrl-return-pressed", (GCallback) _tuba_dialogs_composer_dialog_on_commit_tuba_dialogs_composer_components_editor_ctrl_return_pressed, self, 0);
	_tmp11_ = self->priv->editor;
	g_signal_connect_object ((GObject*) _tmp11_, "notify::char-count", (GCallback) _tuba_dialogs_composer_dialog_update_remaining_chars_g_object_notify, self, 0);
	_tmp12_ = self->priv->editor;
	g_object_set ((AdwDialog*) self, "focus-widget", (GtkWidget*) _tmp12_, NULL);
}

static void
tuba_dialogs_composer_dialog_update_remaining_chars (TubaDialogsComposerDialog* self)
{
	gint64 _tmp0_;
	TubaDialogsComposerComponentsEditor* _tmp1_;
	gint64 _tmp2_;
	gint64 _tmp3_;
	gint64 _tmp4_;
	gint8 _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_char_limit;
	_tmp1_ = self->priv->editor;
	_tmp2_ = tuba_dialogs_composer_components_editor_get_char_count (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->_cw_count;
	_tmp5_ = self->priv->_reserved_chars;
	tuba_dialogs_composer_dialog_set_remaining_chars (self, ((_tmp0_ - _tmp3_) - _tmp4_) - _tmp5_);
}

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

static void
tuba_dialogs_composer_dialog_append_dropdown (TubaDialogsComposerDialog* self,
                                              GtkDropDown* dropdown)
{
	GtkWidget* togglebtn = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkBox* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (dropdown != NULL);
	_tmp0_ = gtk_widget_get_first_child ((GtkWidget*) dropdown);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	togglebtn = _tmp1_;
	_tmp2_ = togglebtn;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = togglebtn;
		gtk_widget_add_css_class (_tmp3_, "flat");
	}
	_tmp4_ = self->priv->dropdowns_box;
	gtk_box_append (_tmp4_, (GtkWidget*) dropdown);
	_g_object_unref0 (togglebtn);
}

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

static void
_tuba_dialogs_composer_dialog_visibility_changed_g_object_notify (GObject* _sender,
                                                                  GParamSpec* pspec,
                                                                  gpointer self)
{
	tuba_dialogs_composer_dialog_visibility_changed ((TubaDialogsComposerDialog*) self);
}

void
tuba_dialogs_composer_dialog_install_visibility (TubaDialogsComposerDialog* self,
                                                 const gchar* default_visibility)
{
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	GListStore* _tmp3_;
	GListModel* _tmp4_;
	GtkPropertyExpression* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkBuilderListItemFactory* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkBuilderListItemFactory* _tmp13_;
	gchar* _tmp14_;
	gboolean _tmp15_;
	GtkDropDown* _tmp16_ = NULL;
	GtkDropDown* _tmp17_;
	GtkDropDown* _tmp18_;
	const gchar* _tmp19_ = NULL;
	TubaAccountStore* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	GeeHashMap* _tmp23_;
	gchar* safe_visibility = NULL;
	gchar* _tmp24_;
	guint default_visibility_index = 0U;
	TubaAccountStore* _tmp25_;
	TubaInstanceAccount* _tmp26_;
	TubaInstanceAccount* _tmp27_;
	GListStore* _tmp28_;
	TubaAccountStore* _tmp29_;
	TubaInstanceAccount* _tmp30_;
	TubaInstanceAccount* _tmp31_;
	GeeHashMap* _tmp32_;
	const gchar* _tmp33_;
	gpointer _tmp34_;
	TubaInstanceAccountVisibility* _tmp35_;
	guint _tmp36_ = 0U;
	gboolean _tmp37_;
	gboolean _tmp38_;
	GtkDropDown* _tmp40_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (default_visibility != NULL);
	_tmp0_ = tuba_accounts;
	_tmp1_ = tuba_account_store_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->visibility_list;
	_tmp4_ = _g_object_ref0 ((GListModel*) _tmp3_);
	_tmp5_ = (GtkPropertyExpression*) gtk_property_expression_new (TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, NULL, "name");
	_tmp6_ = string_to_string (BUILD_RESOURCES);
	_tmp7_ = g_strconcat (_tmp6_, "gtk/dropdown/icon.ui", NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp8_);
	_tmp10_ = string_to_string (BUILD_RESOURCES);
	_tmp11_ = g_strconcat (_tmp10_, "gtk/dropdown/full.ui", NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp12_);
	_tmp14_ = g_strdup (_ ("Post Privacy"));
	_tmp15_ = self->priv->_edit_mode;
	_tmp16_ = (GtkDropDown*) gtk_drop_down_new (_tmp4_, NULL);
	gtk_drop_down_set_expression (_tmp16_, (GtkExpression*) _tmp5_);
	_gtk_expression_unref0 (_tmp5_);
	gtk_drop_down_set_factory (_tmp16_, (GtkListItemFactory*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	gtk_drop_down_set_list_factory (_tmp16_, (GtkListItemFactory*) _tmp13_);
	_g_object_unref0 (_tmp13_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp16_, _tmp14_);
	_g_free0 (_tmp14_);
	gtk_widget_set_valign ((GtkWidget*) _tmp16_, GTK_ALIGN_CENTER);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp16_, !_tmp15_);
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->visibility_button);
	self->visibility_button = _tmp16_;
	_g_free0 (_tmp12_);
	_g_free0 (_tmp8_);
	_tmp17_ = self->visibility_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp17_, "dropdown-circular");
	_tmp18_ = self->visibility_button;
	g_signal_connect_object ((GObject*) _tmp18_, "notify::selected", (GCallback) _tuba_dialogs_composer_dialog_visibility_changed_g_object_notify, self, 0);
	_tmp20_ = tuba_accounts;
	_tmp21_ = tuba_account_store_get_active (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = _tmp22_->visibility;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp23_, default_visibility)) {
		_tmp19_ = default_visibility;
	} else {
		_tmp19_ = "public";
	}
	_tmp24_ = g_strdup (_tmp19_);
	safe_visibility = _tmp24_;
	_tmp25_ = tuba_accounts;
	_tmp26_ = tuba_account_store_get_active (_tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = _tmp27_->visibility_list;
	_tmp29_ = tuba_accounts;
	_tmp30_ = tuba_account_store_get_active (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = _tmp31_->visibility;
	_tmp33_ = safe_visibility;
	_tmp34_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp32_, _tmp33_);
	_tmp35_ = (TubaInstanceAccountVisibility*) _tmp34_;
	_tmp37_ = g_list_store_find (_tmp28_, (GObject*) _tmp35_, &_tmp36_);
	default_visibility_index = _tmp36_;
	_tmp38_ = _tmp37_;
	_g_object_unref0 (_tmp35_);
	if (_tmp38_) {
		GtkDropDown* _tmp39_;
		_tmp39_ = self->visibility_button;
		gtk_drop_down_set_selected (_tmp39_, default_visibility_index);
	}
	_tmp40_ = self->visibility_button;
	tuba_dialogs_composer_dialog_append_dropdown (self, _tmp40_);
	_g_free0 (safe_visibility);
}

static void
tuba_dialogs_composer_dialog_visibility_changed (TubaDialogsComposerDialog* self)
{
	gchar* vis = NULL;
	GtkDropDown* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_;
	TubaDialogsComposerDialogPostButton* _tmp8_;
	GtkDropDown* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->visibility_button;
	_tmp1_ = gtk_drop_down_get_selected_item (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_instance_account_visibility_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibility));
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup (_tmp4_);
	vis = _tmp5_;
	_tmp7_ = vis;
	if (g_strcmp0 (_tmp7_, "direct") == 0) {
		_tmp6_ = _ ("Send");
	} else {
		_tmp6_ = NULL;
	}
	_tmp8_ = self->priv->post_btn;
	tuba_dialogs_composer_dialog_post_button_update_label (_tmp8_, _tmp6_);
	_tmp9_ = self->quote_policy_button;
	if (_tmp9_ != NULL) {
		gboolean _tmp10_ = FALSE;
		const gchar* _tmp11_;
		GtkDropDown* _tmp13_;
		_tmp11_ = vis;
		if (g_strcmp0 (_tmp11_, "public") == 0) {
			_tmp10_ = TRUE;
		} else {
			const gchar* _tmp12_;
			_tmp12_ = vis;
			_tmp10_ = g_strcmp0 (_tmp12_, "unlisted") == 0;
		}
		_tmp13_ = self->quote_policy_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp13_, _tmp10_);
	}
	_g_free0 (vis);
}

static void
_tuba_dialogs_composer_dialog_on_language_changed_g_object_notify (GObject* _sender,
                                                                   GParamSpec* pspec,
                                                                   gpointer self)
{
	tuba_dialogs_composer_dialog_on_language_changed ((TubaDialogsComposerDialog*) self);
}

static void
tuba_dialogs_composer_dialog_install_languages (TubaDialogsComposerDialog* self,
                                                const gchar* locale_iso)
{
	TubaApplication* _tmp0_;
	TubaUtilsLocales* _tmp1_;
	TubaUtilsLocales* _tmp2_;
	GListStore* _tmp3_;
	GListModel* _tmp4_;
	GtkPropertyExpression* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkBuilderListItemFactory* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkBuilderListItemFactory* _tmp13_;
	gchar* _tmp14_;
	GtkDropDown* _tmp15_ = NULL;
	GtkDropDown* _tmp16_;
	GtkDropDown* _tmp28_;
	GtkDropDown* _tmp29_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_app;
	_tmp1_ = tuba_application_get_app_locales (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->list_store;
	_tmp4_ = _g_object_ref0 ((GListModel*) _tmp3_);
	_tmp5_ = (GtkPropertyExpression*) gtk_property_expression_new (TUBA_UTILS_LOCALES_TYPE_LOCALE, NULL, "en-name");
	_tmp6_ = string_to_string (BUILD_RESOURCES);
	_tmp7_ = g_strconcat (_tmp6_, "gtk/dropdown/language_title.ui", NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp8_);
	_tmp10_ = string_to_string (BUILD_RESOURCES);
	_tmp11_ = g_strconcat (_tmp10_, "gtk/dropdown/language.ui", NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp12_);
	_tmp14_ = g_strdup (_ ("Post Language"));
	_tmp15_ = (GtkDropDown*) gtk_drop_down_new (_tmp4_, NULL);
	gtk_drop_down_set_expression (_tmp15_, (GtkExpression*) _tmp5_);
	_gtk_expression_unref0 (_tmp5_);
	gtk_drop_down_set_factory (_tmp15_, (GtkListItemFactory*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	gtk_drop_down_set_list_factory (_tmp15_, (GtkListItemFactory*) _tmp13_);
	_g_object_unref0 (_tmp13_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp15_, _tmp14_);
	_g_free0 (_tmp14_);
	gtk_drop_down_set_enable_search (_tmp15_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp15_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->language_button);
	self->language_button = _tmp15_;
	_g_free0 (_tmp12_);
	_g_free0 (_tmp8_);
	_tmp16_ = self->language_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp16_, "dropdown-circular");
	if (locale_iso != NULL) {
		guint default_lang_index = 0U;
		TubaApplication* _tmp17_;
		TubaUtilsLocales* _tmp18_;
		TubaUtilsLocales* _tmp19_;
		GListStore* _tmp20_;
		TubaUtilsLocalesLocale* _tmp21_;
		TubaUtilsLocalesLocale* _tmp22_;
		GEqualFunc _tmp23_;
		guint _tmp24_ = 0U;
		gboolean _tmp25_;
		gboolean _tmp26_;
		_tmp17_ = tuba_app;
		_tmp18_ = tuba_application_get_app_locales (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_->list_store;
		_tmp21_ = tuba_utils_locales_locale_new (locale_iso, NULL, NULL);
		_tmp22_ = _tmp21_;
		_tmp23_ = tuba_utils_locales_locale_compare;
		_tmp25_ = g_list_store_find_with_equal_func (_tmp20_, (GObject*) _tmp22_, _tmp23_, &_tmp24_);
		default_lang_index = _tmp24_;
		_tmp26_ = _tmp25_;
		_g_object_unref0 (_tmp22_);
		if (_tmp26_) {
			GtkDropDown* _tmp27_;
			_tmp27_ = self->language_button;
			gtk_drop_down_set_selected (_tmp27_, default_lang_index);
		}
	}
	_tmp28_ = self->language_button;
	g_signal_connect_object ((GObject*) _tmp28_, "notify::selected", (GCallback) _tuba_dialogs_composer_dialog_on_language_changed_g_object_notify, self, 0);
	_tmp29_ = self->language_button;
	tuba_dialogs_composer_dialog_append_dropdown (self, _tmp29_);
}

static void
tuba_dialogs_composer_dialog_on_language_changed (TubaDialogsComposerDialog* self)
{
	GtkDropDown* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	TubaUtilsLocalesLocale* locale_obj = NULL;
	GtkDropDown* _tmp3_;
	GObject* _tmp4_;
	GObject* _tmp5_;
	TubaUtilsLocalesLocale* _tmp6_;
	gboolean _tmp7_ = FALSE;
	TubaUtilsLocalesLocale* _tmp8_;
	TubaDialogsComposerComponentsEditor* _tmp12_;
	TubaUtilsLocalesLocale* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	TubaUtilsLocalesLocale* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->language_button;
	_tmp1_ = gtk_drop_down_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == GTK_INVALID_LIST_POSITION) {
		return;
	}
	_tmp3_ = self->language_button;
	_tmp4_ = gtk_drop_down_get_selected_item (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (TUBA_UTILS_LOCALES_IS_LOCALE (_tmp5_) ? ((TubaUtilsLocalesLocale*) _tmp5_) : NULL);
	locale_obj = _tmp6_;
	_tmp8_ = locale_obj;
	if (_tmp8_ == NULL) {
		_tmp7_ = TRUE;
	} else {
		TubaUtilsLocalesLocale* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp9_ = locale_obj;
		_tmp10_ = tuba_utils_locales_locale_get_locale (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp7_ = _tmp11_ == NULL;
	}
	if (_tmp7_) {
		_g_object_unref0 (locale_obj);
		return;
	}
	_tmp12_ = self->priv->editor;
	_tmp13_ = locale_obj;
	_tmp14_ = tuba_utils_locales_locale_get_locale (_tmp13_);
	_tmp15_ = _tmp14_;
	tuba_dialogs_composer_components_editor_set_locale (_tmp12_, _tmp15_);
	_tmp16_ = locale_obj;
	_tmp17_ = tuba_utils_locales_locale_get_locale (_tmp16_);
	_tmp18_ = _tmp17_;
	tuba_dialogs_composer_dialog_cw_changed_with_locale (self, _tmp18_);
	_g_object_unref0 (locale_obj);
}

static void
tuba_dialogs_composer_dialog_cw_changed (TubaDialogsComposerDialog* self)
{
	gchar* locale_icu = NULL;
	gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	GtkDropDown* _tmp3_;
	const gchar* _tmp18_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup ("en");
	locale_icu = _tmp0_;
	_tmp3_ = self->language_button;
	if (_tmp3_ != NULL) {
		GtkDropDown* _tmp4_;
		GObject* _tmp5_;
		GObject* _tmp6_;
		_tmp4_ = self->language_button;
		_tmp5_ = gtk_drop_down_get_selected_item (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocale) != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkDropDown* _tmp7_;
		GObject* _tmp8_;
		GObject* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp7_ = self->language_button;
		_tmp8_ = gtk_drop_down_get_selected_item (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = tuba_utils_locales_locale_get_locale (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocale));
		_tmp11_ = _tmp10_;
		_tmp1_ = _tmp11_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkDropDown* _tmp12_;
		GObject* _tmp13_;
		GObject* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		_tmp12_ = self->language_button;
		_tmp13_ = gtk_drop_down_get_selected_item (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = tuba_utils_locales_locale_get_locale (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TUBA_UTILS_LOCALES_TYPE_LOCALE, TubaUtilsLocalesLocale));
		_tmp16_ = _tmp15_;
		_tmp17_ = g_strdup (_tmp16_);
		_g_free0 (locale_icu);
		locale_icu = _tmp17_;
	}
	_tmp18_ = locale_icu;
	tuba_dialogs_composer_dialog_cw_changed_with_locale (self, _tmp18_);
	_g_free0 (locale_icu);
}

static void
tuba_dialogs_composer_dialog_cw_changed_with_locale (TubaDialogsComposerDialog* self,
                                                     const gchar* locale)
{
	gint cw_count = 0;
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gint64 _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (locale != NULL);
	cw_count = 0;
	_tmp0_ = self->priv->cw_button;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkEntry* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = self->priv->cw_entry;
		_tmp4_ = gtk_editable_get_text ((GtkEditable*) _tmp3_);
		_tmp5_ = _tmp4_;
		cw_count = tuba_utils_counting_chars (_tmp5_, locale);
	}
	_tmp6_ = self->priv->_cw_count;
	if (((gint64) cw_count) != _tmp6_) {
		tuba_dialogs_composer_dialog_set_cw_count (self, (gint64) cw_count);
		tuba_dialogs_composer_dialog_update_remaining_chars (self);
	}
}

static void
tuba_dialogs_composer_dialog_install_quote_policy_button (TubaDialogsComposerDialog* self,
                                                          const gchar* quote_policy,
                                                          gboolean sensitive)
{
	GListStore* supported_quotation_policies = NULL;
	GListStore* _tmp0_;
	GListStore* _tmp1_;
	TubaDialogsComposerDialogQuotationPolicy* _tmp2_;
	TubaDialogsComposerDialogQuotationPolicy* _tmp3_;
	GListStore* _tmp4_;
	TubaDialogsComposerDialogQuotationPolicy* _tmp5_;
	TubaDialogsComposerDialogQuotationPolicy* _tmp6_;
	GListStore* _tmp7_;
	TubaDialogsComposerDialogQuotationPolicy* _tmp8_;
	TubaDialogsComposerDialogQuotationPolicy* _tmp9_;
	GListStore* _tmp10_;
	GListModel* _tmp11_;
	GtkPropertyExpression* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GtkBuilderListItemFactory* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GtkBuilderListItemFactory* _tmp20_;
	gchar* _tmp21_;
	GtkDropDown* _tmp22_ = NULL;
	GtkWidget* actual_button = NULL;
	GtkDropDown* _tmp31_;
	GtkWidget* _tmp32_;
	GtkWidget* _tmp33_;
	AdwHeaderBar* _tmp35_;
	GtkDropDown* _tmp36_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_list_store_new (TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY);
	supported_quotation_policies = _tmp0_;
	_tmp1_ = supported_quotation_policies;
	_tmp2_ = tuba_dialogs_composer_dialog_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_composer_dialog_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_composer_dialog_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_ = supported_quotation_policies;
	_tmp11_ = _g_object_ref0 ((GListModel*) _tmp10_);
	_tmp12_ = (GtkPropertyExpression*) gtk_property_expression_new (TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, NULL, "title");
	_tmp13_ = string_to_string (BUILD_RESOURCES);
	_tmp14_ = g_strconcat (_tmp13_, "gtk/dropdown/quotation_policy_title.ui", NULL);
	_tmp15_ = _tmp14_;
	_tmp16_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp15_);
	_tmp17_ = string_to_string (BUILD_RESOURCES);
	_tmp18_ = g_strconcat (_tmp17_, "gtk/dropdown/quotation_policy.ui", NULL);
	_tmp19_ = _tmp18_;
	_tmp20_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp19_);
	_tmp21_ = g_strdup (_ ("Quote Policy"));
	_tmp22_ = (GtkDropDown*) gtk_drop_down_new (_tmp11_, NULL);
	gtk_drop_down_set_expression (_tmp22_, (GtkExpression*) _tmp12_);
	_gtk_expression_unref0 (_tmp12_);
	gtk_drop_down_set_factory (_tmp22_, (GtkListItemFactory*) _tmp16_);
	_g_object_unref0 (_tmp16_);
	gtk_drop_down_set_list_factory (_tmp22_, (GtkListItemFactory*) _tmp20_);
	_g_object_unref0 (_tmp20_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp22_, _tmp21_);
	_g_free0 (_tmp21_);
	gtk_drop_down_set_enable_search (_tmp22_, FALSE);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp22_, sensitive);
	g_object_ref_sink (_tmp22_);
	_g_object_unref0 (self->quote_policy_button);
	self->quote_policy_button = _tmp22_;
	_g_free0 (_tmp19_);
	_g_free0 (_tmp15_);
	if (quote_policy != NULL) {
		guint default_quote_policy_index = 0U;
		GListStore* _tmp23_;
		TubaDialogsComposerDialogQuotationPolicy* _tmp24_;
		TubaDialogsComposerDialogQuotationPolicy* _tmp25_;
		GEqualFunc _tmp26_;
		guint _tmp27_ = 0U;
		gboolean _tmp28_;
		gboolean _tmp29_;
		_tmp23_ = supported_quotation_policies;
		_tmp24_ = tuba_dialogs_composer_dialog_quotation_policy_new (quote_policy);
		_tmp25_ = _tmp24_;
		_tmp26_ = tuba_dialogs_composer_dialog_quotation_policy_compare;
		_tmp28_ = g_list_store_find_with_equal_func (_tmp23_, (GObject*) _tmp25_, _tmp26_, &_tmp27_);
		default_quote_policy_index = _tmp27_;
		_tmp29_ = _tmp28_;
		_g_object_unref0 (_tmp25_);
		if (_tmp29_) {
			GtkDropDown* _tmp30_;
			_tmp30_ = self->quote_policy_button;
			gtk_drop_down_set_selected (_tmp30_, default_quote_policy_index);
		}
	}
	_tmp31_ = self->quote_policy_button;
	_tmp32_ = gtk_widget_get_first_child ((GtkWidget*) _tmp31_);
	actual_button = (GtkWidget*) (G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp32_) : NULL);
	_tmp33_ = actual_button;
	if (_tmp33_ != NULL) {
		GtkWidget* _tmp34_;
		_tmp34_ = actual_button;
		gtk_widget_add_css_class (_tmp34_, "flat");
	}
	_tmp35_ = self->priv->headerbar;
	_tmp36_ = self->quote_policy_button;
	adw_header_bar_pack_end (_tmp35_, (GtkWidget*) _tmp36_);
	_g_object_unref0 (supported_quotation_policies);
}

static void
_tuba_dialogs_composer_dialog_local_only_button_toggled_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                   gpointer self)
{
	tuba_dialogs_composer_dialog_local_only_button_toggled ((TubaDialogsComposerDialog*) self);
}

static void
tuba_dialogs_composer_dialog_install_local_only_button (TubaDialogsComposerDialog* self,
                                                        gboolean active)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	GtkToggleButton* _tmp3_ = NULL;
	GtkToggleButton* _tmp4_;
	gboolean _tmp5_ = FALSE;
	GtkDropDown* _tmp7_;
	gint _tmp8_ = 0;
	AdwHeaderBar* _tmp9_;
	GtkToggleButton* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup ("tuba-user-home-symbolic");
	_tmp1_ = g_strdup (_ ("Local Only"));
	_tmp2_ = self->priv->_edit_mode;
	_tmp3_ = (GtkToggleButton*) gtk_toggle_button_new ();
	gtk_button_set_icon_name ((GtkButton*) _tmp3_, _tmp0_);
	_g_free0 (_tmp0_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _tmp1_);
	_g_free0 (_tmp1_);
	gtk_toggle_button_set_active (_tmp3_, active);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, !_tmp2_);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->local_only_button);
	self->local_only_button = _tmp3_;
	_tmp4_ = self->local_only_button;
	g_signal_connect_object (_tmp4_, "toggled", (GCallback) _tuba_dialogs_composer_dialog_local_only_button_toggled_gtk_toggle_button_toggled, self, 0);
	if (!active) {
		gboolean _tmp6_;
		_tmp6_ = self->priv->_edit_mode;
		_tmp5_ = !_tmp6_;
	} else {
		_tmp5_ = FALSE;
	}
	_tmp7_ = self->visibility_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp7_, _tmp5_);
	if (active) {
		_tmp8_ = 2;
	} else {
		_tmp8_ = 0;
	}
	tuba_dialogs_composer_dialog_set_reserved_chars (self, (gint8) _tmp8_);
	_tmp9_ = self->priv->headerbar;
	_tmp10_ = self->local_only_button;
	adw_header_bar_pack_end (_tmp9_, (GtkWidget*) _tmp10_);
}

static void
tuba_dialogs_composer_dialog_local_only_button_toggled (TubaDialogsComposerDialog* self)
{
	g_return_if_fail (self != NULL);
	tuba_dialogs_composer_dialog_update_local_only_button_state (self, FALSE);
}

static void
tuba_dialogs_composer_dialog_update_local_only_button_state (TubaDialogsComposerDialog* self,
                                                             gboolean skip_remaining_char_recalc)
{
	gboolean _tmp0_ = FALSE;
	TubaAccountStore* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaAPIInstance* _tmp4_;
	TubaAPIInstance* _tmp5_;
	TubaAPIPleromaInstance* _tmp6_;
	TubaAPIPleromaInstance* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_accounts;
	_tmp2_ = tuba_account_store_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = tuba_instance_account_get_instance_info (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_api_instance_get_pleroma (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_ != NULL) {
		TubaAccountStore* _tmp8_;
		TubaInstanceAccount* _tmp9_;
		TubaInstanceAccount* _tmp10_;
		TubaInstanceAccountInstanceFeatures _tmp11_;
		TubaInstanceAccountInstanceFeatures _tmp12_;
		_tmp8_ = tuba_accounts;
		_tmp9_ = tuba_account_store_get_active (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = tuba_instance_account_get_tuba_instance_features (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp0_ = !((_tmp12_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean _tmp13_ = FALSE;
		GtkToggleButton* _tmp14_;
		gboolean _tmp15_;
		gboolean _tmp16_;
		GtkDropDown* _tmp18_;
		_tmp14_ = self->local_only_button;
		_tmp15_ = gtk_toggle_button_get_active (_tmp14_);
		_tmp16_ = _tmp15_;
		if (!_tmp16_) {
			gboolean _tmp17_;
			_tmp17_ = self->priv->_edit_mode;
			_tmp13_ = !_tmp17_;
		} else {
			_tmp13_ = FALSE;
		}
		_tmp18_ = self->visibility_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp18_, _tmp13_);
	} else {
		gboolean _tmp19_ = FALSE;
		TubaAccountStore* _tmp20_;
		TubaInstanceAccount* _tmp21_;
		TubaInstanceAccount* _tmp22_;
		TubaAPIInstanceV2APIVersions* _tmp23_;
		TubaAPIInstanceV2APIVersions* _tmp24_;
		gint8 _tmp25_;
		gint8 _tmp26_;
		_tmp20_ = tuba_accounts;
		_tmp21_ = tuba_account_store_get_active (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = tuba_instance_account_get_tuba_api_versions (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp24_);
		_tmp26_ = _tmp25_;
		if (((gint) _tmp26_) < 11) {
			TubaAccountStore* _tmp27_;
			TubaInstanceAccount* _tmp28_;
			TubaInstanceAccount* _tmp29_;
			TubaInstanceAccountInstanceFeatures _tmp30_;
			TubaInstanceAccountInstanceFeatures _tmp31_;
			_tmp27_ = tuba_accounts;
			_tmp28_ = tuba_account_store_get_active (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = tuba_instance_account_get_tuba_instance_features (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp19_ = (_tmp31_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH;
		} else {
			_tmp19_ = FALSE;
		}
		if (_tmp19_) {
			gint _tmp32_ = 0;
			gboolean _tmp33_ = FALSE;
			GtkToggleButton* _tmp34_;
			gboolean _tmp35_;
			gboolean _tmp36_;
			_tmp34_ = self->local_only_button;
			_tmp35_ = gtk_toggle_button_get_active (_tmp34_);
			_tmp36_ = _tmp35_;
			if (_tmp36_) {
				TubaDialogsComposerComponentsEditor* _tmp37_;
				GtkTextBuffer* _tmp38_;
				GtkTextBuffer* _tmp39_;
				gchar* _tmp40_;
				gchar* _tmp41_;
				gchar* _tmp42_;
				_tmp37_ = self->priv->editor;
				_tmp38_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp37_);
				_tmp39_ = _tmp38_;
				g_object_get (_tmp39_, "text", &_tmp40_, NULL);
				_tmp41_ = _tmp40_;
				_tmp42_ = _tmp41_;
				_tmp33_ = !g_str_has_suffix (_tmp42_, TUBA_DIALOGS_COMPOSER_DIALOG_LOCAL_ONLY_GLITCH_SUFFIX);
				_g_free0 (_tmp42_);
			} else {
				_tmp33_ = FALSE;
			}
			if (_tmp33_) {
				_tmp32_ = 2;
			} else {
				_tmp32_ = 0;
			}
			tuba_dialogs_composer_dialog_set_reserved_chars (self, (gint8) _tmp32_);
			if (!skip_remaining_char_recalc) {
				tuba_dialogs_composer_dialog_update_remaining_chars (self);
			}
		}
	}
}

static void
_tuba_dialogs_composer_dialog_on_content_type_changed_g_object_notify (GObject* _sender,
                                                                       GParamSpec* pspec,
                                                                       gpointer self)
{
	tuba_dialogs_composer_dialog_on_content_type_changed ((TubaDialogsComposerDialog*) self);
}

static void
tuba_dialogs_composer_dialog_install_content_types (TubaDialogsComposerDialog* self,
                                                    const gchar* content_type)
{
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	GListStore* _tmp3_;
	GListModel* _tmp4_;
	GtkPropertyExpression* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkBuilderListItemFactory* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkBuilderListItemFactory* _tmp13_;
	gchar* _tmp14_;
	GtkDropDown* _tmp15_ = NULL;
	GtkWidget* actual_button = NULL;
	GtkDropDown* _tmp27_;
	GtkWidget* _tmp28_;
	GtkWidget* _tmp29_;
	AdwHeaderBar* _tmp31_;
	GtkDropDown* _tmp32_;
	GtkDropDown* _tmp33_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_accounts;
	_tmp1_ = tuba_account_store_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->supported_mime_types;
	_tmp4_ = _g_object_ref0 ((GListModel*) _tmp3_);
	_tmp5_ = (GtkPropertyExpression*) gtk_property_expression_new (TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE, NULL, "title");
	_tmp6_ = string_to_string (BUILD_RESOURCES);
	_tmp7_ = g_strconcat (_tmp6_, "gtk/dropdown/content_type_title.ui", NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp8_);
	_tmp10_ = string_to_string (BUILD_RESOURCES);
	_tmp11_ = g_strconcat (_tmp10_, "gtk/dropdown/content_type.ui", NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp12_);
	_tmp14_ = g_strdup (_ ("Post Content Type"));
	_tmp15_ = (GtkDropDown*) gtk_drop_down_new (_tmp4_, NULL);
	gtk_drop_down_set_expression (_tmp15_, (GtkExpression*) _tmp5_);
	_gtk_expression_unref0 (_tmp5_);
	gtk_drop_down_set_factory (_tmp15_, (GtkListItemFactory*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	gtk_drop_down_set_list_factory (_tmp15_, (GtkListItemFactory*) _tmp13_);
	_g_object_unref0 (_tmp13_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp15_, _tmp14_);
	_g_free0 (_tmp14_);
	gtk_drop_down_set_enable_search (_tmp15_, FALSE);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->content_type_button);
	self->content_type_button = _tmp15_;
	_g_free0 (_tmp12_);
	_g_free0 (_tmp8_);
	if (content_type != NULL) {
		guint default_content_type_index = 0U;
		TubaAccountStore* _tmp16_;
		TubaInstanceAccount* _tmp17_;
		TubaInstanceAccount* _tmp18_;
		GListStore* _tmp19_;
		TubaInstanceAccountStatusContentType* _tmp20_;
		TubaInstanceAccountStatusContentType* _tmp21_;
		GEqualFunc _tmp22_;
		guint _tmp23_ = 0U;
		gboolean _tmp24_;
		gboolean _tmp25_;
		_tmp16_ = tuba_accounts;
		_tmp17_ = tuba_account_store_get_active (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = _tmp18_->supported_mime_types;
		_tmp20_ = tuba_instance_account_status_content_type_new (content_type);
		_tmp21_ = _tmp20_;
		_tmp22_ = tuba_instance_account_status_content_type_compare;
		_tmp24_ = g_list_store_find_with_equal_func (_tmp19_, (GObject*) _tmp21_, _tmp22_, &_tmp23_);
		default_content_type_index = _tmp23_;
		_tmp25_ = _tmp24_;
		_g_object_unref0 (_tmp21_);
		if (_tmp25_) {
			GtkDropDown* _tmp26_;
			_tmp26_ = self->content_type_button;
			gtk_drop_down_set_selected (_tmp26_, default_content_type_index);
		}
	}
	_tmp27_ = self->content_type_button;
	_tmp28_ = gtk_widget_get_first_child ((GtkWidget*) _tmp27_);
	actual_button = (GtkWidget*) (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, gtk_toggle_button_get_type ()) ? ((GtkToggleButton*) _tmp28_) : NULL);
	_tmp29_ = actual_button;
	if (_tmp29_ != NULL) {
		GtkWidget* _tmp30_;
		_tmp30_ = actual_button;
		gtk_widget_add_css_class (_tmp30_, "flat");
	}
	_tmp31_ = self->priv->headerbar;
	_tmp32_ = self->content_type_button;
	adw_header_bar_pack_start (_tmp31_, (GtkWidget*) _tmp32_);
	_tmp33_ = self->content_type_button;
	g_signal_connect_object ((GObject*) _tmp33_, "notify::selected-item", (GCallback) _tuba_dialogs_composer_dialog_on_content_type_changed_g_object_notify, self, 0);
	tuba_dialogs_composer_dialog_on_content_type_changed (self);
}

static void
tuba_dialogs_composer_dialog_on_content_type_changed (TubaDialogsComposerDialog* self)
{
	GtkDropDown* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	TubaInstanceAccountStatusContentType* ct_obj = NULL;
	GtkDropDown* _tmp3_;
	GObject* _tmp4_;
	GObject* _tmp5_;
	TubaInstanceAccountStatusContentType* _tmp6_;
	gboolean _tmp7_ = FALSE;
	TubaInstanceAccountStatusContentType* _tmp8_;
	TubaDialogsComposerComponentsEditor* _tmp12_;
	TubaInstanceAccountStatusContentType* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->content_type_button;
	_tmp1_ = gtk_drop_down_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == GTK_INVALID_LIST_POSITION) {
		return;
	}
	_tmp3_ = self->content_type_button;
	_tmp4_ = gtk_drop_down_get_selected_item (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (TUBA_INSTANCE_ACCOUNT_IS_STATUS_CONTENT_TYPE (_tmp5_) ? ((TubaInstanceAccountStatusContentType*) _tmp5_) : NULL);
	ct_obj = _tmp6_;
	_tmp8_ = ct_obj;
	if (_tmp8_ == NULL) {
		_tmp7_ = TRUE;
	} else {
		TubaInstanceAccountStatusContentType* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp9_ = ct_obj;
		_tmp10_ = tuba_instance_account_status_content_type_get_syntax (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp7_ = _tmp11_ == NULL;
	}
	if (_tmp7_) {
		_g_object_unref0 (ct_obj);
		return;
	}
	_tmp12_ = self->priv->editor;
	_tmp13_ = ct_obj;
	_tmp14_ = tuba_instance_account_status_content_type_get_syntax (_tmp13_);
	_tmp15_ = _tmp14_;
	tuba_dialogs_composer_components_editor_set_content_type (_tmp12_, _tmp15_);
	_g_object_unref0 (ct_obj);
}

static void
tuba_dialogs_composer_dialog_on_vadjustment_value_changed (TubaDialogsComposerDialog* self)
{
	GtkRevealer* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_title_revealer;
	_tmp1_ = self->priv->scroller;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_revealer_set_reveal_child (_tmp0_, _tmp5_ > ((gdouble) 28));
}

static void
_tuba_dialogs_composer_dialog_on_commit_tuba_dialogs_composer_dialog_post_button_clicked (TubaDialogsComposerDialogPostButton* _sender,
                                                                                          gpointer self)
{
	tuba_dialogs_composer_dialog_on_commit ((TubaDialogsComposerDialog*) self);
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static void
_tuba_dialogs_composer_dialog_cw_changed_gtk_editable_changed (GtkEditable* _sender,
                                                               gpointer self)
{
	tuba_dialogs_composer_dialog_cw_changed ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_cw_changed_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                    gpointer self)
{
	tuba_dialogs_composer_dialog_cw_changed ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_vadjustment_value_changed_gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                                                         gpointer self)
{
	tuba_dialogs_composer_dialog_on_vadjustment_value_changed ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_toggle_poll_component_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                               gpointer self)
{
	tuba_dialogs_composer_dialog_toggle_poll_component ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_add_media_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	tuba_dialogs_composer_dialog_on_add_media_clicked ((TubaDialogsComposerDialog*) self);
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_construct (GType object_type,
                                        TubaDialogsComposerDialogPrecompose* precompose,
                                        const gchar* default_visibility,
                                        const gchar* default_language,
                                        const gchar* post_button_label,
                                        gboolean edit_mode,
                                        gboolean can_schedule,
                                        const gchar* default_quote_policy,
                                        gboolean can_update_draft)
{
	TubaDialogsComposerDialog * self = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp3_ = FALSE;
	TubaDialogsComposerDialogPostButton* _tmp7_;
	TubaDialogsComposerDialogPostButton* _tmp8_;
	TubaDialogsComposerDialogPostButton* _tmp9_;
	TubaAccountStore* _tmp10_;
	TubaInstanceAccount* _tmp11_;
	TubaInstanceAccount* _tmp12_;
	GListStore* _tmp13_;
	guint _tmp14_;
	guint _tmp15_;
	TubaAccountStore* _tmp19_;
	TubaInstanceAccount* _tmp20_;
	TubaInstanceAccount* _tmp21_;
	TubaAPIInstanceV2APIVersions* _tmp22_;
	TubaAPIInstanceV2APIVersions* _tmp23_;
	gint8 _tmp24_;
	gint8 _tmp25_;
	TubaAccountStore* _tmp27_;
	TubaInstanceAccount* _tmp28_;
	TubaInstanceAccount* _tmp29_;
	TubaInstanceAccountInstanceFeatures _tmp30_;
	TubaInstanceAccountInstanceFeatures _tmp31_;
	GtkEntry* _tmp65_;
	GtkToggleButton* _tmp66_;
	GtkScrolledWindow* _tmp67_;
	GtkAdjustment* _tmp68_;
	GtkAdjustment* _tmp69_;
	GtkToggleButton* _tmp70_;
	GtkButton* _tmp71_;
	TubaApplication* _tmp112_;
	TubaDialogsMainWindow* _tmp113_;
	TubaDialogsMainWindow* _tmp114_;
	g_return_val_if_fail (default_visibility != NULL, NULL);
	g_return_val_if_fail (default_language != NULL, NULL);
	g_return_val_if_fail (post_button_label != NULL, NULL);
	g_return_val_if_fail (default_quote_policy != NULL, NULL);
	self = (TubaDialogsComposerDialog*) g_object_new (object_type, NULL);
	tuba_dialogs_composer_dialog_set_edit_mode (self, edit_mode);
	tuba_dialogs_composer_dialog_install_editor (self);
	tuba_dialogs_composer_dialog_install_emoji_pickers (self);
	_tmp1_ = self->priv->_edit_mode;
	if (!_tmp1_) {
		gboolean _tmp2_ = FALSE;
		if (can_schedule) {
			_tmp2_ = TRUE;
		} else {
			_tmp2_ = can_update_draft;
		}
		_tmp0_ = _tmp2_;
	} else {
		_tmp0_ = FALSE;
	}
	if (precompose == NULL) {
		_tmp3_ = TRUE;
	} else {
		gboolean _tmp4_ = FALSE;
		const gchar* _tmp5_;
		_tmp5_ = (*precompose).quote_id;
		if (_tmp5_ == NULL) {
			const gchar* _tmp6_;
			_tmp6_ = (*precompose).in_reply_to_id;
			_tmp4_ = _tmp6_ == NULL;
		} else {
			_tmp4_ = FALSE;
		}
		_tmp3_ = _tmp4_;
	}
	_tmp7_ = self->priv->post_btn;
	tuba_dialogs_composer_dialog_post_button_install (_tmp7_, post_button_label, _tmp0_, can_update_draft, can_schedule, _tmp3_);
	_tmp8_ = self->priv->post_btn;
	g_signal_connect_object (_tmp8_, "clicked", (GCallback) _tuba_dialogs_composer_dialog_on_commit_tuba_dialogs_composer_dialog_post_button_clicked, self, 0);
	_tmp9_ = self->priv->post_btn;
	tuba_dialogs_composer_dialog_post_button_set_allow_dynamic_name (_tmp9_, g_strcmp0 (post_button_label, _ ("Post")) == 0);
	tuba_dialogs_composer_dialog_install_visibility (self, default_visibility);
	tuba_dialogs_composer_dialog_install_languages (self, default_language);
	_tmp10_ = tuba_accounts;
	_tmp11_ = tuba_account_store_get_active (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = _tmp12_->supported_mime_types;
	g_object_get (_tmp13_, "n-items", &_tmp14_, NULL);
	_tmp15_ = _tmp14_;
	if (_tmp15_ > ((guint) 1)) {
		TubaSettings* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		_tmp16_ = tuba_settings;
		_tmp17_ = tuba_settings_get_default_content_type (_tmp16_);
		_tmp18_ = _tmp17_;
		tuba_dialogs_composer_dialog_install_content_types (self, _tmp18_);
	}
	_tmp19_ = tuba_accounts;
	_tmp20_ = tuba_account_store_get_active (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = tuba_instance_account_get_tuba_api_versions (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp23_);
	_tmp25_ = _tmp24_;
	if (((gint) _tmp25_) >= 7) {
		gboolean _tmp26_ = FALSE;
		if (g_strcmp0 (default_visibility, "public") == 0) {
			_tmp26_ = TRUE;
		} else {
			_tmp26_ = g_strcmp0 (default_visibility, "unlisted") == 0;
		}
		tuba_dialogs_composer_dialog_install_quote_policy_button (self, default_quote_policy, _tmp26_);
	}
	_tmp27_ = tuba_accounts;
	_tmp28_ = tuba_account_store_get_active (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = tuba_instance_account_get_tuba_instance_features (_tmp29_);
	_tmp31_ = _tmp30_;
	if ((_tmp31_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_LOCAL_ONLY) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_LOCAL_ONLY) {
		gboolean _tmp32_ = FALSE;
		gboolean _tmp34_ = FALSE;
		gboolean _tmp35_ = FALSE;
		gboolean _tmp36_ = FALSE;
		gboolean _tmp37_ = FALSE;
		gboolean _tmp38_ = FALSE;
		GtkToggleButton* _tmp39_;
		gboolean _tmp40_;
		gboolean _tmp41_;
		GtkToggleButton* _tmp63_;
		gboolean _tmp64_;
		if (g_strcmp0 (default_visibility, "local") == 0) {
			_tmp32_ = TRUE;
		} else {
			gboolean _tmp33_ = FALSE;
			if (precompose != NULL) {
				_tmp33_ = (*precompose).local_only;
			} else {
				_tmp33_ = FALSE;
			}
			_tmp32_ = _tmp33_;
		}
		tuba_dialogs_composer_dialog_install_local_only_button (self, _tmp32_);
		_tmp39_ = self->local_only_button;
		_tmp40_ = gtk_toggle_button_get_active (_tmp39_);
		_tmp41_ = _tmp40_;
		if (_tmp41_) {
			TubaAccountStore* _tmp42_;
			TubaInstanceAccount* _tmp43_;
			TubaInstanceAccount* _tmp44_;
			TubaInstanceAccountInstanceFeatures _tmp45_;
			TubaInstanceAccountInstanceFeatures _tmp46_;
			_tmp42_ = tuba_accounts;
			_tmp43_ = tuba_account_store_get_active (_tmp42_);
			_tmp44_ = _tmp43_;
			_tmp45_ = tuba_instance_account_get_tuba_instance_features (_tmp44_);
			_tmp46_ = _tmp45_;
			_tmp38_ = (_tmp46_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH;
		} else {
			_tmp38_ = FALSE;
		}
		if (_tmp38_) {
			TubaAccountStore* _tmp47_;
			TubaInstanceAccount* _tmp48_;
			TubaInstanceAccount* _tmp49_;
			TubaAPIInstanceV2APIVersions* _tmp50_;
			TubaAPIInstanceV2APIVersions* _tmp51_;
			gint8 _tmp52_;
			gint8 _tmp53_;
			_tmp47_ = tuba_accounts;
			_tmp48_ = tuba_account_store_get_active (_tmp47_);
			_tmp49_ = _tmp48_;
			_tmp50_ = tuba_instance_account_get_tuba_api_versions (_tmp49_);
			_tmp51_ = _tmp50_;
			_tmp52_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp51_);
			_tmp53_ = _tmp52_;
			_tmp37_ = ((gint) _tmp53_) < 11;
		} else {
			_tmp37_ = FALSE;
		}
		if (_tmp37_) {
			_tmp36_ = precompose != NULL;
		} else {
			_tmp36_ = FALSE;
		}
		if (_tmp36_) {
			const gchar* _tmp54_;
			_tmp54_ = (*precompose).content;
			_tmp35_ = _tmp54_ != NULL;
		} else {
			_tmp35_ = FALSE;
		}
		if (_tmp35_) {
			const gchar* _tmp55_;
			_tmp55_ = (*precompose).content;
			_tmp34_ = g_str_has_suffix (_tmp55_, TUBA_DIALOGS_COMPOSER_DIALOG_LOCAL_ONLY_GLITCH_SUFFIX);
		} else {
			_tmp34_ = FALSE;
		}
		if (_tmp34_) {
			const gchar* _tmp56_;
			const gchar* _tmp57_;
			gint _tmp58_;
			gint _tmp59_;
			gint _tmp60_;
			gint _tmp61_;
			gchar* _tmp62_;
			_tmp56_ = (*precompose).content;
			_tmp57_ = (*precompose).content;
			_tmp58_ = strlen (_tmp57_);
			_tmp59_ = _tmp58_;
			_tmp60_ = strlen (TUBA_DIALOGS_COMPOSER_DIALOG_LOCAL_ONLY_GLITCH_SUFFIX);
			_tmp61_ = _tmp60_;
			_tmp62_ = string_substring (_tmp56_, (glong) 0, (glong) (_tmp59_ - _tmp61_));
			_g_free0 ((*precompose).content);
			(*precompose).content = _tmp62_;
		}
		_tmp63_ = self->local_only_button;
		_tmp64_ = self->priv->_edit_mode;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp63_, !_tmp64_);
	}
	_tmp65_ = self->priv->cw_entry;
	g_signal_connect_object ((GtkEditable*) _tmp65_, "changed", (GCallback) _tuba_dialogs_composer_dialog_cw_changed_gtk_editable_changed, self, 0);
	_tmp66_ = self->priv->cw_button;
	g_signal_connect_object (_tmp66_, "toggled", (GCallback) _tuba_dialogs_composer_dialog_cw_changed_gtk_toggle_button_toggled, self, 0);
	tuba_dialogs_composer_dialog_on_language_changed (self);
	tuba_dialogs_composer_dialog_update_remaining_chars (self);
	_tmp67_ = self->priv->scroller;
	_tmp68_ = gtk_scrolled_window_get_vadjustment (_tmp67_);
	_tmp69_ = _tmp68_;
	g_signal_connect_object (_tmp69_, "value-changed", (GCallback) _tuba_dialogs_composer_dialog_on_vadjustment_value_changed_gtk_adjustment_value_changed, self, 0);
	_tmp70_ = self->priv->poll_button;
	g_signal_connect_object (_tmp70_, "toggled", (GCallback) _tuba_dialogs_composer_dialog_toggle_poll_component_gtk_toggle_button_toggled, self, 0);
	tuba_dialogs_composer_dialog_toggle_poll_component (self);
	_tmp71_ = self->priv->add_media_button;
	g_signal_connect_object (_tmp71_, "clicked", (GCallback) _tuba_dialogs_composer_dialog_on_add_media_clicked_gtk_button_clicked, self, 0);
	tuba_dialogs_composer_dialog_set_editor_title (self, _ ("New Post"), NULL);
	if (precompose != NULL) {
		const gchar* _tmp72_;
		const gchar* _tmp77_;
		const gchar* _tmp82_;
		const gchar* _tmp84_;
		const gchar* _tmp86_;
		TubaAPIPoll* _tmp96_;
		gboolean _tmp99_ = FALSE;
		GeeArrayList* _tmp100_;
		_tmp72_ = (*precompose).content;
		if (_tmp72_ != NULL) {
			TubaDialogsComposerComponentsEditor* _tmp73_;
			GtkTextBuffer* _tmp74_;
			GtkTextBuffer* _tmp75_;
			const gchar* _tmp76_;
			_tmp73_ = self->priv->editor;
			_tmp74_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp73_);
			_tmp75_ = _tmp74_;
			_tmp76_ = (*precompose).content;
			g_object_set (_tmp75_, "text", _tmp76_, NULL);
		}
		_tmp77_ = (*precompose).spoiler;
		if (_tmp77_ != NULL) {
			GtkToggleButton* _tmp78_;
			const gchar* _tmp79_;
			GtkEntry* _tmp80_;
			const gchar* _tmp81_;
			_tmp78_ = self->priv->cw_button;
			_tmp79_ = (*precompose).spoiler;
			gtk_toggle_button_set_active (_tmp78_, g_strcmp0 (_tmp79_, "") != 0);
			_tmp80_ = self->priv->cw_entry;
			_tmp81_ = (*precompose).spoiler;
			gtk_editable_set_text ((GtkEditable*) _tmp80_, _tmp81_);
		}
		_tmp82_ = (*precompose).quote_id;
		if (_tmp82_ != NULL) {
			const gchar* _tmp83_;
			_tmp83_ = (*precompose).quote_id;
			tuba_dialogs_composer_dialog_set_quote_id (self, _tmp83_);
			tuba_dialogs_composer_dialog_update_quote_id_state (self);
		}
		_tmp84_ = (*precompose).scheduled_id;
		if (_tmp84_ != NULL) {
			const gchar* _tmp85_;
			_tmp85_ = (*precompose).scheduled_id;
			tuba_dialogs_composer_dialog_set_scheduled_id (self, _tmp85_);
		}
		_tmp86_ = (*precompose).in_reply_to_id;
		if (_tmp86_ != NULL) {
			const gchar* _tmp87_;
			_tmp87_ = (*precompose).in_reply_to_id;
			tuba_dialogs_composer_dialog_set_in_reply_to_id (self, _tmp87_);
		}
		if ((*precompose).force_cursor_at_start) {
			GtkTextIter star_iter = {0};
			TubaDialogsComposerComponentsEditor* _tmp88_;
			GtkTextBuffer* _tmp89_;
			GtkTextBuffer* _tmp90_;
			GtkTextIter _tmp91_ = {0};
			TubaDialogsComposerComponentsEditor* _tmp92_;
			GtkTextBuffer* _tmp93_;
			GtkTextBuffer* _tmp94_;
			GtkTextIter _tmp95_;
			_tmp88_ = self->priv->editor;
			_tmp89_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp88_);
			_tmp90_ = _tmp89_;
			gtk_text_buffer_get_start_iter (_tmp90_, &_tmp91_);
			star_iter = _tmp91_;
			_tmp92_ = self->priv->editor;
			_tmp93_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp92_);
			_tmp94_ = _tmp93_;
			_tmp95_ = star_iter;
			gtk_text_buffer_place_cursor (_tmp94_, &_tmp95_);
		}
		_tmp96_ = (*precompose).poll;
		if (_tmp96_ != NULL) {
			TubaAPIPoll* _tmp97_;
			GtkToggleButton* _tmp98_;
			_tmp97_ = (*precompose).poll;
			tuba_dialogs_composer_dialog_init_polls_component (self, _tmp97_);
			_tmp98_ = self->priv->poll_button;
			gtk_toggle_button_set_active (_tmp98_, TRUE);
		}
		_tmp100_ = (*precompose).media_attachments;
		if (_tmp100_ != NULL) {
			GeeArrayList* _tmp101_;
			gint _tmp102_;
			gint _tmp103_;
			_tmp101_ = (*precompose).media_attachments;
			_tmp102_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp101_);
			_tmp103_ = _tmp102_;
			_tmp99_ = _tmp103_ > 0;
		} else {
			_tmp99_ = FALSE;
		}
		if (_tmp99_) {
			GeeArrayList* _tmp104_;
			TubaDialogsComposerComponentsEditor* _tmp105_;
			TubaDialogsComposerComponentsAttachmentsBin* _tmp106_;
			GtkToggleButton* _tmp107_;
			_tmp104_ = (*precompose).media_attachments;
			tuba_dialogs_composer_dialog_create_attachmentsbin (self, _tmp104_);
			_tmp105_ = self->priv->editor;
			_tmp106_ = self->priv->attachmentsbin_component;
			tuba_widgets_sandwich_source_view_add_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp105_, (GtkWidget*) _tmp106_, FALSE);
			_tmp107_ = self->priv->sensitive_media_button;
			gtk_toggle_button_set_active (_tmp107_, (*precompose).sensitive_media);
		}
	} else {
		TubaDialogsComposerDialogPostButton* _tmp108_;
		gboolean _tmp109_;
		gboolean _tmp110_;
		_tmp108_ = self->priv->post_btn;
		_tmp109_ = tuba_dialogs_composer_dialog_post_button_get_allow_dynamic_name (_tmp108_);
		_tmp110_ = _tmp109_;
		if (_tmp110_) {
			TubaDialogsComposerDialogPostButton* _tmp111_;
			_tmp111_ = self->priv->post_btn;
			tuba_dialogs_composer_dialog_post_button_show_drafts_default (_tmp111_);
		}
	}
	self->priv->unique_state = tuba_dialogs_composer_dialog_generate_unique_state (self);
	_tmp112_ = tuba_app;
	_tmp113_ = tuba_application_get_main_window (_tmp112_);
	_tmp114_ = _tmp113_;
	adw_dialog_present ((AdwDialog*) self, (GtkWidget*) _tmp114_);
	return self;
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_new (TubaDialogsComposerDialogPrecompose* precompose,
                                  const gchar* default_visibility,
                                  const gchar* default_language,
                                  const gchar* post_button_label,
                                  gboolean edit_mode,
                                  gboolean can_schedule,
                                  const gchar* default_quote_policy,
                                  gboolean can_update_draft)
{
	return tuba_dialogs_composer_dialog_construct (TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, precompose, default_visibility, default_language, post_button_label, edit_mode, can_schedule, default_quote_policy, can_update_draft);
}

static gboolean
tuba_dialogs_composer_dialog_ensure_focus_and_vadjustment (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerComponentsEditor* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	TubaDialogsComposerComponentsEditor* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	TubaDialogsComposerComponentsEditor* _tmp9_;
	gboolean _tmp10_;
	gboolean _tmp11_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->editor;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->scroller;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->editor;
	_tmp7_ = gtk_text_view_get_top_margin ((GtkTextView*) _tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp5_ != ((gdouble) _tmp8_)) {
		tuba_dialogs_composer_dialog_scroller_mapped (self);
	}
	_tmp9_ = self->priv->editor;
	g_object_get ((GtkWidget*) _tmp9_, "has-focus", &_tmp10_, NULL);
	_tmp11_ = _tmp10_;
	if (!_tmp11_) {
		TubaDialogsComposerComponentsEditor* _tmp12_;
		_tmp12_ = self->priv->editor;
		result = gtk_widget_grab_focus ((GtkWidget*) _tmp12_);
		return result;
	}
	result = TRUE;
	return result;
}

static gboolean
tuba_dialogs_composer_dialog_real_grab_focus (GtkWidget* base)
{
	TubaDialogsComposerDialog * self;
	gboolean base_focus = FALSE;
	gboolean ensure = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean result;
	self = (TubaDialogsComposerDialog*) base;
	base_focus = GTK_WIDGET_CLASS (tuba_dialogs_composer_dialog_parent_class)->grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, adw_dialog_get_type (), AdwDialog));
	ensure = tuba_dialogs_composer_dialog_ensure_focus_and_vadjustment (self);
	if (ensure) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = base_focus;
	}
	result = _tmp0_;
	return result;
}

static gboolean
___lambda84_ (TubaDialogsComposerDialog* self,
              TubaAPIAttachment* e)
{
	gboolean result;
	g_return_val_if_fail (e != NULL, FALSE);
	tuba_api_attachment_set_tuba_is_report (e, TRUE);
	result = TRUE;
	_g_object_unref0 (e);
	return result;
}

static gboolean
____lambda84__gee_forall_func (gpointer g,
                               gpointer self)
{
	gboolean result;
	result = ___lambda84_ ((TubaDialogsComposerDialog*) self, (TubaAPIAttachment*) g);
	return result;
}

static void
_tuba_dialogs_composer_dialog_scroller_mapped_gtk_widget_map (GtkWidget* _sender,
                                                              gpointer self)
{
	tuba_dialogs_composer_dialog_scroller_mapped ((TubaDialogsComposerDialog*) self);
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_construct_reply (GType object_type,
                                              TubaAPIStatus* to,
                                              TubaDialogsComposerDialogSuccessCallback t_cb,
                                              gpointer t_cb_target,
                                              GDestroyNotify t_cb_target_destroy_notify)
{
	TubaDialogsComposerDialog * self = NULL;
	gchar* final_visibility = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	TubaAPIStatusVisibility* default_visibility = NULL;
	TubaSettings* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	TubaAPIStatusVisibility* _tmp6_;
	TubaAPIStatusVisibility* to_visibility = NULL;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	TubaAPIStatusVisibility* _tmp9_;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	TubaAPIStatusVisibility* _tmp12_;
	gchar* filled_content = NULL;
	gchar* _tmp20_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	gboolean _tmp33_;
	gboolean _tmp34_;
	TubaDialogsComposerDialogPrecompose _tmp35_ = {0};
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	TubaSettings* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	TubaAPIStatus* sample = NULL;
	TubaAPIPoll* _tmp42_;
	TubaAPIPoll* _tmp43_;
	TubaAPIPoll* _tmp44_;
	gboolean _tmp45_;
	gboolean _tmp46_;
	GeeArrayList* _tmp47_;
	GeeArrayList* _tmp48_;
	GeeArrayList* _tmp49_;
	const gchar* _tmp50_;
	const gchar* _tmp51_;
	gchar* _tmp52_;
	const gchar* _tmp53_;
	const gchar* _tmp54_;
	gchar* _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	gchar* _tmp58_;
	TubaAPIAccount* _tmp59_;
	TubaAPIAccount* _tmp60_;
	TubaAPIAccount* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	TubaAPIQuote* _tmp65_;
	TubaAPIQuote* _tmp66_;
	TubaAPIQuote* _tmp67_;
	TubaAPIStatus* _tmp68_ = NULL;
	TubaAPIStatus* _tmp69_;
	TubaAPIStatus* _tmp70_;
	TubaAPIStatus* _tmp71_;
	gboolean _tmp72_;
	gboolean _tmp73_;
	TubaWidgetsStatus* widget_status = NULL;
	TubaAPIStatus* _tmp79_;
	GtkWidget* _tmp80_;
	GtkListBox* lbox = NULL;
	GtkListBox* _tmp81_ = NULL;
	TubaAPIAccount* _tmp82_;
	TubaAPIAccount* _tmp83_;
	const gchar* _tmp84_;
	const gchar* _tmp85_;
	gchar* _tmp86_;
	gchar* _tmp87_;
	GtkScrolledWindow* _tmp88_;
	TubaDialogsComposerDialogSuccessCallback _tmp89_;
	gpointer _tmp89__target;
	GDestroyNotify _tmp89__target_destroy_notify;
	g_return_val_if_fail (to != NULL, NULL);
	_tmp0_ = tuba_api_status_get_visibility (to);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	final_visibility = _tmp2_;
	_tmp3_ = tuba_settings;
	_tmp4_ = tuba_settings_get_default_post_visibility (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_api_status_visibility_from_string (_tmp5_);
	default_visibility = _tmp6_;
	_tmp7_ = tuba_api_status_get_visibility (to);
	_tmp8_ = _tmp7_;
	_tmp9_ = tuba_api_status_visibility_from_string (_tmp8_);
	to_visibility = _tmp9_;
	_tmp12_ = default_visibility;
	if (_tmp12_ != NULL) {
		TubaAPIStatusVisibility* _tmp13_;
		_tmp13_ = to_visibility;
		_tmp11_ = _tmp13_ != NULL;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		TubaAPIStatusVisibility* _tmp14_;
		TubaAPIStatusVisibility* _tmp15_;
		_tmp14_ = default_visibility;
		_tmp15_ = to_visibility;
		_tmp10_ = tuba_api_status_visibility_privacy_rate (*_tmp14_) > tuba_api_status_visibility_privacy_rate (*_tmp15_);
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		TubaSettings* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp16_ = tuba_settings;
		_tmp17_ = tuba_settings_get_default_post_visibility (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = g_strdup (_tmp18_);
		_g_free0 (final_visibility);
		final_visibility = _tmp19_;
	}
	_tmp20_ = g_strdup ("");
	filled_content = _tmp20_;
	{
		gchar* joined_mentions = NULL;
		TubaAPIStatus* _tmp21_;
		TubaAPIStatus* _tmp22_;
		gchar* _tmp23_ = NULL;
		gboolean _tmp24_;
		_tmp21_ = tuba_api_status_get_formal (to);
		_tmp22_ = _tmp21_;
		_tmp24_ = tuba_api_status_get_reply_mentions (_tmp22_, &_tmp23_);
		_g_free0 (joined_mentions);
		joined_mentions = _tmp23_;
		if (_tmp24_) {
			const gchar* _tmp25_;
			const gchar* _tmp26_;
			gchar* _tmp27_;
			_tmp25_ = joined_mentions;
			_tmp26_ = string_to_string (_tmp25_);
			_tmp27_ = g_strconcat (_tmp26_, " ", NULL);
			_g_free0 (filled_content);
			filled_content = _tmp27_;
		}
		_g_free0 (joined_mentions);
	}
	_tmp28_ = filled_content;
	_tmp29_ = tuba_api_status_get_spoiler_text (to);
	_tmp30_ = _tmp29_;
	_tmp31_ = tuba_api_status_get_id (to);
	_tmp32_ = _tmp31_;
	_tmp33_ = tuba_api_status_get_local_only (to);
	_tmp34_ = _tmp33_;
	_g_free0 (_tmp35_.content);
	_tmp35_.content = _tmp28_;
	_g_free0 (_tmp35_.spoiler);
	_tmp35_.spoiler = _tmp30_;
	_g_free0 (_tmp35_.quote_id);
	_tmp35_.quote_id = NULL;
	_g_free0 (_tmp35_.scheduled_id);
	_tmp35_.scheduled_id = NULL;
	_g_free0 (_tmp35_.in_reply_to_id);
	_tmp35_.in_reply_to_id = _tmp32_;
	_g_object_unref0 (_tmp35_.poll);
	_tmp35_.poll = NULL;
	_g_object_unref0 (_tmp35_.media_attachments);
	_tmp35_.media_attachments = NULL;
	_tmp35_.sensitive_media = FALSE;
	_tmp35_.local_only = _tmp34_;
	_tmp35_.force_cursor_at_start = FALSE;
	_tmp36_ = final_visibility;
	_tmp37_ = tuba_api_status_get_language (to);
	_tmp38_ = _tmp37_;
	_tmp39_ = tuba_settings;
	_tmp40_ = tuba_settings_get_default_quote_policy (_tmp39_);
	_tmp41_ = _tmp40_;
	self = (TubaDialogsComposerDialog*) tuba_dialogs_composer_dialog_construct (object_type, &_tmp35_, _tmp36_, _tmp38_, _ ("Reply"), FALSE, TRUE, _tmp41_, FALSE);
	_tmp42_ = tuba_api_status_get_poll (to);
	_tmp43_ = _tmp42_;
	_tmp44_ = _g_object_ref0 (_tmp43_);
	_tmp45_ = tuba_api_status_get_sensitive (to);
	_tmp46_ = _tmp45_;
	_tmp47_ = tuba_api_status_get_media_attachments (to);
	_tmp48_ = _tmp47_;
	_tmp49_ = _g_object_ref0 (_tmp48_);
	_tmp50_ = tuba_api_status_get_visibility (to);
	_tmp51_ = _tmp50_;
	_tmp52_ = g_strdup (_tmp51_);
	_tmp53_ = tuba_api_status_get_content (to);
	_tmp54_ = _tmp53_;
	_tmp55_ = g_strdup (_tmp54_);
	_tmp56_ = tuba_api_status_get_spoiler_text (to);
	_tmp57_ = _tmp56_;
	_tmp58_ = g_strdup (_tmp57_);
	_tmp59_ = tuba_api_status_get_account (to);
	_tmp60_ = _tmp59_;
	_tmp61_ = _g_object_ref0 (_tmp60_);
	_tmp62_ = tuba_api_status_get_created_at (to);
	_tmp63_ = _tmp62_;
	_tmp64_ = g_strdup (_tmp63_);
	_tmp65_ = tuba_api_status_get_quote (to);
	_tmp66_ = _tmp65_;
	_tmp67_ = _g_object_ref0 (_tmp66_);
	_tmp68_ = tuba_api_status_new_empty ();
	tuba_api_status_set_poll (_tmp68_, _tmp44_);
	_g_object_unref0 (_tmp44_);
	tuba_api_status_set_sensitive (_tmp68_, _tmp46_);
	tuba_api_status_set_media_attachments (_tmp68_, _tmp49_);
	_g_object_unref0 (_tmp49_);
	tuba_api_status_set_visibility (_tmp68_, _tmp52_);
	_g_free0 (_tmp52_);
	tuba_api_status_set_tuba_spoiler_revealed (_tmp68_, TRUE);
	tuba_api_status_set_content (_tmp68_, _tmp55_);
	_g_free0 (_tmp55_);
	tuba_api_status_set_spoiler_text (_tmp68_, _tmp58_);
	_g_free0 (_tmp58_);
	tuba_api_status_set_account (_tmp68_, _tmp61_);
	_g_object_unref0 (_tmp61_);
	tuba_api_status_set_created_at (_tmp68_, _tmp64_);
	_g_free0 (_tmp64_);
	tuba_api_status_set_quote (_tmp68_, _tmp67_);
	_g_object_unref0 (_tmp67_);
	sample = _tmp68_;
	_tmp69_ = sample;
	_tmp70_ = tuba_api_status_get_formal (_tmp69_);
	_tmp71_ = _tmp70_;
	_tmp72_ = tuba_api_status_get_has_media (_tmp71_);
	_tmp73_ = _tmp72_;
	if (_tmp73_) {
		TubaAPIStatus* _tmp74_;
		TubaAPIStatus* _tmp75_;
		TubaAPIStatus* _tmp76_;
		GeeArrayList* _tmp77_;
		GeeArrayList* _tmp78_;
		_tmp74_ = sample;
		_tmp75_ = tuba_api_status_get_formal (_tmp74_);
		_tmp76_ = _tmp75_;
		_tmp77_ = tuba_api_status_get_media_attachments (_tmp76_);
		_tmp78_ = _tmp77_;
		gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp78_, ____lambda84__gee_forall_func, self);
	}
	_tmp79_ = sample;
	_tmp80_ = tuba_widgetizable_to_widget ((TubaWidgetizable*) _tmp79_);
	widget_status = G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatus);
	gtk_widget_add_css_class ((GtkWidget*) widget_status, "card");
	gtk_widget_add_css_class ((GtkWidget*) widget_status, "initial-font-size");
	tuba_widgets_status_to_display_only (widget_status);
	gtk_accessible_update_property ((GtkAccessible*) widget_status, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("The post you are replying to."), -1, -1);
	_tmp81_ = (GtkListBox*) gtk_list_box_new ();
	gtk_list_box_set_selection_mode (_tmp81_, GTK_SELECTION_NONE);
	g_object_ref_sink (_tmp81_);
	lbox = _tmp81_;
	gtk_list_box_append (lbox, (GtkWidget*) widget_status);
	_tmp82_ = tuba_api_status_get_account (to);
	_tmp83_ = _tmp82_;
	_tmp84_ = tuba_api_account_get_username (_tmp83_);
	_tmp85_ = _tmp84_;
	_tmp86_ = g_strdup_printf (_ ("Reply to @%s"), _tmp85_);
	_tmp87_ = _tmp86_;
	tuba_dialogs_composer_dialog_set_editor_title (self, _tmp87_, (GtkWidget*) lbox);
	_g_free0 (_tmp87_);
	_tmp88_ = self->priv->scroller;
	g_signal_connect_object ((GtkWidget*) _tmp88_, "map", (GCallback) _tuba_dialogs_composer_dialog_scroller_mapped_gtk_widget_map, self, 0);
	_tmp89_ = t_cb;
	_tmp89__target = t_cb_target;
	_tmp89__target_destroy_notify = t_cb_target_destroy_notify;
	t_cb = NULL;
	t_cb_target = NULL;
	t_cb_target_destroy_notify = NULL;
	(self->cb_target_destroy_notify == NULL) ? NULL : (self->cb_target_destroy_notify (self->cb_target), NULL);
	self->cb = NULL;
	self->cb_target = NULL;
	self->cb_target_destroy_notify = NULL;
	self->cb = _tmp89_;
	self->cb_target = _tmp89__target;
	self->cb_target_destroy_notify = _tmp89__target_destroy_notify;
	_g_object_unref0 (lbox);
	_g_object_unref0 (widget_status);
	_g_object_unref0 (sample);
	_g_free0 (filled_content);
	_g_free0 (to_visibility);
	_g_free0 (default_visibility);
	_g_free0 (final_visibility);
	(t_cb_target_destroy_notify == NULL) ? NULL : (t_cb_target_destroy_notify (t_cb_target), NULL);
	t_cb = NULL;
	t_cb_target = NULL;
	t_cb_target_destroy_notify = NULL;
	return self;
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_new_reply (TubaAPIStatus* to,
                                        TubaDialogsComposerDialogSuccessCallback t_cb,
                                        gpointer t_cb_target,
                                        GDestroyNotify t_cb_target_destroy_notify)
{
	return tuba_dialogs_composer_dialog_construct_reply (TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, to, t_cb, t_cb_target, t_cb_target_destroy_notify);
}

static gboolean
___lambda85_ (TubaDialogsComposerDialog* self,
              TubaAPIAttachment* e)
{
	gboolean result;
	g_return_val_if_fail (e != NULL, FALSE);
	tuba_api_attachment_set_tuba_is_report (e, TRUE);
	result = TRUE;
	_g_object_unref0 (e);
	return result;
}

static gboolean
____lambda85__gee_forall_func (gpointer g,
                               gpointer self)
{
	gboolean result;
	result = ___lambda85_ ((TubaDialogsComposerDialog*) self, (TubaAPIAttachment*) g);
	return result;
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_construct_quote (GType object_type,
                                              TubaAPIStatus* to,
                                              TubaAPIStatusVisibility* reblog_visibility,
                                              gboolean supports_quotes)
{
	TubaDialogsComposerDialog * self = NULL;
	gchar* final_visibility = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp21_ = NULL;
	const gchar* _tmp36_ = NULL;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	gboolean _tmp41_;
	gboolean _tmp42_;
	TubaDialogsComposerDialogPrecompose _tmp43_ = {0};
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	TubaSettings* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	TubaAPIStatus* sample = NULL;
	TubaAPIPoll* _tmp50_;
	TubaAPIPoll* _tmp51_;
	TubaAPIPoll* _tmp52_;
	gboolean _tmp53_;
	gboolean _tmp54_;
	GeeArrayList* _tmp55_;
	GeeArrayList* _tmp56_;
	GeeArrayList* _tmp57_;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	gchar* _tmp60_;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	gchar* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	TubaAPIAccount* _tmp67_;
	TubaAPIAccount* _tmp68_;
	TubaAPIAccount* _tmp69_;
	const gchar* _tmp70_;
	const gchar* _tmp71_;
	gchar* _tmp72_;
	TubaAPIQuote* _tmp73_;
	TubaAPIQuote* _tmp74_;
	TubaAPIQuote* _tmp75_;
	TubaAPIStatus* _tmp76_ = NULL;
	TubaAPIStatus* _tmp77_;
	TubaAPIStatus* _tmp78_;
	TubaAPIStatus* _tmp79_;
	gboolean _tmp80_;
	gboolean _tmp81_;
	TubaWidgetsStatus* widget_status = NULL;
	TubaAPIStatus* _tmp87_;
	GtkWidget* _tmp88_;
	GtkListBox* lbox = NULL;
	GtkListBox* _tmp89_ = NULL;
	TubaAPIAccount* _tmp90_;
	TubaAPIAccount* _tmp91_;
	const gchar* _tmp92_;
	const gchar* _tmp93_;
	gchar* _tmp94_;
	gchar* _tmp95_;
	GtkScrolledWindow* _tmp96_;
	g_return_val_if_fail (to != NULL, NULL);
	_tmp0_ = tuba_api_status_get_visibility (to);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	final_visibility = _tmp2_;
	if (reblog_visibility == NULL) {
		TubaAPIStatusVisibility* default_visibility = NULL;
		TubaSettings* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		TubaAPIStatusVisibility* _tmp6_;
		TubaAPIStatusVisibility* to_visibility = NULL;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		TubaAPIStatusVisibility* _tmp9_;
		gboolean _tmp10_ = FALSE;
		gboolean _tmp11_ = FALSE;
		TubaAPIStatusVisibility* _tmp12_;
		_tmp3_ = tuba_settings;
		_tmp4_ = tuba_settings_get_default_post_visibility (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = tuba_api_status_visibility_from_string (_tmp5_);
		default_visibility = _tmp6_;
		_tmp7_ = tuba_api_status_get_visibility (to);
		_tmp8_ = _tmp7_;
		_tmp9_ = tuba_api_status_visibility_from_string (_tmp8_);
		to_visibility = _tmp9_;
		_tmp12_ = default_visibility;
		if (_tmp12_ != NULL) {
			TubaAPIStatusVisibility* _tmp13_;
			_tmp13_ = to_visibility;
			_tmp11_ = _tmp13_ != NULL;
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			TubaAPIStatusVisibility* _tmp14_;
			TubaAPIStatusVisibility* _tmp15_;
			_tmp14_ = default_visibility;
			_tmp15_ = to_visibility;
			_tmp10_ = tuba_api_status_visibility_privacy_rate (*_tmp14_) > tuba_api_status_visibility_privacy_rate (*_tmp15_);
		} else {
			_tmp10_ = FALSE;
		}
		if (_tmp10_) {
			TubaSettings* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			gchar* _tmp19_;
			_tmp16_ = tuba_settings;
			_tmp17_ = tuba_settings_get_default_post_visibility (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = g_strdup (_tmp18_);
			_g_free0 (final_visibility);
			final_visibility = _tmp19_;
		}
		_g_free0 (to_visibility);
		_g_free0 (default_visibility);
	} else {
		gchar* _tmp20_;
		_tmp20_ = tuba_api_status_visibility_to_string (*reblog_visibility);
		_g_free0 (final_visibility);
		final_visibility = _tmp20_;
	}
	if (supports_quotes) {
		_g_free0 (_tmp21_);
		_tmp21_ = NULL;
	} else {
		gchar* _tmp22_ = NULL;
		TubaAPIStatus* _tmp23_;
		TubaAPIStatus* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		const gchar* _tmp34_;
		gchar* _tmp35_;
		_tmp23_ = tuba_api_status_get_formal (to);
		_tmp24_ = _tmp23_;
		_tmp25_ = tuba_api_status_get_url (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp22_ = _tmp26_;
		if (_tmp22_ == NULL) {
			TubaAPIStatus* _tmp27_;
			TubaAPIStatus* _tmp28_;
			TubaAPIAccount* _tmp29_;
			TubaAPIAccount* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			gchar* _tmp33_;
			_tmp27_ = tuba_api_status_get_formal (to);
			_tmp28_ = _tmp27_;
			_tmp29_ = tuba_api_status_get_account (_tmp28_);
			_tmp30_ = _tmp29_;
			_tmp31_ = tuba_api_account_get_url (_tmp30_);
			_tmp32_ = _tmp31_;
			_tmp33_ = g_strdup (_tmp32_);
			_g_free0 (_tmp22_);
			_tmp22_ = _tmp33_;
		}
		_tmp34_ = string_to_string (_tmp22_);
		_tmp35_ = g_strconcat ("\n\nRE: ", _tmp34_, NULL);
		_g_free0 (_tmp21_);
		_tmp21_ = _tmp35_;
		_g_free0 (_tmp22_);
	}
	if (supports_quotes) {
		const gchar* _tmp37_;
		const gchar* _tmp38_;
		_tmp37_ = tuba_api_status_get_id (to);
		_tmp38_ = _tmp37_;
		_tmp36_ = _tmp38_;
	} else {
		_tmp36_ = NULL;
	}
	_tmp39_ = tuba_api_status_get_spoiler_text (to);
	_tmp40_ = _tmp39_;
	_tmp41_ = tuba_api_status_get_compat_local_only (to);
	_tmp42_ = _tmp41_;
	_g_free0 (_tmp43_.content);
	_tmp43_.content = _tmp21_;
	_g_free0 (_tmp43_.spoiler);
	_tmp43_.spoiler = _tmp40_;
	_g_free0 (_tmp43_.quote_id);
	_tmp43_.quote_id = _tmp36_;
	_g_free0 (_tmp43_.scheduled_id);
	_tmp43_.scheduled_id = NULL;
	_g_free0 (_tmp43_.in_reply_to_id);
	_tmp43_.in_reply_to_id = NULL;
	_g_object_unref0 (_tmp43_.poll);
	_tmp43_.poll = NULL;
	_g_object_unref0 (_tmp43_.media_attachments);
	_tmp43_.media_attachments = NULL;
	_tmp43_.sensitive_media = FALSE;
	_tmp43_.local_only = _tmp42_;
	_tmp43_.force_cursor_at_start = !supports_quotes;
	_tmp44_ = final_visibility;
	_tmp45_ = tuba_api_status_get_language (to);
	_tmp46_ = _tmp45_;
	_tmp47_ = tuba_settings;
	_tmp48_ = tuba_settings_get_default_quote_policy (_tmp47_);
	_tmp49_ = _tmp48_;
	self = (TubaDialogsComposerDialog*) tuba_dialogs_composer_dialog_construct (object_type, &_tmp43_, _tmp44_, _tmp46_, _ ("Quote"), FALSE, TRUE, _tmp49_, FALSE);
	_tmp50_ = tuba_api_status_get_poll (to);
	_tmp51_ = _tmp50_;
	_tmp52_ = _g_object_ref0 (_tmp51_);
	_tmp53_ = tuba_api_status_get_sensitive (to);
	_tmp54_ = _tmp53_;
	_tmp55_ = tuba_api_status_get_media_attachments (to);
	_tmp56_ = _tmp55_;
	_tmp57_ = _g_object_ref0 (_tmp56_);
	_tmp58_ = tuba_api_status_get_visibility (to);
	_tmp59_ = _tmp58_;
	_tmp60_ = g_strdup (_tmp59_);
	_tmp61_ = tuba_api_status_get_content (to);
	_tmp62_ = _tmp61_;
	_tmp63_ = g_strdup (_tmp62_);
	_tmp64_ = tuba_api_status_get_spoiler_text (to);
	_tmp65_ = _tmp64_;
	_tmp66_ = g_strdup (_tmp65_);
	_tmp67_ = tuba_api_status_get_account (to);
	_tmp68_ = _tmp67_;
	_tmp69_ = _g_object_ref0 (_tmp68_);
	_tmp70_ = tuba_api_status_get_created_at (to);
	_tmp71_ = _tmp70_;
	_tmp72_ = g_strdup (_tmp71_);
	_tmp73_ = tuba_api_status_get_quote (to);
	_tmp74_ = _tmp73_;
	_tmp75_ = _g_object_ref0 (_tmp74_);
	_tmp76_ = tuba_api_status_new_empty ();
	tuba_api_status_set_poll (_tmp76_, _tmp52_);
	_g_object_unref0 (_tmp52_);
	tuba_api_status_set_sensitive (_tmp76_, _tmp54_);
	tuba_api_status_set_media_attachments (_tmp76_, _tmp57_);
	_g_object_unref0 (_tmp57_);
	tuba_api_status_set_visibility (_tmp76_, _tmp60_);
	_g_free0 (_tmp60_);
	tuba_api_status_set_tuba_spoiler_revealed (_tmp76_, TRUE);
	tuba_api_status_set_content (_tmp76_, _tmp63_);
	_g_free0 (_tmp63_);
	tuba_api_status_set_spoiler_text (_tmp76_, _tmp66_);
	_g_free0 (_tmp66_);
	tuba_api_status_set_account (_tmp76_, _tmp69_);
	_g_object_unref0 (_tmp69_);
	tuba_api_status_set_created_at (_tmp76_, _tmp72_);
	_g_free0 (_tmp72_);
	tuba_api_status_set_quote (_tmp76_, _tmp75_);
	_g_object_unref0 (_tmp75_);
	sample = _tmp76_;
	_tmp77_ = sample;
	_tmp78_ = tuba_api_status_get_formal (_tmp77_);
	_tmp79_ = _tmp78_;
	_tmp80_ = tuba_api_status_get_has_media (_tmp79_);
	_tmp81_ = _tmp80_;
	if (_tmp81_) {
		TubaAPIStatus* _tmp82_;
		TubaAPIStatus* _tmp83_;
		TubaAPIStatus* _tmp84_;
		GeeArrayList* _tmp85_;
		GeeArrayList* _tmp86_;
		_tmp82_ = sample;
		_tmp83_ = tuba_api_status_get_formal (_tmp82_);
		_tmp84_ = _tmp83_;
		_tmp85_ = tuba_api_status_get_media_attachments (_tmp84_);
		_tmp86_ = _tmp85_;
		gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp86_, ____lambda85__gee_forall_func, self);
	}
	_tmp87_ = sample;
	_tmp88_ = tuba_widgetizable_to_widget ((TubaWidgetizable*) _tmp87_);
	widget_status = G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatus);
	gtk_widget_add_css_class ((GtkWidget*) widget_status, "card");
	gtk_widget_add_css_class ((GtkWidget*) widget_status, "initial-font-size");
	tuba_widgets_status_to_display_only (widget_status);
	gtk_accessible_update_property ((GtkAccessible*) widget_status, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("The post you are quoting."), -1, -1);
	_tmp89_ = (GtkListBox*) gtk_list_box_new ();
	gtk_list_box_set_selection_mode (_tmp89_, GTK_SELECTION_NONE);
	g_object_ref_sink (_tmp89_);
	lbox = _tmp89_;
	gtk_list_box_append (lbox, (GtkWidget*) widget_status);
	_tmp90_ = tuba_api_status_get_account (to);
	_tmp91_ = _tmp90_;
	_tmp92_ = tuba_api_account_get_username (_tmp91_);
	_tmp93_ = _tmp92_;
	_tmp94_ = g_strdup_printf (_ ("Quoting @%s"), _tmp93_);
	_tmp95_ = _tmp94_;
	tuba_dialogs_composer_dialog_set_editor_title (self, _tmp95_, (GtkWidget*) lbox);
	_g_free0 (_tmp95_);
	_tmp96_ = self->priv->scroller;
	g_signal_connect_object ((GtkWidget*) _tmp96_, "map", (GCallback) _tuba_dialogs_composer_dialog_scroller_mapped_gtk_widget_map, self, 0);
	_g_object_unref0 (lbox);
	_g_object_unref0 (widget_status);
	_g_object_unref0 (sample);
	_g_free0 (_tmp21_);
	_g_free0 (final_visibility);
	return self;
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_new_quote (TubaAPIStatus* to,
                                        TubaAPIStatusVisibility* reblog_visibility,
                                        gboolean supports_quotes)
{
	return tuba_dialogs_composer_dialog_construct_quote (TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, to, reblog_visibility, supports_quotes);
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_construct_edit (GType object_type,
                                             TubaAPIStatus* t_status,
                                             TubaAPIStatusSource* source,
                                             TubaDialogsComposerDialogSuccessCallback t_cb,
                                             gpointer t_cb_target,
                                             GDestroyNotify t_cb_target_destroy_notify,
                                             gboolean redraft)
{
	TubaDialogsComposerDialog * self = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp12_ = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	TubaAPIStatusQuoteApproval* _tmp17_;
	TubaAPIStatusQuoteApproval* _tmp18_;
	TubaAPIPoll* _tmp26_;
	TubaAPIPoll* _tmp27_;
	GeeArrayList* _tmp28_;
	GeeArrayList* _tmp29_;
	gboolean _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	gboolean _tmp33_;
	TubaDialogsComposerDialogPrecompose _tmp34_ = {0};
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	TubaDialogsComposerDialogSuccessCallback _tmp41_;
	gpointer _tmp41__target;
	GDestroyNotify _tmp41__target_destroy_notify;
	g_return_val_if_fail (t_status != NULL, NULL);
	if (source == NULL) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp1_ = tuba_api_status_get_content (t_status);
		_tmp2_ = _tmp1_;
		_tmp3_ = tuba_utils_htmlx_remove_tags (_tmp2_);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp3_;
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp4_ = tuba_api_status_source_get_text (source);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strdup (_tmp5_);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp6_;
	}
	if (source == NULL) {
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp8_ = tuba_api_status_get_spoiler_text (t_status);
		_tmp9_ = _tmp8_;
		_tmp7_ = _tmp9_;
	} else {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp10_ = tuba_api_status_source_get_spoiler_text (source);
		_tmp11_ = _tmp10_;
		_tmp7_ = _tmp11_;
	}
	if (redraft) {
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp13_ = tuba_api_status_get_in_reply_to_id (t_status);
		_tmp14_ = _tmp13_;
		_tmp12_ = _tmp14_;
	} else {
		_tmp12_ = NULL;
	}
	if (redraft) {
		_tmp15_ = _ ("Redraft");
	} else {
		_tmp15_ = _ ("Edit");
	}
	_tmp17_ = tuba_api_status_get_quote_approval (t_status);
	_tmp18_ = _tmp17_;
	if (_tmp18_ == NULL) {
		TubaSettings* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp19_ = tuba_settings;
		_tmp20_ = tuba_settings_get_default_quote_policy (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strdup (_tmp21_);
		_g_free0 (_tmp16_);
		_tmp16_ = _tmp22_;
	} else {
		TubaAPIStatusQuoteApproval* _tmp23_;
		TubaAPIStatusQuoteApproval* _tmp24_;
		gchar* _tmp25_;
		_tmp23_ = tuba_api_status_get_quote_approval (t_status);
		_tmp24_ = _tmp23_;
		_tmp25_ = tuba_api_status_quote_policy_to_string (tuba_api_status_quote_approval_to_quote_policy (_tmp24_));
		_g_free0 (_tmp16_);
		_tmp16_ = _tmp25_;
	}
	_tmp26_ = tuba_api_status_get_poll (t_status);
	_tmp27_ = _tmp26_;
	_tmp28_ = tuba_api_status_get_media_attachments (t_status);
	_tmp29_ = _tmp28_;
	_tmp30_ = tuba_api_status_get_sensitive (t_status);
	_tmp31_ = _tmp30_;
	_tmp32_ = tuba_api_status_get_compat_local_only (t_status);
	_tmp33_ = _tmp32_;
	_g_free0 (_tmp34_.content);
	_tmp34_.content = _tmp0_;
	_g_free0 (_tmp34_.spoiler);
	_tmp34_.spoiler = _tmp7_;
	_g_free0 (_tmp34_.quote_id);
	_tmp34_.quote_id = NULL;
	_g_free0 (_tmp34_.scheduled_id);
	_tmp34_.scheduled_id = NULL;
	_g_free0 (_tmp34_.in_reply_to_id);
	_tmp34_.in_reply_to_id = _tmp12_;
	_g_object_unref0 (_tmp34_.poll);
	_tmp34_.poll = _tmp27_;
	_g_object_unref0 (_tmp34_.media_attachments);
	_tmp34_.media_attachments = _tmp29_;
	_tmp34_.sensitive_media = _tmp31_;
	_tmp34_.local_only = _tmp33_;
	_tmp34_.force_cursor_at_start = FALSE;
	_tmp35_ = tuba_api_status_get_visibility (t_status);
	_tmp36_ = _tmp35_;
	_tmp37_ = tuba_api_status_get_language (t_status);
	_tmp38_ = _tmp37_;
	self = (TubaDialogsComposerDialog*) tuba_dialogs_composer_dialog_construct (object_type, &_tmp34_, _tmp36_, _tmp38_, _tmp15_, !redraft, redraft, _tmp16_, redraft);
	if (!redraft) {
		const gchar* _tmp39_;
		const gchar* _tmp40_;
		_tmp39_ = tuba_api_status_get_id (t_status);
		_tmp40_ = _tmp39_;
		tuba_dialogs_composer_dialog_set_edit_status_id (self, _tmp40_);
		tuba_dialogs_composer_dialog_set_editor_title (self, _ ("Edit Post"), NULL);
	}
	_tmp41_ = t_cb;
	_tmp41__target = t_cb_target;
	_tmp41__target_destroy_notify = t_cb_target_destroy_notify;
	t_cb = NULL;
	t_cb_target = NULL;
	t_cb_target_destroy_notify = NULL;
	(self->cb_target_destroy_notify == NULL) ? NULL : (self->cb_target_destroy_notify (self->cb_target), NULL);
	self->cb = NULL;
	self->cb_target = NULL;
	self->cb_target_destroy_notify = NULL;
	self->cb = _tmp41_;
	self->cb_target = _tmp41__target;
	self->cb_target_destroy_notify = _tmp41__target_destroy_notify;
	_g_free0 (_tmp16_);
	_g_free0 (_tmp0_);
	(t_cb_target_destroy_notify == NULL) ? NULL : (t_cb_target_destroy_notify (t_cb_target), NULL);
	t_cb = NULL;
	t_cb_target = NULL;
	t_cb_target_destroy_notify = NULL;
	return self;
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_new_edit (TubaAPIStatus* t_status,
                                       TubaAPIStatusSource* source,
                                       TubaDialogsComposerDialogSuccessCallback t_cb,
                                       gpointer t_cb_target,
                                       GDestroyNotify t_cb_target_destroy_notify,
                                       gboolean redraft)
{
	return tuba_dialogs_composer_dialog_construct_edit (TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, t_status, source, t_cb, t_cb_target, t_cb_target_destroy_notify, redraft);
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_construct_from_scheduled (GType object_type,
                                                       TubaAPIScheduledStatus* scheduled_status,
                                                       gboolean posting_draft,
                                                       TubaAPIPoll* poll,
                                                       TubaDialogsComposerDialogSuccessCallback t_cb,
                                                       gpointer t_cb_target,
                                                       GDestroyNotify t_cb_target_destroy_notify)
{
	TubaDialogsComposerDialog * self = NULL;
	const gchar* _tmp0_ = NULL;
	TubaAPIScheduledStatusParams* _tmp1_;
	TubaAPIScheduledStatusParams* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp12_ = NULL;
	TubaAPIScheduledStatusParams* _tmp13_;
	TubaAPIScheduledStatusParams* _tmp14_;
	gint64 _tmp15_;
	gint64 _tmp16_;
	gboolean _tmp22_ = FALSE;
	TubaAPIScheduledStatusParams* _tmp23_;
	TubaAPIScheduledStatusParams* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	const gchar* _tmp31_ = NULL;
	TubaAPIScheduledStatusParams* _tmp32_;
	TubaAPIScheduledStatusParams* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	TubaAPIScheduledStatusParams* _tmp36_;
	TubaAPIScheduledStatusParams* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	GeeArrayList* _tmp40_;
	GeeArrayList* _tmp41_;
	TubaAPIScheduledStatusParams* _tmp42_;
	TubaAPIScheduledStatusParams* _tmp43_;
	gboolean _tmp44_;
	gboolean _tmp45_;
	TubaDialogsComposerDialogPrecompose _tmp46_ = {0};
	TubaAPIScheduledStatusParams* _tmp47_;
	TubaAPIScheduledStatusParams* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	TubaAPIScheduledStatusParams* _tmp51_;
	TubaAPIScheduledStatusParams* _tmp52_;
	const gchar* _tmp53_;
	const gchar* _tmp54_;
	TubaAPIScheduledStatusParams* _tmp55_;
	TubaAPIScheduledStatusParams* _tmp56_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	TubaDialogsComposerDialogSuccessCallback _tmp61_;
	gpointer _tmp61__target;
	GDestroyNotify _tmp61__target_destroy_notify;
	g_return_val_if_fail (scheduled_status != NULL, NULL);
	_tmp1_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_api_scheduled_status_params_get_quoted_status_id (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != NULL) {
		TubaAPIScheduledStatusParams* _tmp5_;
		TubaAPIScheduledStatusParams* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = tuba_api_scheduled_status_get_props (scheduled_status);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_api_scheduled_status_params_get_quoted_status_id (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = _tmp8_;
	} else {
		_tmp0_ = NULL;
	}
	if (posting_draft) {
		_tmp9_ = NULL;
	} else {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp10_ = tuba_api_scheduled_status_get_id (scheduled_status);
		_tmp11_ = _tmp10_;
		_tmp9_ = _tmp11_;
	}
	_tmp13_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp14_ = _tmp13_;
	_tmp15_ = tuba_api_scheduled_status_params_get_in_reply_to_id (_tmp14_);
	_tmp16_ = _tmp15_;
	if (_tmp16_ > ((gint64) 0)) {
		TubaAPIScheduledStatusParams* _tmp17_;
		TubaAPIScheduledStatusParams* _tmp18_;
		gint64 _tmp19_;
		gint64 _tmp20_;
		gchar* _tmp21_;
		_tmp17_ = tuba_api_scheduled_status_get_props (scheduled_status);
		_tmp18_ = _tmp17_;
		_tmp19_ = tuba_api_scheduled_status_params_get_in_reply_to_id (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp20_);
		_g_free0 (_tmp12_);
		_tmp12_ = _tmp21_;
	} else {
		_g_free0 (_tmp12_);
		_tmp12_ = NULL;
	}
	_tmp23_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp24_ = _tmp23_;
	_tmp25_ = tuba_api_scheduled_status_params_get_local_only (_tmp24_);
	_tmp26_ = _tmp25_;
	if (_tmp26_) {
		_tmp22_ = TRUE;
	} else {
		TubaAPIScheduledStatusParams* _tmp27_;
		TubaAPIScheduledStatusParams* _tmp28_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		_tmp27_ = tuba_api_scheduled_status_get_props (scheduled_status);
		_tmp28_ = _tmp27_;
		_tmp29_ = tuba_api_scheduled_status_params_get_visibility (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp22_ = g_strcmp0 (_tmp30_, "local") == 0;
	}
	if (posting_draft) {
		_tmp31_ = _ ("Post");
	} else {
		_tmp31_ = _ ("Edit");
	}
	_tmp32_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp33_ = _tmp32_;
	_tmp34_ = tuba_api_scheduled_status_params_get_text (_tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp37_ = _tmp36_;
	_tmp38_ = tuba_api_scheduled_status_params_get_spoiler_text (_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = tuba_api_scheduled_status_get_media_attachments (scheduled_status);
	_tmp41_ = _tmp40_;
	_tmp42_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp43_ = _tmp42_;
	_tmp44_ = tuba_api_scheduled_status_params_get_sensitive (_tmp43_);
	_tmp45_ = _tmp44_;
	_g_free0 (_tmp46_.content);
	_tmp46_.content = _tmp35_;
	_g_free0 (_tmp46_.spoiler);
	_tmp46_.spoiler = _tmp39_;
	_g_free0 (_tmp46_.quote_id);
	_tmp46_.quote_id = _tmp0_;
	_g_free0 (_tmp46_.scheduled_id);
	_tmp46_.scheduled_id = _tmp9_;
	_g_free0 (_tmp46_.in_reply_to_id);
	_tmp46_.in_reply_to_id = _tmp12_;
	_g_object_unref0 (_tmp46_.poll);
	_tmp46_.poll = poll;
	_g_object_unref0 (_tmp46_.media_attachments);
	_tmp46_.media_attachments = _tmp41_;
	_tmp46_.sensitive_media = _tmp45_;
	_tmp46_.local_only = _tmp22_;
	_tmp46_.force_cursor_at_start = FALSE;
	_tmp47_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp48_ = _tmp47_;
	_tmp49_ = tuba_api_scheduled_status_params_get_visibility (_tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp52_ = _tmp51_;
	_tmp53_ = tuba_api_scheduled_status_params_get_language (_tmp52_);
	_tmp54_ = _tmp53_;
	_tmp55_ = tuba_api_scheduled_status_get_props (scheduled_status);
	_tmp56_ = _tmp55_;
	_tmp57_ = tuba_api_scheduled_status_params_get_quote_approval_policy (_tmp56_);
	_tmp58_ = _tmp57_;
	self = (TubaDialogsComposerDialog*) tuba_dialogs_composer_dialog_construct (object_type, &_tmp46_, _tmp50_, _tmp54_, _tmp31_, FALSE, posting_draft, _tmp58_, posting_draft);
	if (!posting_draft) {
		const gchar* _tmp59_;
		const gchar* _tmp60_;
		tuba_dialogs_composer_dialog_set_editor_title (self, _ ("Edit Post"), NULL);
		_tmp59_ = tuba_api_scheduled_status_get_scheduled_at (scheduled_status);
		_tmp60_ = _tmp59_;
		tuba_dialogs_composer_dialog_set_schedule_iso8601 (self, _tmp60_);
	}
	tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async (self, !posting_draft, NULL, NULL);
	_tmp61_ = t_cb;
	_tmp61__target = t_cb_target;
	_tmp61__target_destroy_notify = t_cb_target_destroy_notify;
	t_cb = NULL;
	t_cb_target = NULL;
	t_cb_target_destroy_notify = NULL;
	(self->cb_target_destroy_notify == NULL) ? NULL : (self->cb_target_destroy_notify (self->cb_target), NULL);
	self->cb = NULL;
	self->cb_target = NULL;
	self->cb_target_destroy_notify = NULL;
	self->cb = _tmp61_;
	self->cb_target = _tmp61__target;
	self->cb_target_destroy_notify = _tmp61__target_destroy_notify;
	_g_free0 (_tmp12_);
	(t_cb_target_destroy_notify == NULL) ? NULL : (t_cb_target_destroy_notify (t_cb_target), NULL);
	t_cb = NULL;
	t_cb_target = NULL;
	t_cb_target_destroy_notify = NULL;
	return self;
}

TubaDialogsComposerDialog*
tuba_dialogs_composer_dialog_new_from_scheduled (TubaAPIScheduledStatus* scheduled_status,
                                                 gboolean posting_draft,
                                                 TubaAPIPoll* poll,
                                                 TubaDialogsComposerDialogSuccessCallback t_cb,
                                                 gpointer t_cb_target,
                                                 GDestroyNotify t_cb_target_destroy_notify)
{
	return tuba_dialogs_composer_dialog_construct_from_scheduled (TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, scheduled_status, posting_draft, poll, t_cb, t_cb_target, t_cb_target_destroy_notify);
}

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

static void
tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async (TubaDialogsComposerDialog* self,
                                                                    gboolean editing,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_)
{
	TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData* _data_;
	TubaDialogsComposerDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->editing = editing;
	tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_co (_data_);
}

static void
tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_finish (TubaDialogsComposerDialog* self,
                                                                     GAsyncResult* _res_)
{
	TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_ready (GObject* source_object,
                                                                          GAsyncResult* _res_,
                                                                          gpointer _user_data_)
{
	TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_co (_data_);
}

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

static gboolean
____lambda82_ (TubaDialogsComposerDialog* self,
               TubaAPIAttachment* e)
{
	gboolean result;
	g_return_val_if_fail (e != NULL, FALSE);
	tuba_api_attachment_set_tuba_is_report (e, TRUE);
	result = TRUE;
	_g_object_unref0 (e);
	return result;
}

static gboolean
_____lambda82__gee_forall_func (gpointer g,
                                gpointer self)
{
	gboolean result;
	result = ____lambda82_ ((TubaDialogsComposerDialog*) self, (TubaAPIAttachment*) g);
	return result;
}

static gboolean
tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_co (TubaDialogsComposerDialogLoadRepliedToOrQuoteStatusAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp1_ = _data_->self->priv->_quote_id;
	if (_data_->_tmp1_ == NULL) {
		_data_->_tmp2_ = _data_->self->priv->_in_reply_to_id;
		_data_->_tmp0_ = _data_->_tmp2_ == NULL;
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->self->priv->_in_reply_to_id;
	_data_->is_reply = _data_->_tmp3_ != NULL;
	if (_data_->is_reply) {
		_data_->_tmp5_ = _data_->self->priv->_in_reply_to_id;
		_data_->_tmp4_ = _data_->_tmp5_;
	} else {
		_data_->_tmp6_ = _data_->self->priv->_quote_id;
		_data_->_tmp4_ = _data_->_tmp6_;
	}
	_data_->_tmp7_ = g_strdup (_data_->_tmp4_);
	_data_->status_id = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->status_id;
	_data_->_tmp9_ = string_to_string (_data_->_tmp8_);
	_data_->_tmp10_ = g_strconcat ("/api/v1/statuses/", _data_->_tmp9_, NULL);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = tuba_accounts;
	_data_->_tmp13_ = tuba_account_store_get_active (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = _g_object_ref0 (_data_->_tmp14_);
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = tuba_request_v2_new (_data_->_tmp11_, TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp16_, _data_->_tmp15_);
	_g_object_unref0 (_data_->_tmp15_);
	tuba_request_v2_set_ctx (_data_->_tmp16_, (GtkWidget*) _data_->self);
	_data_->_tmp17_ = _data_->_tmp16_;
	_g_free0 (_data_->_tmp11_);
	_data_->req = _data_->_tmp17_;
	{
		_data_->_tmp18_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp18_, tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp19_ = tuba_request_v2_exec_finish (_data_->_tmp18_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp19_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp20_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp20_, NULL, tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp21_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp21_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp22_ = tuba_network;
		_data_->_tmp23_ = _data_->parser;
		_data_->_tmp24_ = tuba_network_parse_node (_data_->_tmp22_, _data_->_tmp23_);
		_data_->node = _data_->_tmp24_;
		_data_->_tmp25_ = _data_->node;
		_data_->_tmp26_ = tuba_api_status_from (_data_->_tmp25_, &_data_->_inner_error0_);
		_data_->api_status = _data_->_tmp26_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp27_ = _data_->api_status;
		tuba_api_status_set_tuba_spoiler_revealed (_data_->_tmp27_, TRUE);
		_data_->_tmp28_ = _data_->api_status;
		_data_->_tmp29_ = tuba_api_status_get_formal (_data_->_tmp28_);
		_data_->_tmp30_ = _data_->_tmp29_;
		_data_->_tmp31_ = tuba_api_status_get_has_media (_data_->_tmp30_);
		_data_->_tmp32_ = _data_->_tmp31_;
		if (_data_->_tmp32_) {
			_data_->_tmp33_ = _data_->api_status;
			_data_->_tmp34_ = tuba_api_status_get_formal (_data_->_tmp33_);
			_data_->_tmp35_ = _data_->_tmp34_;
			_data_->_tmp36_ = tuba_api_status_get_media_attachments (_data_->_tmp35_);
			_data_->_tmp37_ = _data_->_tmp36_;
			gee_abstract_collection_foreach ((GeeAbstractCollection*) _data_->_tmp37_, _____lambda82__gee_forall_func, _data_->self);
		}
		_data_->_tmp38_ = _data_->api_status;
		_data_->_tmp39_ = tuba_widgetizable_to_widget ((TubaWidgetizable*) _data_->_tmp38_);
		_data_->widget_status = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp39_, TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatus);
		_data_->_tmp40_ = _data_->widget_status;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp40_, "card");
		_data_->_tmp41_ = _data_->widget_status;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp41_, "initial-font-size");
		_data_->_tmp42_ = _data_->widget_status;
		tuba_widgets_status_to_display_only (_data_->_tmp42_);
		if (_data_->is_reply) {
			_data_->_tmp43_ = _data_->widget_status;
			gtk_accessible_update_property ((GtkAccessible*) _data_->_tmp43_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("The post you are replying to."), -1, -1);
		} else {
			_data_->_tmp44_ = _data_->widget_status;
			gtk_accessible_update_property ((GtkAccessible*) _data_->_tmp44_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("The post you are quoting."), -1, -1);
		}
		_data_->_tmp45_ = NULL;
		_data_->_tmp45_ = (GtkListBox*) gtk_list_box_new ();
		gtk_list_box_set_selection_mode (_data_->_tmp45_, GTK_SELECTION_NONE);
		g_object_ref_sink (_data_->_tmp45_);
		_data_->lbox = _data_->_tmp45_;
		_data_->_tmp46_ = _data_->lbox;
		_data_->_tmp47_ = _data_->widget_status;
		gtk_list_box_append (_data_->_tmp46_, (GtkWidget*) _data_->_tmp47_);
		if (_data_->is_reply) {
			_data_->_tmp48_ = _ ("Reply to @%s");
		} else {
			_data_->_tmp48_ = _ ("Quoting @%s");
		}
		_data_->_tmp49_ = _data_->api_status;
		_data_->_tmp50_ = tuba_api_status_get_account (_data_->_tmp49_);
		_data_->_tmp51_ = _data_->_tmp50_;
		_data_->_tmp52_ = tuba_api_account_get_username (_data_->_tmp51_);
		_data_->_tmp53_ = _data_->_tmp52_;
		_data_->_tmp54_ = g_strdup_printf (_data_->_tmp48_, _data_->_tmp53_);
		_data_->composer_title = _data_->_tmp54_;
		if (_data_->editing) {
			_data_->_tmp55_ = adw_dialog_get_title ((AdwDialog*) _data_->self);
			_data_->_tmp56_ = _data_->_tmp55_;
			_data_->_tmp57_ = g_strdup (_data_->_tmp56_);
			_g_free0 (_data_->composer_title);
			_data_->composer_title = _data_->_tmp57_;
		}
		_data_->_tmp58_ = _data_->composer_title;
		_data_->_tmp59_ = _data_->lbox;
		tuba_dialogs_composer_dialog_set_editor_title (_data_->self, _data_->_tmp58_, (GtkWidget*) _data_->_tmp59_);
		_data_->_tmp60_ = _data_->self->priv->scroller;
		g_signal_parse_name ("map", gtk_widget_get_type (), &_data_->_tmp61_, NULL, FALSE);
		g_signal_handlers_disconnect_matched ((GtkWidget*) _data_->_tmp60_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _data_->_tmp61_, 0, NULL, (GCallback) _tuba_dialogs_composer_dialog_scroller_mapped_gtk_widget_map, _data_->self);
		_data_->_tmp62_ = _data_->self->priv->scroller;
		g_signal_connect_object ((GtkWidget*) _data_->_tmp62_, "map", (GCallback) _tuba_dialogs_composer_dialog_scroller_mapped_gtk_widget_map, _data_->self, 0);
		_g_free0 (_data_->composer_title);
		_g_object_unref0 (_data_->lbox);
		_g_object_unref0 (_data_->widget_status);
		_g_object_unref0 (_data_->api_status);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_io_error_cancelled:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_debug ("Dialog.vala:932: Message is cancelled.");
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		if (_data_->is_reply) {
			_data_->_tmp63_ = "reply";
		} else {
			_data_->_tmp63_ = "quote";
		}
		_data_->_tmp64_ = string_to_string (_data_->_tmp63_);
		_data_->_tmp65_ = _data_->status_id;
		_data_->_tmp66_ = string_to_string (_data_->_tmp65_);
		_data_->_tmp67_ = _data_->e;
		_data_->_tmp68_ = _data_->_tmp67_->message;
		_data_->_tmp69_ = string_to_string (_data_->_tmp68_);
		_data_->_tmp70_ = g_strconcat ("Couldn't get ", _data_->_tmp64_, " ", _data_->_tmp66_, ": ", _data_->_tmp69_, NULL);
		_data_->_tmp71_ = _data_->_tmp70_;
		g_warning ("Dialog.vala:934: %s", _data_->_tmp71_);
		_g_free0 (_data_->_tmp71_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		_g_free0 (_data_->status_id);
		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;
	}
	if (_data_->is_reply) {
		_data_->_tmp73_ = _data_->self->priv->_quote_id;
		_data_->_tmp72_ = _data_->_tmp73_ != NULL;
	} else {
		_data_->_tmp72_ = FALSE;
	}
	if (_data_->_tmp72_) {
		_data_->_tmp74_ = _data_->self->priv->_quote_id;
		_data_->_tmp75_ = string_to_string (_data_->_tmp74_);
		_data_->_tmp76_ = g_strconcat ("/api/v1/statuses/", _data_->_tmp75_, NULL);
		_data_->_tmp77_ = _data_->_tmp76_;
		_data_->_tmp78_ = tuba_accounts;
		_data_->_tmp79_ = tuba_account_store_get_active (_data_->_tmp78_);
		_data_->_tmp80_ = _data_->_tmp79_;
		_data_->_tmp81_ = _g_object_ref0 (_data_->_tmp80_);
		_data_->_tmp82_ = NULL;
		_data_->_tmp82_ = tuba_request_v2_new (_data_->_tmp77_, TUBA_REQUEST_V2_METHOD_GET);
		tuba_request_v2_set_account (_data_->_tmp82_, _data_->_tmp81_);
		_g_object_unref0 (_data_->_tmp81_);
		tuba_request_v2_set_ctx (_data_->_tmp82_, (GtkWidget*) _data_->self);
		_g_object_unref0 (_data_->req);
		_data_->req = _data_->_tmp82_;
		_g_free0 (_data_->_tmp77_);
		{
			_data_->_tmp83_ = _data_->req;
			_data_->_state_ = 3;
			tuba_request_v2_exec (_data_->_tmp83_, tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_ready, _data_);
			return FALSE;
			_state_3:
			_data_->_tmp84_ = tuba_request_v2_exec_finish (_data_->_tmp83_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_vala1_in_stream = _data_->_tmp84_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
					goto __catch1_g_io_error_cancelled;
				}
				goto __catch1_g_error;
			}
			_data_->_tmp85_ = _data_->_vala1_in_stream;
			_data_->_state_ = 4;
			tuba_network_get_parser_from_inputstream_async (_data_->_tmp85_, NULL, tuba_dialogs_composer_dialog_load_replied_to_or_quote_status_async_ready, _data_);
			return FALSE;
			_state_4:
			_data_->_tmp86_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
			_data_->_vala1_parser = _data_->_tmp86_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->_vala1_in_stream);
				if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
					goto __catch1_g_io_error_cancelled;
				}
				goto __catch1_g_error;
			}
			_data_->_tmp87_ = tuba_network;
			_data_->_tmp88_ = _data_->_vala1_parser;
			_data_->_tmp89_ = tuba_network_parse_node (_data_->_tmp87_, _data_->_tmp88_);
			_data_->_vala1_node = _data_->_tmp89_;
			_data_->_tmp90_ = _data_->_vala1_node;
			_data_->_tmp91_ = tuba_api_status_from (_data_->_tmp90_, &_data_->_inner_error0_);
			_data_->_vala1_api_status = _data_->_tmp91_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				__vala_JsonNode_free0 (_data_->_vala1_node);
				_g_object_unref0 (_data_->_vala1_parser);
				_g_object_unref0 (_data_->_vala1_in_stream);
				if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
					goto __catch1_g_io_error_cancelled;
				}
				goto __catch1_g_error;
			}
			_data_->_tmp92_ = _data_->_vala1_api_status;
			tuba_dialogs_composer_dialog_add_quote_inline_widget (_data_->self, _data_->_tmp92_);
			_g_object_unref0 (_data_->_vala1_api_status);
			__vala_JsonNode_free0 (_data_->_vala1_node);
			_g_object_unref0 (_data_->_vala1_parser);
			_g_object_unref0 (_data_->_vala1_in_stream);
		}
		goto __finally1;
		__catch1_g_io_error_cancelled:
		{
			g_clear_error (&_data_->_inner_error0_);
			g_debug ("Dialog.vala:950: Message is cancelled.");
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->_vala1_e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp93_ = _data_->self->priv->_quote_id;
			_data_->_tmp94_ = string_to_string (_data_->_tmp93_);
			_data_->_tmp95_ = _data_->_vala1_e;
			_data_->_tmp96_ = _data_->_tmp95_->message;
			_data_->_tmp97_ = string_to_string (_data_->_tmp96_);
			_data_->_tmp98_ = g_strconcat ("Couldn't get quote ", _data_->_tmp94_, ": ", _data_->_tmp97_, NULL);
			_data_->_tmp99_ = _data_->_tmp98_;
			g_warning ("Dialog.vala:952: %s", _data_->_tmp99_);
			_g_free0 (_data_->_tmp99_);
			_g_error_free0 (_data_->_vala1_e);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->status_id);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_g_object_unref0 (_data_->req);
	_g_free0 (_data_->status_id);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static inline void
tuba_dialogs_composer_dialog_set_editor_title (TubaDialogsComposerDialog* self,
                                               const gchar* new_title,
                                               GtkWidget* widget_status)
{
	AdwNavigationPage* _tmp0_;
	TubaDialogsComposerComponentsEditor* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_title != NULL);
	adw_dialog_set_title ((AdwDialog*) self, new_title);
	_tmp0_ = self->priv->nav_page;
	adw_navigation_page_set_title (_tmp0_, new_title);
	_tmp1_ = self->priv->editor;
	tuba_dialogs_composer_components_editor_set_title (_tmp1_, new_title, widget_status);
}

static void
tuba_dialogs_composer_dialog_scroller_mapped (TubaDialogsComposerDialog* self)
{
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	TubaDialogsComposerComponentsEditor* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->scroller;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->editor;
	_tmp4_ = gtk_text_view_get_top_margin ((GtkTextView*) _tmp3_);
	_tmp5_ = _tmp4_;
	gtk_adjustment_set_value (_tmp2_, (gdouble) _tmp5_);
}

static void
tuba_dialogs_composer_dialog_toggle_poll_component (TubaDialogsComposerDialog* self)
{
	GtkToggleButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	TubaDialogsComposerComponentsPolls* _tmp12_;
	TubaDialogsComposerComponentsEditor* _tmp17_;
	TubaDialogsComposerComponentsPolls* _tmp18_;
	AdwTimedAnimation* _tmp19_;
	AdwTimedAnimation* _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->poll_button;
	_tmp1_ = gtk_toggle_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		AdwTimedAnimation* _tmp3_;
		_tmp3_ = self->priv->polls_animation;
		if (_tmp3_ != NULL) {
			AdwTimedAnimation* _tmp4_;
			AdwTimedAnimation* _tmp5_;
			_tmp4_ = self->priv->polls_animation;
			adw_timed_animation_set_reverse (_tmp4_, TRUE);
			_tmp5_ = self->priv->polls_animation;
			adw_animation_play ((AdwAnimation*) _tmp5_);
		} else {
			gboolean _tmp6_ = FALSE;
			TubaDialogsComposerComponentsPolls* _tmp7_;
			_tmp7_ = self->priv->polls_component;
			if (_tmp7_ != NULL) {
				TubaDialogsComposerComponentsEditor* _tmp8_;
				TubaDialogsComposerComponentsPolls* _tmp9_;
				_tmp8_ = self->priv->editor;
				_tmp9_ = self->priv->polls_component;
				_tmp6_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp8_, (GtkWidget*) _tmp9_);
			} else {
				_tmp6_ = FALSE;
			}
			if (_tmp6_) {
				TubaDialogsComposerComponentsEditor* _tmp10_;
				TubaDialogsComposerComponentsPolls* _tmp11_;
				_tmp10_ = self->priv->editor;
				_tmp11_ = self->priv->polls_component;
				tuba_widgets_sandwich_source_view_remove_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp10_, (GtkWidget*) _tmp11_);
			}
		}
		return;
	}
	_tmp12_ = self->priv->polls_component;
	if (_tmp12_ == NULL) {
		tuba_dialogs_composer_dialog_init_polls_component (self, NULL);
	} else {
		AdwTimedAnimation* _tmp13_;
		AdwAnimationState _tmp14_;
		AdwAnimationState _tmp15_;
		_tmp13_ = self->priv->polls_animation;
		_tmp14_ = adw_animation_get_state ((AdwAnimation*) _tmp13_);
		_tmp15_ = _tmp14_;
		if (_tmp15_ == ADW_ANIMATION_PLAYING) {
			AdwTimedAnimation* _tmp16_;
			_tmp16_ = self->priv->polls_animation;
			adw_animation_skip ((AdwAnimation*) _tmp16_);
		}
	}
	_tmp17_ = self->priv->editor;
	_tmp18_ = self->priv->polls_component;
	tuba_widgets_sandwich_source_view_add_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp17_, (GtkWidget*) _tmp18_, FALSE);
	_tmp19_ = self->priv->polls_animation;
	adw_timed_animation_set_reverse (_tmp19_, FALSE);
	_tmp20_ = self->priv->polls_animation;
	adw_animation_play ((AdwAnimation*) _tmp20_);
}

static void
_tuba_dialogs_composer_dialog_validate_post_button_g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	tuba_dialogs_composer_dialog_validate_post_button ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_poll_component_animation_end_adw_animation_done (AdwAnimation* _sender,
                                                                                  gpointer self)
{
	tuba_dialogs_composer_dialog_on_poll_component_animation_end ((TubaDialogsComposerDialog*) self, _sender);
}

static void
tuba_dialogs_composer_dialog_init_polls_component (TubaDialogsComposerDialog* self,
                                                   TubaAPIPoll* poll_obj)
{
	TubaDialogsComposerComponentsPolls* _tmp0_;
	TubaDialogsComposerComponentsPolls* _tmp1_ = NULL;
	TubaDialogsComposerComponentsPolls* _tmp2_;
	TubaDialogsComposerComponentsPolls* _tmp3_;
	TubaDialogsComposerComponentsPolls* _tmp4_;
	AdwPropertyAnimationTarget* _tmp5_;
	AdwTimedAnimation* _tmp6_;
	AdwTimedAnimation* _tmp7_;
	TubaDialogsComposerComponentsPolls* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->polls_component;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = tuba_dialogs_composer_components_polls_new (poll_obj);
	gtk_widget_set_opacity ((GtkWidget*) _tmp1_, (gdouble) 0);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->polls_component);
	self->priv->polls_component = _tmp1_;
	_tmp2_ = self->priv->polls_component;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::is-valid", (GCallback) _tuba_dialogs_composer_dialog_validate_post_button_g_object_notify, self, 0);
	_tmp3_ = self->priv->polls_component;
	_tmp4_ = self->priv->polls_component;
	_tmp5_ = (AdwPropertyAnimationTarget*) adw_property_animation_target_new ((GObject*) _tmp4_, "opacity");
	_tmp6_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp3_, (gdouble) 0, (gdouble) 1, (guint) 250, (AdwAnimationTarget*) _tmp5_);
	_g_object_unref0 (self->priv->polls_animation);
	self->priv->polls_animation = _tmp6_;
	_tmp7_ = self->priv->polls_animation;
	g_signal_connect_object ((AdwAnimation*) _tmp7_, "done", (GCallback) _tuba_dialogs_composer_dialog_on_poll_component_animation_end_adw_animation_done, self, 0);
	_tmp8_ = self->priv->polls_component;
	g_object_bind_property_with_closures ((GObject*) self, "is-narrow", (GObject*) _tmp8_, "is-narrow", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
}

static void
tuba_dialogs_composer_dialog_on_add_media_clicked (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerComponentsAttachmentsBin* _tmp0_;
	TubaDialogsComposerComponentsEditor* _tmp1_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp2_;
	g_return_if_fail (self != NULL);
	tuba_dialogs_composer_dialog_create_attachmentsbin (self, NULL);
	_tmp0_ = self->priv->attachmentsbin_component;
	tuba_dialogs_composer_components_attachments_bin_show_file_selector (_tmp0_);
	_tmp1_ = self->priv->editor;
	_tmp2_ = self->priv->attachmentsbin_component;
	tuba_widgets_sandwich_source_view_add_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp1_, (GtkWidget*) _tmp2_, FALSE);
}

static void
tuba_dialogs_composer_dialog_update_attachmentsbin_meta (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerComponentsAttachmentsBin* _tmp0_;
	gboolean _tmp1_ = FALSE;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	gboolean is_used = FALSE;
	GtkToggleButton* _tmp8_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp9_;
	gboolean _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	TubaAccountStore* _tmp15_;
	TubaInstanceAccount* _tmp16_;
	TubaInstanceAccount* _tmp17_;
	TubaAPIInstanceV2APIVersions* _tmp18_;
	TubaAPIInstanceV2APIVersions* _tmp19_;
	gint8 _tmp20_;
	gint8 _tmp21_;
	GtkToggleButton* _tmp28_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->attachmentsbin_component;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp2_ = self->priv->attachmentsbin_component;
	_tmp3_ = tuba_dialogs_composer_components_attachments_bin_get_working (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		_tmp1_ = TRUE;
	} else {
		TubaDialogsComposerComponentsAttachmentsBin* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = self->priv->attachmentsbin_component;
		_tmp6_ = tuba_dialogs_composer_components_attachments_bin_get_is_empty (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = !_tmp7_;
	}
	is_used = _tmp1_;
	_tmp8_ = self->priv->sensitive_media_button;
	_tmp9_ = self->priv->attachmentsbin_component;
	_tmp10_ = tuba_dialogs_composer_components_attachments_bin_get_is_empty (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_widget_set_visible ((GtkWidget*) _tmp8_, !_tmp11_);
	_tmp15_ = tuba_accounts;
	_tmp16_ = tuba_account_store_get_active (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = tuba_instance_account_get_tuba_api_versions (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp19_);
	_tmp21_ = _tmp20_;
	if (((gint) _tmp21_) >= 10) {
		_tmp14_ = TRUE;
	} else {
		_tmp14_ = !is_used;
	}
	if (_tmp14_) {
		_tmp13_ = TRUE;
	} else {
		TubaAccountStore* _tmp22_;
		TubaInstanceAccount* _tmp23_;
		TubaInstanceAccount* _tmp24_;
		TubaInstanceAccountInstanceFeatures _tmp25_;
		TubaInstanceAccountInstanceFeatures _tmp26_;
		_tmp22_ = tuba_accounts;
		_tmp23_ = tuba_account_store_get_active (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = tuba_instance_account_get_tuba_instance_features (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp13_ = (_tmp26_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL;
	}
	if (_tmp13_) {
		gboolean _tmp27_;
		_tmp27_ = self->priv->_quote_limited;
		_tmp12_ = !_tmp27_;
	} else {
		_tmp12_ = FALSE;
	}
	_tmp28_ = self->priv->poll_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp28_, _tmp12_);
	if (!is_used) {
		TubaDialogsComposerComponentsEditor* _tmp29_;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp30_;
		_tmp29_ = self->priv->editor;
		_tmp30_ = self->priv->attachmentsbin_component;
		tuba_widgets_sandwich_source_view_remove_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp29_, (GtkWidget*) _tmp30_);
	}
	tuba_dialogs_composer_dialog_validate_post_button (self);
	tuba_dialogs_composer_dialog_update_attachmentsbin_sensitivity (self);
}

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

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

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

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

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

static gboolean
tuba_dialogs_composer_dialog_on_drag_drop (TubaDialogsComposerDialog* self,
                                           GValue* val,
                                           gdouble x,
                                           gdouble y)
{
	TubaDialogsComposerComponentsDropOverlay* _tmp0_;
	GtkButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GdkFileList* file_list = NULL;
	GValue _tmp4_;
	GdkFileList* _tmp5_;
	GdkFileList* _tmp6_;
	GSList* files = NULL;
	GdkFileList* _tmp7_;
	GSList* _tmp8_;
	GSList* _tmp9_;
	GFile** files_to_upload = NULL;
	GFile** _tmp10_;
	gint files_to_upload_length1;
	gint _files_to_upload_size_;
	GSList* _tmp11_;
	GFile** _tmp14_;
	gint _tmp14__length1;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp15_;
	GFile** _tmp16_;
	gint _tmp16__length1;
	GFile** _tmp17_;
	gint _tmp17__length1;
	TubaDialogsComposerComponentsEditor* _tmp18_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp19_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (val != NULL, FALSE);
	_tmp0_ = self->priv->drop_overlay;
	tuba_dialogs_composer_components_drop_overlay_set_dropping (_tmp0_, FALSE);
	_tmp1_ = self->priv->add_media_button;
	_tmp2_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		result = FALSE;
		return result;
	}
	_tmp4_ = *val;
	_tmp5_ = __vala_GdkFileList_copy0 (g_value_get_boxed (&_tmp4_));
	file_list = _tmp5_;
	_tmp6_ = file_list;
	if (_tmp6_ == NULL) {
		result = FALSE;
		__vala_GdkFileList_free0 (file_list);
		return result;
	}
	_tmp7_ = file_list;
	_tmp8_ = gdk_file_list_get_files (_tmp7_);
	files = _tmp8_;
	_tmp9_ = files;
	if (g_slist_length (_tmp9_) == ((guint) 0)) {
		result = FALSE;
		(files == NULL) ? NULL : (files = (g_slist_free (files), NULL));
		__vala_GdkFileList_free0 (file_list);
		return result;
	}
	_tmp10_ = g_new0 (GFile*, 0 + 1);
	files_to_upload = _tmp10_;
	files_to_upload_length1 = 0;
	_files_to_upload_size_ = files_to_upload_length1;
	_tmp11_ = files;
	{
		GSList* file_collection = NULL;
		GSList* file_it = NULL;
		file_collection = _tmp11_;
		for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
			GFile* file = NULL;
			file = (GFile*) file_it->data;
			{
				GFile* _tmp12_;
				GFile* _tmp13_;
				_tmp12_ = file;
				_tmp13_ = _g_object_ref0 (_tmp12_);
				_vala_array_add40 (&files_to_upload, &files_to_upload_length1, &_files_to_upload_size_, _tmp13_);
			}
		}
	}
	_tmp14_ = files_to_upload;
	_tmp14__length1 = files_to_upload_length1;
	if (_tmp14__length1 == 0) {
		result = FALSE;
		files_to_upload = (_vala_array_free (files_to_upload, files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
		(files == NULL) ? NULL : (files = (g_slist_free (files), NULL));
		__vala_GdkFileList_free0 (file_list);
		return result;
	}
	tuba_dialogs_composer_dialog_create_attachmentsbin (self, NULL);
	_tmp15_ = self->priv->attachmentsbin_component;
	_tmp16_ = files_to_upload;
	_tmp16__length1 = files_to_upload_length1;
	_tmp17_ = (_tmp16_ != NULL) ? _vala_array_dup18 (_tmp16_, _tmp16__length1) : _tmp16_;
	_tmp17__length1 = _tmp16__length1;
	tuba_dialogs_composer_components_attachments_bin_upload_files (_tmp15_, _tmp17_, (gint) _tmp17__length1, NULL, NULL);
	_tmp18_ = self->priv->editor;
	_tmp19_ = self->priv->attachmentsbin_component;
	tuba_widgets_sandwich_source_view_add_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp18_, (GtkWidget*) _tmp19_, FALSE);
	result = TRUE;
	files_to_upload = (_vala_array_free (files_to_upload, files_to_upload_length1, (GDestroyNotify) g_object_unref), NULL);
	(files == NULL) ? NULL : (files = (g_slist_free (files), NULL));
	__vala_GdkFileList_free0 (file_list);
	return result;
}

static GdkDragAction
tuba_dialogs_composer_dialog_on_drag_enter (TubaDialogsComposerDialog* self,
                                            gdouble x,
                                            gdouble y)
{
	TubaDialogsComposerComponentsDropOverlay* _tmp0_;
	GdkDragAction result;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->drop_overlay;
	tuba_dialogs_composer_components_drop_overlay_set_dropping (_tmp0_, TRUE);
	result = GDK_ACTION_COPY;
	return result;
}

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

static void
tuba_dialogs_composer_dialog_on_clipboard_paste_async_data_free (gpointer _data)
{
	TubaDialogsComposerDialogOnClipboardPasteAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->clipboard);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsComposerDialogOnClipboardPasteAsyncData, _data_);
}

static void
tuba_dialogs_composer_dialog_on_clipboard_paste_async (TubaDialogsComposerDialog* self,
                                                       GdkClipboard* clipboard,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_)
{
	TubaDialogsComposerDialogOnClipboardPasteAsyncData* _data_;
	TubaDialogsComposerDialog* _tmp0_;
	GdkClipboard* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (clipboard != NULL);
	_data_ = g_slice_new0 (TubaDialogsComposerDialogOnClipboardPasteAsyncData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_composer_dialog_on_clipboard_paste_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (clipboard);
	_g_object_unref0 (_data_->clipboard);
	_data_->clipboard = _tmp1_;
	tuba_dialogs_composer_dialog_on_clipboard_paste_async_co (_data_);
}

static void
tuba_dialogs_composer_dialog_on_clipboard_paste_finish (TubaDialogsComposerDialog* self,
                                                        GAsyncResult* _res_)
{
	TubaDialogsComposerDialogOnClipboardPasteAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_composer_dialog_on_clipboard_paste_async_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_)
{
	TubaDialogsComposerDialogOnClipboardPasteAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_composer_dialog_on_clipboard_paste_async_co (_data_);
}

static GValue*
_g_value_dup (GValue* self)
{
	return g_boxed_copy (G_TYPE_VALUE, self);
}

static gpointer
__g_value_dup0 (gpointer self)
{
	return self ? _g_value_dup (self) : NULL;
}

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

static void
_vala_GValue_free (GValue* self)
{
	g_boxed_free (G_TYPE_VALUE, self);
}

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

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

static gboolean
tuba_dialogs_composer_dialog_on_clipboard_paste_async_co (TubaDialogsComposerDialogOnClipboardPasteAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_new0 (GFile*, 0 + 1);
	_data_->files = _data_->_tmp0_;
	_data_->files_length1 = 0;
	_data_->_files_size_ = _data_->files_length1;
	{
		_data_->_state_ = 1;
		gdk_clipboard_read_value_async (_data_->clipboard, g_file_get_type (), 0, NULL, tuba_dialogs_composer_dialog_on_clipboard_paste_async_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = __g_value_dup0 (gdk_clipboard_read_value_finish (_data_->clipboard, _data_->_res_, &_data_->_inner_error0_));
		_data_->copied_value = _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = _data_->copied_value;
		if (((gpointer) _data_->_tmp2_) != NULL) {
			_data_->_tmp3_ = _data_->copied_value;
			_data_->_tmp4_ = _g_object_ref0 (g_value_get_object (_data_->_tmp3_));
			_data_->copied_file = _data_->_tmp4_;
			_data_->_tmp5_ = _data_->copied_file;
			if (_data_->_tmp5_ != NULL) {
				_data_->_tmp6_ = _data_->copied_file;
				_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
				_vala_array_add41 (&_data_->files, &_data_->files_length1, &_data_->_files_size_, _data_->_tmp7_);
			}
			_g_object_unref0 (_data_->copied_file);
		}
		__vala_GValue_free0 (_data_->copied_value);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_data_->files = (_vala_array_free (_data_->files, _data_->files_length1, (GDestroyNotify) g_object_unref), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp8_ = _data_->files;
	_data_->_tmp8__length1 = _data_->files_length1;
	if (_data_->_tmp8__length1 == 0) {
		{
			_data_->_state_ = 2;
			gdk_clipboard_read_texture_async (_data_->clipboard, NULL, tuba_dialogs_composer_dialog_on_clipboard_paste_async_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp9_ = gdk_clipboard_read_texture_finish (_data_->clipboard, _data_->_res_, &_data_->_inner_error0_);
			_data_->copied_texture = _data_->_tmp9_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
			_data_->_tmp10_ = _data_->copied_texture;
			if (_data_->_tmp10_ == NULL) {
				_g_object_unref0 (_data_->copied_texture);
				_data_->files = (_vala_array_free (_data_->files, _data_->files_length1, (GDestroyNotify) g_object_unref), NULL);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_data_->_tmp12_ = NULL;
			_data_->_state_ = 3;
			g_file_new_tmp_async ("tuba-XXXXXX.png", G_PRIORITY_DEFAULT, NULL, tuba_dialogs_composer_dialog_on_clipboard_paste_async_ready, _data_);
			return FALSE;
			_state_3:
			_data_->_tmp13_ = g_file_new_tmp_finish (_data_->_res_, &_data_->_tmp12_, &_data_->_inner_error0_);
			_g_object_unref0 (_data_->stream);
			_data_->stream = _data_->_tmp12_;
			_data_->_tmp11_ = _data_->_tmp13_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->stream);
				_g_object_unref0 (_data_->copied_texture);
				goto __catch1_g_error;
			}
			_data_->_tmp14_ = _data_->_tmp11_;
			_data_->_tmp11_ = NULL;
			_vala_array_add42 (&_data_->files, &_data_->files_length1, &_data_->_files_size_, _data_->_tmp14_);
			_data_->_tmp15_ = _data_->stream;
			_data_->_tmp16_ = g_io_stream_get_output_stream ((GIOStream*) _data_->_tmp15_);
			_data_->_tmp17_ = _data_->_tmp16_;
			_data_->_tmp18_ = _g_object_ref0 (_data_->_tmp17_);
			_data_->ostream = _data_->_tmp18_;
			_data_->_tmp19_ = _data_->ostream;
			_data_->_tmp20_ = _data_->copied_texture;
			_data_->_tmp21_ = gdk_texture_save_to_png_bytes (_data_->_tmp20_);
			_data_->_tmp22_ = _data_->_tmp21_;
			_data_->_state_ = 4;
			g_output_stream_write_bytes_async (_data_->_tmp19_, _data_->_tmp22_, G_PRIORITY_DEFAULT, NULL, tuba_dialogs_composer_dialog_on_clipboard_paste_async_ready, _data_);
			return FALSE;
			_state_4:
			g_output_stream_write_bytes_finish (_data_->_tmp19_, _data_->_res_, &_data_->_inner_error0_);
			_g_bytes_unref0 (_data_->_tmp22_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->ostream);
				_g_object_unref0 (_data_->_tmp11_);
				_g_object_unref0 (_data_->stream);
				_g_object_unref0 (_data_->copied_texture);
				goto __catch1_g_error;
			}
			_g_object_unref0 (_data_->ostream);
			_g_object_unref0 (_data_->_tmp11_);
			_g_object_unref0 (_data_->stream);
			_g_object_unref0 (_data_->copied_texture);
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp23_ = _data_->e;
			_data_->_tmp24_ = _data_->_tmp23_->message;
			_data_->_tmp25_ = string_to_string (_data_->_tmp24_);
			_data_->_tmp26_ = g_strconcat ("Couldn't get texture from clipboard: ", _data_->_tmp25_, NULL);
			_data_->_tmp27_ = _data_->_tmp26_;
			g_warning ("Dialog.vala:1080: %s", _data_->_tmp27_);
			_g_free0 (_data_->_tmp27_);
			_g_error_free0 (_data_->e);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->files = (_vala_array_free (_data_->files, _data_->files_length1, (GDestroyNotify) g_object_unref), NULL);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->_tmp28_ = _data_->self->priv->attachmentsbin_component;
	_data_->_tmp29_ = _data_->files;
	_data_->_tmp29__length1 = _data_->files_length1;
	_data_->_tmp30_ = (_data_->_tmp29_ != NULL) ? _vala_array_dup19 (_data_->_tmp29_, _data_->_tmp29__length1) : _data_->_tmp29_;
	_data_->_tmp30__length1 = _data_->_tmp29__length1;
	_data_->_state_ = 5;
	tuba_dialogs_composer_components_attachments_bin_upload_files (_data_->_tmp28_, _data_->_tmp30_, (gint) _data_->_tmp30__length1, tuba_dialogs_composer_dialog_on_clipboard_paste_async_ready, _data_);
	return FALSE;
	_state_5:
	tuba_dialogs_composer_components_attachments_bin_upload_files_finish (_data_->_tmp28_, _data_->_res_);
	_data_->files = (_vala_array_free (_data_->files, _data_->files_length1, (GDestroyNotify) g_object_unref), NULL);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_tuba_dialogs_composer_dialog_update_attachmentsbin_meta_g_object_notify (GObject* _sender,
                                                                          GParamSpec* pspec,
                                                                          gpointer self)
{
	tuba_dialogs_composer_dialog_update_attachmentsbin_meta ((TubaDialogsComposerDialog*) self);
}

static void
tuba_dialogs_composer_dialog_create_attachmentsbin (TubaDialogsComposerDialog* self,
                                                    GeeArrayList* attachments_obj)
{
	TubaDialogsComposerComponentsAttachmentsBin* _tmp0_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp1_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp2_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp3_;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp4_;
	GtkButton* _tmp5_;
	gboolean _tmp6_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->attachmentsbin_component;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = tuba_dialogs_composer_components_attachments_bin_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->attachmentsbin_component);
	self->priv->attachmentsbin_component = _tmp1_;
	_tmp2_ = self->priv->attachmentsbin_component;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::working", (GCallback) _tuba_dialogs_composer_dialog_update_attachmentsbin_meta_g_object_notify, self, 0);
	_tmp3_ = self->priv->attachmentsbin_component;
	g_signal_connect_object ((GObject*) _tmp3_, "notify::is-empty", (GCallback) _tuba_dialogs_composer_dialog_update_attachmentsbin_meta_g_object_notify, self, 0);
	_tmp4_ = self->priv->attachmentsbin_component;
	_tmp5_ = self->priv->add_media_button;
	g_object_bind_property_with_closures ((GObject*) _tmp4_, "can-add-media", (GObject*) _tmp5_, "sensitive", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	if (attachments_obj != NULL) {
		gint _tmp7_;
		gint _tmp8_;
		_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) attachments_obj);
		_tmp8_ = _tmp7_;
		_tmp6_ = _tmp8_ > 0;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		{
			GeeArrayList* _attachment_obj_list = NULL;
			gint _attachment_obj_size = 0;
			GeeArrayList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gint _attachment_obj_index = 0;
			_attachment_obj_list = attachments_obj;
			_tmp9_ = _attachment_obj_list;
			_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
			_tmp11_ = _tmp10_;
			_attachment_obj_size = _tmp11_;
			_attachment_obj_index = -1;
			while (TRUE) {
				gint _tmp12_;
				gint _tmp13_;
				TubaAPIAttachment* attachment_obj = NULL;
				GeeArrayList* _tmp14_;
				gpointer _tmp15_;
				TubaDialogsComposerComponentsAttachmentsBin* _tmp16_;
				TubaAPIAttachment* _tmp17_;
				gboolean _tmp18_;
				_attachment_obj_index = _attachment_obj_index + 1;
				_tmp12_ = _attachment_obj_index;
				_tmp13_ = _attachment_obj_size;
				if (!(_tmp12_ < _tmp13_)) {
					break;
				}
				_tmp14_ = _attachment_obj_list;
				_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, _attachment_obj_index);
				attachment_obj = (TubaAPIAttachment*) _tmp15_;
				_tmp16_ = self->priv->attachmentsbin_component;
				_tmp17_ = attachment_obj;
				_tmp18_ = self->priv->_edit_mode;
				tuba_dialogs_composer_components_attachments_bin_preload_attachment (_tmp16_, _tmp17_, _tmp18_);
				_g_object_unref0 (attachment_obj);
			}
		}
	}
}

static void
tuba_dialogs_composer_dialog_handle_potential_quote_paste (TubaDialogsComposerDialog* self,
                                                           GdkClipboard* clipboard)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	GCancellable* _tmp31_;
	GCancellable* _tmp33_;
	gchar* original_text = NULL;
	TubaDialogsComposerComponentsEditor* _tmp34_;
	GtkTextBuffer* _tmp35_;
	GtkTextBuffer* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	const gchar* _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (clipboard != NULL);
	_tmp5_ = self->priv->_edit_mode;
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp6_;
		_tmp6_ = self->priv->_quote_id;
		_tmp4_ = _tmp6_ != NULL;
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		GtkDropDown* _tmp7_;
		GObject* _tmp8_;
		GObject* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp7_ = self->visibility_button;
		_tmp8_ = gtk_drop_down_get_selected_item (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = tuba_instance_account_visibility_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibility));
		_tmp11_ = _tmp10_;
		_tmp3_ = g_strcmp0 (_tmp11_, "direct") == 0;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		TubaAccountStore* _tmp12_;
		TubaInstanceAccount* _tmp13_;
		TubaInstanceAccount* _tmp14_;
		TubaAPIInstanceV2APIVersions* _tmp15_;
		TubaAPIInstanceV2APIVersions* _tmp16_;
		gint8 _tmp17_;
		gint8 _tmp18_;
		_tmp12_ = tuba_accounts;
		_tmp13_ = tuba_account_store_get_active (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = tuba_instance_account_get_tuba_api_versions (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp2_ = ((gint) _tmp18_) < 7;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp19_ = FALSE;
		TubaDialogsComposerComponentsPolls* _tmp20_;
		_tmp20_ = self->priv->polls_component;
		if (_tmp20_ != NULL) {
			TubaDialogsComposerComponentsEditor* _tmp21_;
			TubaDialogsComposerComponentsPolls* _tmp22_;
			_tmp21_ = self->priv->editor;
			_tmp22_ = self->priv->polls_component;
			_tmp19_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp21_, (GtkWidget*) _tmp22_);
		} else {
			_tmp19_ = FALSE;
		}
		_tmp1_ = _tmp19_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp23_ = FALSE;
		gboolean _tmp24_ = FALSE;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp25_;
		_tmp25_ = self->priv->attachmentsbin_component;
		if (_tmp25_ != NULL) {
			TubaDialogsComposerComponentsEditor* _tmp26_;
			TubaDialogsComposerComponentsAttachmentsBin* _tmp27_;
			_tmp26_ = self->priv->editor;
			_tmp27_ = self->priv->attachmentsbin_component;
			_tmp24_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp26_, (GtkWidget*) _tmp27_);
		} else {
			_tmp24_ = FALSE;
		}
		if (_tmp24_) {
			TubaDialogsComposerComponentsAttachmentsBin* _tmp28_;
			gboolean _tmp29_;
			gboolean _tmp30_;
			_tmp28_ = self->priv->attachmentsbin_component;
			_tmp29_ = tuba_dialogs_composer_components_attachments_bin_get_is_empty (_tmp28_);
			_tmp30_ = _tmp29_;
			_tmp23_ = !_tmp30_;
		} else {
			_tmp23_ = FALSE;
		}
		_tmp0_ = _tmp23_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp31_ = self->priv->quote_paste_cancellable;
	if (_tmp31_ != NULL) {
		GCancellable* _tmp32_;
		_tmp32_ = self->priv->quote_paste_cancellable;
		g_cancellable_cancel (_tmp32_);
	}
	_tmp33_ = g_cancellable_new ();
	_g_object_unref0 (self->priv->quote_paste_cancellable);
	self->priv->quote_paste_cancellable = _tmp33_;
	_tmp34_ = self->priv->editor;
	_tmp35_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp34_);
	_tmp36_ = _tmp35_;
	g_object_get (_tmp36_, "text", &_tmp37_, NULL);
	_tmp38_ = _tmp37_;
	original_text = _tmp38_;
	_tmp39_ = original_text;
	tuba_dialogs_composer_dialog_handle_potential_quote_paste_real (self, _tmp39_, clipboard, NULL, NULL);
	_g_free0 (original_text);
}

static void
tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_data_free (gpointer _data)
{
	TubaDialogsComposerDialogHandlePotentialQuotePasteRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->original_text);
	_g_object_unref0 (_data_->clipboard);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsComposerDialogHandlePotentialQuotePasteRealData, _data_);
}

static void
tuba_dialogs_composer_dialog_handle_potential_quote_paste_real (TubaDialogsComposerDialog* self,
                                                                const gchar* original_text,
                                                                GdkClipboard* clipboard,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_)
{
	TubaDialogsComposerDialogHandlePotentialQuotePasteRealData* _data_;
	TubaDialogsComposerDialog* _tmp0_;
	gchar* _tmp1_;
	GdkClipboard* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (original_text != NULL);
	g_return_if_fail (clipboard != NULL);
	_data_ = g_slice_new0 (TubaDialogsComposerDialogHandlePotentialQuotePasteRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (original_text);
	_g_free0 (_data_->original_text);
	_data_->original_text = _tmp1_;
	_tmp2_ = _g_object_ref0 (clipboard);
	_g_object_unref0 (_data_->clipboard);
	_data_->clipboard = _tmp2_;
	tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_co (_data_);
}

static void
tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_finish (TubaDialogsComposerDialog* self,
                                                                       GAsyncResult* _res_)
{
	TubaDialogsComposerDialogHandlePotentialQuotePasteRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_ready (GObject* source_object,
                                                                      GAsyncResult* _res_,
                                                                      gpointer _user_data_)
{
	TubaDialogsComposerDialogHandlePotentialQuotePasteRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_co (_data_);
}

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

static gboolean
tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_co (TubaDialogsComposerDialogHandlePotentialQuotePasteRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->priv->quote_paste_cancellable;
		_data_->_state_ = 1;
		gdk_clipboard_read_text_async (_data_->clipboard, _data_->_tmp0_, tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = gdk_clipboard_read_text_finish (_data_->clipboard, _data_->_res_, &_data_->_inner_error0_);
		_data_->clipboard_text = _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = _data_->clipboard_text;
		if (_data_->_tmp2_ == NULL) {
			_g_free0 (_data_->clipboard_text);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp3_ = _data_->clipboard_text;
		_data_->_tmp4_ = string_strip (_data_->_tmp3_);
		_g_free0 (_data_->clipboard_text);
		_data_->clipboard_text = _data_->_tmp4_;
		_data_->_tmp5_ = _data_->clipboard_text;
		if (g_strcmp0 (_data_->_tmp5_, "") == 0) {
			_g_free0 (_data_->clipboard_text);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		{
			_data_->_tmp7_ = _data_->clipboard_text;
			_data_->_tmp8_ = g_uri_parse (_data_->_tmp7_, G_URI_FLAGS_NONE, &_data_->_inner_error0_);
			_data_->_tmp6_ = _data_->_tmp8_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
			_data_->_tmp9_ = _data_->_tmp6_;
			_data_->_tmp6_ = NULL;
			_g_uri_unref0 (_data_->uri);
			_data_->uri = _data_->_tmp9_;
			_g_uri_unref0 (_data_->_tmp6_);
		}
		goto __finally1;
		__catch1_g_error:
		{
			g_clear_error (&_data_->_inner_error0_);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			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;
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp11_ = _data_->uri;
		_data_->_tmp12_ = g_uri_get_scheme (_data_->_tmp11_);
		if (g_strcmp0 (_data_->_tmp12_, "http") != 0) {
			_data_->_tmp13_ = _data_->uri;
			_data_->_tmp14_ = g_uri_get_scheme (_data_->_tmp13_);
			_data_->_tmp10_ = g_strcmp0 (_data_->_tmp14_, "https") != 0;
		} else {
			_data_->_tmp10_ = FALSE;
		}
		if (_data_->_tmp10_) {
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp15_ = _data_->uri;
		_data_->_tmp16_ = g_uri_get_path (_data_->_tmp15_);
		_data_->_tmp17_ = g_strdup (_data_->_tmp16_);
		_data_->path = _data_->_tmp17_;
		_data_->_tmp19_ = _data_->path;
		if (g_strcmp0 (_data_->_tmp19_, "") == 0) {
			_data_->_tmp18_ = TRUE;
		} else {
			_data_->_tmp23_ = _data_->path;
			if (g_str_has_prefix (_data_->_tmp23_, "/@")) {
				_data_->_tmp22_ = TRUE;
			} else {
				_data_->_tmp24_ = _data_->path;
				_data_->_tmp22_ = g_str_has_prefix (_data_->_tmp24_, "/notes/");
			}
			if (_data_->_tmp22_) {
				_data_->_tmp21_ = TRUE;
			} else {
				_data_->_tmp25_ = _data_->path;
				_data_->_tmp21_ = g_str_has_prefix (_data_->_tmp25_, "/notice/");
			}
			if (_data_->_tmp21_) {
				_data_->_tmp20_ = TRUE;
			} else {
				_data_->_tmp26_ = _data_->path;
				_data_->_tmp20_ = g_str_has_prefix (_data_->_tmp26_, "/objects/");
			}
			_data_->_tmp18_ = !_data_->_tmp20_;
		}
		if (_data_->_tmp18_) {
			_g_free0 (_data_->path);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp27_ = tuba_accounts;
		_data_->_tmp28_ = tuba_account_store_get_active (_data_->_tmp27_);
		_data_->_tmp29_ = _data_->_tmp28_;
		_data_->_tmp30_ = _g_object_ref0 (_data_->_tmp29_);
		_data_->_tmp31_ = _data_->self->priv->quote_paste_cancellable;
		_data_->_tmp32_ = _g_object_ref0 (_data_->_tmp31_);
		_data_->_tmp33_ = NULL;
		_data_->_tmp33_ = tuba_request_v2_new ("/api/v2/search", TUBA_REQUEST_V2_METHOD_GET);
		tuba_request_v2_set_account (_data_->_tmp33_, _data_->_tmp30_);
		_g_object_unref0 (_data_->_tmp30_);
		tuba_request_v2_set_cancellable (_data_->_tmp33_, _data_->_tmp32_);
		_g_object_unref0 (_data_->_tmp32_);
		_data_->req = _data_->_tmp33_;
		_data_->_tmp34_ = _data_->req;
		tuba_request_v2_add_parameter (_data_->_tmp34_, "resolve", "true");
		_data_->_tmp35_ = _data_->req;
		tuba_request_v2_add_parameter (_data_->_tmp35_, "limit", "1");
		_data_->_tmp36_ = _data_->req;
		tuba_request_v2_add_parameter (_data_->_tmp36_, "type", "statuses");
		_data_->_tmp37_ = _data_->req;
		_data_->_tmp38_ = _data_->uri;
		_data_->_tmp39_ = g_uri_to_string (_data_->_tmp38_);
		_data_->_tmp40_ = _data_->_tmp39_;
		tuba_request_v2_add_parameter (_data_->_tmp37_, "q", _data_->_tmp40_);
		_g_free0 (_data_->_tmp40_);
		_data_->_tmp41_ = _data_->req;
		_data_->_state_ = 2;
		tuba_request_v2_exec (_data_->_tmp41_, tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp42_ = tuba_request_v2_exec_finish (_data_->_tmp41_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp42_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->path);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp43_ = _data_->in_stream;
		_data_->_state_ = 3;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp43_, NULL, tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp44_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp44_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->path);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp45_ = tuba_network;
		_data_->_tmp46_ = _data_->parser;
		_data_->_tmp47_ = tuba_network_parse_node (_data_->_tmp45_, _data_->_tmp46_);
		_data_->_tmp48_ = _data_->_tmp47_;
		_data_->_tmp49_ = tuba_api_search_results_from (_data_->_tmp48_, &_data_->_inner_error0_);
		_data_->_tmp50_ = _data_->_tmp49_;
		__vala_JsonNode_free0 (_data_->_tmp48_);
		_data_->results = _data_->_tmp50_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->path);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
				goto __catch0_g_io_error_cancelled;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp51_ = _data_->results;
		_data_->_tmp52_ = tuba_api_search_results_get_statuses (_data_->_tmp51_);
		_data_->_tmp53_ = _data_->_tmp52_;
		_data_->_tmp54_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp53_);
		_data_->_tmp55_ = _data_->_tmp54_;
		if (_data_->_tmp55_ == 0) {
			_g_object_unref0 (_data_->results);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->path);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp56_ = _data_->results;
		_data_->_tmp57_ = tuba_api_search_results_get_statuses (_data_->_tmp56_);
		_data_->_tmp58_ = _data_->_tmp57_;
		_data_->_tmp59_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp58_, 0);
		_data_->status = (TubaAPIStatus*) _data_->_tmp59_;
		_data_->_tmp60_ = _data_->status;
		_data_->_tmp61_ = tuba_api_status_get_can_be_quoted (_data_->_tmp60_);
		_data_->_tmp62_ = _data_->_tmp61_;
		if (!_data_->_tmp62_) {
			_g_object_unref0 (_data_->status);
			_g_object_unref0 (_data_->results);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->path);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp63_ = _data_->status;
		_data_->_tmp64_ = tuba_widgetizable_to_widget ((TubaWidgetizable*) _data_->_tmp63_);
		_data_->_tmp65_ = TUBA_WIDGETS_IS_STATUS (_data_->_tmp64_) ? ((TubaWidgetsStatus*) _data_->_tmp64_) : NULL;
		if (_data_->_tmp65_ == NULL) {
			_g_object_unref0 (_data_->_tmp64_);
		}
		_data_->status_widget = _data_->_tmp65_;
		_data_->_tmp66_ = _data_->status_widget;
		if (_data_->_tmp66_ == NULL) {
			_g_object_unref0 (_data_->status_widget);
			_g_object_unref0 (_data_->status);
			_g_object_unref0 (_data_->results);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->req);
			_g_free0 (_data_->path);
			_g_uri_unref0 (_data_->uri);
			_g_free0 (_data_->clipboard_text);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp67_ = _data_->status_widget;
		tuba_widgets_status_to_display_only (_data_->_tmp67_);
		_data_->_tmp68_ = _data_->status_widget;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp68_, "card");
		_data_->_tmp69_ = _data_->status_widget;
		gtk_widget_add_css_class ((GtkWidget*) _data_->_tmp69_, "initial-font-size");
		_data_->_tmp70_ = _data_->status_widget;
		gtk_widget_set_overflow ((GtkWidget*) _data_->_tmp70_, GTK_OVERFLOW_HIDDEN);
		_data_->_tmp71_ = tuba_app;
		_data_->_tmp72_ = _data_->clipboard_text;
		_data_->_tmp73_ = g_strdup_printf (_ ("Quote %s?"), _data_->_tmp72_);
		_data_->_tmp74_ = _data_->_tmp73_;
		memset (&_data_->_tmp75_, 0, sizeof (TubaApplicationQuestionText));
		_g_free0 (_data_->_tmp75_.text);
		_data_->_tmp75_.text = _data_->_tmp74_;
		_data_->_tmp75_.use_markup = FALSE;
		memset (&_data_->_tmp76_, 0, sizeof (TubaApplicationQuestionButtons));
		tuba_application_question_button_destroy (&_data_->_tmp76_.yes);
		_data_->_tmp76_.yes = (TubaApplicationQuestionButton) {_ ("Quote"), ADW_RESPONSE_SUGGESTED};
		tuba_application_question_button_destroy (&_data_->_tmp76_.no);
		_data_->_tmp76_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
		_data_->_tmp77_ = _data_->status_widget;
		_data_->_state_ = 4;
		tuba_application_question (_data_->_tmp71_, &_data_->_tmp75_, NULL, (GtkWidget*) _data_->self, &_data_->_tmp76_, (GtkWidget*) _data_->_tmp77_, FALSE, tuba_dialogs_composer_dialog_handle_potential_quote_paste_real_ready, _data_);
		return FALSE;
		_state_4:
		_data_->_tmp78_ = tuba_application_question_finish (_data_->_tmp71_, _data_->_res_);
		_g_free0 (_data_->_tmp74_);
		_data_->qs = _data_->_tmp78_;
		if (tuba_application_question_answer_truthy (_data_->qs)) {
			_data_->_tmp79_ = _data_->self->priv->editor;
			_data_->_tmp80_ = gtk_text_view_get_buffer ((GtkTextView*) _data_->_tmp79_);
			_data_->_tmp81_ = _data_->_tmp80_;
			g_object_set (_data_->_tmp81_, "text", _data_->original_text, NULL);
			_data_->_tmp82_ = _data_->status;
			_data_->_tmp83_ = tuba_api_status_get_id (_data_->_tmp82_);
			_data_->_tmp84_ = _data_->_tmp83_;
			tuba_dialogs_composer_dialog_set_quote_id (_data_->self, _data_->_tmp84_);
			tuba_dialogs_composer_dialog_update_quote_id_state (_data_->self);
			_data_->_tmp85_ = _data_->status;
			tuba_dialogs_composer_dialog_add_quote_inline_widget (_data_->self, _data_->_tmp85_);
		}
		_g_object_unref0 (_data_->status_widget);
		_g_object_unref0 (_data_->status);
		_g_object_unref0 (_data_->results);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->req);
		_g_free0 (_data_->path);
		_g_uri_unref0 (_data_->uri);
		_g_free0 (_data_->clipboard_text);
	}
	goto __finally0;
	__catch0_g_io_error_cancelled:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_debug ("Dialog.vala:1181: Message is cancelled.");
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp86_ = _data_->e;
		_data_->_tmp87_ = _data_->_tmp86_->message;
		_data_->_tmp88_ = string_to_string (_data_->_tmp87_);
		_data_->_tmp89_ = g_strconcat ("Couldn't fetch quote from clipboard: ", _data_->_tmp88_, NULL);
		_data_->_tmp90_ = _data_->_tmp89_;
		g_debug ("Dialog.vala:1183: %s", _data_->_tmp90_);
		_g_free0 (_data_->_tmp90_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_dialogs_composer_dialog_update_quote_id_state (TubaDialogsComposerDialog* self)
{
	gboolean has_quote = FALSE;
	const gchar* _tmp0_;
	TubaAccountStore* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaAPIInstanceV2APIVersions* _tmp4_;
	TubaAPIInstanceV2APIVersions* _tmp5_;
	gint8 _tmp6_;
	gint8 _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_quote_id;
	has_quote = _tmp0_ != NULL;
	_tmp1_ = tuba_accounts;
	_tmp2_ = tuba_account_store_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = tuba_instance_account_get_tuba_api_versions (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp5_);
	_tmp7_ = _tmp6_;
	if (((gint) _tmp7_) >= 7) {
		GtkToggleButton* _tmp8_;
		GtkButton* _tmp9_;
		tuba_dialogs_composer_dialog_set_quote_limited (self, has_quote);
		_tmp8_ = self->priv->poll_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, !has_quote);
		_tmp9_ = self->priv->add_media_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp9_, !has_quote);
	}
}

static void
_tuba_dialogs_composer_dialog_remove_quote_inline_widget_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self)
{
	tuba_dialogs_composer_dialog_remove_quote_inline_widget ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_inline_quote_widget_animation_done_adw_animation_done (AdwAnimation* _sender,
                                                                                        gpointer self)
{
	tuba_dialogs_composer_dialog_on_inline_quote_widget_animation_done ((TubaDialogsComposerDialog*) self, _sender);
}

static void
tuba_dialogs_composer_dialog_add_quote_inline_widget (TubaDialogsComposerDialog* self,
                                                      TubaAPIStatus* quote_status)
{
	GtkWidget* _tmp0_;
	TubaWidgetsStatus* status_widget = NULL;
	GtkWidget* _tmp1_;
	TubaWidgetsStatus* _tmp2_;
	TubaWidgetsStatus* _tmp3_;
	TubaWidgetsStatus* _tmp4_;
	TubaWidgetsStatus* _tmp5_;
	TubaWidgetsStatus* _tmp6_;
	TubaWidgetsStatus* _tmp7_;
	GtkButton* remove_quote_button = NULL;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	gchar* _tmp11_;
	GtkButton* _tmp12_ = NULL;
	GtkButton* _tmp13_;
	TubaWidgetsStatus* _tmp14_;
	GtkBox* _tmp15_;
	GtkButton* _tmp16_;
	TubaWidgetsStatus* _tmp17_;
	GtkWidget* _tmp18_;
	TubaDialogsComposerComponentsEditor* _tmp19_;
	GtkWidget* _tmp20_;
	GtkWidget* _tmp21_;
	GtkWidget* _tmp22_;
	AdwPropertyAnimationTarget* _tmp23_;
	AdwTimedAnimation* _tmp24_;
	AdwTimedAnimation* _tmp25_;
	AdwTimedAnimation* _tmp26_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (quote_status != NULL);
	_tmp0_ = self->priv->inline_quote_widget;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = tuba_widgetizable_to_widget ((TubaWidgetizable*) quote_status);
	status_widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TUBA_WIDGETS_TYPE_STATUS, TubaWidgetsStatus);
	_tmp2_ = status_widget;
	tuba_widgets_status_to_display_only (_tmp2_);
	_tmp3_ = status_widget;
	gtk_widget_add_css_class ((GtkWidget*) _tmp3_, "card");
	_tmp4_ = status_widget;
	gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "initial-font-size");
	_tmp5_ = status_widget;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp5_, 8);
	_tmp6_ = status_widget;
	gtk_widget_set_overflow ((GtkWidget*) _tmp6_, GTK_OVERFLOW_HIDDEN);
	_tmp7_ = status_widget;
	gtk_widget_set_opacity ((GtkWidget*) _tmp7_, (gdouble) 0);
	_tmp8_ = g_strdup ("circular");
	_tmp9_ = g_strdup ("error");
	_tmp10_ = g_new0 (gchar*, 2 + 1);
	_tmp10_[0] = _tmp8_;
	_tmp10_[1] = _tmp9_;
	_tmp11_ = g_strdup (_ ("Remove Quote"));
	_tmp12_ = (GtkButton*) gtk_button_new_from_icon_name ("user-trash-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_);
	remove_quote_button = _tmp12_;
	_tmp13_ = remove_quote_button;
	g_signal_connect_object (_tmp13_, "clicked", (GCallback) _tuba_dialogs_composer_dialog_remove_quote_inline_widget_gtk_button_clicked, self, 0);
	_tmp14_ = status_widget;
	_tmp15_ = _tmp14_->indicators;
	_tmp16_ = remove_quote_button;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = status_widget;
	_tmp18_ = _g_object_ref0 ((GtkWidget*) _tmp17_);
	_g_object_unref0 (self->priv->inline_quote_widget);
	self->priv->inline_quote_widget = _tmp18_;
	_tmp19_ = self->priv->editor;
	_tmp20_ = self->priv->inline_quote_widget;
	tuba_widgets_sandwich_source_view_add_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp19_, _tmp20_, TRUE);
	_tmp21_ = self->priv->inline_quote_widget;
	_tmp22_ = self->priv->inline_quote_widget;
	_tmp23_ = (AdwPropertyAnimationTarget*) adw_property_animation_target_new ((GObject*) _tmp22_, "opacity");
	_tmp24_ = (AdwTimedAnimation*) adw_timed_animation_new (_tmp21_, (gdouble) 0, (gdouble) 1, (guint) 500, (AdwAnimationTarget*) _tmp23_);
	_g_object_unref0 (self->priv->inline_quote_widget_animation);
	self->priv->inline_quote_widget_animation = _tmp24_;
	_tmp25_ = self->priv->inline_quote_widget_animation;
	g_signal_connect_object ((AdwAnimation*) _tmp25_, "done", (GCallback) _tuba_dialogs_composer_dialog_on_inline_quote_widget_animation_done_adw_animation_done, self, 0);
	_tmp26_ = self->priv->inline_quote_widget_animation;
	adw_animation_play ((AdwAnimation*) _tmp26_);
	_g_object_unref0 (remove_quote_button);
	_g_object_unref0 (status_widget);
}

static void
tuba_dialogs_composer_dialog_on_inline_quote_widget_animation_done (TubaDialogsComposerDialog* self,
                                                                    AdwAnimation* animation)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (animation != NULL);
	_tmp0_ = adw_animation_get_value (animation);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == ((gdouble) 0)) {
		tuba_dialogs_composer_dialog_remove_quote_inline_widget_real (self);
	}
}

static void
tuba_dialogs_composer_dialog_remove_quote_inline_widget (TubaDialogsComposerDialog* self)
{
	AdwTimedAnimation* _tmp0_;
	AdwTimedAnimation* _tmp1_;
	AdwTimedAnimation* _tmp2_;
	AdwTimedAnimation* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->inline_quote_widget_animation;
	if (_tmp0_ == NULL) {
		tuba_dialogs_composer_dialog_remove_quote_inline_widget_real (self);
		return;
	}
	_tmp1_ = self->priv->inline_quote_widget_animation;
	adw_timed_animation_set_duration (_tmp1_, (guint) 250);
	_tmp2_ = self->priv->inline_quote_widget_animation;
	adw_timed_animation_set_reverse (_tmp2_, TRUE);
	_tmp3_ = self->priv->inline_quote_widget_animation;
	adw_animation_play ((AdwAnimation*) _tmp3_);
}

static void
tuba_dialogs_composer_dialog_remove_quote_inline_widget_real (TubaDialogsComposerDialog* self)
{
	GtkWidget* _tmp0_;
	TubaDialogsComposerComponentsEditor* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->inline_quote_widget;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->editor;
	_tmp2_ = self->priv->inline_quote_widget;
	tuba_widgets_sandwich_source_view_remove_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp1_, _tmp2_);
	tuba_dialogs_composer_dialog_set_quote_id (self, NULL);
	tuba_dialogs_composer_dialog_update_quote_id_state (self);
	_g_object_unref0 (self->priv->inline_quote_widget);
	self->priv->inline_quote_widget = NULL;
	_g_object_unref0 (self->priv->inline_quote_widget_animation);
	self->priv->inline_quote_widget_animation = NULL;
}

static Block40Data*
block40_data_ref (Block40Data* _data40_)
{
	g_atomic_int_inc (&_data40_->_ref_count_);
	return _data40_;
}

static void
block40_data_unref (void * _userdata_)
{
	Block40Data* _data40_;
	_data40_ = (Block40Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data40_->_ref_count_)) {
		TubaDialogsComposerDialog* self;
		self = _data40_->self;
		_g_object_unref0 (_data40_->clipboard);
		_g_object_unref0 (self);
		g_slice_free (Block40Data, _data40_);
	}
}

static gpointer
_gdk_content_formats_ref0 (gpointer self)
{
	return self ? gdk_content_formats_ref (self) : NULL;
}

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

static void
__lambda78_ (Block40Data* _data40_,
             GObject* obj,
             GAsyncResult* res)
{
	TubaDialogsComposerDialog* self;
	TubaApplication* _tmp0_;
	self = _data40_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = tuba_app;
	if (tuba_application_question_answer_truthy (tuba_application_question_finish (_tmp0_, res))) {
		GdkClipboard* _tmp1_;
		TubaDialogsComposerComponentsEditor* _tmp2_;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp3_;
		tuba_dialogs_composer_dialog_create_attachmentsbin (self, NULL);
		_tmp1_ = _data40_->clipboard;
		tuba_dialogs_composer_dialog_on_clipboard_paste_async (self, _tmp1_, NULL, NULL);
		_tmp2_ = self->priv->editor;
		_tmp3_ = self->priv->attachmentsbin_component;
		tuba_widgets_sandwich_source_view_add_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp2_, (GtkWidget*) _tmp3_, FALSE);
	}
}

static void
___lambda78__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda78_ (self, source_object, res);
	block40_data_unref (self);
}

static void
tuba_dialogs_composer_dialog_on_paste (TubaDialogsComposerDialog* self)
{
	Block40Data* _data40_;
	GdkDisplay* _tmp0_;
	GdkClipboard* _tmp1_;
	GdkClipboard* _tmp2_;
	GdkContentFormats* formats = NULL;
	GdkClipboard* _tmp3_;
	GdkContentFormats* _tmp4_;
	GdkContentFormats* _tmp5_;
	gboolean has_files = FALSE;
	GdkContentFormats* _tmp6_;
	TubaDialogsComposerComponentsEditor* _tmp17_;
	GtkButton* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	TubaApplication* _tmp21_;
	TubaApplicationQuestionText _tmp22_ = {0};
	TubaApplicationQuestionText _tmp23_ = {0};
	TubaApplicationQuestionButtons _tmp24_ = {0};
	g_return_if_fail (self != NULL);
	_data40_ = g_slice_new0 (Block40Data);
	_data40_->_ref_count_ = 1;
	_data40_->self = g_object_ref (self);
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = gdk_display_get_clipboard (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data40_->clipboard = _tmp2_;
	_tmp3_ = _data40_->clipboard;
	_tmp4_ = gdk_clipboard_get_formats (_tmp3_);
	_tmp5_ = _gdk_content_formats_ref0 (_tmp4_);
	formats = _tmp5_;
	_tmp6_ = formats;
	has_files = gdk_content_formats_contain_mime_type (_tmp6_, "text/uri-list");
	if (!has_files) {
		gchar** mime_types = NULL;
		GdkContentFormats* _tmp7_;
		gsize _tmp8_ = 0;
		gchar** _tmp9_;
		gchar** _tmp10_;
		gint _tmp10__length1;
		gint mime_types_length1;
		gint _mime_types_size_;
		gchar** _tmp11_;
		gint _tmp11__length1;
		gchar** _tmp13_;
		gint _tmp13__length1;
		_tmp7_ = formats;
		_tmp9_ = gdk_content_formats_get_mime_types (_tmp7_, &_tmp8_);
		_tmp10_ = (_tmp9_ != NULL) ? _vala_array_dup20 (_tmp9_, _tmp8_) : _tmp9_;
		_tmp10__length1 = _tmp8_;
		mime_types = _tmp10_;
		mime_types_length1 = _tmp10__length1;
		_mime_types_size_ = mime_types_length1;
		_tmp11_ = mime_types;
		_tmp11__length1 = mime_types_length1;
		if (_tmp11_ == NULL) {
			GdkClipboard* _tmp12_;
			_tmp12_ = _data40_->clipboard;
			tuba_dialogs_composer_dialog_handle_potential_quote_paste (self, _tmp12_);
			mime_types = (_vala_array_free (mime_types, mime_types_length1, (GDestroyNotify) g_free), NULL);
			_gdk_content_formats_unref0 (formats);
			block40_data_unref (_data40_);
			_data40_ = NULL;
			return;
		}
		_tmp13_ = mime_types;
		_tmp13__length1 = mime_types_length1;
		{
			gchar** mime_type_collection = NULL;
			gint mime_type_collection_length1 = 0;
			gint _mime_type_collection_size_ = 0;
			gint mime_type_it = 0;
			mime_type_collection = _tmp13_;
			mime_type_collection_length1 = _tmp13__length1;
			for (mime_type_it = 0; mime_type_it < mime_type_collection_length1; mime_type_it = mime_type_it + 1) {
				gchar* _tmp14_;
				gchar* mime_type = NULL;
				_tmp14_ = g_strdup (mime_type_collection[mime_type_it]);
				mime_type = _tmp14_;
				{
					const gchar* _tmp15_;
					_tmp15_ = mime_type;
					if (g_str_has_prefix (_tmp15_, "image/")) {
						has_files = TRUE;
						_g_free0 (mime_type);
						break;
					}
					_g_free0 (mime_type);
				}
			}
		}
		mime_types = (_vala_array_free (mime_types, mime_types_length1, (GDestroyNotify) g_free), NULL);
	}
	if (!has_files) {
		GdkClipboard* _tmp16_;
		_tmp16_ = _data40_->clipboard;
		tuba_dialogs_composer_dialog_handle_potential_quote_paste (self, _tmp16_);
		_gdk_content_formats_unref0 (formats);
		block40_data_unref (_data40_);
		_data40_ = NULL;
		return;
	}
	_tmp17_ = self->priv->editor;
	g_signal_stop_emission_by_name (_tmp17_, "paste-clipboard");
	_tmp18_ = self->priv->add_media_button;
	_tmp19_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp18_);
	_tmp20_ = _tmp19_;
	if (!_tmp20_) {
		_gdk_content_formats_unref0 (formats);
		block40_data_unref (_data40_);
		_data40_ = NULL;
		return;
	}
	_tmp21_ = tuba_app;
	_g_free0 (_tmp22_.text);
	_tmp22_.text = _ ("Paste Media from Clipboard?");
	_tmp22_.use_markup = FALSE;
	_g_free0 (_tmp23_.text);
	_tmp23_.text = _ ("They will be uploaded to your instance");
	_tmp23_.use_markup = FALSE;
	tuba_application_question_button_destroy (&_tmp24_.yes);
	_tmp24_.yes = (TubaApplicationQuestionButton) {_ ("Paste"), ADW_RESPONSE_SUGGESTED};
	tuba_application_question_button_destroy (&_tmp24_.no);
	_tmp24_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
	tuba_application_question (_tmp21_, &_tmp22_, &_tmp23_, (GtkWidget*) self, &_tmp24_, NULL, FALSE, ___lambda78__gasync_ready_callback, block40_data_ref (_data40_));
	_gdk_content_formats_unref0 (formats);
	block40_data_unref (_data40_);
	_data40_ = NULL;
}

static void
_tuba_dialogs_composer_dialog_on_schedule_picked_tuba_dialogs_schedule_schedule_picked (TubaDialogsSchedule* _sender,
                                                                                        const gchar* iso8601,
                                                                                        gpointer self)
{
	tuba_dialogs_composer_dialog_on_schedule_picked ((TubaDialogsComposerDialog*) self, iso8601);
}

static void
tuba_dialogs_composer_dialog_on_schedule_action_activated (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerDialogPostButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	TubaDialogsSchedule* schedule_dlg = NULL;
	const gchar* _tmp3_;
	TubaDialogsSchedule* _tmp4_;
	TubaDialogsSchedule* _tmp5_;
	TubaDialogsSchedule* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->post_btn;
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = self->priv->_schedule_iso8601;
	_tmp4_ = tuba_dialogs_schedule_new (_tmp3_, NULL);
	g_object_ref_sink (_tmp4_);
	schedule_dlg = _tmp4_;
	_tmp5_ = schedule_dlg;
	g_signal_connect_object (_tmp5_, "schedule-picked", (GCallback) _tuba_dialogs_composer_dialog_on_schedule_picked_tuba_dialogs_schedule_schedule_picked, self, 0);
	_tmp6_ = schedule_dlg;
	tuba_dialogs_composer_dialog_on_push_subpage (self, (AdwNavigationPage*) _tmp6_);
	_g_object_unref0 (schedule_dlg);
}

static void
tuba_dialogs_composer_dialog_on_draft_action_activated (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerDialogPostButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GTimeZone* _tmp3_;
	GTimeZone* _tmp4_;
	GDateTime* _tmp5_;
	GDateTime* _tmp6_;
	GDateTime* _tmp7_;
	GDateTime* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->post_btn;
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = g_time_zone_new_local ();
	_tmp4_ = _tmp3_;
	_tmp5_ = g_date_time_new_now (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_date_time_add_years (_tmp6_, 3000);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_date_time_format_iso8601 (_tmp8_);
	_tmp10_ = _tmp9_;
	tuba_dialogs_composer_dialog_set_schedule_iso8601 (self, _tmp10_);
	_g_free0 (_tmp10_);
	_g_date_time_unref0 (_tmp8_);
	_g_date_time_unref0 (_tmp6_);
	_g_time_zone_unref0 (_tmp4_);
	tuba_dialogs_composer_dialog_on_commit (self);
}

static void
_tuba_dialogs_composer_dialog_on_draft_selected_tuba_dialogs_drafts_draft_selected (TubaDialogsDrafts* _sender,
                                                                                    TubaWidgetsScheduledStatus* draft_status_widget,
                                                                                    gpointer self)
{
	tuba_dialogs_composer_dialog_on_draft_selected ((TubaDialogsComposerDialog*) self, draft_status_widget);
}

static void
tuba_dialogs_composer_dialog_on_drafted_posts_action_activated (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerDialogPostButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	TubaDialogsDrafts* drafts_dlg = NULL;
	TubaDialogsDrafts* _tmp3_;
	TubaDialogsDrafts* _tmp4_;
	TubaDialogsDrafts* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->post_btn;
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = tuba_dialogs_drafts_new ();
	g_object_ref_sink (_tmp3_);
	drafts_dlg = _tmp3_;
	_tmp4_ = drafts_dlg;
	g_signal_connect_object (_tmp4_, "draft-selected", (GCallback) _tuba_dialogs_composer_dialog_on_draft_selected_tuba_dialogs_drafts_draft_selected, self, 0);
	_tmp5_ = drafts_dlg;
	tuba_dialogs_composer_dialog_on_push_subpage (self, (AdwNavigationPage*) _tmp5_);
	_g_object_unref0 (drafts_dlg);
}

static Block41Data*
block41_data_ref (Block41Data* _data41_)
{
	g_atomic_int_inc (&_data41_->_ref_count_);
	return _data41_;
}

static void
block41_data_unref (void * _userdata_)
{
	Block41Data* _data41_;
	_data41_ = (Block41Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data41_->_ref_count_)) {
		TubaDialogsComposerDialog* self;
		self = _data41_->self;
		_g_object_unref0 (_data41_->draft_status_widget);
		_g_object_unref0 (self);
		g_slice_free (Block41Data, _data41_);
	}
}

static void
__lambda122_ (Block41Data* _data41_,
              GObject* obj,
              GAsyncResult* res)
{
	TubaDialogsComposerDialog* self;
	TubaApplication* _tmp0_;
	self = _data41_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = tuba_app;
	if (tuba_application_question_answer_truthy (tuba_application_question_finish (_tmp0_, res))) {
		adw_dialog_force_close ((AdwDialog*) self);
		tuba_widgets_scheduled_status_compose_draft (_data41_->draft_status_widget);
	}
}

static void
___lambda122__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda122_ (self, source_object, res);
	block41_data_unref (self);
}

static void
tuba_dialogs_composer_dialog_on_draft_selected (TubaDialogsComposerDialog* self,
                                                TubaWidgetsScheduledStatus* draft_status_widget)
{
	Block41Data* _data41_;
	TubaWidgetsScheduledStatus* _tmp0_;
	gboolean _tmp1_ = FALSE;
	TubaApplication* _tmp2_;
	TubaApplicationQuestionText _tmp3_ = {0};
	TubaApplicationQuestionText _tmp4_ = {0};
	TubaApplicationQuestionButtons _tmp5_ = {0};
	g_return_if_fail (self != NULL);
	g_return_if_fail (draft_status_widget != NULL);
	_data41_ = g_slice_new0 (Block41Data);
	_data41_->_ref_count_ = 1;
	_data41_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (draft_status_widget);
	_g_object_unref0 (_data41_->draft_status_widget);
	_data41_->draft_status_widget = _tmp0_;
	if (self->priv->unique_state == TUBA_DIALOGS_COMPOSER_DIALOG_DEFAULT_EMPTY_STATE) {
		_tmp1_ = !tuba_dialogs_composer_dialog_state_changed (self);
	} else {
		_tmp1_ = FALSE;
	}
	_tmp2_ = tuba_app;
	_g_free0 (_tmp3_.text);
	_tmp3_.text = _ ("Replace Current Post?");
	_tmp3_.use_markup = FALSE;
	_g_free0 (_tmp4_.text);
	_tmp4_.text = _ ("Your current post will be lost.");
	_tmp4_.use_markup = FALSE;
	tuba_application_question_button_destroy (&_tmp5_.yes);
	_tmp5_.yes = (TubaApplicationQuestionButton) {_ ("Replace"), ADW_RESPONSE_DESTRUCTIVE};
	tuba_application_question_button_destroy (&_tmp5_.no);
	_tmp5_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
	tuba_application_question (_tmp2_, &_tmp3_, &_tmp4_, (GtkWidget*) self, &_tmp5_, NULL, _tmp1_, ___lambda122__gasync_ready_callback, block41_data_ref (_data41_));
	block41_data_unref (_data41_);
	_data41_ = NULL;
}

static void
tuba_dialogs_composer_dialog_on_schedule_picked (TubaDialogsComposerDialog* self,
                                                 const gchar* iso8601)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (iso8601 != NULL);
	tuba_dialogs_composer_dialog_set_schedule_iso8601 (self, iso8601);
	tuba_dialogs_composer_dialog_on_commit (self);
}

static void
tuba_dialogs_composer_dialog_on_poll_component_animation_end (TubaDialogsComposerDialog* self,
                                                              AdwAnimation* animation)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (animation != NULL);
	_tmp0_ = adw_animation_get_value (animation);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == ((gdouble) 0)) {
		TubaDialogsComposerComponentsEditor* _tmp2_;
		TubaDialogsComposerComponentsPolls* _tmp3_;
		_tmp2_ = self->priv->editor;
		_tmp3_ = self->priv->polls_component;
		tuba_widgets_sandwich_source_view_remove_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp2_, (GtkWidget*) _tmp3_);
	} else {
		gboolean _tmp4_ = FALSE;
		TubaDialogsComposerComponentsPolls* _tmp5_;
		_tmp5_ = self->priv->polls_component;
		if (_tmp5_ != NULL) {
			TubaDialogsComposerComponentsEditor* _tmp6_;
			TubaDialogsComposerComponentsPolls* _tmp7_;
			_tmp6_ = self->priv->editor;
			_tmp7_ = self->priv->polls_component;
			_tmp4_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp6_, (GtkWidget*) _tmp7_);
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			TubaDialogsComposerComponentsPolls* _tmp8_;
			_tmp8_ = self->priv->polls_component;
			tuba_dialogs_composer_components_polls_grab_first_row_focus (_tmp8_);
		}
	}
	tuba_dialogs_composer_dialog_validate_post_button (self);
}

static void
tuba_dialogs_composer_dialog_on_toast (TubaDialogsComposerDialog* self,
                                       AdwToast* toast)
{
	AdwToastOverlay* _tmp0_;
	AdwToast* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (toast != NULL);
	_tmp0_ = self->priv->toast_overlay;
	_tmp1_ = _g_object_ref0 (toast);
	adw_toast_overlay_add_toast (_tmp0_, _tmp1_);
}

static void
tuba_dialogs_composer_dialog_on_push_subpage (TubaDialogsComposerDialog* self,
                                              AdwNavigationPage* page)
{
	AdwNavigationView* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (page != NULL);
	{
		TubaDialogsComposerPreferredSizeable* sizeable = NULL;
		TubaDialogsComposerPreferredSizeable* _tmp0_;
		TubaDialogsComposerPreferredSizeable* _tmp1_;
		_tmp0_ = _g_object_ref0 (TUBA_DIALOGS_COMPOSER_IS_PREFERRED_SIZEABLE (page) ? ((TubaDialogsComposerPreferredSizeable*) page) : NULL);
		sizeable = _tmp0_;
		_tmp1_ = sizeable;
		if (_tmp1_ != NULL) {
			TubaDialogsComposerPreferredSizeable* _tmp2_;
			AdwToolbarView* _tmp3_;
			TubaDialogsComposerPreferredSizeable* _tmp4_;
			AdwToolbarView* _tmp5_;
			_tmp2_ = sizeable;
			_tmp3_ = self->priv->toolbar_view;
			tuba_dialogs_composer_preferred_sizeable_set_preferred_height (_tmp2_, gtk_widget_get_height ((GtkWidget*) _tmp3_));
			_tmp4_ = sizeable;
			_tmp5_ = self->priv->toolbar_view;
			tuba_dialogs_composer_preferred_sizeable_set_preferred_width (_tmp4_, gtk_widget_get_width ((GtkWidget*) _tmp5_));
		}
		_g_object_unref0 (sizeable);
	}
	_tmp6_ = self->priv->nav_view;
	adw_navigation_view_push (_tmp6_, page);
}

static void
tuba_dialogs_composer_dialog_on_pop_subpage (TubaDialogsComposerDialog* self)
{
	AdwNavigationView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->nav_view;
	adw_navigation_view_pop (_tmp0_);
}

static void
tuba_dialogs_composer_dialog_validate_post_button (TubaDialogsComposerDialog* self)
{
	gboolean sensitive = FALSE;
	gint64 _tmp0_;
	gint64 _tmp1_;
	TubaDialogsComposerDialogPostButton* _tmp29_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_dialogs_composer_dialog_get_remaining_chars (self);
	_tmp1_ = _tmp0_;
	sensitive = _tmp1_ >= ((gint64) 0);
	if (sensitive) {
		gboolean _tmp2_ = FALSE;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp3_;
		gboolean _tmp13_ = FALSE;
		TubaDialogsComposerComponentsPolls* _tmp14_;
		_tmp3_ = self->priv->attachmentsbin_component;
		if (_tmp3_ != NULL) {
			TubaDialogsComposerComponentsEditor* _tmp4_;
			TubaDialogsComposerComponentsAttachmentsBin* _tmp5_;
			_tmp4_ = self->priv->editor;
			_tmp5_ = self->priv->attachmentsbin_component;
			_tmp2_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp4_, (GtkWidget*) _tmp5_);
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			gboolean _tmp6_ = FALSE;
			TubaDialogsComposerComponentsAttachmentsBin* _tmp7_;
			gboolean _tmp8_;
			gboolean _tmp9_;
			_tmp7_ = self->priv->attachmentsbin_component;
			_tmp8_ = tuba_dialogs_composer_components_attachments_bin_get_is_empty (_tmp7_);
			_tmp9_ = _tmp8_;
			if (!_tmp9_) {
				TubaDialogsComposerComponentsAttachmentsBin* _tmp10_;
				gboolean _tmp11_;
				gboolean _tmp12_;
				_tmp10_ = self->priv->attachmentsbin_component;
				_tmp11_ = tuba_dialogs_composer_components_attachments_bin_get_working (_tmp10_);
				_tmp12_ = _tmp11_;
				_tmp6_ = !_tmp12_;
			} else {
				_tmp6_ = FALSE;
			}
			sensitive = _tmp6_;
		}
		_tmp14_ = self->priv->polls_component;
		if (_tmp14_ != NULL) {
			TubaDialogsComposerComponentsEditor* _tmp15_;
			TubaDialogsComposerComponentsPolls* _tmp16_;
			_tmp15_ = self->priv->editor;
			_tmp16_ = self->priv->polls_component;
			_tmp13_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp15_, (GtkWidget*) _tmp16_);
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			gboolean _tmp17_ = FALSE;
			gboolean _tmp18_ = FALSE;
			if (sensitive) {
				TubaDialogsComposerComponentsPolls* _tmp19_;
				gboolean _tmp20_;
				gboolean _tmp21_;
				_tmp19_ = self->priv->polls_component;
				_tmp20_ = tuba_dialogs_composer_components_polls_get_is_valid (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp18_ = _tmp21_;
			} else {
				_tmp18_ = FALSE;
			}
			if (_tmp18_) {
				gint64 _tmp22_;
				gint64 _tmp23_;
				gint64 _tmp24_;
				_tmp22_ = tuba_dialogs_composer_dialog_get_remaining_chars (self);
				_tmp23_ = _tmp22_;
				_tmp24_ = self->priv->_char_limit;
				_tmp17_ = _tmp23_ < _tmp24_;
			} else {
				_tmp17_ = FALSE;
			}
			sensitive = _tmp17_;
		} else {
			gboolean _tmp25_ = FALSE;
			if (sensitive) {
				gint64 _tmp26_;
				gint64 _tmp27_;
				gint64 _tmp28_;
				_tmp26_ = tuba_dialogs_composer_dialog_get_remaining_chars (self);
				_tmp27_ = _tmp26_;
				_tmp28_ = self->priv->_char_limit;
				_tmp25_ = _tmp27_ < _tmp28_;
			} else {
				_tmp25_ = FALSE;
			}
			sensitive = _tmp25_;
		}
	}
	_tmp29_ = self->priv->post_btn;
	tuba_dialogs_composer_dialog_post_button_set_sensitive_real (_tmp29_, sensitive);
}

static void
tuba_dialogs_composer_dialog_update_attachmentsbin_sensitivity (TubaDialogsComposerDialog* self)
{
	TubaDialogsComposerComponentsAttachmentsBin* _tmp0_;
	gboolean has_class = FALSE;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GtkToggleButton* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->attachmentsbin_component;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->attachmentsbin_component;
	has_class = gtk_widget_has_css_class ((GtkWidget*) _tmp1_, "spoilered-attachmentsbin");
	_tmp3_ = self->priv->sensitive_media_button;
	_tmp4_ = gtk_toggle_button_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		_tmp2_ = !has_class;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		TubaDialogsComposerComponentsAttachmentsBin* _tmp6_;
		_tmp6_ = self->priv->attachmentsbin_component;
		gtk_widget_add_css_class ((GtkWidget*) _tmp6_, "spoilered-attachmentsbin");
	} else {
		gboolean _tmp7_ = FALSE;
		GtkToggleButton* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		_tmp8_ = self->priv->sensitive_media_button;
		_tmp9_ = gtk_toggle_button_get_active (_tmp8_);
		_tmp10_ = _tmp9_;
		if (!_tmp10_) {
			_tmp7_ = has_class;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			TubaDialogsComposerComponentsAttachmentsBin* _tmp11_;
			_tmp11_ = self->priv->attachmentsbin_component;
			gtk_widget_remove_css_class ((GtkWidget*) _tmp11_, "spoilered-attachmentsbin");
		}
	}
}

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

static JsonBuilder*
tuba_dialogs_composer_dialog_populate_json_body (TubaDialogsComposerDialog* self)
{
	gboolean _tmp0_ = FALSE;
	GtkToggleButton* _tmp1_;
	gboolean is_local = FALSE;
	gboolean is_pleroma = FALSE;
	TubaAccountStore* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaAPIInstance* _tmp8_;
	TubaAPIInstance* _tmp9_;
	TubaAPIPleromaInstance* _tmp10_;
	TubaAPIPleromaInstance* _tmp11_;
	gboolean is_glitch = FALSE;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaInstanceAccountInstanceFeatures _tmp15_;
	TubaInstanceAccountInstanceFeatures _tmp16_;
	gboolean is_shrimp = FALSE;
	TubaAccountStore* _tmp17_;
	TubaInstanceAccount* _tmp18_;
	TubaInstanceAccount* _tmp19_;
	TubaInstanceAccountInstanceFeatures _tmp20_;
	TubaInstanceAccountInstanceFeatures _tmp21_;
	gboolean supports_eye = FALSE;
	TubaAccountStore* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	TubaInstanceAccount* _tmp24_;
	TubaAPIInstanceV2APIVersions* _tmp25_;
	TubaAPIInstanceV2APIVersions* _tmp26_;
	gint8 _tmp27_;
	gint8 _tmp28_;
	JsonBuilder* builder = NULL;
	JsonBuilder* _tmp29_;
	JsonBuilder* _tmp30_;
	JsonBuilder* _tmp31_;
	gchar* _tmp32_ = NULL;
	gboolean _tmp33_ = FALSE;
	gboolean _tmp34_ = FALSE;
	gboolean _tmp35_ = FALSE;
	JsonBuilder* _tmp56_;
	gboolean _tmp57_ = FALSE;
	gboolean _tmp58_ = FALSE;
	gchar* vis = NULL;
	gboolean _tmp63_ = FALSE;
	gboolean _tmp64_ = FALSE;
	JsonBuilder* _tmp79_;
	JsonBuilder* _tmp80_;
	TubaDialogsComposerComponentsEditor* _tmp81_;
	const gchar* _tmp82_;
	const gchar* _tmp83_;
	gboolean _tmp84_ = FALSE;
	GtkDropDown* _tmp85_;
	gboolean _tmp96_ = FALSE;
	gboolean _tmp97_ = FALSE;
	GtkDropDown* _tmp98_;
	gboolean _tmp114_ = FALSE;
	const gchar* _tmp115_;
	JsonBuilder* _tmp120_;
	gboolean _tmp121_ = FALSE;
	GtkToggleButton* _tmp122_;
	gboolean _tmp123_;
	gboolean _tmp124_;
	JsonBuilder* _tmp132_;
	JsonBuilder* _tmp133_;
	const gchar* _tmp134_ = NULL;
	GtkToggleButton* _tmp135_;
	gboolean _tmp136_;
	gboolean _tmp137_;
	JsonBuilder* _tmp141_;
	gboolean _tmp142_ = FALSE;
	gboolean _tmp143_ = FALSE;
	gboolean _tmp144_ = FALSE;
	TubaDialogsComposerComponentsPolls* _tmp145_;
	gboolean _tmp181_ = FALSE;
	gboolean _tmp182_ = FALSE;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp183_;
	const gchar* _tmp221_;
	const gchar* _tmp233_;
	JsonBuilder* _tmp237_;
	JsonBuilder* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->local_only_button;
	if (_tmp1_ != NULL) {
		GtkToggleButton* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->local_only_button;
		_tmp3_ = gtk_toggle_button_get_active (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	is_local = _tmp0_;
	_tmp5_ = tuba_accounts;
	_tmp6_ = tuba_account_store_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = tuba_instance_account_get_instance_info (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = tuba_api_instance_get_pleroma (_tmp9_);
	_tmp11_ = _tmp10_;
	is_pleroma = _tmp11_ != NULL;
	_tmp12_ = tuba_accounts;
	_tmp13_ = tuba_account_store_get_active (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = tuba_instance_account_get_tuba_instance_features (_tmp14_);
	_tmp16_ = _tmp15_;
	is_glitch = (_tmp16_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH;
	_tmp17_ = tuba_accounts;
	_tmp18_ = tuba_account_store_get_active (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = tuba_instance_account_get_tuba_instance_features (_tmp19_);
	_tmp21_ = _tmp20_;
	is_shrimp = (_tmp21_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP;
	_tmp22_ = tuba_accounts;
	_tmp23_ = tuba_account_store_get_active (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = tuba_instance_account_get_tuba_api_versions (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp26_);
	_tmp28_ = _tmp27_;
	supports_eye = ((gint) _tmp28_) < 11;
	_tmp29_ = json_builder_new ();
	builder = _tmp29_;
	_tmp30_ = builder;
	json_builder_begin_object (_tmp30_);
	_tmp31_ = builder;
	json_builder_set_member_name (_tmp31_, "status");
	if (is_local) {
		_tmp35_ = supports_eye;
	} else {
		_tmp35_ = FALSE;
	}
	if (_tmp35_) {
		_tmp34_ = is_glitch;
	} else {
		_tmp34_ = FALSE;
	}
	if (_tmp34_) {
		TubaDialogsComposerComponentsEditor* _tmp36_;
		GtkTextBuffer* _tmp37_;
		GtkTextBuffer* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
		gchar* _tmp41_;
		_tmp36_ = self->priv->editor;
		_tmp37_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp36_);
		_tmp38_ = _tmp37_;
		g_object_get (_tmp38_, "text", &_tmp39_, NULL);
		_tmp40_ = _tmp39_;
		_tmp41_ = _tmp40_;
		_tmp33_ = !g_str_has_suffix (_tmp41_, TUBA_DIALOGS_COMPOSER_DIALOG_LOCAL_ONLY_GLITCH_SUFFIX);
		_g_free0 (_tmp41_);
	} else {
		_tmp33_ = FALSE;
	}
	if (_tmp33_) {
		TubaDialogsComposerComponentsEditor* _tmp42_;
		GtkTextBuffer* _tmp43_;
		GtkTextBuffer* _tmp44_;
		gchar* _tmp45_;
		gchar* _tmp46_;
		gchar* _tmp47_;
		const gchar* _tmp48_;
		const gchar* _tmp49_;
		gchar* _tmp50_;
		_tmp42_ = self->priv->editor;
		_tmp43_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp42_);
		_tmp44_ = _tmp43_;
		g_object_get (_tmp44_, "text", &_tmp45_, NULL);
		_tmp46_ = _tmp45_;
		_tmp47_ = _tmp46_;
		_tmp48_ = string_to_string (_tmp47_);
		_tmp49_ = string_to_string (TUBA_DIALOGS_COMPOSER_DIALOG_LOCAL_ONLY_GLITCH_SUFFIX);
		_tmp50_ = g_strconcat (_tmp48_, _tmp49_, NULL);
		_g_free0 (_tmp32_);
		_tmp32_ = _tmp50_;
		_g_free0 (_tmp47_);
	} else {
		TubaDialogsComposerComponentsEditor* _tmp51_;
		GtkTextBuffer* _tmp52_;
		GtkTextBuffer* _tmp53_;
		gchar* _tmp54_;
		gchar* _tmp55_;
		_tmp51_ = self->priv->editor;
		_tmp52_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp51_);
		_tmp53_ = _tmp52_;
		g_object_get (_tmp53_, "text", &_tmp54_, NULL);
		_tmp55_ = _tmp54_;
		_g_free0 (_tmp32_);
		_tmp32_ = _tmp55_;
	}
	_tmp56_ = builder;
	json_builder_add_string_value (_tmp56_, _tmp32_);
	if (is_local) {
		gboolean _tmp59_ = FALSE;
		if (!is_glitch) {
			_tmp59_ = TRUE;
		} else {
			_tmp59_ = !supports_eye;
		}
		_tmp58_ = _tmp59_;
	} else {
		_tmp58_ = FALSE;
	}
	if (_tmp58_) {
		gboolean _tmp60_ = FALSE;
		if (!is_pleroma) {
			_tmp60_ = TRUE;
		} else {
			_tmp60_ = is_shrimp;
		}
		_tmp57_ = _tmp60_;
	} else {
		_tmp57_ = FALSE;
	}
	if (_tmp57_) {
		JsonBuilder* _tmp61_;
		JsonBuilder* _tmp62_;
		_tmp61_ = builder;
		json_builder_set_member_name (_tmp61_, "local_only");
		_tmp62_ = builder;
		json_builder_add_boolean_value (_tmp62_, TRUE);
	}
	vis = NULL;
	if (is_local) {
		_tmp64_ = is_pleroma;
	} else {
		_tmp64_ = FALSE;
	}
	if (_tmp64_) {
		_tmp63_ = !is_shrimp;
	} else {
		_tmp63_ = FALSE;
	}
	if (_tmp63_) {
		JsonBuilder* _tmp65_;
		JsonBuilder* _tmp66_;
		_tmp65_ = builder;
		json_builder_set_member_name (_tmp65_, "visibility");
		_tmp66_ = builder;
		json_builder_add_string_value (_tmp66_, "local");
	} else {
		GtkDropDown* _tmp67_;
		guint _tmp68_;
		guint _tmp69_;
		_tmp67_ = self->visibility_button;
		_tmp68_ = gtk_drop_down_get_selected (_tmp67_);
		_tmp69_ = _tmp68_;
		if (_tmp69_ != GTK_INVALID_LIST_POSITION) {
			JsonBuilder* _tmp70_;
			GtkDropDown* _tmp71_;
			GObject* _tmp72_;
			GObject* _tmp73_;
			const gchar* _tmp74_;
			const gchar* _tmp75_;
			gchar* _tmp76_;
			JsonBuilder* _tmp77_;
			const gchar* _tmp78_;
			_tmp70_ = builder;
			json_builder_set_member_name (_tmp70_, "visibility");
			_tmp71_ = self->visibility_button;
			_tmp72_ = gtk_drop_down_get_selected_item (_tmp71_);
			_tmp73_ = _tmp72_;
			_tmp74_ = tuba_instance_account_visibility_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibility));
			_tmp75_ = _tmp74_;
			_tmp76_ = g_strdup (_tmp75_);
			_g_free0 (vis);
			vis = _tmp76_;
			_tmp77_ = builder;
			_tmp78_ = vis;
			json_builder_add_string_value (_tmp77_, _tmp78_);
		}
	}
	_tmp79_ = builder;
	json_builder_set_member_name (_tmp79_, "language");
	_tmp80_ = builder;
	_tmp81_ = self->priv->editor;
	_tmp82_ = tuba_dialogs_composer_components_editor_get_locale (_tmp81_);
	_tmp83_ = _tmp82_;
	json_builder_add_string_value (_tmp80_, _tmp83_);
	_tmp85_ = self->content_type_button;
	if (_tmp85_ != NULL) {
		GtkDropDown* _tmp86_;
		guint _tmp87_;
		guint _tmp88_;
		_tmp86_ = self->content_type_button;
		_tmp87_ = gtk_drop_down_get_selected (_tmp86_);
		_tmp88_ = _tmp87_;
		_tmp84_ = _tmp88_ != GTK_INVALID_LIST_POSITION;
	} else {
		_tmp84_ = FALSE;
	}
	if (_tmp84_) {
		JsonBuilder* _tmp89_;
		JsonBuilder* _tmp90_;
		GtkDropDown* _tmp91_;
		GObject* _tmp92_;
		GObject* _tmp93_;
		const gchar* _tmp94_;
		const gchar* _tmp95_;
		_tmp89_ = builder;
		json_builder_set_member_name (_tmp89_, "content_type");
		_tmp90_ = builder;
		_tmp91_ = self->content_type_button;
		_tmp92_ = gtk_drop_down_get_selected_item (_tmp91_);
		_tmp93_ = _tmp92_;
		_tmp94_ = tuba_instance_account_status_content_type_get_mime (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, TUBA_INSTANCE_ACCOUNT_TYPE_STATUS_CONTENT_TYPE, TubaInstanceAccountStatusContentType));
		_tmp95_ = _tmp94_;
		json_builder_add_string_value (_tmp90_, _tmp95_);
	}
	_tmp98_ = self->quote_policy_button;
	if (_tmp98_ != NULL) {
		GtkDropDown* _tmp99_;
		guint _tmp100_;
		guint _tmp101_;
		_tmp99_ = self->quote_policy_button;
		_tmp100_ = gtk_drop_down_get_selected (_tmp99_);
		_tmp101_ = _tmp100_;
		_tmp97_ = _tmp101_ != GTK_INVALID_LIST_POSITION;
	} else {
		_tmp97_ = FALSE;
	}
	if (_tmp97_) {
		gboolean _tmp102_ = FALSE;
		const gchar* _tmp103_;
		_tmp103_ = vis;
		if (g_strcmp0 (_tmp103_, "public") == 0) {
			_tmp102_ = TRUE;
		} else {
			const gchar* _tmp104_;
			_tmp104_ = vis;
			_tmp102_ = g_strcmp0 (_tmp104_, "unlisted") == 0;
		}
		_tmp96_ = _tmp102_;
	} else {
		_tmp96_ = FALSE;
	}
	if (_tmp96_) {
		JsonBuilder* _tmp105_;
		JsonBuilder* _tmp106_;
		GtkDropDown* _tmp107_;
		GObject* _tmp108_;
		GObject* _tmp109_;
		TubaAPIStatusQuotePolicy _tmp110_;
		TubaAPIStatusQuotePolicy _tmp111_;
		gchar* _tmp112_;
		gchar* _tmp113_;
		_tmp105_ = builder;
		json_builder_set_member_name (_tmp105_, "quote_approval_policy");
		_tmp106_ = builder;
		_tmp107_ = self->quote_policy_button;
		_tmp108_ = gtk_drop_down_get_selected_item (_tmp107_);
		_tmp109_ = _tmp108_;
		_tmp110_ = tuba_dialogs_composer_dialog_quotation_policy_get_policy (G_TYPE_CHECK_INSTANCE_CAST (_tmp109_, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicy));
		_tmp111_ = _tmp110_;
		_tmp112_ = tuba_api_status_quote_policy_to_string (_tmp111_);
		_tmp113_ = _tmp112_;
		json_builder_add_string_value (_tmp106_, _tmp113_);
		_g_free0 (_tmp113_);
	}
	_tmp115_ = self->priv->_in_reply_to_id;
	if (_tmp115_ != NULL) {
		gboolean _tmp116_;
		_tmp116_ = self->priv->_edit_mode;
		_tmp114_ = !_tmp116_;
	} else {
		_tmp114_ = FALSE;
	}
	if (_tmp114_) {
		JsonBuilder* _tmp117_;
		JsonBuilder* _tmp118_;
		const gchar* _tmp119_;
		_tmp117_ = builder;
		json_builder_set_member_name (_tmp117_, "in_reply_to_id");
		_tmp118_ = builder;
		_tmp119_ = self->priv->_in_reply_to_id;
		json_builder_add_string_value (_tmp118_, _tmp119_);
	}
	_tmp120_ = builder;
	json_builder_set_member_name (_tmp120_, "sensitive");
	_tmp122_ = self->priv->cw_button;
	_tmp123_ = gtk_toggle_button_get_active (_tmp122_);
	_tmp124_ = _tmp123_;
	if (_tmp124_) {
		_tmp121_ = TRUE;
	} else {
		gboolean _tmp125_ = FALSE;
		GtkToggleButton* _tmp126_;
		gboolean _tmp127_;
		gboolean _tmp128_;
		_tmp126_ = self->priv->sensitive_media_button;
		_tmp127_ = gtk_widget_get_visible ((GtkWidget*) _tmp126_);
		_tmp128_ = _tmp127_;
		if (_tmp128_) {
			GtkToggleButton* _tmp129_;
			gboolean _tmp130_;
			gboolean _tmp131_;
			_tmp129_ = self->priv->sensitive_media_button;
			_tmp130_ = gtk_toggle_button_get_active (_tmp129_);
			_tmp131_ = _tmp130_;
			_tmp125_ = _tmp131_;
		} else {
			_tmp125_ = FALSE;
		}
		_tmp121_ = _tmp125_;
	}
	_tmp132_ = builder;
	json_builder_add_boolean_value (_tmp132_, _tmp121_);
	_tmp133_ = builder;
	json_builder_set_member_name (_tmp133_, "spoiler_text");
	_tmp135_ = self->priv->cw_button;
	_tmp136_ = gtk_toggle_button_get_active (_tmp135_);
	_tmp137_ = _tmp136_;
	if (_tmp137_) {
		GtkEntry* _tmp138_;
		const gchar* _tmp139_;
		const gchar* _tmp140_;
		_tmp138_ = self->priv->cw_entry;
		_tmp139_ = gtk_editable_get_text ((GtkEditable*) _tmp138_);
		_tmp140_ = _tmp139_;
		_tmp134_ = _tmp140_;
	} else {
		_tmp134_ = "";
	}
	_tmp141_ = builder;
	json_builder_add_string_value (_tmp141_, _tmp134_);
	_tmp145_ = self->priv->polls_component;
	if (_tmp145_ != NULL) {
		TubaDialogsComposerComponentsEditor* _tmp146_;
		TubaDialogsComposerComponentsPolls* _tmp147_;
		_tmp146_ = self->priv->editor;
		_tmp147_ = self->priv->polls_component;
		_tmp144_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp146_, (GtkWidget*) _tmp147_);
	} else {
		_tmp144_ = FALSE;
	}
	if (_tmp144_) {
		TubaDialogsComposerComponentsPolls* _tmp148_;
		gboolean _tmp149_;
		gboolean _tmp150_;
		_tmp148_ = self->priv->polls_component;
		_tmp149_ = tuba_dialogs_composer_components_polls_get_is_valid (_tmp148_);
		_tmp150_ = _tmp149_;
		_tmp143_ = _tmp150_;
	} else {
		_tmp143_ = FALSE;
	}
	if (_tmp143_) {
		TubaDialogsComposerComponentsPolls* _tmp151_;
		gboolean _tmp152_;
		gboolean _tmp153_;
		_tmp151_ = self->priv->polls_component;
		_tmp152_ = tuba_dialogs_composer_components_polls_get_has_rows (_tmp151_);
		_tmp153_ = _tmp152_;
		_tmp142_ = _tmp153_;
	} else {
		_tmp142_ = FALSE;
	}
	if (_tmp142_) {
		JsonBuilder* _tmp154_;
		JsonBuilder* _tmp155_;
		JsonBuilder* _tmp156_;
		JsonBuilder* _tmp157_;
		TubaDialogsComposerComponentsPolls* _tmp158_;
		gboolean _tmp159_;
		gboolean _tmp160_;
		JsonBuilder* _tmp161_;
		JsonBuilder* _tmp162_;
		TubaDialogsComposerComponentsPolls* _tmp163_;
		gboolean _tmp164_;
		gboolean _tmp165_;
		JsonBuilder* _tmp166_;
		JsonBuilder* _tmp167_;
		TubaDialogsComposerComponentsPolls* _tmp168_;
		gint64 _tmp169_;
		gint64 _tmp170_;
		JsonBuilder* _tmp171_;
		JsonBuilder* _tmp172_;
		TubaDialogsComposerComponentsPolls* _tmp173_;
		gint _tmp174_ = 0;
		gchar** _tmp175_;
		JsonBuilder* _tmp179_;
		JsonBuilder* _tmp180_;
		_tmp154_ = builder;
		json_builder_set_member_name (_tmp154_, "poll");
		_tmp155_ = builder;
		json_builder_begin_object (_tmp155_);
		_tmp156_ = builder;
		json_builder_set_member_name (_tmp156_, "multiple");
		_tmp157_ = builder;
		_tmp158_ = self->priv->polls_component;
		_tmp159_ = tuba_dialogs_composer_components_polls_get_multiple_choice (_tmp158_);
		_tmp160_ = _tmp159_;
		json_builder_add_boolean_value (_tmp157_, _tmp160_);
		_tmp161_ = builder;
		json_builder_set_member_name (_tmp161_, "hide_totals");
		_tmp162_ = builder;
		_tmp163_ = self->priv->polls_component;
		_tmp164_ = tuba_dialogs_composer_components_polls_get_hide_totals (_tmp163_);
		_tmp165_ = _tmp164_;
		json_builder_add_boolean_value (_tmp162_, _tmp165_);
		_tmp166_ = builder;
		json_builder_set_member_name (_tmp166_, "expires_in");
		_tmp167_ = builder;
		_tmp168_ = self->priv->polls_component;
		_tmp169_ = tuba_dialogs_composer_components_polls_get_expires_in (_tmp168_);
		_tmp170_ = _tmp169_;
		json_builder_add_int_value (_tmp167_, _tmp170_);
		_tmp171_ = builder;
		json_builder_set_member_name (_tmp171_, "options");
		_tmp172_ = builder;
		json_builder_begin_array (_tmp172_);
		_tmp173_ = self->priv->polls_component;
		_tmp175_ = tuba_dialogs_composer_components_polls_get_all_options (_tmp173_, &_tmp174_);
		{
			gchar** option_collection = NULL;
			gint option_collection_length1 = 0;
			gint _option_collection_size_ = 0;
			gint option_it = 0;
			option_collection = _tmp175_;
			option_collection_length1 = _tmp174_;
			for (option_it = 0; option_it < option_collection_length1; option_it = option_it + 1) {
				gchar* _tmp176_;
				gchar* option = NULL;
				_tmp176_ = g_strdup (option_collection[option_it]);
				option = _tmp176_;
				{
					JsonBuilder* _tmp177_;
					const gchar* _tmp178_;
					_tmp177_ = builder;
					_tmp178_ = option;
					json_builder_add_string_value (_tmp177_, _tmp178_);
					_g_free0 (option);
				}
			}
			option_collection = (_vala_array_free (option_collection, option_collection_length1, (GDestroyNotify) g_free), NULL);
		}
		_tmp179_ = builder;
		json_builder_end_array (_tmp179_);
		_tmp180_ = builder;
		json_builder_end_object (_tmp180_);
	}
	_tmp183_ = self->priv->attachmentsbin_component;
	if (_tmp183_ != NULL) {
		TubaDialogsComposerComponentsEditor* _tmp184_;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp185_;
		_tmp184_ = self->priv->editor;
		_tmp185_ = self->priv->attachmentsbin_component;
		_tmp182_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp184_, (GtkWidget*) _tmp185_);
	} else {
		_tmp182_ = FALSE;
	}
	if (_tmp182_) {
		TubaDialogsComposerComponentsAttachmentsBin* _tmp186_;
		gboolean _tmp187_;
		gboolean _tmp188_;
		_tmp186_ = self->priv->attachmentsbin_component;
		_tmp187_ = tuba_dialogs_composer_components_attachments_bin_get_is_empty (_tmp186_);
		_tmp188_ = _tmp187_;
		_tmp181_ = !_tmp188_;
	} else {
		_tmp181_ = FALSE;
	}
	if (_tmp181_) {
		JsonBuilder* _tmp189_;
		JsonBuilder* _tmp190_;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp191_;
		gint _tmp192_ = 0;
		gchar** _tmp193_;
		JsonBuilder* _tmp197_;
		gboolean _tmp198_;
		_tmp189_ = builder;
		json_builder_set_member_name (_tmp189_, "media_ids");
		_tmp190_ = builder;
		json_builder_begin_array (_tmp190_);
		_tmp191_ = self->priv->attachmentsbin_component;
		_tmp193_ = tuba_dialogs_composer_components_attachments_bin_get_all_media_ids (_tmp191_, &_tmp192_);
		{
			gchar** m_id_collection = NULL;
			gint m_id_collection_length1 = 0;
			gint _m_id_collection_size_ = 0;
			gint m_id_it = 0;
			m_id_collection = _tmp193_;
			m_id_collection_length1 = _tmp192_;
			for (m_id_it = 0; m_id_it < m_id_collection_length1; m_id_it = m_id_it + 1) {
				gchar* _tmp194_;
				gchar* m_id = NULL;
				_tmp194_ = g_strdup (m_id_collection[m_id_it]);
				m_id = _tmp194_;
				{
					JsonBuilder* _tmp195_;
					const gchar* _tmp196_;
					_tmp195_ = builder;
					_tmp196_ = m_id;
					json_builder_add_string_value (_tmp195_, _tmp196_);
					_g_free0 (m_id);
				}
			}
			m_id_collection = (_vala_array_free (m_id_collection, m_id_collection_length1, (GDestroyNotify) g_free), NULL);
		}
		_tmp197_ = builder;
		json_builder_end_array (_tmp197_);
		_tmp198_ = self->priv->_edit_mode;
		if (_tmp198_) {
			JsonBuilder* _tmp199_;
			JsonBuilder* _tmp200_;
			TubaDialogsComposerComponentsAttachmentsBin* _tmp201_;
			gint _tmp202_ = 0;
			TubaDialogsComposerComponentsAttachmentsBinMetadata* _tmp203_;
			JsonBuilder* _tmp220_;
			_tmp199_ = builder;
			json_builder_set_member_name (_tmp199_, "media_attributes");
			_tmp200_ = builder;
			json_builder_begin_array (_tmp200_);
			_tmp201_ = self->priv->attachmentsbin_component;
			_tmp203_ = tuba_dialogs_composer_components_attachments_bin_get_all_metadata (_tmp201_, &_tmp202_);
			{
				TubaDialogsComposerComponentsAttachmentsBinMetadata* meta_collection = NULL;
				gint meta_collection_length1 = 0;
				gint _meta_collection_size_ = 0;
				gint meta_it = 0;
				meta_collection = _tmp203_;
				meta_collection_length1 = _tmp202_;
				for (meta_it = 0; meta_it < meta_collection_length1; meta_it = meta_it + 1) {
					TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp204_;
					TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp205_ = {0};
					TubaDialogsComposerComponentsAttachmentsBinMetadata meta = {0};
					_tmp204_ = meta_collection[meta_it];
					tuba_dialogs_composer_components_attachments_bin_metadata_copy (&_tmp204_, &_tmp205_);
					meta = _tmp205_;
					{
						JsonBuilder* _tmp206_;
						JsonBuilder* _tmp207_;
						JsonBuilder* _tmp208_;
						TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp209_;
						const gchar* _tmp210_;
						JsonBuilder* _tmp211_;
						JsonBuilder* _tmp212_;
						TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp213_;
						const gchar* _tmp214_;
						JsonBuilder* _tmp215_;
						JsonBuilder* _tmp216_;
						TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp217_;
						const gchar* _tmp218_;
						JsonBuilder* _tmp219_;
						_tmp206_ = builder;
						json_builder_begin_object (_tmp206_);
						_tmp207_ = builder;
						json_builder_set_member_name (_tmp207_, "id");
						_tmp208_ = builder;
						_tmp209_ = meta;
						_tmp210_ = _tmp209_.id;
						json_builder_add_string_value (_tmp208_, _tmp210_);
						_tmp211_ = builder;
						json_builder_set_member_name (_tmp211_, "description");
						_tmp212_ = builder;
						_tmp213_ = meta;
						_tmp214_ = _tmp213_.description;
						json_builder_add_string_value (_tmp212_, _tmp214_);
						_tmp215_ = builder;
						json_builder_set_member_name (_tmp215_, "focus");
						_tmp216_ = builder;
						_tmp217_ = meta;
						_tmp218_ = _tmp217_.focus;
						json_builder_add_string_value (_tmp216_, _tmp218_);
						_tmp219_ = builder;
						json_builder_end_object (_tmp219_);
						tuba_dialogs_composer_components_attachments_bin_metadata_destroy (&meta);
					}
				}
				meta_collection = (_vala_TubaDialogsComposerComponentsAttachmentsBinMetadata_array_free (meta_collection, meta_collection_length1), NULL);
			}
			_tmp220_ = builder;
			json_builder_end_array (_tmp220_);
		}
	}
	_tmp221_ = self->priv->_quote_id;
	if (_tmp221_ != NULL) {
		const gchar* _tmp222_ = NULL;
		TubaAccountStore* _tmp223_;
		TubaInstanceAccount* _tmp224_;
		TubaInstanceAccount* _tmp225_;
		TubaAPIInstanceV2APIVersions* _tmp226_;
		TubaAPIInstanceV2APIVersions* _tmp227_;
		gint8 _tmp228_;
		gint8 _tmp229_;
		JsonBuilder* _tmp230_;
		JsonBuilder* _tmp231_;
		const gchar* _tmp232_;
		_tmp223_ = tuba_accounts;
		_tmp224_ = tuba_account_store_get_active (_tmp223_);
		_tmp225_ = _tmp224_;
		_tmp226_ = tuba_instance_account_get_tuba_api_versions (_tmp225_);
		_tmp227_ = _tmp226_;
		_tmp228_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp227_);
		_tmp229_ = _tmp228_;
		if (((gint) _tmp229_) >= 7) {
			_tmp222_ = "quoted_status_id";
		} else {
			_tmp222_ = "quote_id";
		}
		_tmp230_ = builder;
		json_builder_set_member_name (_tmp230_, _tmp222_);
		_tmp231_ = builder;
		_tmp232_ = self->priv->_quote_id;
		json_builder_add_string_value (_tmp231_, _tmp232_);
	}
	_tmp233_ = self->priv->_schedule_iso8601;
	if (_tmp233_ != NULL) {
		JsonBuilder* _tmp234_;
		JsonBuilder* _tmp235_;
		const gchar* _tmp236_;
		_tmp234_ = builder;
		json_builder_set_member_name (_tmp234_, "scheduled_at");
		_tmp235_ = builder;
		_tmp236_ = self->priv->_schedule_iso8601;
		json_builder_add_string_value (_tmp235_, _tmp236_);
	}
	_tmp237_ = builder;
	json_builder_end_object (_tmp237_);
	result = builder;
	_g_free0 (vis);
	_g_free0 (_tmp32_);
	return result;
}

static void
__lambda83_ (TubaDialogsComposerDialog* self,
             GObject* obj,
             GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		tuba_dialogs_composer_dialog_transaction_finish (self, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		GError* _tmp2_;
		const gchar* _tmp3_;
		AdwToast* _tmp4_ = NULL;
		AdwToast* _tmp5_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp0_ = e;
		_tmp1_ = _tmp0_->message;
		g_warning ("Dialog.vala:1539: %s", _tmp1_);
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		_tmp4_ = adw_toast_new (_tmp3_);
		adw_toast_set_timeout (_tmp4_, (guint) 0);
		_tmp5_ = _tmp4_;
		tuba_dialogs_composer_dialog_on_toast (self, _tmp5_);
		_g_object_unref0 (_tmp5_);
		_g_error_free0 (e);
	}
	__finally0:
	{
		GError* _inner_error1_ = NULL;
		gtk_widget_set_sensitive ((GtkWidget*) self, TRUE);
	}
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda83__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda83_ ((TubaDialogsComposerDialog*) self, source_object, res);
	g_object_unref (self);
}

static void
tuba_dialogs_composer_dialog_on_commit (TubaDialogsComposerDialog* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_widget_get_sensitive ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		return;
	}
	gtk_widget_set_sensitive ((GtkWidget*) self, FALSE);
	tuba_dialogs_composer_dialog_transaction (self, ___lambda83__gasync_ready_callback, g_object_ref (self));
}

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

static void
tuba_dialogs_composer_dialog_transaction (TubaDialogsComposerDialog* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	TubaDialogsComposerDialogTransactionData* _data_;
	TubaDialogsComposerDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsComposerDialogTransactionData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_composer_dialog_transaction_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_composer_dialog_transaction_co (_data_);
}

static void
tuba_dialogs_composer_dialog_transaction_finish (TubaDialogsComposerDialog* self,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	TubaDialogsComposerDialogTransactionData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
tuba_dialogs_composer_dialog_transaction_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	TubaDialogsComposerDialogTransactionData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_composer_dialog_transaction_co (_data_);
}

static gboolean
tuba_dialogs_composer_dialog_transaction_co (TubaDialogsComposerDialogTransactionData* _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/statuses", TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp4_, _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->publish_req = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->self->priv->_edit_status_id;
	if (_data_->_tmp6_ != NULL) {
		_data_->_tmp7_ = _data_->self->priv->_edit_status_id;
		_data_->_tmp5_ = g_strcmp0 (_data_->_tmp7_, "") != 0;
	} else {
		_data_->_tmp5_ = FALSE;
	}
	if (_data_->_tmp5_) {
		_data_->_tmp8_ = _data_->self->priv->_edit_status_id;
		_data_->_tmp9_ = string_to_string (_data_->_tmp8_);
		_data_->_tmp10_ = g_strconcat ("/api/v1/statuses/", _data_->_tmp9_, NULL);
		_data_->_tmp11_ = _data_->_tmp10_;
		_data_->_tmp12_ = tuba_accounts;
		_data_->_tmp13_ = tuba_account_store_get_active (_data_->_tmp12_);
		_data_->_tmp14_ = _data_->_tmp13_;
		_data_->_tmp15_ = _g_object_ref0 (_data_->_tmp14_);
		_data_->_tmp16_ = NULL;
		_data_->_tmp16_ = tuba_request_v2_new (_data_->_tmp11_, TUBA_REQUEST_V2_METHOD_PUT);
		tuba_request_v2_set_account (_data_->_tmp16_, _data_->_tmp15_);
		_g_object_unref0 (_data_->_tmp15_);
		_g_object_unref0 (_data_->publish_req);
		_data_->publish_req = _data_->_tmp16_;
		_g_free0 (_data_->_tmp11_);
	}
	_data_->_tmp17_ = _data_->publish_req;
	_data_->_tmp18_ = tuba_dialogs_composer_dialog_populate_json_body (_data_->self);
	_data_->_tmp19_ = _data_->_tmp18_;
	tuba_request_v2_set_body_from_json (_data_->_tmp17_, _data_->_tmp19_);
	_g_object_unref0 (_data_->_tmp19_);
	_data_->_tmp20_ = _data_->publish_req;
	_data_->_state_ = 1;
	tuba_request_v2_exec (_data_->_tmp20_, tuba_dialogs_composer_dialog_transaction_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp21_ = tuba_request_v2_exec_finish (_data_->_tmp20_, _data_->_res_, NULL, &_data_->_inner_error0_);
	_data_->in_stream = _data_->_tmp21_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->publish_req);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp22_ = _data_->in_stream;
	_data_->_state_ = 2;
	tuba_network_get_parser_from_inputstream_async (_data_->_tmp22_, NULL, tuba_dialogs_composer_dialog_transaction_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp23_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
	_data_->parser = _data_->_tmp23_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->publish_req);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp24_ = tuba_network;
	_data_->_tmp25_ = _data_->parser;
	_data_->_tmp26_ = tuba_network_parse_node (_data_->_tmp24_, _data_->_tmp25_);
	_data_->node = _data_->_tmp26_;
	_data_->status = NULL;
	_data_->_tmp27_ = _data_->self->priv->_schedule_iso8601;
	if (_data_->_tmp27_ != NULL) {
		_data_->_tmp28_ = _data_->node;
		_data_->_tmp29_ = tuba_api_scheduled_status_from (_data_->_tmp28_, &_data_->_inner_error0_);
		_data_->scheduled_status = _data_->_tmp29_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->status);
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->publish_req);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp30_ = _data_->scheduled_status;
		_data_->_tmp31_ = tuba_api_scheduled_status_get_id (_data_->_tmp30_);
		_data_->_tmp32_ = _data_->_tmp31_;
		_data_->_tmp33_ = string_to_string (_data_->_tmp32_);
		_data_->_tmp34_ = _data_->scheduled_status;
		_data_->_tmp35_ = tuba_api_scheduled_status_get_scheduled_at (_data_->_tmp34_);
		_data_->_tmp36_ = _data_->_tmp35_;
		_data_->_tmp37_ = string_to_string (_data_->_tmp36_);
		_data_->_tmp38_ = g_strconcat ("Scheduled post with id ", _data_->_tmp33_, " at ", _data_->_tmp37_, NULL);
		_data_->_tmp39_ = _data_->_tmp38_;
		g_debug ("Dialog.vala:1566: %s", _data_->_tmp39_);
		_g_free0 (_data_->_tmp39_);
		_g_object_unref0 (_data_->scheduled_status);
	} else {
		_data_->_tmp41_ = _data_->node;
		_data_->_tmp42_ = tuba_api_status_from (_data_->_tmp41_, &_data_->_inner_error0_);
		_data_->_tmp40_ = _data_->_tmp42_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->status);
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			_g_object_unref0 (_data_->publish_req);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp43_ = _data_->_tmp40_;
		_data_->_tmp40_ = NULL;
		_g_object_unref0 (_data_->status);
		_data_->status = _data_->_tmp43_;
		_data_->_tmp44_ = _data_->status;
		_data_->_tmp45_ = tuba_api_status_get_id (_data_->_tmp44_);
		_data_->_tmp46_ = _data_->_tmp45_;
		_data_->_tmp47_ = string_to_string (_data_->_tmp46_);
		_data_->_tmp48_ = g_strconcat ("Published post with id ", _data_->_tmp47_, NULL);
		_data_->_tmp49_ = _data_->_tmp48_;
		g_debug ("Dialog.vala:1569: %s", _data_->_tmp49_);
		_g_free0 (_data_->_tmp49_);
		_g_object_unref0 (_data_->_tmp40_);
	}
	_data_->_tmp50_ = _data_->self->priv->_scheduled_id;
	if (_data_->_tmp50_ != NULL) {
		tuba_dialogs_composer_dialog_delete_scheduled_post (_data_->self, NULL, NULL);
	} else {
		_data_->_tmp51_ = _data_->self->cb;
		_data_->_tmp51__target = _data_->self->cb_target;
		if (_data_->_tmp51_ != NULL) {
			_data_->_tmp52_ = _data_->self->cb;
			_data_->_tmp52__target = _data_->self->cb_target;
			_data_->_tmp53_ = _data_->status;
			_data_->_tmp52_ (_data_->_tmp53_, _data_->_tmp52__target);
		} else {
			_data_->_tmp54_ = _data_->self->priv->_schedule_iso8601;
			if (_data_->_tmp54_ != NULL) {
				_data_->_tmp55_ = tuba_app;
				g_signal_emit_by_name (_data_->_tmp55_, "refresh-scheduled-statuses");
			}
		}
	}
	adw_dialog_force_close ((AdwDialog*) _data_->self);
	_g_object_unref0 (_data_->status);
	__vala_JsonNode_free0 (_data_->node);
	_g_object_unref0 (_data_->parser);
	_g_object_unref0 (_data_->in_stream);
	_g_object_unref0 (_data_->publish_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_composer_dialog_delete_scheduled_post_data_free (gpointer _data)
{
	TubaDialogsComposerDialogDeleteScheduledPostData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaDialogsComposerDialogDeleteScheduledPostData, _data_);
}

static void
tuba_dialogs_composer_dialog_delete_scheduled_post (TubaDialogsComposerDialog* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	TubaDialogsComposerDialogDeleteScheduledPostData* _data_;
	TubaDialogsComposerDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaDialogsComposerDialogDeleteScheduledPostData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_dialogs_composer_dialog_delete_scheduled_post_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_dialogs_composer_dialog_delete_scheduled_post_co (_data_);
}

static void
tuba_dialogs_composer_dialog_delete_scheduled_post_finish (TubaDialogsComposerDialog* self,
                                                           GAsyncResult* _res_)
{
	TubaDialogsComposerDialogDeleteScheduledPostData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_dialogs_composer_dialog_delete_scheduled_post_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	TubaDialogsComposerDialogDeleteScheduledPostData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_dialogs_composer_dialog_delete_scheduled_post_co (_data_);
}

static gboolean
tuba_dialogs_composer_dialog_delete_scheduled_post_co (TubaDialogsComposerDialogDeleteScheduledPostData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_scheduled_id;
	_data_->_tmp1_ = string_to_string (_data_->_tmp0_);
	_data_->_tmp2_ = g_strconcat ("/api/v1/scheduled_statuses/", _data_->_tmp1_, NULL);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = tuba_accounts;
	_data_->_tmp5_ = tuba_account_store_get_active (_data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = tuba_request_v2_new (_data_->_tmp3_, TUBA_REQUEST_V2_METHOD_DELETE);
	tuba_request_v2_set_account (_data_->_tmp8_, _data_->_tmp7_);
	_g_object_unref0 (_data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_g_free0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp9_;
	{
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->req, tuba_dialogs_composer_dialog_delete_scheduled_post_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp10_ = tuba_request_v2_exec_finish (_data_->req, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp11_ = _data_->_tmp10_;
		_g_object_unref0 (_data_->_tmp11_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp12_ = _data_->self->cb;
		_data_->_tmp12__target = _data_->self->cb_target;
		if (_data_->_tmp12_ != NULL) {
			_data_->_tmp13_ = _data_->self->cb;
			_data_->_tmp13__target = _data_->self->cb_target;
			_data_->_tmp13_ (NULL, _data_->_tmp13__target);
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp14_ = _data_->e;
		_data_->_tmp15_ = g_strdup_printf ("%i", _data_->_tmp14_->code);
		_data_->_tmp16_ = _data_->_tmp15_;
		_data_->_tmp17_ = _data_->e;
		_data_->_tmp18_ = _data_->_tmp17_->message;
		_data_->_tmp19_ = string_to_string (_data_->_tmp18_);
		_data_->_tmp20_ = g_strconcat ("Couldn't delete scheduled post: ", _data_->_tmp16_, " ", _data_->_tmp19_, NULL);
		_data_->_tmp21_ = _data_->_tmp20_;
		g_warning ("Dialog.vala:1589: %s", _data_->_tmp21_);
		_g_free0 (_data_->_tmp21_);
		_g_free0 (_data_->_tmp16_);
		_data_->_tmp22_ = tuba_app;
		_data_->_tmp23_ = _data_->e;
		_data_->_tmp24_ = _data_->_tmp23_->message;
		_data_->_tmp25_ = g_strdup_printf (_ ("Couldn't delete scheduled post: %s"), _data_->_tmp24_);
		_data_->_tmp26_ = _data_->_tmp25_;
		g_signal_emit_by_name (_data_->_tmp22_, "toast", _data_->_tmp26_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp26_);
		_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 gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

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

static guint
tuba_dialogs_composer_dialog_generate_unique_state (TubaDialogsComposerDialog* self)
{
	GString* builder = NULL;
	TubaDialogsComposerComponentsEditor* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkTextBuffer* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GString* _tmp6_;
	GString* _tmp7_;
	GString* _tmp8_;
	GtkToggleButton* _tmp9_;
	gboolean _tmp10_;
	gboolean _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GString* _tmp14_;
	GtkEntry* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	TubaDialogsComposerComponentsAttachmentsBin* _tmp20_;
	gboolean _tmp48_ = FALSE;
	gboolean _tmp49_ = FALSE;
	gboolean _tmp50_ = FALSE;
	TubaDialogsComposerComponentsPolls* _tmp51_;
	GHashFunc _tmp86_;
	GString* _tmp87_;
	const gchar* _tmp88_;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->editor;
	_tmp1_ = gtk_text_view_get_buffer ((GtkTextView*) _tmp0_);
	_tmp2_ = _tmp1_;
	g_object_get (_tmp2_, "text", &_tmp3_, NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = g_string_new (_tmp5_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	builder = _tmp7_;
	_tmp8_ = builder;
	_tmp9_ = self->priv->cw_button;
	_tmp10_ = gtk_toggle_button_get_active (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = bool_to_string (_tmp11_);
	_tmp13_ = _tmp12_;
	g_string_append (_tmp8_, _tmp13_);
	_g_free0 (_tmp13_);
	_tmp14_ = builder;
	_tmp15_ = self->priv->cw_entry;
	_tmp16_ = gtk_editable_get_text ((GtkEditable*) _tmp15_);
	_tmp17_ = _tmp16_;
	g_string_append (_tmp14_, _tmp17_);
	_tmp20_ = self->priv->attachmentsbin_component;
	if (_tmp20_ != NULL) {
		TubaDialogsComposerComponentsEditor* _tmp21_;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp22_;
		_tmp21_ = self->priv->editor;
		_tmp22_ = self->priv->attachmentsbin_component;
		_tmp19_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp21_, (GtkWidget*) _tmp22_);
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		TubaDialogsComposerComponentsAttachmentsBin* _tmp23_;
		gboolean _tmp24_;
		gboolean _tmp25_;
		_tmp23_ = self->priv->attachmentsbin_component;
		_tmp24_ = tuba_dialogs_composer_components_attachments_bin_get_is_empty (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp18_ = !_tmp25_;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		GString* _tmp26_;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp27_;
		gint _tmp28_ = 0;
		gchar** _tmp29_;
		gchar** _tmp30_;
		gint _tmp30__length1;
		gchar* _tmp31_;
		gchar* _tmp32_;
		TubaDialogsComposerComponentsAttachmentsBin* _tmp33_;
		gint _tmp34_ = 0;
		TubaDialogsComposerComponentsAttachmentsBinMetadata* _tmp35_;
		_tmp26_ = builder;
		_tmp27_ = self->priv->attachmentsbin_component;
		_tmp29_ = tuba_dialogs_composer_components_attachments_bin_get_all_media_ids (_tmp27_, &_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp30__length1 = _tmp28_;
		_tmp31_ = _vala_g_strjoinv ("", _tmp30_, (gint) _tmp28_);
		_tmp32_ = _tmp31_;
		g_string_append (_tmp26_, _tmp32_);
		_g_free0 (_tmp32_);
		_tmp30_ = (_vala_array_free (_tmp30_, _tmp30__length1, (GDestroyNotify) g_free), NULL);
		_tmp33_ = self->priv->attachmentsbin_component;
		_tmp35_ = tuba_dialogs_composer_components_attachments_bin_get_all_metadata (_tmp33_, &_tmp34_);
		{
			TubaDialogsComposerComponentsAttachmentsBinMetadata* meta_collection = NULL;
			gint meta_collection_length1 = 0;
			gint _meta_collection_size_ = 0;
			gint meta_it = 0;
			meta_collection = _tmp35_;
			meta_collection_length1 = _tmp34_;
			for (meta_it = 0; meta_it < meta_collection_length1; meta_it = meta_it + 1) {
				TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp36_;
				TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp37_ = {0};
				TubaDialogsComposerComponentsAttachmentsBinMetadata meta = {0};
				_tmp36_ = meta_collection[meta_it];
				tuba_dialogs_composer_components_attachments_bin_metadata_copy (&_tmp36_, &_tmp37_);
				meta = _tmp37_;
				{
					GString* _tmp38_;
					TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp39_;
					const gchar* _tmp40_;
					GString* _tmp41_;
					TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp42_;
					const gchar* _tmp43_;
					GString* _tmp44_;
					TubaDialogsComposerComponentsAttachmentsBinMetadata _tmp45_;
					const gchar* _tmp46_;
					_tmp38_ = builder;
					_tmp39_ = meta;
					_tmp40_ = _tmp39_.id;
					g_string_append (_tmp38_, _tmp40_);
					_tmp41_ = builder;
					_tmp42_ = meta;
					_tmp43_ = _tmp42_.description;
					g_string_append (_tmp41_, _tmp43_);
					_tmp44_ = builder;
					_tmp45_ = meta;
					_tmp46_ = _tmp45_.focus;
					g_string_append (_tmp44_, _tmp46_);
					tuba_dialogs_composer_components_attachments_bin_metadata_destroy (&meta);
				}
			}
			meta_collection = (_vala_TubaDialogsComposerComponentsAttachmentsBinMetadata_array_free (meta_collection, meta_collection_length1), NULL);
		}
	} else {
		GString* _tmp47_;
		_tmp47_ = builder;
		g_string_append (_tmp47_, "none");
	}
	_tmp51_ = self->priv->polls_component;
	if (_tmp51_ != NULL) {
		TubaDialogsComposerComponentsEditor* _tmp52_;
		TubaDialogsComposerComponentsPolls* _tmp53_;
		_tmp52_ = self->priv->editor;
		_tmp53_ = self->priv->polls_component;
		_tmp50_ = tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) _tmp52_, (GtkWidget*) _tmp53_);
	} else {
		_tmp50_ = FALSE;
	}
	if (_tmp50_) {
		TubaDialogsComposerComponentsPolls* _tmp54_;
		gboolean _tmp55_;
		gboolean _tmp56_;
		_tmp54_ = self->priv->polls_component;
		_tmp55_ = tuba_dialogs_composer_components_polls_get_is_valid (_tmp54_);
		_tmp56_ = _tmp55_;
		_tmp49_ = _tmp56_;
	} else {
		_tmp49_ = FALSE;
	}
	if (_tmp49_) {
		TubaDialogsComposerComponentsPolls* _tmp57_;
		gboolean _tmp58_;
		gboolean _tmp59_;
		_tmp57_ = self->priv->polls_component;
		_tmp58_ = tuba_dialogs_composer_components_polls_get_has_rows (_tmp57_);
		_tmp59_ = _tmp58_;
		_tmp48_ = _tmp59_;
	} else {
		_tmp48_ = FALSE;
	}
	if (_tmp48_) {
		GString* _tmp60_;
		TubaDialogsComposerComponentsPolls* _tmp61_;
		gint _tmp62_ = 0;
		gchar** _tmp63_;
		gchar** _tmp64_;
		gint _tmp64__length1;
		gchar* _tmp65_;
		gchar* _tmp66_;
		GString* _tmp67_;
		TubaDialogsComposerComponentsPolls* _tmp68_;
		gboolean _tmp69_;
		gboolean _tmp70_;
		gchar* _tmp71_;
		gchar* _tmp72_;
		GString* _tmp73_;
		TubaDialogsComposerComponentsPolls* _tmp74_;
		gboolean _tmp75_;
		gboolean _tmp76_;
		gchar* _tmp77_;
		gchar* _tmp78_;
		GString* _tmp79_;
		TubaDialogsComposerComponentsPolls* _tmp80_;
		gint64 _tmp81_;
		gint64 _tmp82_;
		gchar* _tmp83_;
		gchar* _tmp84_;
		_tmp60_ = builder;
		_tmp61_ = self->priv->polls_component;
		_tmp63_ = tuba_dialogs_composer_components_polls_get_all_options (_tmp61_, &_tmp62_);
		_tmp64_ = _tmp63_;
		_tmp64__length1 = _tmp62_;
		_tmp65_ = _vala_g_strjoinv ("", _tmp64_, (gint) _tmp62_);
		_tmp66_ = _tmp65_;
		g_string_append (_tmp60_, _tmp66_);
		_g_free0 (_tmp66_);
		_tmp64_ = (_vala_array_free (_tmp64_, _tmp64__length1, (GDestroyNotify) g_free), NULL);
		_tmp67_ = builder;
		_tmp68_ = self->priv->polls_component;
		_tmp69_ = tuba_dialogs_composer_components_polls_get_multiple_choice (_tmp68_);
		_tmp70_ = _tmp69_;
		_tmp71_ = bool_to_string (_tmp70_);
		_tmp72_ = _tmp71_;
		g_string_append (_tmp67_, _tmp72_);
		_g_free0 (_tmp72_);
		_tmp73_ = builder;
		_tmp74_ = self->priv->polls_component;
		_tmp75_ = tuba_dialogs_composer_components_polls_get_hide_totals (_tmp74_);
		_tmp76_ = _tmp75_;
		_tmp77_ = bool_to_string (_tmp76_);
		_tmp78_ = _tmp77_;
		g_string_append (_tmp73_, _tmp78_);
		_g_free0 (_tmp78_);
		_tmp79_ = builder;
		_tmp80_ = self->priv->polls_component;
		_tmp81_ = tuba_dialogs_composer_components_polls_get_expires_in (_tmp80_);
		_tmp82_ = _tmp81_;
		_tmp83_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp82_);
		_tmp84_ = _tmp83_;
		g_string_append (_tmp79_, _tmp84_);
		_g_free0 (_tmp84_);
	} else {
		GString* _tmp85_;
		_tmp85_ = builder;
		g_string_append (_tmp85_, "none");
	}
	_tmp86_ = g_str_hash;
	_tmp87_ = builder;
	_tmp88_ = _tmp87_->str;
	result = _tmp86_ (_tmp88_);
	_g_string_free0 (builder);
	return result;
}

static gboolean
tuba_dialogs_composer_dialog_state_changed (TubaDialogsComposerDialog* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->priv->unique_state == ((guint) 0)) {
		result = FALSE;
		return result;
	}
	result = self->priv->unique_state != tuba_dialogs_composer_dialog_generate_unique_state (self);
	return result;
}

static void
___lambda123_ (TubaDialogsComposerDialog* self,
               GObject* obj,
               GAsyncResult* res)
{
	TubaApplication* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = tuba_app;
	if (tuba_application_question_answer_truthy (tuba_application_question_finish (_tmp0_, res))) {
		adw_dialog_force_close ((AdwDialog*) self);
	}
}

static void
____lambda123__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda123_ ((TubaDialogsComposerDialog*) self, source_object, res);
	g_object_unref (self);
}

static void
tuba_dialogs_composer_dialog_on_exit (TubaDialogsComposerDialog* self)
{
	g_return_if_fail (self != NULL);
	if (tuba_dialogs_composer_dialog_state_changed (self)) {
		TubaApplication* _tmp0_;
		TubaApplicationQuestionText _tmp1_ = {0};
		TubaApplicationQuestionText _tmp2_ = {0};
		TubaApplicationQuestionButtons _tmp3_ = {0};
		_tmp0_ = tuba_app;
		_g_free0 (_tmp1_.text);
		_tmp1_.text = _ ("Discard Post?");
		_tmp1_.use_markup = FALSE;
		_g_free0 (_tmp2_.text);
		_tmp2_.text = _ ("Your progress will be lost.");
		_tmp2_.use_markup = FALSE;
		tuba_application_question_button_destroy (&_tmp3_.yes);
		_tmp3_.yes = (TubaApplicationQuestionButton) {_ ("Discard"), ADW_RESPONSE_DESTRUCTIVE};
		tuba_application_question_button_destroy (&_tmp3_.no);
		_tmp3_.no = (TubaApplicationQuestionButton) {_ ("Cancel"), ADW_RESPONSE_DEFAULT};
		tuba_application_question (_tmp0_, &_tmp1_, &_tmp2_, (GtkWidget*) self, &_tmp3_, NULL, FALSE, ____lambda123__gasync_ready_callback, g_object_ref (self));
	} else {
		adw_dialog_force_close ((AdwDialog*) self);
	}
}

static void
tuba_dialogs_composer_dialog_on_cw_revealed (TubaDialogsComposerDialog* self)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkEntry* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cw_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = self->priv->cw_entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp3_);
}

gboolean
tuba_dialogs_composer_dialog_get_is_narrow (TubaDialogsComposerDialog* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_narrow;
	return result;
}

void
tuba_dialogs_composer_dialog_set_is_narrow (TubaDialogsComposerDialog* self,
                                            gboolean value)
{
	GtkGridLayout* layout_manager = NULL;
	GtkGrid* _tmp0_;
	GtkLayoutManager* _tmp1_;
	GtkGridLayout* _tmp2_;
	GtkGridLayoutChild* counter_layout_child = NULL;
	GtkGridLayout* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLayoutChild* _tmp5_;
	GtkGridLayoutChild* _tmp6_;
	GtkGridLayoutChild* post_layout_child = NULL;
	GtkGridLayout* _tmp7_;
	TubaDialogsComposerDialogPostButton* _tmp8_;
	GtkLayoutChild* _tmp9_;
	GtkGridLayoutChild* _tmp10_;
	GtkGridLayoutChild* btns_layout_child = NULL;
	GtkGridLayout* _tmp11_;
	GtkBox* _tmp12_;
	GtkLayoutChild* _tmp13_;
	GtkGridLayoutChild* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->grid;
	_tmp1_ = gtk_widget_get_layout_manager ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_grid_layout_get_type (), GtkGridLayout));
	layout_manager = _tmp2_;
	_tmp3_ = layout_manager;
	_tmp4_ = self->priv->counter_label;
	_tmp5_ = gtk_layout_manager_get_layout_child ((GtkLayoutManager*) _tmp3_, (GtkWidget*) _tmp4_);
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_grid_layout_child_get_type (), GtkGridLayoutChild));
	counter_layout_child = _tmp6_;
	_tmp7_ = layout_manager;
	_tmp8_ = self->priv->post_btn;
	_tmp9_ = gtk_layout_manager_get_layout_child ((GtkLayoutManager*) _tmp7_, (GtkWidget*) _tmp8_);
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_grid_layout_child_get_type (), GtkGridLayoutChild));
	post_layout_child = _tmp10_;
	_tmp11_ = layout_manager;
	_tmp12_ = self->priv->btns_box;
	_tmp13_ = gtk_layout_manager_get_layout_child ((GtkLayoutManager*) _tmp11_, (GtkWidget*) _tmp12_);
	_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_grid_layout_child_get_type (), GtkGridLayoutChild));
	btns_layout_child = _tmp14_;
	if (value) {
		GtkGridLayoutChild* _tmp15_;
		GtkGridLayoutChild* _tmp16_;
		GtkGridLayoutChild* _tmp17_;
		GtkGridLayoutChild* _tmp18_;
		GtkGridLayoutChild* _tmp19_;
		GtkGridLayoutChild* _tmp20_;
		GtkLabel* _tmp21_;
		GtkLabel* _tmp22_;
		GtkGrid* _tmp23_;
		TubaDialogsComposerComponentsEditor* _tmp24_;
		GtkEntry* _tmp25_;
		GtkGrid* _tmp26_;
		TubaDialogsComposerComponentsEditor* _tmp27_;
		GtkEntry* _tmp28_;
		GtkGrid* _tmp29_;
		_tmp15_ = post_layout_child;
		gtk_grid_layout_child_set_column (_tmp15_, 1);
		_tmp16_ = post_layout_child;
		gtk_grid_layout_child_set_row (_tmp16_, 1);
		_tmp17_ = post_layout_child;
		gtk_grid_layout_child_set_row_span (_tmp17_, 1);
		_tmp18_ = counter_layout_child;
		gtk_grid_layout_child_set_row (_tmp18_, 0);
		_tmp19_ = counter_layout_child;
		gtk_grid_layout_child_set_column (_tmp19_, 1);
		_tmp20_ = btns_layout_child;
		gtk_grid_layout_child_set_column_span (_tmp20_, 1);
		_tmp21_ = self->priv->counter_label;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp21_, 10);
		_tmp22_ = self->priv->counter_label;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp22_, 0);
		_tmp23_ = self->priv->grid;
		gtk_grid_set_row_spacing (_tmp23_, 12);
		_tmp24_ = self->priv->editor;
		_tmp25_ = self->priv->cw_entry;
		_tmp26_ = self->priv->grid;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp26_, 16);
		gtk_widget_set_margin_start ((GtkWidget*) _tmp25_, 16);
		gtk_widget_set_margin_start ((GtkWidget*) _tmp24_, 16);
		_tmp27_ = self->priv->editor;
		_tmp28_ = self->priv->cw_entry;
		_tmp29_ = self->priv->grid;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp29_, 16);
		gtk_widget_set_margin_end ((GtkWidget*) _tmp28_, 16);
		gtk_widget_set_margin_end ((GtkWidget*) _tmp27_, 16);
	} else {
		GtkGridLayoutChild* _tmp30_;
		GtkGridLayoutChild* _tmp31_;
		GtkGridLayoutChild* _tmp32_;
		GtkGridLayoutChild* _tmp33_;
		GtkGridLayoutChild* _tmp34_;
		GtkGridLayoutChild* _tmp35_;
		GtkLabel* _tmp36_;
		GtkLabel* _tmp37_;
		GtkGrid* _tmp38_;
		TubaDialogsComposerComponentsEditor* _tmp39_;
		GtkEntry* _tmp40_;
		GtkGrid* _tmp41_;
		TubaDialogsComposerComponentsEditor* _tmp42_;
		GtkEntry* _tmp43_;
		GtkGrid* _tmp44_;
		_tmp30_ = post_layout_child;
		gtk_grid_layout_child_set_column (_tmp30_, 2);
		_tmp31_ = post_layout_child;
		gtk_grid_layout_child_set_row (_tmp31_, 0);
		_tmp32_ = post_layout_child;
		gtk_grid_layout_child_set_row_span (_tmp32_, 2);
		_tmp33_ = counter_layout_child;
		gtk_grid_layout_child_set_row (_tmp33_, 1);
		_tmp34_ = counter_layout_child;
		gtk_grid_layout_child_set_column (_tmp34_, 1);
		_tmp35_ = btns_layout_child;
		gtk_grid_layout_child_set_column_span (_tmp35_, 2);
		_tmp36_ = self->priv->counter_label;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp36_, 0);
		_tmp37_ = self->priv->counter_label;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp37_, 12);
		_tmp38_ = self->priv->grid;
		gtk_grid_set_row_spacing (_tmp38_, 16);
		_tmp39_ = self->priv->editor;
		_tmp40_ = self->priv->cw_entry;
		_tmp41_ = self->priv->grid;
		gtk_widget_set_margin_start ((GtkWidget*) _tmp41_, 32);
		gtk_widget_set_margin_start ((GtkWidget*) _tmp40_, 32);
		gtk_widget_set_margin_start ((GtkWidget*) _tmp39_, 32);
		_tmp42_ = self->priv->editor;
		_tmp43_ = self->priv->cw_entry;
		_tmp44_ = self->priv->grid;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp44_, 32);
		gtk_widget_set_margin_end ((GtkWidget*) _tmp43_, 32);
		gtk_widget_set_margin_end ((GtkWidget*) _tmp42_, 32);
	}
	self->priv->_is_narrow = value;
	_g_object_unref0 (btns_layout_child);
	_g_object_unref0 (post_layout_child);
	_g_object_unref0 (counter_layout_child);
	_g_object_unref0 (layout_manager);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_IS_NARROW_PROPERTY]);
}

gint64
tuba_dialogs_composer_dialog_get_char_limit (TubaDialogsComposerDialog* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_char_limit;
	return result;
}

void
tuba_dialogs_composer_dialog_set_char_limit (TubaDialogsComposerDialog* self,
                                             gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_get_char_limit (self);
	if (old_value != value) {
		self->priv->_char_limit = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_CHAR_LIMIT_PROPERTY]);
	}
}

gint64
tuba_dialogs_composer_dialog_get_cw_count (TubaDialogsComposerDialog* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_cw_count;
	return result;
}

void
tuba_dialogs_composer_dialog_set_cw_count (TubaDialogsComposerDialog* self,
                                           gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_get_cw_count (self);
	if (old_value != value) {
		self->priv->_cw_count = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_CW_COUNT_PROPERTY]);
	}
}

gint8
tuba_dialogs_composer_dialog_get_reserved_chars (TubaDialogsComposerDialog* self)
{
	gint8 result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_reserved_chars;
	return result;
}

void
tuba_dialogs_composer_dialog_set_reserved_chars (TubaDialogsComposerDialog* self,
                                                 gint8 value)
{
	gint8 old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_get_reserved_chars (self);
	if (old_value != value) {
		self->priv->_reserved_chars = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_RESERVED_CHARS_PROPERTY]);
	}
}

gint64
tuba_dialogs_composer_dialog_get_remaining_chars (TubaDialogsComposerDialog* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_remaining_chars;
	return result;
}

void
tuba_dialogs_composer_dialog_set_remaining_chars (TubaDialogsComposerDialog* self,
                                                  gint64 value)
{
	gchar* _tmp0_ = NULL;
	gint64 _tmp1_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	g_return_if_fail (self != NULL);
	self->priv->_remaining_chars = value;
	_tmp1_ = self->priv->_char_limit;
	if (_tmp1_ >= ((gint64) 1000)) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup_printf ("%" G_GINT64_FORMAT, value);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	} else {
		gchar* _tmp3_;
		gchar* _tmp4_;
		gint64 _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp3_ = g_strdup_printf ("%" G_GINT64_FORMAT, value);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->_char_limit;
		_tmp6_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strconcat (_tmp4_, " / ", _tmp7_, NULL);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp8_;
		_g_free0 (_tmp7_);
		_g_free0 (_tmp4_);
	}
	_tmp9_ = self->priv->counter_label;
	_tmp10_ = self->priv->counter_label;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp10_, _tmp0_);
	gtk_label_set_label (_tmp9_, _tmp0_);
	tuba_dialogs_composer_dialog_validate_post_button (self);
	if (value < ((gint64) 0)) {
		GtkLabel* _tmp11_;
		GtkLabel* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp11_ = self->priv->counter_label;
		gtk_widget_add_css_class ((GtkWidget*) _tmp11_, "error");
		_tmp12_ = self->priv->counter_label;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp12_, "accent");
		_tmp13_ = g_strdup_printf (_ ("Exceeded character limit by %lld"), llabs (value));
		_tmp14_ = _tmp13_;
		gtk_accessible_announce ((GtkAccessible*) self, _tmp14_, GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH);
		_g_free0 (_tmp14_);
	} else {
		GtkLabel* _tmp15_;
		_tmp15_ = self->priv->counter_label;
		if (gtk_widget_has_css_class ((GtkWidget*) _tmp15_, "error")) {
			GtkLabel* _tmp16_;
			GtkLabel* _tmp17_;
			_tmp16_ = self->priv->counter_label;
			gtk_widget_remove_css_class ((GtkWidget*) _tmp16_, "error");
			_tmp17_ = self->priv->counter_label;
			gtk_widget_add_css_class ((GtkWidget*) _tmp17_, "accent");
		}
	}
	_g_free0 (_tmp0_);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_REMAINING_CHARS_PROPERTY]);
}

static gboolean
tuba_dialogs_composer_dialog_get_edit_mode (TubaDialogsComposerDialog* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_edit_mode;
	return result;
}

static void
tuba_dialogs_composer_dialog_set_edit_mode (TubaDialogsComposerDialog* self,
                                            gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_edit_mode = value;
}

static const gchar*
tuba_dialogs_composer_dialog_get_schedule_iso8601 (TubaDialogsComposerDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_schedule_iso8601;
	result = _tmp0_;
	return result;
}

static void
tuba_dialogs_composer_dialog_set_schedule_iso8601 (TubaDialogsComposerDialog* self,
                                                   const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_schedule_iso8601);
	self->priv->_schedule_iso8601 = _tmp0_;
}

static const gchar*
tuba_dialogs_composer_dialog_get_in_reply_to_id (TubaDialogsComposerDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_in_reply_to_id;
	result = _tmp0_;
	return result;
}

static void
tuba_dialogs_composer_dialog_set_in_reply_to_id (TubaDialogsComposerDialog* self,
                                                 const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_in_reply_to_id);
	self->priv->_in_reply_to_id = _tmp0_;
}

const gchar*
tuba_dialogs_composer_dialog_get_quote_id (TubaDialogsComposerDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_quote_id;
	result = _tmp0_;
	return result;
}

void
tuba_dialogs_composer_dialog_set_quote_id (TubaDialogsComposerDialog* self,
                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_get_quote_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_quote_id);
		self->priv->_quote_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_QUOTE_ID_PROPERTY]);
	}
}

const gchar*
tuba_dialogs_composer_dialog_get_scheduled_id (TubaDialogsComposerDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_scheduled_id;
	result = _tmp0_;
	return result;
}

void
tuba_dialogs_composer_dialog_set_scheduled_id (TubaDialogsComposerDialog* self,
                                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_get_scheduled_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_scheduled_id);
		self->priv->_scheduled_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_SCHEDULED_ID_PROPERTY]);
	}
}

const gchar*
tuba_dialogs_composer_dialog_get_edit_status_id (TubaDialogsComposerDialog* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_edit_status_id;
	result = _tmp0_;
	return result;
}

void
tuba_dialogs_composer_dialog_set_edit_status_id (TubaDialogsComposerDialog* self,
                                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_get_edit_status_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_edit_status_id);
		self->priv->_edit_status_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_EDIT_STATUS_ID_PROPERTY]);
	}
}

static gboolean
tuba_dialogs_composer_dialog_get_quote_limited (TubaDialogsComposerDialog* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_quote_limited;
	return result;
}

static void
tuba_dialogs_composer_dialog_set_quote_limited (TubaDialogsComposerDialog* self,
                                                gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_quote_limited = value;
}

static inline gpointer
tuba_dialogs_composer_dialog_post_button_get_instance_private (TubaDialogsComposerDialogPostButton* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerDialogPostButton_private_offset);
}

static void
_tuba_dialogs_composer_dialog_post_button_on_clicked_adw_split_button_clicked (AdwSplitButton* _sender,
                                                                               gpointer self)
{
	tuba_dialogs_composer_dialog_post_button_on_clicked ((TubaDialogsComposerDialogPostButton*) self);
}

static void
_tuba_dialogs_composer_dialog_post_button_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                         gpointer self)
{
	tuba_dialogs_composer_dialog_post_button_on_clicked ((TubaDialogsComposerDialogPostButton*) self);
}

void
tuba_dialogs_composer_dialog_post_button_install (TubaDialogsComposerDialogPostButton* self,
                                                  const gchar* label,
                                                  gboolean with_menu,
                                                  gboolean can_update_draft,
                                                  gboolean can_schedule,
                                                  gboolean can_have_drafts)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_tmp0_ = adw_bin_get_child ((AdwBin*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		return;
	}
	_tmp2_ = g_strdup (label);
	_g_free0 (self->priv->original_label);
	self->priv->original_label = _tmp2_;
	if (with_menu) {
		GMenu* menu_model = NULL;
		GMenu* _tmp3_;
		const gchar* _tmp4_ = NULL;
		GMenu* _tmp5_;
		gboolean _tmp7_ = FALSE;
		gchar* _tmp9_;
		GMenu* _tmp10_;
		GMenuModel* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar** _tmp14_;
		AdwSplitButton* _tmp15_ = NULL;
		GtkWidget* _tmp16_;
		GtkWidget* _tmp17_;
		_tmp3_ = g_menu_new ();
		menu_model = _tmp3_;
		if (can_update_draft) {
			_tmp4_ = _ ("Edit Draft Post");
		} else {
			_tmp4_ = _ ("Draft Post");
		}
		_tmp5_ = menu_model;
		g_menu_append (_tmp5_, _tmp4_, "composer.draft");
		if (can_schedule) {
			GMenu* _tmp6_;
			_tmp6_ = menu_model;
			g_menu_append (_tmp6_, _ ("Schedule Post…"), "composer.schedule");
		}
		if (can_have_drafts) {
			_tmp7_ = !can_update_draft;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GMenu* _tmp8_;
			_tmp8_ = menu_model;
			g_menu_append (_tmp8_, _ ("Drafts…"), "composer.drafted-posts");
		}
		_tmp9_ = g_strdup (label);
		_tmp10_ = menu_model;
		_tmp11_ = _g_object_ref0 ((GMenuModel*) _tmp10_);
		_tmp12_ = g_strdup ("pill");
		_tmp13_ = g_strdup ("suggested-action");
		_tmp14_ = g_new0 (gchar*, 2 + 1);
		_tmp14_[0] = _tmp12_;
		_tmp14_[1] = _tmp13_;
		_tmp15_ = (AdwSplitButton*) adw_split_button_new ();
		adw_split_button_set_label (_tmp15_, _tmp9_);
		_g_free0 (_tmp9_);
		adw_split_button_set_menu_model (_tmp15_, _tmp11_);
		_g_object_unref0 (_tmp11_);
		gtk_widget_set_css_classes ((GtkWidget*) _tmp15_, _tmp14_);
		_tmp14_ = (_vala_array_free (_tmp14_, 2, (GDestroyNotify) g_free), NULL);
		g_object_ref_sink (_tmp15_);
		_g_object_unref0 (self->priv->label_widget);
		self->priv->label_widget = (GtkWidget*) _tmp15_;
		_tmp16_ = self->priv->label_widget;
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, adw_split_button_get_type (), AdwSplitButton), "clicked", (GCallback) _tuba_dialogs_composer_dialog_post_button_on_clicked_adw_split_button_clicked, self, 0);
		_tmp17_ = self->priv->label_widget;
		adw_bin_set_child ((AdwBin*) self, _tmp17_);
		_g_object_unref0 (menu_model);
	} else {
		GtkLabel* _tmp18_ = NULL;
		GtkButton* btn = NULL;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar** _tmp21_;
		GtkWidget* _tmp22_;
		GtkWidget* _tmp23_;
		GtkButton* _tmp24_ = NULL;
		GtkButton* _tmp25_;
		GtkButton* _tmp26_;
		_tmp18_ = (GtkLabel*) gtk_label_new (label);
		gtk_label_set_ellipsize (_tmp18_, PANGO_ELLIPSIZE_END);
		g_object_ref_sink (_tmp18_);
		_g_object_unref0 (self->priv->label_widget);
		self->priv->label_widget = (GtkWidget*) _tmp18_;
		_tmp19_ = g_strdup ("small-pill");
		_tmp20_ = g_strdup ("suggested-action");
		_tmp21_ = g_new0 (gchar*, 2 + 1);
		_tmp21_[0] = _tmp19_;
		_tmp21_[1] = _tmp20_;
		_tmp22_ = self->priv->label_widget;
		_tmp23_ = _g_object_ref0 (_tmp22_);
		_tmp24_ = (GtkButton*) gtk_button_new ();
		gtk_widget_set_css_classes ((GtkWidget*) _tmp24_, _tmp21_);
		_tmp21_ = (_vala_array_free (_tmp21_, 2, (GDestroyNotify) g_free), NULL);
		gtk_button_set_child (_tmp24_, _tmp23_);
		_g_object_unref0 (_tmp23_);
		g_object_ref_sink (_tmp24_);
		btn = _tmp24_;
		_tmp25_ = btn;
		g_signal_connect_object (_tmp25_, "clicked", (GCallback) _tuba_dialogs_composer_dialog_post_button_on_clicked_gtk_button_clicked, self, 0);
		_tmp26_ = btn;
		adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp26_);
		_g_object_unref0 (btn);
	}
}

void
tuba_dialogs_composer_dialog_post_button_update_label (TubaDialogsComposerDialogPostButton* self,
                                                       const gchar* new_label)
{
	gboolean _tmp0_ = FALSE;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->label_widget;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_allow_dynamic_name;
		_tmp0_ = !_tmp2_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->label_widget;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, adw_split_button_get_type ())) {
		const gchar* _tmp4_ = NULL;
		GtkWidget* _tmp6_;
		if (new_label == NULL) {
			const gchar* _tmp5_;
			_tmp5_ = self->priv->original_label;
			_tmp4_ = _tmp5_;
		} else {
			_tmp4_ = new_label;
		}
		_tmp6_ = self->priv->label_widget;
		adw_split_button_set_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, adw_split_button_get_type (), AdwSplitButton), _tmp4_);
	} else {
		GtkWidget* _tmp7_;
		_tmp7_ = self->priv->label_widget;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, gtk_label_get_type ())) {
			const gchar* _tmp8_ = NULL;
			GtkWidget* _tmp10_;
			if (new_label == NULL) {
				const gchar* _tmp9_;
				_tmp9_ = self->priv->original_label;
				_tmp8_ = _tmp9_;
			} else {
				_tmp8_ = new_label;
			}
			_tmp10_ = self->priv->label_widget;
			gtk_label_set_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_label_get_type (), GtkLabel), _tmp8_);
		}
	}
}

void
tuba_dialogs_composer_dialog_post_button_show_drafts_default (TubaDialogsComposerDialogPostButton* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar** _tmp8_;
	GtkLabel* _tmp9_ = NULL;
	GtkButton* _tmp10_ = NULL;
	GtkButton* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp2_ = adw_bin_get_child ((AdwBin*) self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == NULL) {
		_tmp1_ = TRUE;
	} else {
		GtkWidget* _tmp4_;
		_tmp4_ = self->priv->label_widget;
		_tmp1_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, adw_split_button_get_type ());
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self->priv->drafts_default;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = g_strdup ("composer.drafted-posts");
	_tmp6_ = g_strdup ("small-pill");
	_tmp7_ = g_strdup ("suggested-action");
	_tmp8_ = g_new0 (gchar*, 2 + 1);
	_tmp8_[0] = _tmp6_;
	_tmp8_[1] = _tmp7_;
	_tmp9_ = (GtkLabel*) gtk_label_new (_ ("Drafts…"));
	gtk_label_set_ellipsize (_tmp9_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp9_);
	_tmp10_ = (GtkButton*) gtk_button_new ();
	gtk_actionable_set_action_name ((GtkActionable*) _tmp10_, _tmp5_);
	_g_free0 (_tmp5_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp10_, _tmp8_);
	_tmp8_ = (_vala_array_free (_tmp8_, 2, (GDestroyNotify) g_free), NULL);
	gtk_button_set_child (_tmp10_, (GtkWidget*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	self->priv->drafts_default = TRUE;
	gtk_widget_set_sensitive ((GtkWidget*) self, TRUE);
}

static void
tuba_dialogs_composer_dialog_post_button_on_sensitive_changed (TubaDialogsComposerDialogPostButton* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	g_return_if_fail (self != NULL);
	if (!self->priv->drafts_default) {
		_tmp1_ = TRUE;
	} else {
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp2_ = adw_bin_get_child ((AdwBin*) self);
		_tmp3_ = _tmp2_;
		_tmp4_ = self->priv->label_widget;
		_tmp1_ = _tmp3_ == _tmp4_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		GtkWidget* _tmp5_;
		_tmp5_ = self->priv->label_widget;
		_tmp0_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, adw_split_button_get_type ());
	}
	if (_tmp0_) {
		return;
	}
	self->priv->drafts_default = FALSE;
	_tmp6_ = self->priv->label_widget;
	adw_bin_set_child ((AdwBin*) self, _tmp6_);
	_tmp7_ = gtk_widget_get_sensitive ((GtkWidget*) self);
	_tmp8_ = _tmp7_;
	gtk_widget_set_sensitive ((GtkWidget*) self, !_tmp8_);
}

void
tuba_dialogs_composer_dialog_post_button_set_sensitive_real (TubaDialogsComposerDialogPostButton* self,
                                                             gboolean val)
{
	g_return_if_fail (self != NULL);
	if (self->priv->drafts_default) {
		tuba_dialogs_composer_dialog_post_button_on_sensitive_changed (self);
	}
	gtk_widget_set_sensitive ((GtkWidget*) self, val);
}

static void
tuba_dialogs_composer_dialog_post_button_on_clicked (TubaDialogsComposerDialogPostButton* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_dialogs_composer_dialog_post_button_signals[TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_CLICKED_SIGNAL], 0);
}

TubaDialogsComposerDialogPostButton*
tuba_dialogs_composer_dialog_post_button_construct (GType object_type)
{
	TubaDialogsComposerDialogPostButton * self = NULL;
	self = (TubaDialogsComposerDialogPostButton*) g_object_new (object_type, NULL);
	return self;
}

TubaDialogsComposerDialogPostButton*
tuba_dialogs_composer_dialog_post_button_new (void)
{
	return tuba_dialogs_composer_dialog_post_button_construct (TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON);
}

gboolean
tuba_dialogs_composer_dialog_post_button_get_allow_dynamic_name (TubaDialogsComposerDialogPostButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_allow_dynamic_name;
	return result;
}

void
tuba_dialogs_composer_dialog_post_button_set_allow_dynamic_name (TubaDialogsComposerDialogPostButton* self,
                                                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_post_button_get_allow_dynamic_name (self);
	if (old_value != value) {
		self->priv->_allow_dynamic_name = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_post_button_properties[TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_ALLOW_DYNAMIC_NAME_PROPERTY]);
	}
}

static void
tuba_dialogs_composer_dialog_post_button_class_init (TubaDialogsComposerDialogPostButtonClass * klass,
                                                     gpointer klass_data)
{
	tuba_dialogs_composer_dialog_post_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerDialogPostButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_dialog_post_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_dialog_post_button_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_dialog_post_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_ALLOW_DYNAMIC_NAME_PROPERTY, tuba_dialogs_composer_dialog_post_button_properties[TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_ALLOW_DYNAMIC_NAME_PROPERTY] = g_param_spec_boolean ("allow-dynamic-name", "allow-dynamic-name", "allow-dynamic-name", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_dialogs_composer_dialog_post_button_signals[TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_CLICKED_SIGNAL] = g_signal_new ("clicked", TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_dialogs_composer_dialog_post_button_instance_init (TubaDialogsComposerDialogPostButton * self,
                                                        gpointer klass)
{
	gchar* _tmp0_;
	self->priv = tuba_dialogs_composer_dialog_post_button_get_instance_private (self);
	self->priv->_allow_dynamic_name = FALSE;
	_tmp0_ = g_strdup ("");
	self->priv->original_label = _tmp0_;
	self->priv->label_widget = NULL;
	self->priv->drafts_default = FALSE;
}

static void
tuba_dialogs_composer_dialog_post_button_finalize (GObject * obj)
{
	TubaDialogsComposerDialogPostButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON, TubaDialogsComposerDialogPostButton);
	g_debug ("Dialog.vala:41: Destroying PostButton");
	_g_free0 (self->priv->original_label);
	_g_object_unref0 (self->priv->label_widget);
	G_OBJECT_CLASS (tuba_dialogs_composer_dialog_post_button_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_dialog_post_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerDialogPostButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_dialog_post_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerDialogPostButton), 0, (GInstanceInitFunc) tuba_dialogs_composer_dialog_post_button_instance_init, NULL };
	GType tuba_dialogs_composer_dialog_post_button_type_id;
	tuba_dialogs_composer_dialog_post_button_type_id = g_type_register_static (adw_bin_get_type (), "TubaDialogsComposerDialogPostButton", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerDialogPostButton_private_offset = g_type_add_instance_private (tuba_dialogs_composer_dialog_post_button_type_id, sizeof (TubaDialogsComposerDialogPostButtonPrivate));
	return tuba_dialogs_composer_dialog_post_button_type_id;
}

GType
tuba_dialogs_composer_dialog_post_button_get_type (void)
{
	static GType tuba_dialogs_composer_dialog_post_button_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_dialog_post_button_type_id__once)) {
		GType tuba_dialogs_composer_dialog_post_button_type_id;
		tuba_dialogs_composer_dialog_post_button_type_id = tuba_dialogs_composer_dialog_post_button_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_dialog_post_button_type_id__once, tuba_dialogs_composer_dialog_post_button_type_id);
	}
	return tuba_dialogs_composer_dialog_post_button_type_id__once;
}

static void
_vala_tuba_dialogs_composer_dialog_post_button_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec)
{
	TubaDialogsComposerDialogPostButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON, TubaDialogsComposerDialogPostButton);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_ALLOW_DYNAMIC_NAME_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_dialog_post_button_get_allow_dynamic_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_dialog_post_button_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec)
{
	TubaDialogsComposerDialogPostButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON, TubaDialogsComposerDialogPostButton);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_DIALOG_POST_BUTTON_ALLOW_DYNAMIC_NAME_PROPERTY:
		tuba_dialogs_composer_dialog_post_button_set_allow_dynamic_name (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_dialogs_composer_dialog_quotation_policy_get_instance_private (TubaDialogsComposerDialogQuotationPolicy* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerDialogQuotationPolicy_private_offset);
}

static gboolean
_tuba_dialogs_composer_dialog_quotation_policy_compare_lambda80_ (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_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicy)->priv->_policy;
	_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (b, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicy)->priv->_policy;
	result = _tmp0_ == _tmp1_;
	return result;
}

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

TubaDialogsComposerDialogQuotationPolicy*
tuba_dialogs_composer_dialog_quotation_policy_construct (GType object_type,
                                                         const gchar* policy_name)
{
	TubaDialogsComposerDialogQuotationPolicy * self = NULL;
	g_return_val_if_fail (policy_name != NULL, NULL);
	self = (TubaDialogsComposerDialogQuotationPolicy*) g_object_new (object_type, NULL);
	tuba_dialogs_composer_dialog_quotation_policy_set_policy (self, tuba_api_status_quote_policy_from_string (policy_name));
	return self;
}

TubaDialogsComposerDialogQuotationPolicy*
tuba_dialogs_composer_dialog_quotation_policy_new (const gchar* policy_name)
{
	return tuba_dialogs_composer_dialog_quotation_policy_construct (TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, policy_name);
}

TubaDialogsComposerDialogQuotationPolicy*
tuba_dialogs_composer_dialog_quotation_policy_construct_from_policy (GType object_type,
                                                                     TubaAPIStatusQuotePolicy policy)
{
	TubaDialogsComposerDialogQuotationPolicy * self = NULL;
	self = (TubaDialogsComposerDialogQuotationPolicy*) g_object_new (object_type, NULL);
	tuba_dialogs_composer_dialog_quotation_policy_set_policy (self, policy);
	return self;
}

TubaDialogsComposerDialogQuotationPolicy*
tuba_dialogs_composer_dialog_quotation_policy_new_from_policy (TubaAPIStatusQuotePolicy policy)
{
	return tuba_dialogs_composer_dialog_quotation_policy_construct_from_policy (TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, policy);
}

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

void
tuba_dialogs_composer_dialog_quotation_policy_set_policy (TubaDialogsComposerDialogQuotationPolicy* self,
                                                          TubaAPIStatusQuotePolicy value)
{
	TubaAPIStatusQuotePolicy old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_dialog_quotation_policy_get_policy (self);
	if (old_value != value) {
		self->priv->_policy = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_dialog_quotation_policy_properties[TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_POLICY_PROPERTY]);
	}
}

gchar*
tuba_dialogs_composer_dialog_quotation_policy_get_title (TubaDialogsComposerDialogQuotationPolicy* self)
{
	gchar* result;
	TubaAPIStatusQuotePolicy _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_policy;
	_tmp1_ = tuba_api_status_quote_policy_to_title (_tmp0_);
	result = _tmp1_;
	return result;
}

gchar*
tuba_dialogs_composer_dialog_quotation_policy_get_subtitle (TubaDialogsComposerDialogQuotationPolicy* self)
{
	gchar* result;
	TubaAPIStatusQuotePolicy _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_policy;
	_tmp1_ = tuba_api_status_quote_policy_to_subtitle (_tmp0_);
	result = _tmp1_;
	return result;
}

const gchar*
tuba_dialogs_composer_dialog_quotation_policy_get_icon (TubaDialogsComposerDialogQuotationPolicy* self)
{
	const gchar* result;
	TubaAPIStatusQuotePolicy _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_policy;
	switch (_tmp0_) {
		case TUBA_API_STATUS_QUOTE_POLICY_NOBODY:
		{
			result = "tuba-quotation-disabled-symbolic";
			return result;
		}
		case TUBA_API_STATUS_QUOTE_POLICY_FOLLOWERS:
		{
			result = "tuba-quotation-locked-symbolic";
			return result;
		}
		default:
		{
			result = "tuba-quotation-symbolic";
			return result;
		}
	}
}

static void
tuba_dialogs_composer_dialog_quotation_policy_class_init (TubaDialogsComposerDialogQuotationPolicyClass * klass,
                                                          gpointer klass_data)
{
	tuba_dialogs_composer_dialog_quotation_policy_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerDialogQuotationPolicy_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_dialog_quotation_policy_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_dialog_quotation_policy_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_dialog_quotation_policy_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_POLICY_PROPERTY, tuba_dialogs_composer_dialog_quotation_policy_properties[TUBA_DIALOGS_COMPOSER_DIALOG_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_COMPOSER_DIALOG_QUOTATION_POLICY_TITLE_PROPERTY, tuba_dialogs_composer_dialog_quotation_policy_properties[TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_SUBTITLE_PROPERTY, tuba_dialogs_composer_dialog_quotation_policy_properties[TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_SUBTITLE_PROPERTY] = g_param_spec_string ("subtitle", "subtitle", "subtitle", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_ICON_PROPERTY, tuba_dialogs_composer_dialog_quotation_policy_properties[TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_ICON_PROPERTY] = g_param_spec_string ("icon", "icon", "icon", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	tuba_dialogs_composer_dialog_quotation_policy_compare = __tuba_dialogs_composer_dialog_quotation_policy_compare_lambda80__gequal_func;
}

static void
tuba_dialogs_composer_dialog_quotation_policy_instance_init (TubaDialogsComposerDialogQuotationPolicy * self,
                                                             gpointer klass)
{
	self->priv = tuba_dialogs_composer_dialog_quotation_policy_get_instance_private (self);
}

static void
tuba_dialogs_composer_dialog_quotation_policy_finalize (GObject * obj)
{
	TubaDialogsComposerDialogQuotationPolicy * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicy);
	G_OBJECT_CLASS (tuba_dialogs_composer_dialog_quotation_policy_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_dialog_quotation_policy_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerDialogQuotationPolicyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_dialog_quotation_policy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerDialogQuotationPolicy), 0, (GInstanceInitFunc) tuba_dialogs_composer_dialog_quotation_policy_instance_init, NULL };
	GType tuba_dialogs_composer_dialog_quotation_policy_type_id;
	tuba_dialogs_composer_dialog_quotation_policy_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaDialogsComposerDialogQuotationPolicy", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerDialogQuotationPolicy_private_offset = g_type_add_instance_private (tuba_dialogs_composer_dialog_quotation_policy_type_id, sizeof (TubaDialogsComposerDialogQuotationPolicyPrivate));
	return tuba_dialogs_composer_dialog_quotation_policy_type_id;
}

GType
tuba_dialogs_composer_dialog_quotation_policy_get_type (void)
{
	static GType tuba_dialogs_composer_dialog_quotation_policy_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_dialog_quotation_policy_type_id__once)) {
		GType tuba_dialogs_composer_dialog_quotation_policy_type_id;
		tuba_dialogs_composer_dialog_quotation_policy_type_id = tuba_dialogs_composer_dialog_quotation_policy_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_dialog_quotation_policy_type_id__once, tuba_dialogs_composer_dialog_quotation_policy_type_id);
	}
	return tuba_dialogs_composer_dialog_quotation_policy_type_id__once;
}

static void
_vala_tuba_dialogs_composer_dialog_quotation_policy_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec)
{
	TubaDialogsComposerDialogQuotationPolicy * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicy);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_POLICY_PROPERTY:
		g_value_set_enum (value, tuba_dialogs_composer_dialog_quotation_policy_get_policy (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_TITLE_PROPERTY:
		g_value_take_string (value, tuba_dialogs_composer_dialog_quotation_policy_get_title (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_SUBTITLE_PROPERTY:
		g_value_take_string (value, tuba_dialogs_composer_dialog_quotation_policy_get_subtitle (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_ICON_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_dialog_quotation_policy_get_icon (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_dialog_quotation_policy_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec)
{
	TubaDialogsComposerDialogQuotationPolicy * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_QUOTATION_POLICY, TubaDialogsComposerDialogQuotationPolicy);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_DIALOG_QUOTATION_POLICY_POLICY_PROPERTY:
		tuba_dialogs_composer_dialog_quotation_policy_set_policy (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
tuba_dialogs_composer_dialog_precompose_copy (const TubaDialogsComposerDialogPrecompose* self,
                                              TubaDialogsComposerDialogPrecompose* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	TubaAPIPoll* _tmp10_;
	TubaAPIPoll* _tmp11_;
	GeeArrayList* _tmp12_;
	GeeArrayList* _tmp13_;
	_tmp0_ = (*self).content;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).content);
	(*dest).content = _tmp1_;
	_tmp2_ = (*self).spoiler;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).spoiler);
	(*dest).spoiler = _tmp3_;
	_tmp4_ = (*self).quote_id;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 ((*dest).quote_id);
	(*dest).quote_id = _tmp5_;
	_tmp6_ = (*self).scheduled_id;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 ((*dest).scheduled_id);
	(*dest).scheduled_id = _tmp7_;
	_tmp8_ = (*self).in_reply_to_id;
	_tmp9_ = g_strdup (_tmp8_);
	_g_free0 ((*dest).in_reply_to_id);
	(*dest).in_reply_to_id = _tmp9_;
	_tmp10_ = (*self).poll;
	_tmp11_ = _g_object_ref0 (_tmp10_);
	_g_object_unref0 ((*dest).poll);
	(*dest).poll = _tmp11_;
	_tmp12_ = (*self).media_attachments;
	_tmp13_ = _g_object_ref0 (_tmp12_);
	_g_object_unref0 ((*dest).media_attachments);
	(*dest).media_attachments = _tmp13_;
	(*dest).sensitive_media = (*self).sensitive_media;
	(*dest).local_only = (*self).local_only;
	(*dest).force_cursor_at_start = (*self).force_cursor_at_start;
}

void
tuba_dialogs_composer_dialog_precompose_destroy (TubaDialogsComposerDialogPrecompose* self)
{
	_g_free0 ((*self).content);
	_g_free0 ((*self).spoiler);
	_g_free0 ((*self).quote_id);
	_g_free0 ((*self).scheduled_id);
	_g_free0 ((*self).in_reply_to_id);
	_g_object_unref0 ((*self).poll);
	_g_object_unref0 ((*self).media_attachments);
}

TubaDialogsComposerDialogPrecompose*
tuba_dialogs_composer_dialog_precompose_dup (const TubaDialogsComposerDialogPrecompose* self)
{
	TubaDialogsComposerDialogPrecompose* dup;
	dup = g_new0 (TubaDialogsComposerDialogPrecompose, 1);
	tuba_dialogs_composer_dialog_precompose_copy (self, dup);
	return dup;
}

void
tuba_dialogs_composer_dialog_precompose_free (TubaDialogsComposerDialogPrecompose* self)
{
	tuba_dialogs_composer_dialog_precompose_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_dialog_precompose_get_type_once (void)
{
	GType tuba_dialogs_composer_dialog_precompose_type_id;
	tuba_dialogs_composer_dialog_precompose_type_id = g_boxed_type_register_static ("TubaDialogsComposerDialogPrecompose", (GBoxedCopyFunc) tuba_dialogs_composer_dialog_precompose_dup, (GBoxedFreeFunc) tuba_dialogs_composer_dialog_precompose_free);
	return tuba_dialogs_composer_dialog_precompose_type_id;
}

GType
tuba_dialogs_composer_dialog_precompose_get_type (void)
{
	static GType tuba_dialogs_composer_dialog_precompose_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_dialog_precompose_type_id__once)) {
		GType tuba_dialogs_composer_dialog_precompose_type_id;
		tuba_dialogs_composer_dialog_precompose_type_id = tuba_dialogs_composer_dialog_precompose_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_dialog_precompose_type_id__once, tuba_dialogs_composer_dialog_precompose_type_id);
	}
	return tuba_dialogs_composer_dialog_precompose_type_id__once;
}

static void
_tuba_dialogs_composer_dialog_on_schedule_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                     GVariant* parameter,
                                                                                     gpointer self)
{
	tuba_dialogs_composer_dialog_on_schedule_action_activated ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_draft_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                  GVariant* parameter,
                                                                                  gpointer self)
{
	tuba_dialogs_composer_dialog_on_draft_action_activated ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_drafted_posts_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                          GVariant* parameter,
                                                                                          gpointer self)
{
	tuba_dialogs_composer_dialog_on_drafted_posts_action_activated ((TubaDialogsComposerDialog*) self);
}

static GdkDragAction
_tuba_dialogs_composer_dialog_on_drag_enter_gtk_drop_target_enter (GtkDropTarget* _sender,
                                                                   gdouble x,
                                                                   gdouble y,
                                                                   gpointer self)
{
	GdkDragAction result;
	result = tuba_dialogs_composer_dialog_on_drag_enter ((TubaDialogsComposerDialog*) self, x, y);
	return result;
}

static void
_tuba_dialogs_composer_dialog_on_drag_leave_gtk_drop_target_leave (GtkDropTarget* _sender,
                                                                   gpointer self)
{
	tuba_dialogs_composer_dialog_on_drag_leave ((TubaDialogsComposerDialog*) self);
}

static gboolean
_tuba_dialogs_composer_dialog_on_drag_drop_gtk_drop_target_drop (GtkDropTarget* _sender,
                                                                 GValue* value,
                                                                 gdouble x,
                                                                 gdouble y,
                                                                 gpointer self)
{
	gboolean result;
	result = tuba_dialogs_composer_dialog_on_drag_drop ((TubaDialogsComposerDialog*) self, value, x, y);
	return result;
}

static void
_tuba_dialogs_composer_dialog_update_attachmentsbin_sensitivity_gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                                           gpointer self)
{
	tuba_dialogs_composer_dialog_update_attachmentsbin_sensitivity ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_exit_adw_dialog_close_attempt (AdwDialog* _sender,
                                                                gpointer self)
{
	tuba_dialogs_composer_dialog_on_exit ((TubaDialogsComposerDialog*) self);
}

static void
_tuba_dialogs_composer_dialog_on_cw_revealed_g_object_notify (GObject* _sender,
                                                              GParamSpec* pspec,
                                                              gpointer self)
{
	tuba_dialogs_composer_dialog_on_cw_revealed ((TubaDialogsComposerDialog*) self);
}

static GObject *
tuba_dialogs_composer_dialog_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsComposerDialog * self;
	AdwBreakpointCondition* condition = NULL;
	AdwBreakpointCondition* _tmp0_;
	AdwBreakpoint* breakpoint = NULL;
	AdwBreakpointCondition* _tmp1_;
	AdwBreakpoint* _tmp2_;
	AdwBreakpoint* _tmp3_;
	GValue* _tmp4_ = NULL;
	AdwBreakpoint* _tmp5_;
	AdwBreakpoint* _tmp6_;
	GSimpleAction* schedule_action = NULL;
	GSimpleAction* _tmp7_;
	GSimpleAction* _tmp8_;
	GSimpleAction* draft_action = NULL;
	GSimpleAction* _tmp9_;
	GSimpleAction* _tmp10_;
	GSimpleAction* drafted_posts_action = NULL;
	GSimpleAction* _tmp11_;
	GSimpleAction* _tmp12_;
	GSimpleActionGroup* action_group = NULL;
	GSimpleActionGroup* _tmp13_;
	GSimpleActionGroup* _tmp14_;
	GSimpleAction* _tmp15_;
	GSimpleActionGroup* _tmp16_;
	GSimpleAction* _tmp17_;
	GSimpleActionGroup* _tmp18_;
	GSimpleAction* _tmp19_;
	GSimpleActionGroup* _tmp20_;
	gint64 char_limit_api = 0LL;
	TubaAccountStore* _tmp21_;
	TubaInstanceAccount* _tmp22_;
	TubaInstanceAccount* _tmp23_;
	TubaAPIInstance* _tmp24_;
	TubaAPIInstance* _tmp25_;
	gint64 _tmp26_;
	gint64 _tmp27_;
	GtkDropTarget* dnd_controller = NULL;
	GtkDropTarget* _tmp28_ = NULL;
	GtkDropTarget* _tmp29_;
	GtkDropTarget* _tmp30_;
	GtkDropTarget* _tmp31_;
	AdwToolbarView* _tmp32_;
	GtkDropTarget* _tmp33_;
	GtkEventController* _tmp34_;
	GtkToggleButton* _tmp35_;
	gboolean _tmp36_ = FALSE;
	TubaAccountStore* _tmp37_;
	TubaInstanceAccount* _tmp38_;
	TubaInstanceAccount* _tmp39_;
	TubaAPIInstanceV2APIVersions* _tmp40_;
	TubaAPIInstanceV2APIVersions* _tmp41_;
	gint8 _tmp42_;
	gint8 _tmp43_;
	GtkRevealer* _tmp51_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_composer_dialog_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, TubaDialogsComposerDialog);
	_tmp0_ = adw_breakpoint_condition_new_length (ADW_BREAKPOINT_CONDITION_MAX_WIDTH, (gdouble) 430, ADW_LENGTH_UNIT_SP);
	condition = _tmp0_;
	_tmp1_ = condition;
	condition = NULL;
	_tmp2_ = adw_breakpoint_new (_tmp1_);
	breakpoint = _tmp2_;
	_tmp3_ = breakpoint;
	_tmp4_ = g_new0 (GValue, 1);
	g_value_init (_tmp4_, G_TYPE_BOOLEAN);
	g_value_set_boolean (_tmp4_, TRUE);
	adw_breakpoint_add_setter (_tmp3_, (GObject*) self, "is-narrow", _tmp4_);
	__vala_GValue_free0 (_tmp4_);
	_tmp5_ = breakpoint;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	adw_dialog_add_breakpoint ((AdwDialog*) self, _tmp6_);
	_tmp7_ = g_simple_action_new ("schedule", NULL);
	schedule_action = _tmp7_;
	_tmp8_ = schedule_action;
	g_signal_connect_object (_tmp8_, "activate", (GCallback) _tuba_dialogs_composer_dialog_on_schedule_action_activated_g_simple_action_activate, self, 0);
	_tmp9_ = g_simple_action_new ("draft", NULL);
	draft_action = _tmp9_;
	_tmp10_ = draft_action;
	g_signal_connect_object (_tmp10_, "activate", (GCallback) _tuba_dialogs_composer_dialog_on_draft_action_activated_g_simple_action_activate, self, 0);
	_tmp11_ = g_simple_action_new ("drafted-posts", NULL);
	drafted_posts_action = _tmp11_;
	_tmp12_ = drafted_posts_action;
	g_signal_connect_object (_tmp12_, "activate", (GCallback) _tuba_dialogs_composer_dialog_on_drafted_posts_action_activated_g_simple_action_activate, self, 0);
	_tmp13_ = g_simple_action_group_new ();
	action_group = _tmp13_;
	_tmp14_ = action_group;
	_tmp15_ = schedule_action;
	g_action_map_add_action ((GActionMap*) _tmp14_, (GAction*) _tmp15_);
	_tmp16_ = action_group;
	_tmp17_ = draft_action;
	g_action_map_add_action ((GActionMap*) _tmp16_, (GAction*) _tmp17_);
	_tmp18_ = action_group;
	_tmp19_ = drafted_posts_action;
	g_action_map_add_action ((GActionMap*) _tmp18_, (GAction*) _tmp19_);
	_tmp20_ = action_group;
	gtk_widget_insert_action_group ((GtkWidget*) self, "composer", (GActionGroup*) _tmp20_);
	_tmp21_ = tuba_accounts;
	_tmp22_ = tuba_account_store_get_active (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = tuba_instance_account_get_instance_info (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = tuba_api_instance_get_compat_status_max_characters (_tmp25_);
	_tmp27_ = _tmp26_;
	char_limit_api = _tmp27_;
	if (char_limit_api > ((gint64) 0)) {
		tuba_dialogs_composer_dialog_set_char_limit (self, char_limit_api);
	}
	_tmp28_ = gtk_drop_target_new (gdk_file_list_get_type (), GDK_ACTION_COPY);
	gtk_event_controller_set_propagation_phase ((GtkEventController*) _tmp28_, GTK_PHASE_CAPTURE);
	dnd_controller = _tmp28_;
	_tmp29_ = dnd_controller;
	g_signal_connect_object (_tmp29_, "enter", (GCallback) _tuba_dialogs_composer_dialog_on_drag_enter_gtk_drop_target_enter, self, 0);
	_tmp30_ = dnd_controller;
	g_signal_connect_object (_tmp30_, "leave", (GCallback) _tuba_dialogs_composer_dialog_on_drag_leave_gtk_drop_target_leave, self, 0);
	_tmp31_ = dnd_controller;
	g_signal_connect_object (_tmp31_, "drop", (GCallback) _tuba_dialogs_composer_dialog_on_drag_drop_gtk_drop_target_drop, self, 0);
	_tmp32_ = self->priv->toolbar_view;
	_tmp33_ = dnd_controller;
	_tmp34_ = _g_object_ref0 ((GtkEventController*) _tmp33_);
	gtk_widget_add_controller ((GtkWidget*) _tmp32_, _tmp34_);
	_tmp35_ = self->priv->sensitive_media_button;
	g_signal_connect_object (_tmp35_, "toggled", (GCallback) _tuba_dialogs_composer_dialog_update_attachmentsbin_sensitivity_gtk_toggle_button_toggled, self, 0);
	g_signal_connect_object ((AdwDialog*) self, "close-attempt", (GCallback) _tuba_dialogs_composer_dialog_on_exit_adw_dialog_close_attempt, self, 0);
	_tmp37_ = tuba_accounts;
	_tmp38_ = tuba_account_store_get_active (_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = tuba_instance_account_get_tuba_api_versions (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp41_);
	_tmp43_ = _tmp42_;
	if (((gint) _tmp43_) < 10) {
		TubaAccountStore* _tmp44_;
		TubaInstanceAccount* _tmp45_;
		TubaInstanceAccount* _tmp46_;
		TubaInstanceAccountInstanceFeatures _tmp47_;
		TubaInstanceAccountInstanceFeatures _tmp48_;
		_tmp44_ = tuba_accounts;
		_tmp45_ = tuba_account_store_get_active (_tmp44_);
		_tmp46_ = _tmp45_;
		_tmp47_ = tuba_instance_account_get_tuba_instance_features (_tmp46_);
		_tmp48_ = _tmp47_;
		_tmp36_ = !((_tmp48_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL);
	} else {
		_tmp36_ = FALSE;
	}
	if (_tmp36_) {
		GtkToggleButton* _tmp49_;
		GtkButton* _tmp50_;
		_tmp49_ = self->priv->poll_button;
		_tmp50_ = self->priv->add_media_button;
		g_object_bind_property_with_closures ((GObject*) _tmp49_, "active", (GObject*) _tmp50_, "sensitive", G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	}
	_tmp51_ = self->priv->cw_revealer;
	g_signal_connect_object ((GObject*) _tmp51_, "notify::child-revealed", (GCallback) _tuba_dialogs_composer_dialog_on_cw_revealed_g_object_notify, self, 0);
	_g_object_unref0 (dnd_controller);
	_g_object_unref0 (action_group);
	_g_object_unref0 (drafted_posts_action);
	_g_object_unref0 (draft_action);
	_g_object_unref0 (schedule_action);
	_g_object_unref0 (breakpoint);
	_adw_breakpoint_condition_free0 (condition);
	return obj;
}

static void
tuba_dialogs_composer_dialog_class_init (TubaDialogsComposerDialogClass * klass,
                                         gpointer klass_data)
{
	tuba_dialogs_composer_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerDialog_private_offset);
	((GtkWidgetClass *) klass)->grab_focus = (gboolean (*) (GtkWidget*)) tuba_dialogs_composer_dialog_real_grab_focus;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_dialog_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_dialog_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_composer_dialog_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_dialog_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_IS_NARROW_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_IS_NARROW_PROPERTY] = g_param_spec_boolean ("is-narrow", "is-narrow", "is-narrow", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_CHAR_LIMIT_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_CHAR_LIMIT_PROPERTY] = g_param_spec_int64 ("char-limit", "char-limit", "char-limit", G_MININT64, G_MAXINT64, (gint64) 500, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_CW_COUNT_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_CW_COUNT_PROPERTY] = g_param_spec_int64 ("cw-count", "cw-count", "cw-count", G_MININT64, G_MAXINT64, (gint64) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_RESERVED_CHARS_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_RESERVED_CHARS_PROPERTY] = g_param_spec_char ("reserved-chars", "reserved-chars", "reserved-chars", G_MININT8, G_MAXINT8, (gint8) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_REMAINING_CHARS_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_REMAINING_CHARS_PROPERTY] = g_param_spec_int64 ("remaining-chars", "remaining-chars", "remaining-chars", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_QUOTE_ID_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_QUOTE_ID_PROPERTY] = g_param_spec_string ("quote-id", "quote-id", "quote-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_SCHEDULED_ID_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_SCHEDULED_ID_PROPERTY] = g_param_spec_string ("scheduled-id", "scheduled-id", "scheduled-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_DIALOG_EDIT_STATUS_ID_PROPERTY, tuba_dialogs_composer_dialog_properties[TUBA_DIALOGS_COMPOSER_DIALOG_EDIT_STATUS_ID_PROPERTY] = g_param_spec_string ("edit-status-id", "edit-status-id", "edit-status-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/dev/geopjr/Tuba/ui/dialogs/composer.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "counter_label", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, counter_label));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "post_btn", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, post_btn));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "btns_box", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, btns_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "dropdowns_box", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, dropdowns_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "grid", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, grid));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "toast_overlay", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, toast_overlay));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "nav_view", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, nav_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "toolbar_view", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, toolbar_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "drop_overlay", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, drop_overlay));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "nav_page", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, nav_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scroller", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, scroller));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "headerbar", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, headerbar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_title_revealer", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, main_title_revealer));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cw_revealer", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, cw_revealer));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "native_emojis_button", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, native_emojis_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "custom_emojis_button", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, custom_emojis_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cw_button", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, cw_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cw_entry", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, cw_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "poll_button", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, poll_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sensitive_media_button", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, sensitive_media_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "add_media_button", FALSE, TubaDialogsComposerDialog_private_offset + G_STRUCT_OFFSET (TubaDialogsComposerDialogPrivate, add_media_button));
	g_type_ensure (TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY);
	g_type_ensure (TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON);
}

static void
tuba_dialogs_composer_dialog_instance_init (TubaDialogsComposerDialog * self,
                                            gpointer klass)
{
	self->priv = tuba_dialogs_composer_dialog_get_instance_private (self);
	self->priv->_is_narrow = FALSE;
	self->priv->_char_limit = (gint64) 500;
	self->priv->_cw_count = (gint64) 0;
	self->priv->_reserved_chars = (gint8) 0;
	self->priv->_remaining_chars = (gint64) 500;
	self->priv->_edit_mode = FALSE;
	self->priv->_schedule_iso8601 = NULL;
	self->priv->_in_reply_to_id = NULL;
	self->priv->_quote_id = NULL;
	self->priv->_scheduled_id = NULL;
	self->priv->_edit_status_id = NULL;
	self->priv->_quote_limited = FALSE;
	self->content_type_button = NULL;
	self->quote_policy_button = NULL;
	self->local_only_button = NULL;
	self->priv->unique_state = (guint) 0;
	self->priv->polls_component = NULL;
	self->priv->polls_animation = NULL;
	self->priv->attachmentsbin_component = NULL;
	self->priv->quote_paste_cancellable = NULL;
	self->priv->inline_quote_widget = NULL;
	self->priv->inline_quote_widget_animation = NULL;
	g_type_ensure (TUBA_DIALOGS_COMPOSER_DIALOG_TYPE_POST_BUTTON);
	g_type_ensure (TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_DROP_OVERLAY);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tuba_dialogs_composer_dialog_finalize (GObject * obj)
{
	TubaDialogsComposerDialog * self;
	GCancellable* _tmp0_;
	GtkWidget* _tmp2_;
	AdwTimedAnimation* _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, TubaDialogsComposerDialog);
	g_debug ("Dialog.vala:6: Destroying Composer");
	_tmp0_ = self->priv->quote_paste_cancellable;
	if (_tmp0_ != NULL) {
		GCancellable* _tmp1_;
		_tmp1_ = self->priv->quote_paste_cancellable;
		g_cancellable_cancel (_tmp1_);
	}
	_tmp2_ = self->priv->inline_quote_widget;
	if (_tmp2_ != NULL) {
		_g_object_unref0 (self->priv->inline_quote_widget);
		self->priv->inline_quote_widget = NULL;
	}
	_tmp3_ = self->priv->inline_quote_widget_animation;
	if (_tmp3_ != NULL) {
		_g_object_unref0 (self->priv->inline_quote_widget_animation);
		self->priv->inline_quote_widget_animation = NULL;
	}
	_g_free0 (self->priv->_schedule_iso8601);
	_g_free0 (self->priv->_in_reply_to_id);
	_g_free0 (self->priv->_quote_id);
	_g_free0 (self->priv->_scheduled_id);
	_g_free0 (self->priv->_edit_status_id);
	_g_object_unref0 (self->priv->editor);
	_g_object_unref0 (self->visibility_button);
	_g_object_unref0 (self->language_button);
	_g_object_unref0 (self->content_type_button);
	_g_object_unref0 (self->quote_policy_button);
	_g_object_unref0 (self->local_only_button);
	(self->cb_target_destroy_notify == NULL) ? NULL : (self->cb_target_destroy_notify (self->cb_target), NULL);
	self->cb = NULL;
	self->cb_target = NULL;
	self->cb_target_destroy_notify = NULL;
	_g_object_unref0 (self->priv->polls_component);
	_g_object_unref0 (self->priv->polls_animation);
	_g_object_unref0 (self->priv->attachmentsbin_component);
	_g_object_unref0 (self->priv->quote_paste_cancellable);
	_g_object_unref0 (self->priv->inline_quote_widget);
	_g_object_unref0 (self->priv->inline_quote_widget_animation);
	G_OBJECT_CLASS (tuba_dialogs_composer_dialog_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerDialog), 0, (GInstanceInitFunc) tuba_dialogs_composer_dialog_instance_init, NULL };
	GType tuba_dialogs_composer_dialog_type_id;
	tuba_dialogs_composer_dialog_type_id = g_type_register_static (adw_dialog_get_type (), "TubaDialogsComposerDialog", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerDialog_private_offset = g_type_add_instance_private (tuba_dialogs_composer_dialog_type_id, sizeof (TubaDialogsComposerDialogPrivate));
	return tuba_dialogs_composer_dialog_type_id;
}

GType
tuba_dialogs_composer_dialog_get_type (void)
{
	static GType tuba_dialogs_composer_dialog_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_dialog_type_id__once)) {
		GType tuba_dialogs_composer_dialog_type_id;
		tuba_dialogs_composer_dialog_type_id = tuba_dialogs_composer_dialog_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_dialog_type_id__once, tuba_dialogs_composer_dialog_type_id);
	}
	return tuba_dialogs_composer_dialog_type_id__once;
}

static void
_vala_tuba_dialogs_composer_dialog_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	TubaDialogsComposerDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, TubaDialogsComposerDialog);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_DIALOG_IS_NARROW_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_dialog_get_is_narrow (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_CHAR_LIMIT_PROPERTY:
		g_value_set_int64 (value, tuba_dialogs_composer_dialog_get_char_limit (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_CW_COUNT_PROPERTY:
		g_value_set_int64 (value, tuba_dialogs_composer_dialog_get_cw_count (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_RESERVED_CHARS_PROPERTY:
		g_value_set_char (value, tuba_dialogs_composer_dialog_get_reserved_chars (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_REMAINING_CHARS_PROPERTY:
		g_value_set_int64 (value, tuba_dialogs_composer_dialog_get_remaining_chars (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_QUOTE_ID_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_dialog_get_quote_id (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_SCHEDULED_ID_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_dialog_get_scheduled_id (self));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_EDIT_STATUS_ID_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_dialog_get_edit_status_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_dialog_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	TubaDialogsComposerDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_TYPE_DIALOG, TubaDialogsComposerDialog);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_DIALOG_IS_NARROW_PROPERTY:
		tuba_dialogs_composer_dialog_set_is_narrow (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_CHAR_LIMIT_PROPERTY:
		tuba_dialogs_composer_dialog_set_char_limit (self, g_value_get_int64 (value));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_CW_COUNT_PROPERTY:
		tuba_dialogs_composer_dialog_set_cw_count (self, g_value_get_int64 (value));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_RESERVED_CHARS_PROPERTY:
		tuba_dialogs_composer_dialog_set_reserved_chars (self, g_value_get_char (value));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_REMAINING_CHARS_PROPERTY:
		tuba_dialogs_composer_dialog_set_remaining_chars (self, g_value_get_int64 (value));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_QUOTE_ID_PROPERTY:
		tuba_dialogs_composer_dialog_set_quote_id (self, g_value_get_string (value));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_SCHEDULED_ID_PROPERTY:
		tuba_dialogs_composer_dialog_set_scheduled_id (self, g_value_get_string (value));
		break;
		case TUBA_DIALOGS_COMPOSER_DIALOG_EDIT_STATUS_ID_PROPERTY:
		tuba_dialogs_composer_dialog_set_edit_status_id (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

