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

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

#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_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_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;
typedef struct _TubaDialogsComposerComponentsPollsPrivate TubaDialogsComposerComponentsPollsPrivate;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW (tuba_dialogs_composer_components_polls_poll_row_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, TubaDialogsComposerComponentsPollsPollRow))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, TubaDialogsComposerComponentsPollsPollRowClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_POLL_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_POLL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, TubaDialogsComposerComponentsPollsPollRowClass))

typedef struct _TubaDialogsComposerComponentsPollsPollRow TubaDialogsComposerComponentsPollsPollRow;
typedef struct _TubaDialogsComposerComponentsPollsPollRowClass TubaDialogsComposerComponentsPollsPollRowClass;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON (tuba_dialogs_composer_components_polls_stateful_button_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, TubaDialogsComposerComponentsPollsStatefulButton))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, TubaDialogsComposerComponentsPollsStatefulButtonClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_STATEFUL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_STATEFUL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, TubaDialogsComposerComponentsPollsStatefulButtonClass))

typedef struct _TubaDialogsComposerComponentsPollsStatefulButton TubaDialogsComposerComponentsPollsStatefulButton;
typedef struct _TubaDialogsComposerComponentsPollsStatefulButtonClass TubaDialogsComposerComponentsPollsStatefulButtonClass;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION (tuba_dialogs_composer_components_polls_expiration_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpiration))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpirationClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_EXPIRATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_EXPIRATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpirationClass))

typedef struct _TubaDialogsComposerComponentsPollsExpiration TubaDialogsComposerComponentsPollsExpiration;
typedef struct _TubaDialogsComposerComponentsPollsExpirationClass TubaDialogsComposerComponentsPollsExpirationClass;
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EDIT_MODE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_NARROW_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_HIDE_TOTALS_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_MULTIPLE_CHOICE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_CAN_DELETE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_VALID_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_INITING_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRES_IN_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_HAS_ROWS_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_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_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_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_POLL_OPTION (tuba_api_poll_option_get_type ())
#define TUBA_API_POLL_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_POLL_OPTION, TubaAPIPollOption))
#define TUBA_API_POLL_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_POLL_OPTION, TubaAPIPollOptionClass))
#define TUBA_API_IS_POLL_OPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_POLL_OPTION))
#define TUBA_API_IS_POLL_OPTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_POLL_OPTION))
#define TUBA_API_POLL_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_POLL_OPTION, TubaAPIPollOptionClass))

typedef struct _TubaAPIPollOption TubaAPIPollOption;
typedef struct _TubaAPIPollOptionClass TubaAPIPollOptionClass;

#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_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 _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _TubaDialogsComposerComponentsPollsPollRowPrivate TubaDialogsComposerComponentsPollsPollRowPrivate;
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_VALID_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_CAN_DELETE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_LAST_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_EMPTY_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_NUM_PROPERTIES];
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_DELETED_SIGNAL,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_NUM_SIGNALS
};
static guint tuba_dialogs_composer_components_polls_poll_row_signals[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_NUM_SIGNALS] = {0};
typedef struct _TubaDialogsComposerComponentsPollsExpirationPrivate TubaDialogsComposerComponentsPollsExpirationPrivate;
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_SHORT_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_VALUE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_components_polls_expiration_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_NUM_PROPERTIES];
typedef struct _TubaDialogsComposerComponentsPollsStatefulButtonPrivate TubaDialogsComposerComponentsPollsStatefulButtonPrivate;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TYPE_STATE (tuba_dialogs_composer_components_polls_stateful_button_state_get_type ())
typedef struct _TubaDialogsComposerComponentsPollsStatefulButtonState TubaDialogsComposerComponentsPollsStatefulButtonState;
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ACTIVE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ICON_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TITLE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_components_polls_stateful_button_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_NUM_PROPERTIES];

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

struct _TubaDialogsComposerComponentsPolls {
	GtkBox parent_instance;
	TubaDialogsComposerComponentsPollsPrivate * priv;
};

struct _TubaDialogsComposerComponentsPollsClass {
	GtkBoxClass parent_class;
};

struct _TubaDialogsComposerComponentsPollsPrivate {
	gboolean _edit_mode;
	gboolean _is_narrow;
	GeeArrayList* poll_options;
	GtkListBox* poll_list;
	GtkDropDown* expiration_button;
	TubaDialogsComposerComponentsPollsStatefulButton* multi_button;
	TubaDialogsComposerComponentsPollsStatefulButton* show_results_button;
	GtkGrid* actions_grid;
	gboolean _can_delete;
	gboolean _is_valid;
	gboolean _initing;
	TubaDialogsComposerComponentsPollsExpiration** expirations;
	gint expirations_length1;
	gint _expirations_size_;
};

struct _TubaDialogsComposerComponentsPollsPollRow {
	AdwEntryRow parent_instance;
	TubaDialogsComposerComponentsPollsPollRowPrivate * priv;
};

struct _TubaDialogsComposerComponentsPollsPollRowClass {
	AdwEntryRowClass parent_class;
};

struct _TubaDialogsComposerComponentsPollsPollRowPrivate {
	GtkButton* delete_button;
	gboolean _is_valid;
	gboolean _can_delete;
	gboolean _is_last;
	gboolean _is_empty;
};

struct _TubaDialogsComposerComponentsPollsExpiration {
	GObject parent_instance;
	TubaDialogsComposerComponentsPollsExpirationPrivate * priv;
};

struct _TubaDialogsComposerComponentsPollsExpirationClass {
	GObjectClass parent_class;
};

struct _TubaDialogsComposerComponentsPollsExpirationPrivate {
	gchar* _text;
	gchar* _text_short;
	gint64 _value;
};

struct _TubaDialogsComposerComponentsPollsStatefulButton {
	GtkButton parent_instance;
	TubaDialogsComposerComponentsPollsStatefulButtonPrivate * priv;
};

struct _TubaDialogsComposerComponentsPollsStatefulButtonClass {
	GtkButtonClass parent_class;
};

struct _TubaDialogsComposerComponentsPollsStatefulButtonState {
	gchar* active;
	gchar* inactive;
};

struct _TubaDialogsComposerComponentsPollsStatefulButtonPrivate {
	gboolean _active;
	TubaDialogsComposerComponentsPollsStatefulButtonState _icon;
	TubaDialogsComposerComponentsPollsStatefulButtonState _title;
	AdwButtonContent* content;
};

static gint TubaDialogsComposerComponentsPolls_private_offset;
static gpointer tuba_dialogs_composer_components_polls_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN GEqualFunc tuba_dialogs_composer_components_polls_expiration_compare;
static gint TubaDialogsComposerComponentsPollsPollRow_private_offset;
static gpointer tuba_dialogs_composer_components_polls_poll_row_parent_class = NULL;
static gint TubaDialogsComposerComponentsPollsExpiration_private_offset;
static gpointer tuba_dialogs_composer_components_polls_expiration_parent_class = NULL;
GEqualFunc tuba_dialogs_composer_components_polls_expiration_compare = NULL;
static gint TubaDialogsComposerComponentsPollsStatefulButton_private_offset;
static gpointer tuba_dialogs_composer_components_polls_stateful_button_parent_class = NULL;
static TubaDialogsComposerComponentsAttachableIface * tuba_dialogs_composer_components_polls_tuba_dialogs_composer_components_attachable_parent_iface = NULL;

VALA_EXTERN GType tuba_dialogs_composer_components_attachable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsAttachable, 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_polls_poll_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsPollsPollRow, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_polls_stateful_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsPollsStatefulButton, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_polls_expiration_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsPollsExpiration, g_object_unref)
VALA_EXTERN TubaDialogsComposerComponentsPollsExpiration* tuba_dialogs_composer_components_polls_expiration_new (const gchar* text,
                                                                                                     const gchar* text_short,
                                                                                                     gint64 value);
VALA_EXTERN TubaDialogsComposerComponentsPollsExpiration* tuba_dialogs_composer_components_polls_expiration_construct (GType object_type,
                                                                                                           const gchar* text,
                                                                                                           const gchar* text_short,
                                                                                                           gint64 value);
VALA_EXTERN gchar** tuba_dialogs_composer_components_polls_get_all_options (TubaDialogsComposerComponentsPolls* self,
                                                                gint* result_length1);
static void _vala_array_add47 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
VALA_EXTERN void tuba_dialogs_composer_components_polls_grab_first_row_focus (TubaDialogsComposerComponentsPolls* self);
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_poll_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPoll, g_object_unref)
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);
VALA_EXTERN void tuba_dialogs_composer_components_polls_set_initing (TubaDialogsComposerComponentsPolls* self,
                                                         gboolean value);
static TubaDialogsComposerComponentsPollsPollRow* tuba_dialogs_composer_components_polls_add_poll_row (TubaDialogsComposerComponentsPolls* self,
                                                                                                const gchar* content,
                                                                                                gboolean is_last);
VALA_EXTERN gboolean tuba_api_poll_get_multiple (TubaAPIPoll* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_set_active (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                        gboolean value);
VALA_EXTERN GType tuba_api_poll_option_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPollOption, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_poll_get_options (TubaAPIPoll* self);
VALA_EXTERN const gchar* tuba_api_poll_option_get_title (TubaAPIPollOption* self);
VALA_EXTERN const gchar* tuba_api_poll_get_expires_at (TubaAPIPoll* self);
static void tuba_dialogs_composer_components_polls_row_cleanup (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_install_expires_in (TubaDialogsComposerComponentsPolls* self,
                                                                const gchar* expires_at);
static void tuba_dialogs_composer_components_polls_check_poll_items (TubaDialogsComposerComponentsPolls* self);
static void tuba_dialogs_composer_components_polls_set_can_delete (TubaDialogsComposerComponentsPolls* self,
                                                            gboolean value);
VALA_EXTERN TubaDialogsComposerComponentsPollsPollRow* tuba_dialogs_composer_components_polls_poll_row_new (void);
VALA_EXTERN TubaDialogsComposerComponentsPollsPollRow* tuba_dialogs_composer_components_polls_poll_row_construct (GType object_type);
VALA_EXTERN void tuba_dialogs_composer_components_polls_poll_row_set_is_last (TubaDialogsComposerComponentsPollsPollRow* self,
                                                                  gboolean value);
static void tuba_dialogs_composer_components_polls_remove_poll_row (TubaDialogsComposerComponentsPolls* self,
                                                             TubaDialogsComposerComponentsPollsPollRow* row);
static void _tuba_dialogs_composer_components_polls_remove_poll_row_tuba_dialogs_composer_components_polls_poll_row_deleted (TubaDialogsComposerComponentsPollsPollRow* _sender,
                                                                                                                      TubaDialogsComposerComponentsPollsPollRow* row,
                                                                                                                      gpointer self);
static void tuba_dialogs_composer_components_polls_on_row_invalid (TubaDialogsComposerComponentsPolls* self);
static void _tuba_dialogs_composer_components_polls_on_row_invalid_g_object_notify (GObject* _sender,
                                                                             GParamSpec* pspec,
                                                                             gpointer self);
static void _tuba_dialogs_composer_components_polls_row_cleanup_gtk_editable_changed (GtkEditable* _sender,
                                                                               gpointer self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_initing (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_poll_row_get_is_empty (TubaDialogsComposerComponentsPollsPollRow* 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_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 gint64 tuba_api_instance_get_compat_status_poll_max_options (TubaAPIInstance* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_can_delete (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_check_invalid (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_set_is_valid (TubaDialogsComposerComponentsPolls* self,
                                                          gboolean value);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_poll_row_get_is_valid (TubaDialogsComposerComponentsPollsPollRow* self);
VALA_EXTERN gint64 tuba_api_instance_get_compat_status_poll_min_expiration (TubaAPIInstance* self);
VALA_EXTERN gint64 tuba_api_instance_get_compat_status_poll_max_expiration (TubaAPIInstance* self);
VALA_EXTERN gint64 tuba_dialogs_composer_components_polls_expiration_get_value (TubaDialogsComposerComponentsPollsExpiration* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_is_narrow (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_set_is_narrow (TubaDialogsComposerComponentsPolls* self,
                                                           gboolean value);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_hide_totals (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_stateful_button_get_active (TubaDialogsComposerComponentsPollsStatefulButton* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_multiple_choice (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_is_valid (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gint64 tuba_dialogs_composer_components_polls_get_expires_in (TubaDialogsComposerComponentsPolls* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_get_has_rows (TubaDialogsComposerComponentsPolls* self);
static void tuba_dialogs_composer_components_polls_poll_row_set_is_valid (TubaDialogsComposerComponentsPollsPollRow* self,
                                                                   gboolean value);
static void tuba_dialogs_composer_components_polls_poll_row_update_delete_button (TubaDialogsComposerComponentsPollsPollRow* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_poll_row_get_can_delete (TubaDialogsComposerComponentsPollsPollRow* self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_polls_poll_row_get_is_last (TubaDialogsComposerComponentsPollsPollRow* self);
static void tuba_dialogs_composer_components_polls_poll_row_on_delete_button_clicked (TubaDialogsComposerComponentsPollsPollRow* self);
static void tuba_dialogs_composer_components_polls_poll_row_check_valid (TubaDialogsComposerComponentsPollsPollRow* self);
VALA_EXTERN gint64 tuba_api_instance_get_compat_status_poll_max_characters (TubaAPIInstance* self);
static void tuba_dialogs_composer_components_polls_poll_row_set_is_empty (TubaDialogsComposerComponentsPollsPollRow* self,
                                                                   gboolean value);
VALA_EXTERN void tuba_dialogs_composer_components_polls_poll_row_set_can_delete (TubaDialogsComposerComponentsPollsPollRow* self,
                                                                     gboolean value);
static GObject * tuba_dialogs_composer_components_polls_poll_row_constructor (GType type,
                                                                       guint n_construct_properties,
                                                                       GObjectConstructParam * construct_properties);
static void _tuba_dialogs_composer_components_polls_poll_row_on_delete_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                                   gpointer self);
static void _tuba_dialogs_composer_components_polls_poll_row_check_valid_gtk_editable_changed (GtkEditable* _sender,
                                                                                        gpointer self);
static void tuba_dialogs_composer_components_polls_poll_row_finalize (GObject * obj);
static GType tuba_dialogs_composer_components_polls_poll_row_get_type_once (void);
static void _vala_tuba_dialogs_composer_components_polls_poll_row_get_property (GObject * object,
                                                                         guint property_id,
                                                                         GValue * value,
                                                                         GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_components_polls_poll_row_set_property (GObject * object,
                                                                         guint property_id,
                                                                         const GValue * value,
                                                                         GParamSpec * pspec);
static gboolean _tuba_dialogs_composer_components_polls_expiration_compare_lambda72_ (const gchar* a,
                                                                               const gchar* b);
static gboolean __tuba_dialogs_composer_components_polls_expiration_compare_lambda72__gequal_func (gconstpointer a,
                                                                                            gconstpointer b);
VALA_EXTERN const gchar* tuba_dialogs_composer_components_polls_expiration_get_text (TubaDialogsComposerComponentsPollsExpiration* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_expiration_set_text (TubaDialogsComposerComponentsPollsExpiration* self,
                                                                 const gchar* value);
VALA_EXTERN const gchar* tuba_dialogs_composer_components_polls_expiration_get_text_short (TubaDialogsComposerComponentsPollsExpiration* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_expiration_set_text_short (TubaDialogsComposerComponentsPollsExpiration* self,
                                                                       const gchar* value);
VALA_EXTERN void tuba_dialogs_composer_components_polls_expiration_set_value (TubaDialogsComposerComponentsPollsExpiration* self,
                                                                  gint64 value);
static void tuba_dialogs_composer_components_polls_expiration_finalize (GObject * obj);
static GType tuba_dialogs_composer_components_polls_expiration_get_type_once (void);
static void _vala_tuba_dialogs_composer_components_polls_expiration_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_components_polls_expiration_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec);
VALA_EXTERN GType tuba_dialogs_composer_components_polls_stateful_button_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaDialogsComposerComponentsPollsStatefulButtonState* tuba_dialogs_composer_components_polls_stateful_button_state_dup (const TubaDialogsComposerComponentsPollsStatefulButtonState* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_state_free (TubaDialogsComposerComponentsPollsStatefulButtonState* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_state_copy (const TubaDialogsComposerComponentsPollsStatefulButtonState* self,
                                                                        TubaDialogsComposerComponentsPollsStatefulButtonState* dest);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_state_destroy (TubaDialogsComposerComponentsPollsStatefulButtonState* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaDialogsComposerComponentsPollsStatefulButtonState, tuba_dialogs_composer_components_polls_stateful_button_state_destroy)
VALA_EXTERN TubaDialogsComposerComponentsPollsStatefulButton* tuba_dialogs_composer_components_polls_stateful_button_new (TubaDialogsComposerComponentsPollsStatefulButtonState* icon,
                                                                                                              TubaDialogsComposerComponentsPollsStatefulButtonState* title,
                                                                                                              gboolean active);
VALA_EXTERN TubaDialogsComposerComponentsPollsStatefulButton* tuba_dialogs_composer_components_polls_stateful_button_construct (GType object_type,
                                                                                                                    TubaDialogsComposerComponentsPollsStatefulButtonState* icon,
                                                                                                                    TubaDialogsComposerComponentsPollsStatefulButtonState* title,
                                                                                                                    gboolean active);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_set_icon (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                      TubaDialogsComposerComponentsPollsStatefulButtonState * value);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_set_title (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                       TubaDialogsComposerComponentsPollsStatefulButtonState * value);
static void tuba_dialogs_composer_components_polls_stateful_button_on_clicked (TubaDialogsComposerComponentsPollsStatefulButton* self);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_get_icon (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                      TubaDialogsComposerComponentsPollsStatefulButtonState * result);
VALA_EXTERN void tuba_dialogs_composer_components_polls_stateful_button_get_title (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                       TubaDialogsComposerComponentsPollsStatefulButtonState * result);
static gboolean _tuba_dialogs_composer_components_polls_stateful_button_state_equal (const TubaDialogsComposerComponentsPollsStatefulButtonState * s1,
                                                                              const TubaDialogsComposerComponentsPollsStatefulButtonState * s2);
static GObject * tuba_dialogs_composer_components_polls_stateful_button_constructor (GType type,
                                                                              guint n_construct_properties,
                                                                              GObjectConstructParam * construct_properties);
static void _tuba_dialogs_composer_components_polls_stateful_button_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                            gpointer self);
static void tuba_dialogs_composer_components_polls_stateful_button_finalize (GObject * obj);
static GType tuba_dialogs_composer_components_polls_stateful_button_get_type_once (void);
static void _vala_tuba_dialogs_composer_components_polls_stateful_button_get_property (GObject * object,
                                                                                guint property_id,
                                                                                GValue * value,
                                                                                GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_components_polls_stateful_button_set_property (GObject * object,
                                                                                guint property_id,
                                                                                const GValue * value,
                                                                                GParamSpec * pspec);
static GObject * tuba_dialogs_composer_components_polls_constructor (GType type,
                                                              guint n_construct_properties,
                                                              GObjectConstructParam * construct_properties);
VALA_EXTERN gboolean tuba_dialogs_composer_components_attachable_get_edit_mode (TubaDialogsComposerComponentsAttachable* self);
VALA_EXTERN void tuba_dialogs_composer_components_attachable_set_edit_mode (TubaDialogsComposerComponentsAttachable* self,
                                                                gboolean value);
static void tuba_dialogs_composer_components_polls_finalize (GObject * obj);
static GType tuba_dialogs_composer_components_polls_get_type_once (void);
static void _vala_tuba_dialogs_composer_components_polls_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_components_polls_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_components_polls_get_instance_private (TubaDialogsComposerComponentsPolls* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerComponentsPolls_private_offset);
}

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

gchar**
tuba_dialogs_composer_components_polls_get_all_options (TubaDialogsComposerComponentsPolls* self,
                                                        gint* result_length1)
{
	gchar** _result_ = NULL;
	gchar** _tmp0_;
	gint _result__length1;
	gint __result__size_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	_result_ = _tmp0_;
	_result__length1 = 0;
	__result__size_ = _result__length1;
	{
		GeeArrayList* _poll_option_list = NULL;
		GeeArrayList* _tmp1_;
		gint _poll_option_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _poll_option_index = 0;
		_tmp1_ = self->priv->poll_options;
		_poll_option_list = _tmp1_;
		_tmp2_ = _poll_option_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_poll_option_size = _tmp4_;
		_poll_option_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			TubaDialogsComposerComponentsPollsPollRow* poll_option = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			TubaDialogsComposerComponentsPollsPollRow* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			_poll_option_index = _poll_option_index + 1;
			_tmp5_ = _poll_option_index;
			_tmp6_ = _poll_option_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _poll_option_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _poll_option_index);
			poll_option = (TubaDialogsComposerComponentsPollsPollRow*) _tmp8_;
			_tmp9_ = poll_option;
			_tmp10_ = gtk_editable_get_text ((GtkEditable*) _tmp9_);
			_tmp11_ = _tmp10_;
			if (g_strcmp0 (_tmp11_, "") != 0) {
				TubaDialogsComposerComponentsPollsPollRow* _tmp12_;
				const gchar* _tmp13_;
				const gchar* _tmp14_;
				gchar* _tmp15_;
				_tmp12_ = poll_option;
				_tmp13_ = gtk_editable_get_text ((GtkEditable*) _tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = g_strdup (_tmp14_);
				_vala_array_add47 (&_result_, &_result__length1, &__result__size_, _tmp15_);
			}
			_g_object_unref0 (poll_option);
		}
	}
	_tmp16_ = _result_;
	_tmp16__length1 = _result__length1;
	if (result_length1) {
		*result_length1 = _tmp16__length1;
	}
	result = _tmp16_;
	return result;
}

void
tuba_dialogs_composer_components_polls_grab_first_row_focus (TubaDialogsComposerComponentsPolls* self)
{
	gboolean _tmp0_ = FALSE;
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->poll_options;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 0) {
		GeeArrayList* _tmp4_;
		gpointer _tmp5_;
		TubaDialogsComposerComponentsPollsPollRow* _tmp6_;
		_tmp4_ = self->priv->poll_options;
		_tmp5_ = gee_abstract_list_get ((GeeAbstractList*) _tmp4_, 0);
		_tmp6_ = (TubaDialogsComposerComponentsPollsPollRow*) _tmp5_;
		_tmp0_ = gtk_widget_grab_focus ((GtkWidget*) _tmp6_);
		_g_object_unref0 (_tmp6_);
	} else {
		_tmp0_ = gtk_widget_grab_focus ((GtkWidget*) self);
	}
}

TubaDialogsComposerComponentsPolls*
tuba_dialogs_composer_components_polls_construct (GType object_type,
                                                  TubaAPIPoll* poll_obj)
{
	TubaDialogsComposerComponentsPolls * self = NULL;
	gchar* expires_at = NULL;
	const gchar* _tmp25_;
	GtkGrid* _tmp26_;
	GtkDropDown* _tmp27_;
	self = (TubaDialogsComposerComponentsPolls*) g_object_new (object_type, NULL);
	tuba_dialogs_composer_components_polls_set_initing (self, TRUE);
	expires_at = NULL;
	if (poll_obj == NULL) {
		TubaDialogsComposerComponentsPollsPollRow* _tmp0_;
		TubaDialogsComposerComponentsPollsPollRow* _tmp1_;
		TubaDialogsComposerComponentsPollsPollRow* _tmp2_;
		TubaDialogsComposerComponentsPollsPollRow* _tmp3_;
		_tmp0_ = tuba_dialogs_composer_components_polls_add_poll_row (self, NULL, FALSE);
		_tmp1_ = _tmp0_;
		_g_object_unref0 (_tmp1_);
		_tmp2_ = tuba_dialogs_composer_components_polls_add_poll_row (self, NULL, FALSE);
		_tmp3_ = _tmp2_;
		_g_object_unref0 (_tmp3_);
	} else {
		TubaDialogsComposerComponentsPollsStatefulButton* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		_tmp4_ = self->priv->multi_button;
		_tmp5_ = tuba_api_poll_get_multiple (poll_obj);
		_tmp6_ = _tmp5_;
		tuba_dialogs_composer_components_polls_stateful_button_set_active (_tmp4_, _tmp6_);
		{
			GeeArrayList* _option_list = NULL;
			GeeArrayList* _tmp7_;
			GeeArrayList* _tmp8_;
			gint _option_size = 0;
			GeeArrayList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gint _option_index = 0;
			_tmp7_ = tuba_api_poll_get_options (poll_obj);
			_tmp8_ = _tmp7_;
			_option_list = _tmp8_;
			_tmp9_ = _option_list;
			_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
			_tmp11_ = _tmp10_;
			_option_size = _tmp11_;
			_option_index = -1;
			while (TRUE) {
				gint _tmp12_;
				gint _tmp13_;
				TubaAPIPollOption* option = NULL;
				GeeArrayList* _tmp14_;
				gpointer _tmp15_;
				TubaAPIPollOption* _tmp16_;
				_option_index = _option_index + 1;
				_tmp12_ = _option_index;
				_tmp13_ = _option_size;
				if (!(_tmp12_ < _tmp13_)) {
					break;
				}
				_tmp14_ = _option_list;
				_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, _option_index);
				option = (TubaAPIPollOption*) _tmp15_;
				_tmp16_ = option;
				if (_tmp16_ != NULL) {
					TubaAPIPollOption* _tmp17_;
					const gchar* _tmp18_;
					const gchar* _tmp19_;
					TubaDialogsComposerComponentsPollsPollRow* _tmp20_;
					TubaDialogsComposerComponentsPollsPollRow* _tmp21_;
					_tmp17_ = option;
					_tmp18_ = tuba_api_poll_option_get_title (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp20_ = tuba_dialogs_composer_components_polls_add_poll_row (self, _tmp19_, FALSE);
					_tmp21_ = _tmp20_;
					_g_object_unref0 (_tmp21_);
				}
				_g_object_unref0 (option);
			}
		}
		_tmp22_ = tuba_api_poll_get_expires_at (poll_obj);
		_tmp23_ = _tmp22_;
		_tmp24_ = g_strdup (_tmp23_);
		_g_free0 (expires_at);
		expires_at = _tmp24_;
	}
	tuba_dialogs_composer_components_polls_set_initing (self, FALSE);
	tuba_dialogs_composer_components_polls_row_cleanup (self);
	_tmp25_ = expires_at;
	tuba_dialogs_composer_components_polls_install_expires_in (self, _tmp25_);
	_tmp26_ = self->priv->actions_grid;
	_tmp27_ = self->priv->expiration_button;
	gtk_grid_attach (_tmp26_, (GtkWidget*) _tmp27_, 0, 1, 1, 1);
	_g_free0 (expires_at);
	return self;
}

TubaDialogsComposerComponentsPolls*
tuba_dialogs_composer_components_polls_new (TubaAPIPoll* poll_obj)
{
	return tuba_dialogs_composer_components_polls_construct (TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, poll_obj);
}

static void
tuba_dialogs_composer_components_polls_check_poll_items (TubaDialogsComposerComponentsPolls* self)
{
	gint poll_options_amount = 0;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->poll_options;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	poll_options_amount = _tmp2_;
	tuba_dialogs_composer_components_polls_set_can_delete (self, poll_options_amount > 2);
}

static void
_tuba_dialogs_composer_components_polls_remove_poll_row_tuba_dialogs_composer_components_polls_poll_row_deleted (TubaDialogsComposerComponentsPollsPollRow* _sender,
                                                                                                                 TubaDialogsComposerComponentsPollsPollRow* row,
                                                                                                                 gpointer self)
{
	tuba_dialogs_composer_components_polls_remove_poll_row ((TubaDialogsComposerComponentsPolls*) self, row);
}

static void
_tuba_dialogs_composer_components_polls_on_row_invalid_g_object_notify (GObject* _sender,
                                                                        GParamSpec* pspec,
                                                                        gpointer self)
{
	tuba_dialogs_composer_components_polls_on_row_invalid ((TubaDialogsComposerComponentsPolls*) self);
}

static void
_tuba_dialogs_composer_components_polls_row_cleanup_gtk_editable_changed (GtkEditable* _sender,
                                                                          gpointer self)
{
	tuba_dialogs_composer_components_polls_row_cleanup ((TubaDialogsComposerComponentsPolls*) self);
}

static TubaDialogsComposerComponentsPollsPollRow*
tuba_dialogs_composer_components_polls_add_poll_row (TubaDialogsComposerComponentsPolls* self,
                                                     const gchar* content,
                                                     gboolean is_last)
{
	TubaDialogsComposerComponentsPollsPollRow* row = NULL;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gchar* _tmp3_;
	TubaDialogsComposerComponentsPollsPollRow* _tmp4_ = NULL;
	GeeArrayList* _tmp7_;
	TubaDialogsComposerComponentsPollsPollRow* _tmp8_;
	GtkListBox* _tmp9_;
	TubaDialogsComposerComponentsPollsPollRow* _tmp10_;
	TubaDialogsComposerComponentsPollsPollRow* _tmp11_;
	TubaDialogsComposerComponentsPollsPollRow* _tmp12_;
	TubaDialogsComposerComponentsPollsPollRow* _tmp13_;
	TubaDialogsComposerComponentsPollsPollRow* _tmp14_;
	TubaDialogsComposerComponentsPollsPollRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->poll_options;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf (_ ("Choice %d"), _tmp2_ + 1);
	_tmp4_ = tuba_dialogs_composer_components_polls_poll_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	row = _tmp4_;
	if (is_last) {
		TubaDialogsComposerComponentsPollsPollRow* _tmp5_;
		_tmp5_ = row;
		tuba_dialogs_composer_components_polls_poll_row_set_is_last (_tmp5_, TRUE);
	}
	if (content != NULL) {
		TubaDialogsComposerComponentsPollsPollRow* _tmp6_;
		_tmp6_ = row;
		gtk_editable_set_text ((GtkEditable*) _tmp6_, content);
	}
	_tmp7_ = self->priv->poll_options;
	_tmp8_ = row;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, _tmp8_);
	_tmp9_ = self->priv->poll_list;
	_tmp10_ = row;
	gtk_list_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = row;
	g_object_bind_property_with_closures ((GObject*) self, "can-delete", (GObject*) _tmp11_, "can-delete", 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)));
	_tmp12_ = row;
	g_signal_connect_object (_tmp12_, "deleted", (GCallback) _tuba_dialogs_composer_components_polls_remove_poll_row_tuba_dialogs_composer_components_polls_poll_row_deleted, self, 0);
	_tmp13_ = row;
	g_signal_connect_object ((GObject*) _tmp13_, "notify::is-valid", (GCallback) _tuba_dialogs_composer_components_polls_on_row_invalid_g_object_notify, self, 0);
	_tmp14_ = row;
	g_signal_connect_object ((GtkEditable*) _tmp14_, "changed", (GCallback) _tuba_dialogs_composer_components_polls_row_cleanup_gtk_editable_changed, self, G_CONNECT_AFTER);
	tuba_dialogs_composer_components_polls_on_row_invalid (self);
	tuba_dialogs_composer_components_polls_check_poll_items (self);
	result = row;
	return result;
}

static void
tuba_dialogs_composer_components_polls_row_cleanup (TubaDialogsComposerComponentsPolls* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	TubaDialogsComposerComponentsPollsPollRow* last_poll_row = NULL;
	GeeArrayList* _tmp5_;
	gpointer _tmp6_;
	gboolean is_empty = FALSE;
	TubaDialogsComposerComponentsPollsPollRow* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_initing;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->poll_options;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ < 2;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = self->priv->poll_options;
	_tmp6_ = gee_list_last ((GeeList*) _tmp5_);
	last_poll_row = (TubaDialogsComposerComponentsPollsPollRow*) _tmp6_;
	_tmp7_ = last_poll_row;
	_tmp8_ = tuba_dialogs_composer_components_polls_poll_row_get_is_empty (_tmp7_);
	_tmp9_ = _tmp8_;
	is_empty = _tmp9_;
	if (!is_empty) {
		GeeArrayList* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		TubaAccountStore* _tmp14_;
		TubaInstanceAccount* _tmp15_;
		TubaInstanceAccount* _tmp16_;
		TubaAPIInstance* _tmp17_;
		TubaAPIInstance* _tmp18_;
		gint64 _tmp19_;
		gint64 _tmp20_;
		_tmp11_ = self->priv->poll_options;
		_tmp12_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = tuba_accounts;
		_tmp15_ = tuba_account_store_get_active (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = tuba_instance_account_get_instance_info (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = tuba_api_instance_get_compat_status_poll_max_options (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp10_ = ((gint64) _tmp13_) < _tmp20_;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		TubaDialogsComposerComponentsPollsPollRow* _tmp21_;
		TubaDialogsComposerComponentsPollsPollRow* _tmp22_;
		TubaDialogsComposerComponentsPollsPollRow* _tmp23_;
		_tmp21_ = last_poll_row;
		tuba_dialogs_composer_components_polls_poll_row_set_is_last (_tmp21_, FALSE);
		_tmp22_ = tuba_dialogs_composer_components_polls_add_poll_row (self, NULL, TRUE);
		_tmp23_ = _tmp22_;
		_g_object_unref0 (_tmp23_);
		g_signal_emit_by_name ((TubaDialogsComposerComponentsAttachable*) self, "scroll", TRUE);
	} else {
		gboolean _tmp24_ = FALSE;
		if (is_empty) {
			gboolean _tmp25_;
			_tmp25_ = self->priv->_can_delete;
			_tmp24_ = _tmp25_;
		} else {
			_tmp24_ = FALSE;
		}
		if (_tmp24_) {
			TubaDialogsComposerComponentsPollsPollRow* second_last_poll_row = NULL;
			GeeArrayList* _tmp26_;
			GeeArrayList* _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			gpointer _tmp30_;
			TubaDialogsComposerComponentsPollsPollRow* _tmp31_;
			gboolean _tmp32_;
			gboolean _tmp33_;
			_tmp26_ = self->priv->poll_options;
			_tmp27_ = self->priv->poll_options;
			_tmp28_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = gee_abstract_list_get ((GeeAbstractList*) _tmp26_, _tmp29_ - 2);
			second_last_poll_row = (TubaDialogsComposerComponentsPollsPollRow*) _tmp30_;
			_tmp31_ = second_last_poll_row;
			_tmp32_ = tuba_dialogs_composer_components_polls_poll_row_get_is_empty (_tmp31_);
			_tmp33_ = _tmp32_;
			if (_tmp33_) {
				GeeArrayList* _tmp34_;
				TubaDialogsComposerComponentsPollsPollRow* _tmp35_;
				GtkListBox* _tmp36_;
				TubaDialogsComposerComponentsPollsPollRow* _tmp37_;
				TubaDialogsComposerComponentsPollsPollRow* _tmp38_;
				_tmp34_ = self->priv->poll_options;
				_tmp35_ = last_poll_row;
				gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp34_, _tmp35_);
				_tmp36_ = self->priv->poll_list;
				_tmp37_ = last_poll_row;
				gtk_list_box_remove (_tmp36_, (GtkWidget*) _tmp37_);
				_tmp38_ = second_last_poll_row;
				tuba_dialogs_composer_components_polls_poll_row_set_is_last (_tmp38_, TRUE);
				tuba_dialogs_composer_components_polls_check_poll_items (self);
			}
			_g_object_unref0 (second_last_poll_row);
		}
	}
	_g_object_unref0 (last_poll_row);
}

static void
tuba_dialogs_composer_components_polls_remove_poll_row (TubaDialogsComposerComponentsPolls* self,
                                                        TubaDialogsComposerComponentsPollsPollRow* row)
{
	GeeArrayList* _tmp0_;
	GtkListBox* _tmp1_;
	gint i = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = self->priv->poll_options;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, row);
	_tmp1_ = self->priv->poll_list;
	gtk_list_box_remove (_tmp1_, (GtkWidget*) row);
	i = 0;
	{
		GeeArrayList* _t_row_list = NULL;
		GeeArrayList* _tmp2_;
		gint _t_row_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _t_row_index = 0;
		_tmp2_ = self->priv->poll_options;
		_t_row_list = _tmp2_;
		_tmp3_ = _t_row_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_t_row_size = _tmp5_;
		_t_row_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			TubaDialogsComposerComponentsPollsPollRow* t_row = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			gint _tmp10_;
			TubaDialogsComposerComponentsPollsPollRow* _tmp11_;
			gchar* _tmp12_;
			gchar* _tmp13_;
			_t_row_index = _t_row_index + 1;
			_tmp6_ = _t_row_index;
			_tmp7_ = _t_row_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _t_row_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _t_row_index);
			t_row = (TubaDialogsComposerComponentsPollsPollRow*) _tmp9_;
			_tmp10_ = i;
			i = _tmp10_ + 1;
			_tmp11_ = t_row;
			_tmp12_ = g_strdup_printf (_ ("Choice %d"), i);
			_tmp13_ = _tmp12_;
			adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp11_, _tmp13_);
			_g_free0 (_tmp13_);
			_g_object_unref0 (t_row);
		}
	}
	tuba_dialogs_composer_components_polls_set_is_valid (self, !tuba_dialogs_composer_components_polls_check_invalid (self));
	tuba_dialogs_composer_components_polls_check_poll_items (self);
	tuba_dialogs_composer_components_polls_row_cleanup (self);
}

gboolean
tuba_dialogs_composer_components_polls_check_invalid (TubaDialogsComposerComponentsPolls* self)
{
	gboolean any_invalid = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	any_invalid = FALSE;
	{
		GeeArrayList* _t_row_list = NULL;
		GeeArrayList* _tmp0_;
		gint _t_row_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _t_row_index = 0;
		_tmp0_ = self->priv->poll_options;
		_t_row_list = _tmp0_;
		_tmp1_ = _t_row_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_t_row_size = _tmp3_;
		_t_row_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			TubaDialogsComposerComponentsPollsPollRow* t_row = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			TubaDialogsComposerComponentsPollsPollRow* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_t_row_index = _t_row_index + 1;
			_tmp4_ = _t_row_index;
			_tmp5_ = _t_row_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _t_row_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _t_row_index);
			t_row = (TubaDialogsComposerComponentsPollsPollRow*) _tmp7_;
			_tmp8_ = t_row;
			_tmp9_ = tuba_dialogs_composer_components_polls_poll_row_get_is_valid (_tmp8_);
			_tmp10_ = _tmp9_;
			any_invalid = !_tmp10_;
			if (any_invalid) {
				_g_object_unref0 (t_row);
				break;
			}
			_g_object_unref0 (t_row);
		}
	}
	result = any_invalid;
	return result;
}

static void
tuba_dialogs_composer_components_polls_on_row_invalid (TubaDialogsComposerComponentsPolls* self)
{
	g_return_if_fail (self != NULL);
	tuba_dialogs_composer_components_polls_set_is_valid (self, !tuba_dialogs_composer_components_polls_check_invalid (self));
	tuba_dialogs_composer_components_polls_row_cleanup (self);
}

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

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

void
tuba_dialogs_composer_components_polls_install_expires_in (TubaDialogsComposerComponentsPolls* self,
                                                           const gchar* expires_at)
{
	GListStore* store = NULL;
	GListStore* _tmp0_;
	gint64 min = 0LL;
	TubaAccountStore* _tmp1_;
	TubaInstanceAccount* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaAPIInstance* _tmp4_;
	TubaAPIInstance* _tmp5_;
	gint64 _tmp6_;
	gint64 _tmp7_;
	gint64 max = 0LL;
	TubaAccountStore* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaInstanceAccount* _tmp10_;
	TubaAPIInstance* _tmp11_;
	TubaAPIInstance* _tmp12_;
	gint64 _tmp13_;
	gint64 _tmp14_;
	gint one_day_index = 0;
	gint exp_count = 0;
	TubaDialogsComposerComponentsPollsExpiration** _tmp15_;
	gint _tmp15__length1;
	GListStore* _tmp29_;
	GListModel* _tmp30_;
	GtkPropertyExpression* _tmp31_;
	const gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	GtkBuilderListItemFactory* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	GtkBuilderListItemFactory* _tmp39_;
	gchar* _tmp40_;
	GtkDropDown* _tmp41_ = NULL;
	GtkDropDown* _tmp42_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_list_store_new (TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION);
	store = _tmp0_;
	_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_compat_status_poll_min_expiration (_tmp5_);
	_tmp7_ = _tmp6_;
	min = _tmp7_;
	_tmp8_ = tuba_accounts;
	_tmp9_ = tuba_account_store_get_active (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = tuba_instance_account_get_instance_info (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = tuba_api_instance_get_compat_status_poll_max_expiration (_tmp12_);
	_tmp14_ = _tmp13_;
	max = _tmp14_;
	if (min > ((gint64) 604800)) {
		min = (gint64) 0;
	}
	if (max < ((gint64) 300)) {
		max = (gint64) 604800;
	}
	one_day_index = -1;
	exp_count = -1;
	_tmp15_ = self->priv->expirations;
	_tmp15__length1 = self->priv->expirations_length1;
	{
		TubaDialogsComposerComponentsPollsExpiration** expiration_collection = NULL;
		gint expiration_collection_length1 = 0;
		gint _expiration_collection_size_ = 0;
		gint expiration_it = 0;
		expiration_collection = _tmp15_;
		expiration_collection_length1 = _tmp15__length1;
		for (expiration_it = 0; expiration_it < expiration_collection_length1; expiration_it = expiration_it + 1) {
			TubaDialogsComposerComponentsPollsExpiration* _tmp16_;
			TubaDialogsComposerComponentsPollsExpiration* expiration = NULL;
			_tmp16_ = _g_object_ref0 (expiration_collection[expiration_it]);
			expiration = _tmp16_;
			{
				gboolean _tmp17_ = FALSE;
				TubaDialogsComposerComponentsPollsExpiration* _tmp18_;
				gint64 _tmp19_;
				gint64 _tmp20_;
				_tmp18_ = expiration;
				_tmp19_ = tuba_dialogs_composer_components_polls_expiration_get_value (_tmp18_);
				_tmp20_ = _tmp19_;
				if (min <= _tmp20_) {
					TubaDialogsComposerComponentsPollsExpiration* _tmp21_;
					gint64 _tmp22_;
					gint64 _tmp23_;
					_tmp21_ = expiration;
					_tmp22_ = tuba_dialogs_composer_components_polls_expiration_get_value (_tmp21_);
					_tmp23_ = _tmp22_;
					_tmp17_ = max >= _tmp23_;
				} else {
					_tmp17_ = FALSE;
				}
				if (_tmp17_) {
					GListStore* _tmp24_;
					TubaDialogsComposerComponentsPollsExpiration* _tmp25_;
					TubaDialogsComposerComponentsPollsExpiration* _tmp26_;
					gint64 _tmp27_;
					gint64 _tmp28_;
					_tmp24_ = store;
					_tmp25_ = expiration;
					g_list_store_append (_tmp24_, (GObject*) _tmp25_);
					exp_count = exp_count + 1;
					_tmp26_ = expiration;
					_tmp27_ = tuba_dialogs_composer_components_polls_expiration_get_value (_tmp26_);
					_tmp28_ = _tmp27_;
					if (_tmp28_ <= ((gint64) 86400)) {
						one_day_index = exp_count;
					}
				}
				_g_object_unref0 (expiration);
			}
		}
	}
	_tmp29_ = store;
	_tmp30_ = _g_object_ref0 ((GListModel*) _tmp29_);
	_tmp31_ = (GtkPropertyExpression*) gtk_property_expression_new (TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, NULL, "text");
	_tmp32_ = string_to_string (BUILD_RESOURCES);
	_tmp33_ = g_strconcat (_tmp32_, "gtk/dropdown/expiration.ui", NULL);
	_tmp34_ = _tmp33_;
	_tmp35_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp34_);
	_tmp36_ = string_to_string (BUILD_RESOURCES);
	_tmp37_ = g_strconcat (_tmp36_, "gtk/dropdown/expiration.ui", NULL);
	_tmp38_ = _tmp37_;
	_tmp39_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp38_);
	_tmp40_ = g_strdup (_ ("Expiration"));
	_tmp41_ = (GtkDropDown*) gtk_drop_down_new (_tmp30_, NULL);
	gtk_drop_down_set_expression (_tmp41_, (GtkExpression*) _tmp31_);
	_gtk_expression_unref0 (_tmp31_);
	gtk_drop_down_set_factory (_tmp41_, (GtkListItemFactory*) _tmp35_);
	_g_object_unref0 (_tmp35_);
	gtk_drop_down_set_list_factory (_tmp41_, (GtkListItemFactory*) _tmp39_);
	_g_object_unref0 (_tmp39_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp41_, _tmp40_);
	_g_free0 (_tmp40_);
	gtk_drop_down_set_enable_search (_tmp41_, FALSE);
	g_object_ref_sink (_tmp41_);
	_g_object_unref0 (self->priv->expiration_button);
	self->priv->expiration_button = _tmp41_;
	_g_free0 (_tmp38_);
	_g_free0 (_tmp34_);
	_tmp42_ = self->priv->expiration_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp42_, "dropdown-circular");
	if (expires_at != NULL) {
		GDateTime* date = NULL;
		GDateTime* _tmp43_;
		GDateTime* now = NULL;
		GDateTime* _tmp44_;
		GTimeSpan delta = 0LL;
		GDateTime* _tmp45_;
		GDateTime* _tmp46_;
		guint default_exp_index = 0U;
		GListStore* _tmp47_;
		TubaDialogsComposerComponentsPollsExpiration* _tmp48_;
		TubaDialogsComposerComponentsPollsExpiration* _tmp49_;
		GEqualFunc _tmp50_;
		guint _tmp51_ = 0U;
		gboolean _tmp52_;
		gboolean _tmp53_;
		_tmp43_ = g_date_time_new_from_iso8601 (expires_at, NULL);
		date = _tmp43_;
		_tmp44_ = g_date_time_new_now_local ();
		now = _tmp44_;
		_tmp45_ = date;
		_tmp46_ = now;
		delta = g_date_time_difference (_tmp45_, _tmp46_);
		_tmp47_ = store;
		_tmp48_ = tuba_dialogs_composer_components_polls_expiration_new (NULL, NULL, (gint64) (delta / G_TIME_SPAN_SECOND));
		_tmp49_ = _tmp48_;
		_tmp50_ = tuba_dialogs_composer_components_polls_expiration_compare;
		_tmp52_ = g_list_store_find_with_equal_func (_tmp47_, (GObject*) _tmp49_, _tmp50_, &_tmp51_);
		default_exp_index = _tmp51_;
		_tmp53_ = _tmp52_;
		_g_object_unref0 (_tmp49_);
		if (_tmp53_) {
			GtkDropDown* _tmp54_;
			_tmp54_ = self->priv->expiration_button;
			gtk_drop_down_set_selected (_tmp54_, default_exp_index);
		}
		_g_date_time_unref0 (now);
		_g_date_time_unref0 (date);
	} else {
		if (one_day_index > -1) {
			GtkDropDown* _tmp55_;
			_tmp55_ = self->priv->expiration_button;
			gtk_drop_down_set_selected (_tmp55_, (guint) one_day_index);
		}
	}
	_g_object_unref0 (store);
}

static gboolean
tuba_dialogs_composer_components_polls_real_get_edit_mode (TubaDialogsComposerComponentsAttachable* base)
{
	gboolean result;
	TubaDialogsComposerComponentsPolls* self;
	self = (TubaDialogsComposerComponentsPolls*) base;
	result = self->priv->_edit_mode;
	return result;
}

static void
tuba_dialogs_composer_components_polls_real_set_edit_mode (TubaDialogsComposerComponentsAttachable* base,
                                                           gboolean value)
{
	TubaDialogsComposerComponentsPolls* self;
	gboolean old_value;
	self = (TubaDialogsComposerComponentsPolls*) base;
	old_value = tuba_dialogs_composer_components_polls_real_get_edit_mode (base);
	if (old_value != value) {
		self->priv->_edit_mode = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EDIT_MODE_PROPERTY]);
	}
}

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

void
tuba_dialogs_composer_components_polls_set_is_narrow (TubaDialogsComposerComponentsPolls* self,
                                                      gboolean value)
{
	GtkGridLayout* layout_manager = NULL;
	GtkGrid* _tmp0_;
	GtkLayoutManager* _tmp1_;
	GtkGridLayout* _tmp2_;
	GtkGridLayoutChild* expiration_button_layout_child = NULL;
	GtkGridLayout* _tmp3_;
	GtkDropDown* _tmp4_;
	GtkLayoutChild* _tmp5_;
	GtkGridLayoutChild* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->actions_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->expiration_button;
	_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));
	expiration_button_layout_child = _tmp6_;
	if (value) {
		GtkGrid* _tmp7_;
		GtkGridLayoutChild* _tmp8_;
		GtkGridLayoutChild* _tmp9_;
		GtkDropDown* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		GtkBuilderListItemFactory* _tmp14_;
		GtkBuilderListItemFactory* _tmp15_;
		_tmp7_ = self->priv->actions_grid;
		gtk_grid_set_column_homogeneous (_tmp7_, TRUE);
		_tmp8_ = expiration_button_layout_child;
		gtk_grid_layout_child_set_column (_tmp8_, 0);
		_tmp9_ = expiration_button_layout_child;
		gtk_grid_layout_child_set_row (_tmp9_, 1);
		_tmp10_ = self->priv->expiration_button;
		_tmp11_ = string_to_string (BUILD_RESOURCES);
		_tmp12_ = g_strconcat (_tmp11_, "gtk/dropdown/expiration.ui", NULL);
		_tmp13_ = _tmp12_;
		_tmp14_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp13_);
		_tmp15_ = _tmp14_;
		gtk_drop_down_set_factory (_tmp10_, (GtkListItemFactory*) _tmp15_);
		_g_object_unref0 (_tmp15_);
		_g_free0 (_tmp13_);
	} else {
		GtkGrid* _tmp16_;
		GtkGridLayoutChild* _tmp17_;
		GtkGridLayoutChild* _tmp18_;
		GtkDropDown* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		GtkBuilderListItemFactory* _tmp23_;
		GtkBuilderListItemFactory* _tmp24_;
		_tmp16_ = self->priv->actions_grid;
		gtk_grid_set_column_homogeneous (_tmp16_, FALSE);
		_tmp17_ = expiration_button_layout_child;
		gtk_grid_layout_child_set_column (_tmp17_, 2);
		_tmp18_ = expiration_button_layout_child;
		gtk_grid_layout_child_set_row (_tmp18_, 0);
		_tmp19_ = self->priv->expiration_button;
		_tmp20_ = string_to_string (BUILD_RESOURCES);
		_tmp21_ = g_strconcat (_tmp20_, "gtk/dropdown/expiration_title.ui", NULL);
		_tmp22_ = _tmp21_;
		_tmp23_ = (GtkBuilderListItemFactory*) gtk_builder_list_item_factory_new_from_resource (NULL, _tmp22_);
		_tmp24_ = _tmp23_;
		gtk_drop_down_set_factory (_tmp19_, (GtkListItemFactory*) _tmp24_);
		_g_object_unref0 (_tmp24_);
		_g_free0 (_tmp22_);
	}
	self->priv->_is_narrow = value;
	_g_object_unref0 (expiration_button_layout_child);
	_g_object_unref0 (layout_manager);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_NARROW_PROPERTY]);
}

gboolean
tuba_dialogs_composer_components_polls_get_hide_totals (TubaDialogsComposerComponentsPolls* self)
{
	gboolean result;
	TubaDialogsComposerComponentsPollsStatefulButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->show_results_button;
	_tmp1_ = tuba_dialogs_composer_components_polls_stateful_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	result = !_tmp2_;
	return result;
}

gboolean
tuba_dialogs_composer_components_polls_get_multiple_choice (TubaDialogsComposerComponentsPolls* self)
{
	gboolean result;
	TubaDialogsComposerComponentsPollsStatefulButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->multi_button;
	_tmp1_ = tuba_dialogs_composer_components_polls_stateful_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

gboolean
tuba_dialogs_composer_components_polls_get_can_delete (TubaDialogsComposerComponentsPolls* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_can_delete;
	return result;
}

static void
tuba_dialogs_composer_components_polls_set_can_delete (TubaDialogsComposerComponentsPolls* self,
                                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_polls_get_can_delete (self);
	if (old_value != value) {
		self->priv->_can_delete = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_CAN_DELETE_PROPERTY]);
	}
}

gboolean
tuba_dialogs_composer_components_polls_get_is_valid (TubaDialogsComposerComponentsPolls* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_valid;
	return result;
}

void
tuba_dialogs_composer_components_polls_set_is_valid (TubaDialogsComposerComponentsPolls* self,
                                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_polls_get_is_valid (self);
	if (old_value != value) {
		self->priv->_is_valid = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_VALID_PROPERTY]);
	}
}

gboolean
tuba_dialogs_composer_components_polls_get_initing (TubaDialogsComposerComponentsPolls* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_initing;
	return result;
}

void
tuba_dialogs_composer_components_polls_set_initing (TubaDialogsComposerComponentsPolls* self,
                                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_polls_get_initing (self);
	if (old_value != value) {
		self->priv->_initing = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_INITING_PROPERTY]);
	}
}

gint64
tuba_dialogs_composer_components_polls_get_expires_in (TubaDialogsComposerComponentsPolls* self)
{
	gint64 result;
	GtkDropDown* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	g_return_val_if_fail (self != NULL, -1LL);
	_tmp0_ = self->priv->expiration_button;
	_tmp1_ = gtk_drop_down_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != GTK_INVALID_LIST_POSITION) {
		GtkDropDown* _tmp3_;
		GObject* _tmp4_;
		GObject* _tmp5_;
		gint64 _tmp6_;
		gint64 _tmp7_;
		_tmp3_ = self->priv->expiration_button;
		_tmp4_ = gtk_drop_down_get_selected_item (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = tuba_dialogs_composer_components_polls_expiration_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpiration));
		_tmp7_ = _tmp6_;
		result = _tmp7_;
		return result;
	} else {
		result = (gint64) 86400;
		return result;
	}
}

gboolean
tuba_dialogs_composer_components_polls_get_has_rows (TubaDialogsComposerComponentsPolls* self)
{
	gboolean result;
	gboolean _result_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_result_ = FALSE;
	{
		GeeArrayList* _poll_option_list = NULL;
		GeeArrayList* _tmp0_;
		gint _poll_option_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _poll_option_index = 0;
		_tmp0_ = self->priv->poll_options;
		_poll_option_list = _tmp0_;
		_tmp1_ = _poll_option_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_poll_option_size = _tmp3_;
		_poll_option_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			TubaDialogsComposerComponentsPollsPollRow* poll_option = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			TubaDialogsComposerComponentsPollsPollRow* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			_poll_option_index = _poll_option_index + 1;
			_tmp4_ = _poll_option_index;
			_tmp5_ = _poll_option_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _poll_option_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _poll_option_index);
			poll_option = (TubaDialogsComposerComponentsPollsPollRow*) _tmp7_;
			_tmp8_ = poll_option;
			_tmp9_ = gtk_editable_get_text ((GtkEditable*) _tmp8_);
			_tmp10_ = _tmp9_;
			if (g_strcmp0 (_tmp10_, "") != 0) {
				_result_ = TRUE;
				_g_object_unref0 (poll_option);
				break;
			}
			_g_object_unref0 (poll_option);
		}
	}
	result = _result_;
	return result;
}

static inline gpointer
tuba_dialogs_composer_components_polls_poll_row_get_instance_private (TubaDialogsComposerComponentsPollsPollRow* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerComponentsPollsPollRow_private_offset);
}

static void
tuba_dialogs_composer_components_polls_poll_row_update_delete_button (TubaDialogsComposerComponentsPollsPollRow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkButton* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_dialogs_composer_components_polls_poll_row_get_can_delete (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = tuba_dialogs_composer_components_polls_poll_row_get_is_empty (self);
		_tmp5_ = _tmp4_;
		if (!_tmp5_) {
			_tmp3_ = TRUE;
		} else {
			gboolean _tmp6_;
			gboolean _tmp7_;
			_tmp6_ = tuba_dialogs_composer_components_polls_poll_row_get_is_last (self);
			_tmp7_ = _tmp6_;
			_tmp3_ = !_tmp7_;
		}
		_tmp0_ = _tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp8_ = self->priv->delete_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp8_, _tmp0_);
}

static void
tuba_dialogs_composer_components_polls_poll_row_on_delete_button_clicked (TubaDialogsComposerComponentsPollsPollRow* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_dialogs_composer_components_polls_poll_row_signals[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_DELETED_SIGNAL], 0, self);
}

static void
tuba_dialogs_composer_components_polls_poll_row_check_valid (TubaDialogsComposerComponentsPollsPollRow* self)
{
	gint text_count = 0;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean passed_limit = FALSE;
	TubaAccountStore* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaInstanceAccount* _tmp4_;
	TubaAPIInstance* _tmp5_;
	TubaAPIInstance* _tmp6_;
	gint64 _tmp7_;
	gint64 _tmp8_;
	gboolean _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_editable_get_text ((GtkEditable*) self);
	_tmp1_ = _tmp0_;
	text_count = g_utf8_strlen (_tmp1_, (gssize) -1);
	_tmp2_ = tuba_accounts;
	_tmp3_ = tuba_account_store_get_active (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_instance_account_get_instance_info (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = tuba_api_instance_get_compat_status_poll_max_characters (_tmp6_);
	_tmp8_ = _tmp7_;
	passed_limit = ((gint64) text_count) > _tmp8_;
	tuba_dialogs_composer_components_polls_poll_row_set_is_empty (self, text_count == 0);
	tuba_dialogs_composer_components_polls_poll_row_set_is_valid (self, !passed_limit);
	_tmp9_ = self->priv->_is_valid;
	if (!_tmp9_) {
		gtk_widget_add_css_class ((GtkWidget*) self, "error");
	} else {
		gtk_widget_remove_css_class ((GtkWidget*) self, "error");
	}
}

TubaDialogsComposerComponentsPollsPollRow*
tuba_dialogs_composer_components_polls_poll_row_construct (GType object_type)
{
	TubaDialogsComposerComponentsPollsPollRow * self = NULL;
	self = (TubaDialogsComposerComponentsPollsPollRow*) g_object_new (object_type, NULL);
	return self;
}

TubaDialogsComposerComponentsPollsPollRow*
tuba_dialogs_composer_components_polls_poll_row_new (void)
{
	return tuba_dialogs_composer_components_polls_poll_row_construct (TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW);
}

gboolean
tuba_dialogs_composer_components_polls_poll_row_get_is_valid (TubaDialogsComposerComponentsPollsPollRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_valid;
	return result;
}

static void
tuba_dialogs_composer_components_polls_poll_row_set_is_valid (TubaDialogsComposerComponentsPollsPollRow* self,
                                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_polls_poll_row_get_is_valid (self);
	if (old_value != value) {
		self->priv->_is_valid = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_VALID_PROPERTY]);
	}
}

gboolean
tuba_dialogs_composer_components_polls_poll_row_get_can_delete (TubaDialogsComposerComponentsPollsPollRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_can_delete;
	return result;
}

void
tuba_dialogs_composer_components_polls_poll_row_set_can_delete (TubaDialogsComposerComponentsPollsPollRow* self,
                                                                gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_can_delete = value;
	tuba_dialogs_composer_components_polls_poll_row_update_delete_button (self);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_CAN_DELETE_PROPERTY]);
}

gboolean
tuba_dialogs_composer_components_polls_poll_row_get_is_last (TubaDialogsComposerComponentsPollsPollRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_last;
	return result;
}

void
tuba_dialogs_composer_components_polls_poll_row_set_is_last (TubaDialogsComposerComponentsPollsPollRow* self,
                                                             gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_is_last = value;
	tuba_dialogs_composer_components_polls_poll_row_update_delete_button (self);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_LAST_PROPERTY]);
}

gboolean
tuba_dialogs_composer_components_polls_poll_row_get_is_empty (TubaDialogsComposerComponentsPollsPollRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_empty;
	return result;
}

static void
tuba_dialogs_composer_components_polls_poll_row_set_is_empty (TubaDialogsComposerComponentsPollsPollRow* self,
                                                              gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_is_empty = value;
	tuba_dialogs_composer_components_polls_poll_row_update_delete_button (self);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_EMPTY_PROPERTY]);
}

static void
_tuba_dialogs_composer_components_polls_poll_row_on_delete_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                              gpointer self)
{
	tuba_dialogs_composer_components_polls_poll_row_on_delete_button_clicked ((TubaDialogsComposerComponentsPollsPollRow*) self);
}

static void
_tuba_dialogs_composer_components_polls_poll_row_check_valid_gtk_editable_changed (GtkEditable* _sender,
                                                                                   gpointer self)
{
	tuba_dialogs_composer_components_polls_poll_row_check_valid ((TubaDialogsComposerComponentsPollsPollRow*) self);
}

static GObject *
tuba_dialogs_composer_components_polls_poll_row_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsComposerComponentsPollsPollRow * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	gchar* _tmp5_;
	GtkButton* _tmp6_ = NULL;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_composer_components_polls_poll_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, TubaDialogsComposerComponentsPollsPollRow);
	_tmp0_ = g_strdup ("user-trash-symbolic");
	_tmp1_ = g_strdup ("flat");
	_tmp2_ = g_strdup ("circular");
	_tmp3_ = g_strdup ("error");
	_tmp4_ = g_new0 (gchar*, 3 + 1);
	_tmp4_[0] = _tmp1_;
	_tmp4_[1] = _tmp2_;
	_tmp4_[2] = _tmp3_;
	_tmp5_ = g_strdup (_ ("Remove"));
	_tmp6_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_icon_name (_tmp6_, _tmp0_);
	_g_free0 (_tmp0_);
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp6_, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, 3, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp6_, _tmp5_);
	_g_free0 (_tmp5_);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->delete_button);
	self->priv->delete_button = _tmp6_;
	_tmp7_ = self->priv->delete_button;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) _tuba_dialogs_composer_components_polls_poll_row_on_delete_button_clicked_gtk_button_clicked, self, 0);
	_tmp8_ = self->priv->delete_button;
	adw_entry_row_add_suffix ((AdwEntryRow*) self, (GtkWidget*) _tmp8_);
	g_signal_connect_object ((GtkEditable*) self, "changed", (GCallback) _tuba_dialogs_composer_components_polls_poll_row_check_valid_gtk_editable_changed, self, 0);
	tuba_dialogs_composer_components_polls_poll_row_check_valid (self);
	return obj;
}

static void
tuba_dialogs_composer_components_polls_poll_row_class_init (TubaDialogsComposerComponentsPollsPollRowClass * klass,
                                                            gpointer klass_data)
{
	tuba_dialogs_composer_components_polls_poll_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerComponentsPollsPollRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_components_polls_poll_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_components_polls_poll_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_composer_components_polls_poll_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_components_polls_poll_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_VALID_PROPERTY, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_VALID_PROPERTY] = g_param_spec_boolean ("is-valid", "is-valid", "is-valid", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_CAN_DELETE_PROPERTY, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_CAN_DELETE_PROPERTY] = g_param_spec_boolean ("can-delete", "can-delete", "can-delete", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_LAST_PROPERTY, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_LAST_PROPERTY] = g_param_spec_boolean ("is-last", "is-last", "is-last", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_EMPTY_PROPERTY, tuba_dialogs_composer_components_polls_poll_row_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_EMPTY_PROPERTY] = g_param_spec_boolean ("is-empty", "is-empty", "is-empty", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	tuba_dialogs_composer_components_polls_poll_row_signals[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_DELETED_SIGNAL] = g_signal_new ("deleted", TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW);
}

static void
tuba_dialogs_composer_components_polls_poll_row_instance_init (TubaDialogsComposerComponentsPollsPollRow * self,
                                                               gpointer klass)
{
	self->priv = tuba_dialogs_composer_components_polls_poll_row_get_instance_private (self);
	self->priv->_is_valid = FALSE;
	self->priv->_can_delete = TRUE;
	self->priv->_is_last = FALSE;
	self->priv->_is_empty = TRUE;
}

static void
tuba_dialogs_composer_components_polls_poll_row_finalize (GObject * obj)
{
	TubaDialogsComposerComponentsPollsPollRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, TubaDialogsComposerComponentsPollsPollRow);
	tuba_dialogs_composer_components_polls_poll_row_set_is_valid (self, FALSE);
	g_debug ("Polls.vala:61: Destroying PollRow");
	_g_object_unref0 (self->priv->delete_button);
	G_OBJECT_CLASS (tuba_dialogs_composer_components_polls_poll_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_components_polls_poll_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerComponentsPollsPollRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_components_polls_poll_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerComponentsPollsPollRow), 0, (GInstanceInitFunc) tuba_dialogs_composer_components_polls_poll_row_instance_init, NULL };
	GType tuba_dialogs_composer_components_polls_poll_row_type_id;
	tuba_dialogs_composer_components_polls_poll_row_type_id = g_type_register_static (adw_entry_row_get_type (), "TubaDialogsComposerComponentsPollsPollRow", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerComponentsPollsPollRow_private_offset = g_type_add_instance_private (tuba_dialogs_composer_components_polls_poll_row_type_id, sizeof (TubaDialogsComposerComponentsPollsPollRowPrivate));
	return tuba_dialogs_composer_components_polls_poll_row_type_id;
}

GType
tuba_dialogs_composer_components_polls_poll_row_get_type (void)
{
	static GType tuba_dialogs_composer_components_polls_poll_row_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_components_polls_poll_row_type_id__once)) {
		GType tuba_dialogs_composer_components_polls_poll_row_type_id;
		tuba_dialogs_composer_components_polls_poll_row_type_id = tuba_dialogs_composer_components_polls_poll_row_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_components_polls_poll_row_type_id__once, tuba_dialogs_composer_components_polls_poll_row_type_id);
	}
	return tuba_dialogs_composer_components_polls_poll_row_type_id__once;
}

static void
_vala_tuba_dialogs_composer_components_polls_poll_row_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPollsPollRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, TubaDialogsComposerComponentsPollsPollRow);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_VALID_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_poll_row_get_is_valid (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_CAN_DELETE_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_poll_row_get_can_delete (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_LAST_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_poll_row_get_is_last (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_EMPTY_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_poll_row_get_is_empty (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_components_polls_poll_row_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPollsPollRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, TubaDialogsComposerComponentsPollsPollRow);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_VALID_PROPERTY:
		tuba_dialogs_composer_components_polls_poll_row_set_is_valid (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_CAN_DELETE_PROPERTY:
		tuba_dialogs_composer_components_polls_poll_row_set_can_delete (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_LAST_PROPERTY:
		tuba_dialogs_composer_components_polls_poll_row_set_is_last (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_POLL_ROW_IS_EMPTY_PROPERTY:
		tuba_dialogs_composer_components_polls_poll_row_set_is_empty (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_components_polls_expiration_get_instance_private (TubaDialogsComposerComponentsPollsExpiration* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerComponentsPollsExpiration_private_offset);
}

static gboolean
_tuba_dialogs_composer_components_polls_expiration_compare_lambda72_ (const gchar* a,
                                                                      const gchar* b)
{
	gint64 _tmp0_;
	gint64 _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_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpiration)->priv->_value;
	_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (b, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpiration)->priv->_value;
	result = _tmp0_ >= _tmp1_;
	return result;
}

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

TubaDialogsComposerComponentsPollsExpiration*
tuba_dialogs_composer_components_polls_expiration_construct (GType object_type,
                                                             const gchar* text,
                                                             const gchar* text_short,
                                                             gint64 value)
{
	TubaDialogsComposerComponentsPollsExpiration * self = NULL;
	self = (TubaDialogsComposerComponentsPollsExpiration*) g_object_new (object_type, "text", text, "text-short", text_short, "value", value, NULL);
	return self;
}

TubaDialogsComposerComponentsPollsExpiration*
tuba_dialogs_composer_components_polls_expiration_new (const gchar* text,
                                                       const gchar* text_short,
                                                       gint64 value)
{
	return tuba_dialogs_composer_components_polls_expiration_construct (TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, text, text_short, value);
}

const gchar*
tuba_dialogs_composer_components_polls_expiration_get_text (TubaDialogsComposerComponentsPollsExpiration* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}

void
tuba_dialogs_composer_components_polls_expiration_set_text (TubaDialogsComposerComponentsPollsExpiration* self,
                                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_polls_expiration_get_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_text);
		self->priv->_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_expiration_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_PROPERTY]);
	}
}

const gchar*
tuba_dialogs_composer_components_polls_expiration_get_text_short (TubaDialogsComposerComponentsPollsExpiration* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text_short;
	result = _tmp0_;
	return result;
}

void
tuba_dialogs_composer_components_polls_expiration_set_text_short (TubaDialogsComposerComponentsPollsExpiration* self,
                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_polls_expiration_get_text_short (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_text_short);
		self->priv->_text_short = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_expiration_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_SHORT_PROPERTY]);
	}
}

gint64
tuba_dialogs_composer_components_polls_expiration_get_value (TubaDialogsComposerComponentsPollsExpiration* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_value;
	return result;
}

void
tuba_dialogs_composer_components_polls_expiration_set_value (TubaDialogsComposerComponentsPollsExpiration* self,
                                                             gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_polls_expiration_get_value (self);
	if (old_value != value) {
		self->priv->_value = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_expiration_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_VALUE_PROPERTY]);
	}
}

static void
tuba_dialogs_composer_components_polls_expiration_class_init (TubaDialogsComposerComponentsPollsExpirationClass * klass,
                                                              gpointer klass_data)
{
	tuba_dialogs_composer_components_polls_expiration_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerComponentsPollsExpiration_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_components_polls_expiration_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_components_polls_expiration_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_components_polls_expiration_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_PROPERTY, tuba_dialogs_composer_components_polls_expiration_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_SHORT_PROPERTY, tuba_dialogs_composer_components_polls_expiration_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_SHORT_PROPERTY] = g_param_spec_string ("text-short", "text-short", "text-short", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_VALUE_PROPERTY, tuba_dialogs_composer_components_polls_expiration_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_VALUE_PROPERTY] = g_param_spec_int64 ("value", "value", "value", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_dialogs_composer_components_polls_expiration_compare = __tuba_dialogs_composer_components_polls_expiration_compare_lambda72__gequal_func;
}

static void
tuba_dialogs_composer_components_polls_expiration_instance_init (TubaDialogsComposerComponentsPollsExpiration * self,
                                                                 gpointer klass)
{
	self->priv = tuba_dialogs_composer_components_polls_expiration_get_instance_private (self);
}

static void
tuba_dialogs_composer_components_polls_expiration_finalize (GObject * obj)
{
	TubaDialogsComposerComponentsPollsExpiration * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpiration);
	_g_free0 (self->priv->_text);
	_g_free0 (self->priv->_text_short);
	G_OBJECT_CLASS (tuba_dialogs_composer_components_polls_expiration_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_components_polls_expiration_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerComponentsPollsExpirationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_components_polls_expiration_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerComponentsPollsExpiration), 0, (GInstanceInitFunc) tuba_dialogs_composer_components_polls_expiration_instance_init, NULL };
	GType tuba_dialogs_composer_components_polls_expiration_type_id;
	tuba_dialogs_composer_components_polls_expiration_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaDialogsComposerComponentsPollsExpiration", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerComponentsPollsExpiration_private_offset = g_type_add_instance_private (tuba_dialogs_composer_components_polls_expiration_type_id, sizeof (TubaDialogsComposerComponentsPollsExpirationPrivate));
	return tuba_dialogs_composer_components_polls_expiration_type_id;
}

GType
tuba_dialogs_composer_components_polls_expiration_get_type (void)
{
	static GType tuba_dialogs_composer_components_polls_expiration_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_components_polls_expiration_type_id__once)) {
		GType tuba_dialogs_composer_components_polls_expiration_type_id;
		tuba_dialogs_composer_components_polls_expiration_type_id = tuba_dialogs_composer_components_polls_expiration_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_components_polls_expiration_type_id__once, tuba_dialogs_composer_components_polls_expiration_type_id);
	}
	return tuba_dialogs_composer_components_polls_expiration_type_id__once;
}

static void
_vala_tuba_dialogs_composer_components_polls_expiration_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPollsExpiration * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpiration);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_components_polls_expiration_get_text (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_SHORT_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_components_polls_expiration_get_text_short (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_VALUE_PROPERTY:
		g_value_set_int64 (value, tuba_dialogs_composer_components_polls_expiration_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_components_polls_expiration_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPollsExpiration * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_EXPIRATION, TubaDialogsComposerComponentsPollsExpiration);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_PROPERTY:
		tuba_dialogs_composer_components_polls_expiration_set_text (self, g_value_get_string (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_TEXT_SHORT_PROPERTY:
		tuba_dialogs_composer_components_polls_expiration_set_text_short (self, g_value_get_string (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRATION_VALUE_PROPERTY:
		tuba_dialogs_composer_components_polls_expiration_set_value (self, g_value_get_int64 (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
tuba_dialogs_composer_components_polls_stateful_button_get_instance_private (TubaDialogsComposerComponentsPollsStatefulButton* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerComponentsPollsStatefulButton_private_offset);
}

TubaDialogsComposerComponentsPollsStatefulButton*
tuba_dialogs_composer_components_polls_stateful_button_construct (GType object_type,
                                                                  TubaDialogsComposerComponentsPollsStatefulButtonState* icon,
                                                                  TubaDialogsComposerComponentsPollsStatefulButtonState* title,
                                                                  gboolean active)
{
	TubaDialogsComposerComponentsPollsStatefulButton * self = NULL;
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp0_;
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp1_;
	g_return_val_if_fail (icon != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	self = (TubaDialogsComposerComponentsPollsStatefulButton*) g_object_new (object_type, NULL);
	_tmp0_ = *icon;
	tuba_dialogs_composer_components_polls_stateful_button_set_icon (self, &_tmp0_);
	_tmp1_ = *title;
	tuba_dialogs_composer_components_polls_stateful_button_set_title (self, &_tmp1_);
	tuba_dialogs_composer_components_polls_stateful_button_set_active (self, active);
	return self;
}

TubaDialogsComposerComponentsPollsStatefulButton*
tuba_dialogs_composer_components_polls_stateful_button_new (TubaDialogsComposerComponentsPollsStatefulButtonState* icon,
                                                            TubaDialogsComposerComponentsPollsStatefulButtonState* title,
                                                            gboolean active)
{
	return tuba_dialogs_composer_components_polls_stateful_button_construct (TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, icon, title, active);
}

static void
tuba_dialogs_composer_components_polls_stateful_button_on_clicked (TubaDialogsComposerComponentsPollsStatefulButton* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	AdwButtonContent* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_dialogs_composer_components_polls_stateful_button_get_active (self);
	_tmp1_ = _tmp0_;
	tuba_dialogs_composer_components_polls_stateful_button_set_active (self, !_tmp1_);
	_tmp2_ = self->priv->content;
	_tmp3_ = adw_button_content_get_label (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup_printf (_ ("Changed state to \"%s\""), _tmp4_);
	_tmp6_ = _tmp5_;
	gtk_accessible_announce ((GtkAccessible*) self, _tmp6_, GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_HIGH);
	_g_free0 (_tmp6_);
}

gboolean
tuba_dialogs_composer_components_polls_stateful_button_get_active (TubaDialogsComposerComponentsPollsStatefulButton* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_active;
	return result;
}

void
tuba_dialogs_composer_components_polls_stateful_button_set_active (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                   gboolean value)
{
	const gchar* _tmp0_ = NULL;
	AdwButtonContent* _tmp5_;
	const gchar* _tmp6_ = NULL;
	AdwButtonContent* _tmp11_;
	g_return_if_fail (self != NULL);
	self->priv->_active = value;
	if (self->priv->_active) {
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = self->priv->_icon;
		_tmp2_ = _tmp1_.active;
		_tmp0_ = _tmp2_;
	} else {
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = self->priv->_icon;
		_tmp4_ = _tmp3_.inactive;
		_tmp0_ = _tmp4_;
	}
	_tmp5_ = self->priv->content;
	adw_button_content_set_icon_name (_tmp5_, _tmp0_);
	if (self->priv->_active) {
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp7_;
		const gchar* _tmp8_;
		_tmp7_ = self->priv->_title;
		_tmp8_ = _tmp7_.active;
		_tmp6_ = _tmp8_;
	} else {
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp9_;
		const gchar* _tmp10_;
		_tmp9_ = self->priv->_title;
		_tmp10_ = _tmp9_.inactive;
		_tmp6_ = _tmp10_;
	}
	_tmp11_ = self->priv->content;
	adw_button_content_set_label (_tmp11_, _tmp6_);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_stateful_button_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ACTIVE_PROPERTY]);
}

void
tuba_dialogs_composer_components_polls_stateful_button_get_icon (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                 TubaDialogsComposerComponentsPollsStatefulButtonState * result)
{
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_icon;
	*result = _tmp0_;
	return;
}

static gboolean
_tuba_dialogs_composer_components_polls_stateful_button_state_equal (const TubaDialogsComposerComponentsPollsStatefulButtonState * s1,
                                                                     const TubaDialogsComposerComponentsPollsStatefulButtonState * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	if (g_strcmp0 (s1->active, s2->active)) {
		return FALSE;
	}
	if (g_strcmp0 (s1->inactive, s2->inactive)) {
		return FALSE;
	}
	return TRUE;
}

void
tuba_dialogs_composer_components_polls_stateful_button_set_icon (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                 TubaDialogsComposerComponentsPollsStatefulButtonState * value)
{
	TubaDialogsComposerComponentsPollsStatefulButtonState old_value;
	g_return_if_fail (self != NULL);
	tuba_dialogs_composer_components_polls_stateful_button_get_icon (self, &old_value);
	if (_tuba_dialogs_composer_components_polls_stateful_button_state_equal (value, &old_value) != TRUE) {
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp0_;
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp1_;
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp2_ = {0};
		_tmp0_ = *value;
		_tmp1_ = _tmp0_;
		tuba_dialogs_composer_components_polls_stateful_button_state_copy (&_tmp1_, &_tmp2_);
		tuba_dialogs_composer_components_polls_stateful_button_state_destroy (&self->priv->_icon);
		self->priv->_icon = _tmp2_;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_stateful_button_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ICON_PROPERTY]);
	}
}

void
tuba_dialogs_composer_components_polls_stateful_button_get_title (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                  TubaDialogsComposerComponentsPollsStatefulButtonState * result)
{
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_title;
	*result = _tmp0_;
	return;
}

void
tuba_dialogs_composer_components_polls_stateful_button_set_title (TubaDialogsComposerComponentsPollsStatefulButton* self,
                                                                  TubaDialogsComposerComponentsPollsStatefulButtonState * value)
{
	TubaDialogsComposerComponentsPollsStatefulButtonState old_value;
	g_return_if_fail (self != NULL);
	tuba_dialogs_composer_components_polls_stateful_button_get_title (self, &old_value);
	if (_tuba_dialogs_composer_components_polls_stateful_button_state_equal (value, &old_value) != TRUE) {
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp0_;
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp1_;
		TubaDialogsComposerComponentsPollsStatefulButtonState _tmp2_ = {0};
		_tmp0_ = *value;
		_tmp1_ = _tmp0_;
		tuba_dialogs_composer_components_polls_stateful_button_state_copy (&_tmp1_, &_tmp2_);
		tuba_dialogs_composer_components_polls_stateful_button_state_destroy (&self->priv->_title);
		self->priv->_title = _tmp2_;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_polls_stateful_button_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TITLE_PROPERTY]);
	}
}

void
tuba_dialogs_composer_components_polls_stateful_button_state_copy (const TubaDialogsComposerComponentsPollsStatefulButtonState* self,
                                                                   TubaDialogsComposerComponentsPollsStatefulButtonState* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	_tmp0_ = (*self).active;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).active);
	(*dest).active = _tmp1_;
	_tmp2_ = (*self).inactive;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).inactive);
	(*dest).inactive = _tmp3_;
}

void
tuba_dialogs_composer_components_polls_stateful_button_state_destroy (TubaDialogsComposerComponentsPollsStatefulButtonState* self)
{
	_g_free0 ((*self).active);
	_g_free0 ((*self).inactive);
}

TubaDialogsComposerComponentsPollsStatefulButtonState*
tuba_dialogs_composer_components_polls_stateful_button_state_dup (const TubaDialogsComposerComponentsPollsStatefulButtonState* self)
{
	TubaDialogsComposerComponentsPollsStatefulButtonState* dup;
	dup = g_new0 (TubaDialogsComposerComponentsPollsStatefulButtonState, 1);
	tuba_dialogs_composer_components_polls_stateful_button_state_copy (self, dup);
	return dup;
}

void
tuba_dialogs_composer_components_polls_stateful_button_state_free (TubaDialogsComposerComponentsPollsStatefulButtonState* self)
{
	tuba_dialogs_composer_components_polls_stateful_button_state_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_components_polls_stateful_button_state_get_type_once (void)
{
	GType tuba_dialogs_composer_components_polls_stateful_button_state_type_id;
	tuba_dialogs_composer_components_polls_stateful_button_state_type_id = g_boxed_type_register_static ("TubaDialogsComposerComponentsPollsStatefulButtonState", (GBoxedCopyFunc) tuba_dialogs_composer_components_polls_stateful_button_state_dup, (GBoxedFreeFunc) tuba_dialogs_composer_components_polls_stateful_button_state_free);
	return tuba_dialogs_composer_components_polls_stateful_button_state_type_id;
}

GType
tuba_dialogs_composer_components_polls_stateful_button_state_get_type (void)
{
	static GType tuba_dialogs_composer_components_polls_stateful_button_state_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_components_polls_stateful_button_state_type_id__once)) {
		GType tuba_dialogs_composer_components_polls_stateful_button_state_type_id;
		tuba_dialogs_composer_components_polls_stateful_button_state_type_id = tuba_dialogs_composer_components_polls_stateful_button_state_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_components_polls_stateful_button_state_type_id__once, tuba_dialogs_composer_components_polls_stateful_button_state_type_id);
	}
	return tuba_dialogs_composer_components_polls_stateful_button_state_type_id__once;
}

static void
_tuba_dialogs_composer_components_polls_stateful_button_on_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self)
{
	tuba_dialogs_composer_components_polls_stateful_button_on_clicked ((TubaDialogsComposerComponentsPollsStatefulButton*) self);
}

static GObject *
tuba_dialogs_composer_components_polls_stateful_button_constructor (GType type,
                                                                    guint n_construct_properties,
                                                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsComposerComponentsPollsStatefulButton * self;
	AdwButtonContent* _tmp0_ = NULL;
	AdwButtonContent* _tmp1_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_composer_components_polls_stateful_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, TubaDialogsComposerComponentsPollsStatefulButton);
	_tmp0_ = (AdwButtonContent*) adw_button_content_new ();
	adw_button_content_set_can_shrink (_tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->content);
	self->priv->content = _tmp0_;
	_tmp1_ = self->priv->content;
	gtk_button_set_child ((GtkButton*) self, (GtkWidget*) _tmp1_);
	g_signal_connect_object ((GtkButton*) self, "clicked", (GCallback) _tuba_dialogs_composer_components_polls_stateful_button_on_clicked_gtk_button_clicked, self, 0);
	return obj;
}

static void
tuba_dialogs_composer_components_polls_stateful_button_class_init (TubaDialogsComposerComponentsPollsStatefulButtonClass * klass,
                                                                   gpointer klass_data)
{
	tuba_dialogs_composer_components_polls_stateful_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerComponentsPollsStatefulButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_components_polls_stateful_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_components_polls_stateful_button_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_composer_components_polls_stateful_button_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_components_polls_stateful_button_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ACTIVE_PROPERTY, tuba_dialogs_composer_components_polls_stateful_button_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ICON_PROPERTY, tuba_dialogs_composer_components_polls_stateful_button_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ICON_PROPERTY] = g_param_spec_boxed ("icon", "icon", "icon", TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TYPE_STATE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TITLE_PROPERTY, tuba_dialogs_composer_components_polls_stateful_button_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TITLE_PROPERTY] = g_param_spec_boxed ("title", "title", "title", TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TYPE_STATE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
tuba_dialogs_composer_components_polls_stateful_button_instance_init (TubaDialogsComposerComponentsPollsStatefulButton * self,
                                                                      gpointer klass)
{
	self->priv = tuba_dialogs_composer_components_polls_stateful_button_get_instance_private (self);
	self->priv->_active = FALSE;
}

static void
tuba_dialogs_composer_components_polls_stateful_button_finalize (GObject * obj)
{
	TubaDialogsComposerComponentsPollsStatefulButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, TubaDialogsComposerComponentsPollsStatefulButton);
	g_debug ("Polls.vala:98: Destroying Composer StatefulButton");
	tuba_dialogs_composer_components_polls_stateful_button_state_destroy (&self->priv->_icon);
	tuba_dialogs_composer_components_polls_stateful_button_state_destroy (&self->priv->_title);
	_g_object_unref0 (self->priv->content);
	G_OBJECT_CLASS (tuba_dialogs_composer_components_polls_stateful_button_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_components_polls_stateful_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerComponentsPollsStatefulButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_components_polls_stateful_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerComponentsPollsStatefulButton), 0, (GInstanceInitFunc) tuba_dialogs_composer_components_polls_stateful_button_instance_init, NULL };
	GType tuba_dialogs_composer_components_polls_stateful_button_type_id;
	tuba_dialogs_composer_components_polls_stateful_button_type_id = g_type_register_static (gtk_button_get_type (), "TubaDialogsComposerComponentsPollsStatefulButton", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerComponentsPollsStatefulButton_private_offset = g_type_add_instance_private (tuba_dialogs_composer_components_polls_stateful_button_type_id, sizeof (TubaDialogsComposerComponentsPollsStatefulButtonPrivate));
	return tuba_dialogs_composer_components_polls_stateful_button_type_id;
}

GType
tuba_dialogs_composer_components_polls_stateful_button_get_type (void)
{
	static GType tuba_dialogs_composer_components_polls_stateful_button_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_components_polls_stateful_button_type_id__once)) {
		GType tuba_dialogs_composer_components_polls_stateful_button_type_id;
		tuba_dialogs_composer_components_polls_stateful_button_type_id = tuba_dialogs_composer_components_polls_stateful_button_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_components_polls_stateful_button_type_id__once, tuba_dialogs_composer_components_polls_stateful_button_type_id);
	}
	return tuba_dialogs_composer_components_polls_stateful_button_type_id__once;
}

static void
_vala_tuba_dialogs_composer_components_polls_stateful_button_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPollsStatefulButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, TubaDialogsComposerComponentsPollsStatefulButton);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ACTIVE_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_stateful_button_get_active (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ICON_PROPERTY:
		{
			TubaDialogsComposerComponentsPollsStatefulButtonState boxed;
			tuba_dialogs_composer_components_polls_stateful_button_get_icon (self, &boxed);
			g_value_set_boxed (value, &boxed);
		}
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TITLE_PROPERTY:
		{
			TubaDialogsComposerComponentsPollsStatefulButtonState boxed;
			tuba_dialogs_composer_components_polls_stateful_button_get_title (self, &boxed);
			g_value_set_boxed (value, &boxed);
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_components_polls_stateful_button_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPollsStatefulButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_STATEFUL_BUTTON, TubaDialogsComposerComponentsPollsStatefulButton);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ACTIVE_PROPERTY:
		tuba_dialogs_composer_components_polls_stateful_button_set_active (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_ICON_PROPERTY:
		tuba_dialogs_composer_components_polls_stateful_button_set_icon (self, g_value_get_boxed (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_STATEFUL_BUTTON_TITLE_PROPERTY:
		tuba_dialogs_composer_components_polls_stateful_button_set_title (self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static GObject *
tuba_dialogs_composer_components_polls_constructor (GType type,
                                                    guint n_construct_properties,
                                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsComposerComponentsPolls * self;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GtkListBox* _tmp2_ = NULL;
	GtkListBox* _tmp3_;
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp4_ = {0};
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp5_ = {0};
	gchar* _tmp6_;
	gchar** _tmp7_;
	gchar* _tmp8_;
	TubaDialogsComposerComponentsPollsStatefulButton* _tmp9_ = NULL;
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp10_ = {0};
	TubaDialogsComposerComponentsPollsStatefulButtonState _tmp11_ = {0};
	gchar* _tmp12_;
	gchar** _tmp13_;
	gchar* _tmp14_;
	TubaDialogsComposerComponentsPollsStatefulButton* _tmp15_ = NULL;
	TubaDialogsComposerComponentsPollsStatefulButton* _tmp16_;
	GtkGrid* _tmp17_ = NULL;
	GtkGrid* _tmp18_;
	TubaDialogsComposerComponentsPollsStatefulButton* _tmp19_;
	GtkGrid* _tmp20_;
	TubaDialogsComposerComponentsPollsStatefulButton* _tmp21_;
	GtkGrid* _tmp22_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_composer_components_polls_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, TubaDialogsComposerComponentsPolls);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	gtk_box_set_spacing ((GtkBox*) self, 12);
	_tmp0_ = g_strdup ("boxed-list");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp2_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	gtk_list_box_set_selection_mode (_tmp2_, GTK_SELECTION_NONE);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->poll_list);
	self->priv->poll_list = _tmp2_;
	_tmp3_ = self->priv->poll_list;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp3_);
	_g_free0 (_tmp4_.active);
	_tmp4_.active = "tuba-checkbox-checked-symbolic";
	_g_free0 (_tmp4_.inactive);
	_tmp4_.inactive = "tuba-radio-checked-symbolic";
	_g_free0 (_tmp5_.active);
	_tmp5_.active = _ ("Multiple Choice");
	_g_free0 (_tmp5_.inactive);
	_tmp5_.inactive = _ ("Single Choice");
	_tmp6_ = g_strdup ("tuba-circular");
	_tmp7_ = g_new0 (gchar*, 1 + 1);
	_tmp7_[0] = _tmp6_;
	_tmp8_ = g_strdup (_ ("Toggle Choice Type"));
	_tmp9_ = tuba_dialogs_composer_components_polls_stateful_button_new (&_tmp4_, &_tmp5_, FALSE);
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp9_, GTK_ALIGN_FILL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp9_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp9_, _tmp7_);
	_tmp7_ = (_vala_array_free (_tmp7_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp9_, _tmp8_);
	_g_free0 (_tmp8_);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->multi_button);
	self->priv->multi_button = _tmp9_;
	_g_free0 (_tmp10_.active);
	_tmp10_.active = "tuba-eye-open-negative-filled-symbolic";
	_g_free0 (_tmp10_.inactive);
	_tmp10_.inactive = "tuba-eye-not-looking-symbolic";
	_g_free0 (_tmp11_.active);
	_tmp11_.active = _ ("Show Results");
	_g_free0 (_tmp11_.inactive);
	_tmp11_.inactive = _ ("Hide Results");
	_tmp12_ = g_strdup ("tuba-circular");
	_tmp13_ = g_new0 (gchar*, 1 + 1);
	_tmp13_[0] = _tmp12_;
	_tmp14_ = g_strdup (_ ("Toggle Results Visibility"));
	_tmp15_ = tuba_dialogs_composer_components_polls_stateful_button_new (&_tmp10_, &_tmp11_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp15_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp15_, GTK_ALIGN_FILL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp15_, _tmp13_);
	_tmp13_ = (_vala_array_free (_tmp13_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp15_, _tmp14_);
	_g_free0 (_tmp14_);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->show_results_button);
	self->priv->show_results_button = _tmp15_;
	_tmp16_ = self->priv->show_results_button;
	g_object_bind_property_with_closures ((GObject*) self, "edit-mode", (GObject*) _tmp16_, "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)));
	_tmp17_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_homogeneous (_tmp17_, TRUE);
	gtk_grid_set_row_homogeneous (_tmp17_, TRUE);
	gtk_grid_set_column_spacing (_tmp17_, 6);
	gtk_grid_set_row_spacing (_tmp17_, 6);
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->actions_grid);
	self->priv->actions_grid = _tmp17_;
	_tmp18_ = self->priv->actions_grid;
	_tmp19_ = self->priv->multi_button;
	gtk_grid_attach (_tmp18_, (GtkWidget*) _tmp19_, 0, 0, 1, 1);
	_tmp20_ = self->priv->actions_grid;
	_tmp21_ = self->priv->show_results_button;
	gtk_grid_attach (_tmp20_, (GtkWidget*) _tmp21_, 1, 0, 1, 1);
	_tmp22_ = self->priv->actions_grid;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp22_);
	gtk_widget_add_css_class ((GtkWidget*) self, "initial-font-size");
	return obj;
}

static void
tuba_dialogs_composer_components_polls_class_init (TubaDialogsComposerComponentsPollsClass * klass,
                                                   gpointer klass_data)
{
	tuba_dialogs_composer_components_polls_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerComponentsPolls_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_components_polls_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_components_polls_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_composer_components_polls_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_components_polls_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EDIT_MODE_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EDIT_MODE_PROPERTY] = g_param_spec_boolean ("edit-mode", "edit-mode", "edit-mode", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_NARROW_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_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_COMPONENTS_POLLS_HIDE_TOTALS_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_HIDE_TOTALS_PROPERTY] = g_param_spec_boolean ("hide-totals", "hide-totals", "hide-totals", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_MULTIPLE_CHOICE_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_MULTIPLE_CHOICE_PROPERTY] = g_param_spec_boolean ("multiple-choice", "multiple-choice", "multiple-choice", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_CAN_DELETE_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_CAN_DELETE_PROPERTY] = g_param_spec_boolean ("can-delete", "can-delete", "can-delete", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_VALID_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_VALID_PROPERTY] = g_param_spec_boolean ("is-valid", "is-valid", "is-valid", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_INITING_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_INITING_PROPERTY] = g_param_spec_boolean ("initing", "initing", "initing", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRES_IN_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRES_IN_PROPERTY] = g_param_spec_int64 ("expires-in", "expires-in", "expires-in", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_HAS_ROWS_PROPERTY, tuba_dialogs_composer_components_polls_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_HAS_ROWS_PROPERTY] = g_param_spec_boolean ("has-rows", "has-rows", "has-rows", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
tuba_dialogs_composer_components_polls_tuba_dialogs_composer_components_attachable_interface_init (TubaDialogsComposerComponentsAttachableIface * iface,
                                                                                                   gpointer iface_data)
{
	tuba_dialogs_composer_components_polls_tuba_dialogs_composer_components_attachable_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_edit_mode = tuba_dialogs_composer_components_polls_real_get_edit_mode;
	iface->set_edit_mode = tuba_dialogs_composer_components_polls_real_set_edit_mode;
}

static void
tuba_dialogs_composer_components_polls_instance_init (TubaDialogsComposerComponentsPolls * self,
                                                      gpointer klass)
{
	GeeArrayList* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	TubaDialogsComposerComponentsPollsExpiration* _tmp40_;
	TubaDialogsComposerComponentsPollsExpiration** _tmp41_;
	self->priv = tuba_dialogs_composer_components_polls_get_instance_private (self);
	self->priv->_edit_mode = FALSE;
	self->priv->_is_narrow = FALSE;
	_tmp0_ = gee_array_list_new (TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_TYPE_POLL_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->poll_options = _tmp0_;
	self->priv->_can_delete = FALSE;
	self->priv->_is_valid = FALSE;
	self->priv->_initing = FALSE;
	_tmp1_ = g_strdup_printf (ngettext ("%d Minute", "%d Minutes", (gulong) 5), 5);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf (_ ("%dmin"), 5);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp2_, _tmp4_, (gint64) 300);
	_tmp6_ = g_strdup_printf (ngettext ("%d Minute", "%d Minutes", (gulong) 30), 30);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf (_ ("%dmin"), 30);
	_tmp9_ = _tmp8_;
	_tmp10_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp7_, _tmp9_, (gint64) 1800);
	_tmp11_ = g_strdup_printf (ngettext ("%d Hour", "%d Hours", (gulong) 1), 1);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_strdup_printf (_ ("%dh"), 1);
	_tmp14_ = _tmp13_;
	_tmp15_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp12_, _tmp14_, (gint64) 3600);
	_tmp16_ = g_strdup_printf (ngettext ("%d Hour", "%d Hours", (gulong) 6), 6);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strdup_printf (_ ("%dh"), 6);
	_tmp19_ = _tmp18_;
	_tmp20_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp17_, _tmp19_, (gint64) 21600);
	_tmp21_ = g_strdup_printf (ngettext ("%d Hour", "%d Hours", (gulong) 12), 12);
	_tmp22_ = _tmp21_;
	_tmp23_ = g_strdup_printf (_ ("%dh"), 12);
	_tmp24_ = _tmp23_;
	_tmp25_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp22_, _tmp24_, (gint64) 43200);
	_tmp26_ = g_strdup_printf (ngettext ("%d Day", "%d Days", (gulong) 1), 1);
	_tmp27_ = _tmp26_;
	_tmp28_ = g_strdup_printf (_ ("%dd"), 1);
	_tmp29_ = _tmp28_;
	_tmp30_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp27_, _tmp29_, (gint64) 86400);
	_tmp31_ = g_strdup_printf (ngettext ("%d Day", "%d Days", (gulong) 3), 3);
	_tmp32_ = _tmp31_;
	_tmp33_ = g_strdup_printf (_ ("%dd"), 3);
	_tmp34_ = _tmp33_;
	_tmp35_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp32_, _tmp34_, (gint64) 259200);
	_tmp36_ = g_strdup_printf (ngettext ("%d Day", "%d Days", (gulong) 7), 7);
	_tmp37_ = _tmp36_;
	_tmp38_ = g_strdup_printf (_ ("%dd"), 7);
	_tmp39_ = _tmp38_;
	_tmp40_ = tuba_dialogs_composer_components_polls_expiration_new (_tmp37_, _tmp39_, (gint64) 604800);
	_tmp41_ = g_new0 (TubaDialogsComposerComponentsPollsExpiration*, 8 + 1);
	_tmp41_[0] = _tmp5_;
	_tmp41_[1] = _tmp10_;
	_tmp41_[2] = _tmp15_;
	_tmp41_[3] = _tmp20_;
	_tmp41_[4] = _tmp25_;
	_tmp41_[5] = _tmp30_;
	_tmp41_[6] = _tmp35_;
	_tmp41_[7] = _tmp40_;
	self->priv->expirations = _tmp41_;
	self->priv->expirations_length1 = 8;
	self->priv->_expirations_size_ = self->priv->expirations_length1;
	_g_free0 (_tmp39_);
	_g_free0 (_tmp37_);
	_g_free0 (_tmp34_);
	_g_free0 (_tmp32_);
	_g_free0 (_tmp29_);
	_g_free0 (_tmp27_);
	_g_free0 (_tmp24_);
	_g_free0 (_tmp22_);
	_g_free0 (_tmp19_);
	_g_free0 (_tmp17_);
	_g_free0 (_tmp14_);
	_g_free0 (_tmp12_);
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
}

static void
tuba_dialogs_composer_components_polls_finalize (GObject * obj)
{
	TubaDialogsComposerComponentsPolls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, TubaDialogsComposerComponentsPolls);
	g_debug ("Polls.vala:5: Destroying Composer Component Polls");
	_g_object_unref0 (self->priv->poll_options);
	_g_object_unref0 (self->priv->poll_list);
	_g_object_unref0 (self->priv->expiration_button);
	_g_object_unref0 (self->priv->multi_button);
	_g_object_unref0 (self->priv->show_results_button);
	_g_object_unref0 (self->priv->actions_grid);
	self->priv->expirations = (_vala_array_free (self->priv->expirations, self->priv->expirations_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (tuba_dialogs_composer_components_polls_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_components_polls_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerComponentsPollsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_components_polls_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerComponentsPolls), 0, (GInstanceInitFunc) tuba_dialogs_composer_components_polls_instance_init, NULL };
	static const GInterfaceInfo tuba_dialogs_composer_components_attachable_info = { (GInterfaceInitFunc) tuba_dialogs_composer_components_polls_tuba_dialogs_composer_components_attachable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_dialogs_composer_components_polls_type_id;
	tuba_dialogs_composer_components_polls_type_id = g_type_register_static (gtk_box_get_type (), "TubaDialogsComposerComponentsPolls", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_dialogs_composer_components_polls_type_id, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, &tuba_dialogs_composer_components_attachable_info);
	TubaDialogsComposerComponentsPolls_private_offset = g_type_add_instance_private (tuba_dialogs_composer_components_polls_type_id, sizeof (TubaDialogsComposerComponentsPollsPrivate));
	return tuba_dialogs_composer_components_polls_type_id;
}

GType
tuba_dialogs_composer_components_polls_get_type (void)
{
	static GType tuba_dialogs_composer_components_polls_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_components_polls_type_id__once)) {
		GType tuba_dialogs_composer_components_polls_type_id;
		tuba_dialogs_composer_components_polls_type_id = tuba_dialogs_composer_components_polls_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_components_polls_type_id__once, tuba_dialogs_composer_components_polls_type_id);
	}
	return tuba_dialogs_composer_components_polls_type_id__once;
}

static void
_vala_tuba_dialogs_composer_components_polls_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPolls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, TubaDialogsComposerComponentsPolls);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EDIT_MODE_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_attachable_get_edit_mode ((TubaDialogsComposerComponentsAttachable*) self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_NARROW_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_get_is_narrow (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_HIDE_TOTALS_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_get_hide_totals (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_MULTIPLE_CHOICE_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_get_multiple_choice (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_CAN_DELETE_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_get_can_delete (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_VALID_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_get_is_valid (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_INITING_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_get_initing (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EXPIRES_IN_PROPERTY:
		g_value_set_int64 (value, tuba_dialogs_composer_components_polls_get_expires_in (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_HAS_ROWS_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_polls_get_has_rows (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_components_polls_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec)
{
	TubaDialogsComposerComponentsPolls * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_POLLS, TubaDialogsComposerComponentsPolls);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_EDIT_MODE_PROPERTY:
		tuba_dialogs_composer_components_attachable_set_edit_mode ((TubaDialogsComposerComponentsAttachable*) self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_NARROW_PROPERTY:
		tuba_dialogs_composer_components_polls_set_is_narrow (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_CAN_DELETE_PROPERTY:
		tuba_dialogs_composer_components_polls_set_can_delete (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_IS_VALID_PROPERTY:
		tuba_dialogs_composer_components_polls_set_is_valid (self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_POLLS_INITING_PROPERTY:
		tuba_dialogs_composer_components_polls_set_initing (self, g_value_get_boolean (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);
}

