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

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

#define TOOTLE_TYPE_IACCOUNT_LISTENER (tootle_iaccount_listener_get_type ())
#define TOOTLE_IACCOUNT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_IACCOUNT_LISTENER, TootleIAccountListener))
#define TOOTLE_IS_IACCOUNT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_IACCOUNT_LISTENER))
#define TOOTLE_IACCOUNT_LISTENER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TOOTLE_TYPE_IACCOUNT_LISTENER, TootleIAccountListenerIface))

typedef struct _TootleIAccountListener TootleIAccountListener;
typedef struct _TootleIAccountListenerIface TootleIAccountListenerIface;

#define TOOTLE_TYPE_ENTITY (tootle_entity_get_type ())
#define TOOTLE_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ENTITY, TootleEntity))
#define TOOTLE_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ENTITY, TootleEntityClass))
#define TOOTLE_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ENTITY))
#define TOOTLE_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ENTITY))
#define TOOTLE_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ENTITY, TootleEntityClass))

typedef struct _TootleEntity TootleEntity;
typedef struct _TootleEntityClass TootleEntityClass;

#define TOOTLE_API_TYPE_ACCOUNT (tootle_api_account_get_type ())
#define TOOTLE_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccount))
#define TOOTLE_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccountClass))
#define TOOTLE_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_ACCOUNT))
#define TOOTLE_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_ACCOUNT))
#define TOOTLE_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccountClass))

typedef struct _TootleAPIAccount TootleAPIAccount;
typedef struct _TootleAPIAccountClass TootleAPIAccountClass;

#define TOOTLE_TYPE_INSTANCE_ACCOUNT (tootle_instance_account_get_type ())
#define TOOTLE_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccount))
#define TOOTLE_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccountClass))
#define TOOTLE_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT))
#define TOOTLE_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_INSTANCE_ACCOUNT))
#define TOOTLE_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccountClass))

typedef struct _TootleInstanceAccount TootleInstanceAccount;
typedef struct _TootleInstanceAccountClass TootleInstanceAccountClass;

#define TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON (tootle_widgets_accounts_button_get_type ())
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON, TootleWidgetsAccountsButton))
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON, TootleWidgetsAccountsButtonClass))
#define TOOTLE_WIDGETS_IS_ACCOUNTS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON))
#define TOOTLE_WIDGETS_IS_ACCOUNTS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON))
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON, TootleWidgetsAccountsButtonClass))

typedef struct _TootleWidgetsAccountsButton TootleWidgetsAccountsButton;
typedef struct _TootleWidgetsAccountsButtonClass TootleWidgetsAccountsButtonClass;
typedef struct _TootleWidgetsAccountsButtonPrivate TootleWidgetsAccountsButtonPrivate;

#define TOOTLE_WIDGETS_TYPE_AVATAR (tootle_widgets_avatar_get_type ())
#define TOOTLE_WIDGETS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_AVATAR, TootleWidgetsAvatar))
#define TOOTLE_WIDGETS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_AVATAR, TootleWidgetsAvatarClass))
#define TOOTLE_WIDGETS_IS_AVATAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_AVATAR))
#define TOOTLE_WIDGETS_IS_AVATAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_AVATAR))
#define TOOTLE_WIDGETS_AVATAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_AVATAR, TootleWidgetsAvatarClass))

typedef struct _TootleWidgetsAvatar TootleWidgetsAvatar;
typedef struct _TootleWidgetsAvatarClass TootleWidgetsAvatarClass;
enum  {
	TOOTLE_WIDGETS_ACCOUNTS_BUTTON_0_PROPERTY,
	TOOTLE_WIDGETS_ACCOUNTS_BUTTON_NUM_PROPERTIES
};
static GParamSpec* tootle_widgets_accounts_button_properties[TOOTLE_WIDGETS_ACCOUNTS_BUTTON_NUM_PROPERTIES];

#define TOOTLE_TYPE_ACCOUNTS (tootle_accounts_get_type ())
#define TOOTLE_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccounts))
#define TOOTLE_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))
#define TOOTLE_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_IS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))

typedef struct _TootleAccounts TootleAccounts;
typedef struct _TootleAccountsClass TootleAccountsClass;

#define TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT (tootle_dialogs_new_account_get_type ())
#define TOOTLE_DIALOGS_NEW_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT, TootleDialogsNewAccount))
#define TOOTLE_DIALOGS_NEW_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT, TootleDialogsNewAccountClass))
#define TOOTLE_DIALOGS_IS_NEW_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT))
#define TOOTLE_DIALOGS_IS_NEW_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT))
#define TOOTLE_DIALOGS_NEW_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT, TootleDialogsNewAccountClass))

typedef struct _TootleDialogsNewAccount TootleDialogsNewAccount;
typedef struct _TootleDialogsNewAccountClass TootleDialogsNewAccountClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM (tootle_widgets_accounts_button_item_get_type ())
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM, TootleWidgetsAccountsButtonItem))
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM, TootleWidgetsAccountsButtonItemClass))
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM))
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM))
#define TOOTLE_WIDGETS_ACCOUNTS_BUTTON_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM, TootleWidgetsAccountsButtonItemClass))

typedef struct _TootleWidgetsAccountsButtonItem TootleWidgetsAccountsButtonItem;
typedef struct _TootleWidgetsAccountsButtonItemClass TootleWidgetsAccountsButtonItemClass;
typedef struct _TootleWidgetsAccountsButtonItemPrivate TootleWidgetsAccountsButtonItemPrivate;
enum  {
	TOOTLE_WIDGETS_ACCOUNTS_BUTTON_ITEM_0_PROPERTY,
	TOOTLE_WIDGETS_ACCOUNTS_BUTTON_ITEM_NUM_PROPERTIES
};
static GParamSpec* tootle_widgets_accounts_button_item_properties[TOOTLE_WIDGETS_ACCOUNTS_BUTTON_ITEM_NUM_PROPERTIES];

#define TOOTLE_TYPE_APPLICATION (tootle_application_get_type ())
#define TOOTLE_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_APPLICATION, TootleApplication))
#define TOOTLE_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_APPLICATION, TootleApplicationClass))
#define TOOTLE_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_APPLICATION))
#define TOOTLE_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_APPLICATION))
#define TOOTLE_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_APPLICATION, TootleApplicationClass))

typedef struct _TootleApplication TootleApplication;
typedef struct _TootleApplicationClass TootleApplicationClass;

#define TOOTLE_DIALOGS_TYPE_MAIN_WINDOW (tootle_dialogs_main_window_get_type ())
#define TOOTLE_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindow))
#define TOOTLE_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))

typedef struct _TootleDialogsMainWindow TootleDialogsMainWindow;
typedef struct _TootleDialogsMainWindowClass TootleDialogsMainWindowClass;

#define TOOTLE_TYPE_WIDGETIZABLE (tootle_widgetizable_get_type ())
#define TOOTLE_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_WIDGETIZABLE, TootleWidgetizable))
#define TOOTLE_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_WIDGETIZABLE))
#define TOOTLE_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TOOTLE_TYPE_WIDGETIZABLE, TootleWidgetizableIface))

typedef struct _TootleWidgetizable TootleWidgetizable;
typedef struct _TootleWidgetizableIface TootleWidgetizableIface;

#define TOOTLE_VIEWS_TYPE_BASE (tootle_views_base_get_type ())
#define TOOTLE_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase))
#define TOOTLE_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))
#define TOOTLE_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))

typedef struct _TootleViewsBase TootleViewsBase;
typedef struct _TootleViewsBaseClass TootleViewsBaseClass;

#define TOOTLE_VIEWS_TYPE_TIMELINE (tootle_views_timeline_get_type ())
#define TOOTLE_VIEWS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_TIMELINE, TootleViewsTimeline))
#define TOOTLE_VIEWS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_TIMELINE, TootleViewsTimelineClass))
#define TOOTLE_VIEWS_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_TIMELINE))
#define TOOTLE_VIEWS_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_TIMELINE))
#define TOOTLE_VIEWS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_TIMELINE, TootleViewsTimelineClass))

typedef struct _TootleViewsTimeline TootleViewsTimeline;
typedef struct _TootleViewsTimelineClass TootleViewsTimelineClass;

#define TOOTLE_VIEWS_TYPE_FAVORITES (tootle_views_favorites_get_type ())
#define TOOTLE_VIEWS_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_FAVORITES, TootleViewsFavorites))
#define TOOTLE_VIEWS_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_FAVORITES, TootleViewsFavoritesClass))
#define TOOTLE_VIEWS_IS_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_FAVORITES))
#define TOOTLE_VIEWS_IS_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_FAVORITES))
#define TOOTLE_VIEWS_FAVORITES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_FAVORITES, TootleViewsFavoritesClass))

typedef struct _TootleViewsFavorites TootleViewsFavorites;
typedef struct _TootleViewsFavoritesClass TootleViewsFavoritesClass;

#define TOOTLE_VIEWS_TYPE_CONVERSATIONS (tootle_views_conversations_get_type ())
#define TOOTLE_VIEWS_CONVERSATIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_CONVERSATIONS, TootleViewsConversations))
#define TOOTLE_VIEWS_CONVERSATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_CONVERSATIONS, TootleViewsConversationsClass))
#define TOOTLE_VIEWS_IS_CONVERSATIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_CONVERSATIONS))
#define TOOTLE_VIEWS_IS_CONVERSATIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_CONVERSATIONS))
#define TOOTLE_VIEWS_CONVERSATIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_CONVERSATIONS, TootleViewsConversationsClass))

typedef struct _TootleViewsConversations TootleViewsConversations;
typedef struct _TootleViewsConversationsClass TootleViewsConversationsClass;

#define TOOTLE_VIEWS_TYPE_BOOKMARKS (tootle_views_bookmarks_get_type ())
#define TOOTLE_VIEWS_BOOKMARKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_BOOKMARKS, TootleViewsBookmarks))
#define TOOTLE_VIEWS_BOOKMARKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_BOOKMARKS, TootleViewsBookmarksClass))
#define TOOTLE_VIEWS_IS_BOOKMARKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_BOOKMARKS))
#define TOOTLE_VIEWS_IS_BOOKMARKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_BOOKMARKS))
#define TOOTLE_VIEWS_BOOKMARKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_BOOKMARKS, TootleViewsBookmarksClass))

typedef struct _TootleViewsBookmarks TootleViewsBookmarks;
typedef struct _TootleViewsBookmarksClass TootleViewsBookmarksClass;

#define TOOTLE_VIEWS_TYPE_LISTS (tootle_views_lists_get_type ())
#define TOOTLE_VIEWS_LISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_LISTS, TootleViewsLists))
#define TOOTLE_VIEWS_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_LISTS, TootleViewsListsClass))
#define TOOTLE_VIEWS_IS_LISTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_LISTS))
#define TOOTLE_VIEWS_IS_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_LISTS))
#define TOOTLE_VIEWS_LISTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_LISTS, TootleViewsListsClass))

typedef struct _TootleViewsLists TootleViewsLists;
typedef struct _TootleViewsListsClass TootleViewsListsClass;

struct _TootleIAccountListenerIface {
	GTypeInterface parent_iface;
	void (*on_account_changed) (TootleIAccountListener* self, TootleInstanceAccount* account);
	void (*on_accounts_changed) (TootleIAccountListener* self, GeeArrayList* accounts);
};

struct _TootleWidgetsAccountsButton {
	GtkMenuButton parent_instance;
	TootleWidgetsAccountsButtonPrivate * priv;
};

struct _TootleWidgetsAccountsButtonClass {
	GtkMenuButtonClass parent_class;
	void (*on_accounts_changed) (TootleWidgetsAccountsButton* self, GeeArrayList* accounts);
	void (*on_account_changed) (TootleWidgetsAccountsButton* self, TootleInstanceAccount* account);
};

struct _TootleWidgetsAccountsButtonPrivate {
	gboolean invalidated;
	TootleWidgetsAvatar* avatar;
	GtkListBox* account_list;
	GtkModelButton* item_accounts;
	GtkModelButton* item_prefs;
	GtkModelButton* item_refresh;
	GtkButton* item_favs;
	GtkButton* item_conversations;
	GtkButton* item_bookmarks;
	GtkButton* item_lists;
};

struct _TootleWidgetsAccountsButtonItem {
	GtkListBoxRow parent_instance;
	TootleWidgetsAccountsButtonItemPrivate * priv;
};

struct _TootleWidgetsAccountsButtonItemClass {
	GtkListBoxRowClass parent_class;
};

struct _TootleWidgetsAccountsButtonItemPrivate {
	TootleWidgetsAccountsButton* button;
	TootleInstanceAccount* account;
	GtkStack* stack;
	TootleWidgetsAvatar* avatar;
	GtkLabel* title;
	GtkLabel* handle;
	GtkButton* forget_button;
};

typedef enum  {
	TOOTLE_OOPSIE_USER,
	TOOTLE_OOPSIE_PARSING,
	TOOTLE_OOPSIE_INSTANCE,
	TOOTLE_OOPSIE_INTERNAL
} TootleOopsie;
#define TOOTLE_OOPSIE tootle_oopsie_quark ()
struct _TootleWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TootleWidgetizable* self, GError** error);
	void (*open) (TootleWidgetizable* self);
	void (*resolve_open) (TootleWidgetizable* self, TootleInstanceAccount* account);
};

static gint TootleWidgetsAccountsButton_private_offset;
static gpointer tootle_widgets_accounts_button_parent_class = NULL;
extern TootleAccounts* tootle_accounts;
static gint TootleWidgetsAccountsButtonItem_private_offset;
static gpointer tootle_widgets_accounts_button_item_parent_class = NULL;
extern TootleApplication* tootle_app;
extern TootleDialogsMainWindow* tootle_window;
static TootleIAccountListenerIface * tootle_widgets_accounts_button_tootle_iaccount_listener_parent_iface = NULL;

GType tootle_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleEntity, g_object_unref)
GType tootle_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIAccount, g_object_unref)
GType tootle_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleInstanceAccount, g_object_unref)
GType tootle_iaccount_listener_get_type (void) G_GNUC_CONST ;
GType tootle_widgets_accounts_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsAccountsButton, g_object_unref)
GType tootle_widgets_avatar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsAvatar, g_object_unref)
void tootle_widgets_accounts_button_on_accounts_changed (TootleWidgetsAccountsButton* self,
                                                         GeeArrayList* accounts);
void tootle_widgets_accounts_button_on_account_changed (TootleWidgetsAccountsButton* self,
                                                        TootleInstanceAccount* account);
void tootle_iaccount_listener_account_listener_free (TootleIAccountListener* self);
void tootle_widgets_accounts_button_on_selection_changed (TootleWidgetsAccountsButton* self,
                                                          GtkListBoxRow* r);
GType tootle_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAccounts, g_object_unref)
GeeArrayList* tootle_accounts_get_saved (TootleAccounts* self);
TootleDialogsNewAccount* tootle_dialogs_new_account_new (void);
TootleDialogsNewAccount* tootle_dialogs_new_account_construct (GType object_type);
GType tootle_dialogs_new_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsNewAccount, g_object_unref)
TootleInstanceAccount* tootle_accounts_get_active (TootleAccounts* self);
void tootle_accounts_switch_account (TootleAccounts* self,
                                     gint id);
static void tootle_widgets_accounts_button_real_on_accounts_changed (TootleWidgetsAccountsButton* self,
                                                              GeeArrayList* accounts);
static void tootle_widgets_accounts_button_rebuild (TootleWidgetsAccountsButton* self);
static void tootle_widgets_accounts_button_real_on_account_changed (TootleWidgetsAccountsButton* self,
                                                             TootleInstanceAccount* account);
void tootle_widgets_avatar_set_account (TootleWidgetsAvatar* self,
                                        TootleAPIAccount* value);
const gchar* tootle_api_account_get_display_name (TootleAPIAccount* self);
gchar* tootle_instance_account_get_handle (TootleInstanceAccount* self);
static void __lambda105_ (TootleWidgetsAccountsButton* self,
                   GtkWidget* w);
static void ___lambda105__gtk_callback (GtkWidget* widget,
                                 gpointer self);
static gboolean __lambda106_ (TootleWidgetsAccountsButton* self,
                       TootleInstanceAccount* acc);
static GType tootle_widgets_accounts_button_item_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsAccountsButtonItem, g_object_unref)
static TootleWidgetsAccountsButtonItem* tootle_widgets_accounts_button_item_new (TootleInstanceAccount* account,
                                                                          TootleWidgetsAccountsButton* btn);
static TootleWidgetsAccountsButtonItem* tootle_widgets_accounts_button_item_construct (GType object_type,
                                                                                TootleInstanceAccount* account,
                                                                                TootleWidgetsAccountsButton* btn);
static gboolean ___lambda106__gee_forall_func (gpointer g,
                                        gpointer self);
static TootleWidgetsAccountsButtonItem* tootle_widgets_accounts_button_item_new_add_new (void);
static TootleWidgetsAccountsButtonItem* tootle_widgets_accounts_button_item_construct_add_new (GType object_type);
TootleWidgetsAccountsButton* tootle_widgets_accounts_button_new (void);
TootleWidgetsAccountsButton* tootle_widgets_accounts_button_construct (GType object_type);
static void tootle_widgets_accounts_button_item_forget (TootleWidgetsAccountsButtonItem* self);
GType tootle_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleApplication, g_object_unref)
gboolean tootle_application_question (TootleApplication* self,
                                      const gchar* text,
                                      const gchar* msg,
                                      GtkWindow* win);
GType tootle_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsMainWindow, g_object_unref)
void tootle_accounts_remove (TootleAccounts* self,
                             TootleInstanceAccount* account);
static void _tootle_widgets_accounts_button_item_forget_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self);
static void tootle_widgets_accounts_button_item_open_profile (TootleWidgetsAccountsButtonItem* self);
GQuark tootle_oopsie_quark (void);
GType tootle_widgetizable_get_type (void) G_GNUC_CONST ;
void tootle_widgetizable_resolve_open (TootleWidgetizable* self,
                                       TootleInstanceAccount* account);
static void _tootle_widgets_accounts_button_item_open_profile_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void tootle_widgets_accounts_button_item_finalize (GObject * obj);
static GType tootle_widgets_accounts_button_item_get_type_once (void);
static GObject * tootle_widgets_accounts_button_constructor (GType type,
                                                      guint n_construct_properties,
                                                      GObjectConstructParam * construct_properties);
void tootle_iaccount_listener_account_listener_init (TootleIAccountListener* self);
static void _tootle_widgets_accounts_button___lambda107_ (TootleWidgetsAccountsButton* self);
static void __tootle_widgets_accounts_button___lambda107__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void _tootle_widgets_accounts_button___lambda108_ (TootleWidgetsAccountsButton* self);
GType tootle_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsBase, g_object_unref)
TootleViewsBase* tootle_dialogs_main_window_open_view (TootleDialogsMainWindow* self,
                                                       TootleViewsBase* view);
TootleViewsFavorites* tootle_views_favorites_new (void);
TootleViewsFavorites* tootle_views_favorites_construct (GType object_type);
GType tootle_views_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsTimeline, g_object_unref)
GType tootle_views_favorites_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsFavorites, g_object_unref)
static void __tootle_widgets_accounts_button___lambda108__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void _tootle_widgets_accounts_button___lambda109_ (TootleWidgetsAccountsButton* self);
TootleViewsConversations* tootle_views_conversations_new (void);
TootleViewsConversations* tootle_views_conversations_construct (GType object_type);
GType tootle_views_conversations_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsConversations, g_object_unref)
static void __tootle_widgets_accounts_button___lambda109__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void _tootle_widgets_accounts_button___lambda112_ (TootleWidgetsAccountsButton* self);
TootleViewsBookmarks* tootle_views_bookmarks_new (void);
TootleViewsBookmarks* tootle_views_bookmarks_construct (GType object_type);
GType tootle_views_bookmarks_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsBookmarks, g_object_unref)
static void __tootle_widgets_accounts_button___lambda112__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void _tootle_widgets_accounts_button___lambda113_ (TootleWidgetsAccountsButton* self);
TootleViewsLists* tootle_views_lists_new (void);
TootleViewsLists* tootle_views_lists_construct (GType object_type);
GType tootle_views_lists_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsLists, g_object_unref)
static void __tootle_widgets_accounts_button___lambda113__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void _tootle_widgets_accounts_button___lambda124_ (TootleWidgetsAccountsButton* self);
void tootle_dialogs_preferences_open (void);
static void __tootle_widgets_accounts_button___lambda124__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
static void _tootle_widgets_accounts_button___lambda127_ (TootleWidgetsAccountsButton* self);
static void __tootle_widgets_accounts_button___lambda127__g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self);
static void _tootle_widgets_accounts_button_on_selection_changed_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                      GtkListBoxRow* row,
                                                                                      gpointer self);
void tootle_iaccount_listener_on_accounts_changed (TootleIAccountListener* self,
                                                   GeeArrayList* accounts);
void tootle_iaccount_listener_on_account_changed (TootleIAccountListener* self,
                                                  TootleInstanceAccount* account);
static void tootle_widgets_accounts_button_finalize (GObject * obj);
static GType tootle_widgets_accounts_button_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
tootle_widgets_accounts_button_get_instance_private (TootleWidgetsAccountsButton* self)
{
	return G_STRUCT_MEMBER_P (self, TootleWidgetsAccountsButton_private_offset);
}

void
tootle_widgets_accounts_button_on_selection_changed (TootleWidgetsAccountsButton* self,
                                                     GtkListBoxRow* r)
{
	gint i = 0;
	TootleAccounts* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	TootleInstanceAccount* account = NULL;
	TootleAccounts* _tmp9_;
	GeeArrayList* _tmp10_;
	GeeArrayList* _tmp11_;
	gpointer _tmp12_;
	TootleAccounts* _tmp13_;
	TootleInstanceAccount* _tmp14_;
	TootleInstanceAccount* _tmp15_;
	TootleInstanceAccount* _tmp16_;
	TootleAccounts* _tmp17_;
	GtkPopover* _tmp18_;
	GtkPopover* _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (r != NULL);
	i = gtk_list_box_row_get_index (r);
	_tmp0_ = tootle_accounts;
	_tmp1_ = tootle_accounts_get_saved (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (i >= _tmp4_) {
		TootleDialogsNewAccount* _tmp5_;
		TootleDialogsNewAccount* _tmp6_;
		GtkPopover* _tmp7_;
		GtkPopover* _tmp8_;
		gtk_toggle_button_set_active ((GtkToggleButton*) self, FALSE);
		_tmp5_ = tootle_dialogs_new_account_new ();
		g_object_ref_sink (_tmp5_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp6_);
		_tmp7_ = gtk_menu_button_get_popover ((GtkMenuButton*) self);
		_tmp8_ = _tmp7_;
		gtk_popover_popdown (_tmp8_);
		return;
	}
	_tmp9_ = tootle_accounts;
	_tmp10_ = tootle_accounts_get_saved (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, i);
	account = (TootleInstanceAccount*) _tmp12_;
	_tmp13_ = tootle_accounts;
	_tmp14_ = tootle_accounts_get_active (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = account;
	if (_tmp15_ == _tmp16_) {
		_g_object_unref0 (account);
		return;
	}
	_tmp17_ = tootle_accounts;
	tootle_accounts_switch_account (_tmp17_, i);
	_tmp18_ = gtk_menu_button_get_popover ((GtkMenuButton*) self);
	_tmp19_ = _tmp18_;
	gtk_popover_popdown (_tmp19_);
	_g_object_unref0 (account);
}

static void
tootle_widgets_accounts_button_real_on_accounts_changed (TootleWidgetsAccountsButton* self,
                                                         GeeArrayList* accounts)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (accounts != NULL);
	self->priv->invalidated = TRUE;
	_tmp0_ = gtk_toggle_button_get_active ((GtkToggleButton*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		tootle_widgets_accounts_button_rebuild (self);
	}
}

void
tootle_widgets_accounts_button_on_accounts_changed (TootleWidgetsAccountsButton* self,
                                                    GeeArrayList* accounts)
{
	TootleWidgetsAccountsButtonClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_WIDGETS_ACCOUNTS_BUTTON_GET_CLASS (self);
	if (_klass_->on_accounts_changed) {
		_klass_->on_accounts_changed (self, accounts);
	}
}

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

static void
tootle_widgets_accounts_button_real_on_account_changed (TootleWidgetsAccountsButton* self,
                                                        TootleInstanceAccount* account)
{
	GtkModelButton* _tmp15_;
	if (account == NULL) {
		TootleWidgetsAvatar* _tmp0_;
		GtkModelButton* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp0_ = self->priv->avatar;
		tootle_widgets_avatar_set_account (_tmp0_, NULL);
		_tmp1_ = self->priv->item_accounts;
		_tmp2_ = g_strdup_printf ("<b><span size=\"large\">%s</span></b>\n%s", _ ("Anonymous"), _ ("No active account"));
		_tmp3_ = _tmp2_;
		g_object_set (_tmp1_, "text", _tmp3_, NULL);
		_g_free0 (_tmp3_);
	} else {
		TootleWidgetsAvatar* _tmp4_;
		GtkModelButton* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp4_ = self->priv->avatar;
		tootle_widgets_avatar_set_account (_tmp4_, (TootleAPIAccount*) account);
		_tmp5_ = self->priv->item_accounts;
		_tmp6_ = tootle_api_account_get_display_name ((TootleAPIAccount*) account);
		_tmp7_ = _tmp6_;
		_tmp8_ = string_to_string (_tmp7_);
		_tmp9_ = tootle_instance_account_get_handle (account);
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_;
		_tmp12_ = string_to_string (_tmp11_);
		_tmp13_ = g_strconcat ("<b><span size=\"large\">", _tmp8_, "</span></b>\n", _tmp12_, NULL);
		_tmp14_ = _tmp13_;
		g_object_set (_tmp5_, "text", _tmp14_, NULL);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp11_);
	}
	_tmp15_ = self->priv->item_accounts;
	g_object_set (_tmp15_, "use-markup", TRUE, NULL);
}

void
tootle_widgets_accounts_button_on_account_changed (TootleWidgetsAccountsButton* self,
                                                   TootleInstanceAccount* account)
{
	TootleWidgetsAccountsButtonClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TOOTLE_WIDGETS_ACCOUNTS_BUTTON_GET_CLASS (self);
	if (_klass_->on_account_changed) {
		_klass_->on_account_changed (self, account);
	}
}

static void
__lambda105_ (TootleWidgetsAccountsButton* self,
              GtkWidget* w)
{
	GtkListBox* _tmp0_;
	g_return_if_fail (w != NULL);
	_tmp0_ = self->priv->account_list;
	gtk_container_remove ((GtkContainer*) _tmp0_, w);
}

static void
___lambda105__gtk_callback (GtkWidget* widget,
                            gpointer self)
{
	__lambda105_ ((TootleWidgetsAccountsButton*) self, widget);
}

static gboolean
__lambda106_ (TootleWidgetsAccountsButton* self,
              TootleInstanceAccount* acc)
{
	TootleWidgetsAccountsButtonItem* row = NULL;
	TootleWidgetsAccountsButtonItem* _tmp0_;
	GtkListBox* _tmp1_;
	TootleWidgetsAccountsButtonItem* _tmp2_;
	TootleAccounts* _tmp3_;
	TootleInstanceAccount* _tmp4_;
	TootleInstanceAccount* _tmp5_;
	gboolean result = FALSE;
	g_return_val_if_fail (acc != NULL, FALSE);
	_tmp0_ = tootle_widgets_accounts_button_item_new (acc, self);
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	_tmp1_ = self->priv->account_list;
	_tmp2_ = row;
	gtk_list_box_insert (_tmp1_, (GtkWidget*) _tmp2_, -1);
	_tmp3_ = tootle_accounts;
	_tmp4_ = tootle_accounts_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == acc) {
		TootleWidgetsAccountsButtonItem* _tmp6_;
		_tmp6_ = row;
		g_signal_emit_by_name ((GtkListBoxRow*) _tmp6_, "activate");
	}
	result = TRUE;
	_g_object_unref0 (row);
	_g_object_unref0 (acc);
	return result;
}

static gboolean
___lambda106__gee_forall_func (gpointer g,
                               gpointer self)
{
	gboolean result;
	result = __lambda106_ ((TootleWidgetsAccountsButton*) self, (TootleInstanceAccount*) g);
	return result;
}

static void
tootle_widgets_accounts_button_rebuild (TootleWidgetsAccountsButton* self)
{
	GtkListBox* _tmp0_;
	TootleAccounts* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	GtkListBox* _tmp4_;
	TootleWidgetsAccountsButtonItem* _tmp5_;
	TootleWidgetsAccountsButtonItem* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->account_list;
	gtk_container_foreach ((GtkContainer*) _tmp0_, ___lambda105__gtk_callback, self);
	_tmp1_ = tootle_accounts;
	_tmp2_ = tootle_accounts_get_saved (_tmp1_);
	_tmp3_ = _tmp2_;
	gee_abstract_collection_foreach ((GeeAbstractCollection*) _tmp3_, ___lambda106__gee_forall_func, self);
	_tmp4_ = self->priv->account_list;
	_tmp5_ = tootle_widgets_accounts_button_item_new_add_new ();
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	gtk_list_box_insert (_tmp4_, (GtkWidget*) _tmp6_, -1);
	_g_object_unref0 (_tmp6_);
	self->priv->invalidated = FALSE;
}

TootleWidgetsAccountsButton*
tootle_widgets_accounts_button_construct (GType object_type)
{
	TootleWidgetsAccountsButton * self = NULL;
	self = (TootleWidgetsAccountsButton*) g_object_new (object_type, NULL);
	return self;
}

TootleWidgetsAccountsButton*
tootle_widgets_accounts_button_new (void)
{
	return tootle_widgets_accounts_button_construct (TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON);
}

static inline gpointer
tootle_widgets_accounts_button_item_get_instance_private (TootleWidgetsAccountsButtonItem* self)
{
	return G_STRUCT_MEMBER_P (self, TootleWidgetsAccountsButtonItem_private_offset);
}

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

static TootleWidgetsAccountsButtonItem*
tootle_widgets_accounts_button_item_construct (GType object_type,
                                               TootleInstanceAccount* account,
                                               TootleWidgetsAccountsButton* btn)
{
	TootleWidgetsAccountsButtonItem * self = NULL;
	TootleInstanceAccount* _tmp0_;
	TootleWidgetsAccountsButton* _tmp1_;
	TootleWidgetsAvatar* _tmp2_;
	GtkLabel* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GtkLabel* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	g_return_val_if_fail (account != NULL, NULL);
	g_return_val_if_fail (btn != NULL, NULL);
	self = (TootleWidgetsAccountsButtonItem*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (account);
	_g_object_unref0 (self->priv->account);
	self->priv->account = _tmp0_;
	_tmp1_ = _g_object_ref0 (btn);
	_g_object_unref0 (self->priv->button);
	self->priv->button = _tmp1_;
	_tmp2_ = self->priv->avatar;
	tootle_widgets_avatar_set_account (_tmp2_, (TootleAPIAccount*) account);
	_tmp3_ = self->priv->title;
	_tmp4_ = tootle_api_account_get_display_name ((TootleAPIAccount*) account);
	_tmp5_ = _tmp4_;
	gtk_label_set_label (_tmp3_, _tmp5_);
	_tmp6_ = self->priv->handle;
	_tmp7_ = tootle_instance_account_get_handle (account);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_;
	gtk_label_set_label (_tmp6_, _tmp9_);
	_g_free0 (_tmp9_);
	return self;
}

static TootleWidgetsAccountsButtonItem*
tootle_widgets_accounts_button_item_new (TootleInstanceAccount* account,
                                         TootleWidgetsAccountsButton* btn)
{
	return tootle_widgets_accounts_button_item_construct (TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM, account, btn);
}

static TootleWidgetsAccountsButtonItem*
tootle_widgets_accounts_button_item_construct_add_new (GType object_type)
{
	TootleWidgetsAccountsButtonItem * self = NULL;
	GtkButton* _tmp0_;
	GtkStack* _tmp1_;
	self = (TootleWidgetsAccountsButtonItem*) g_object_new (object_type, NULL);
	_tmp0_ = self->priv->forget_button;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp1_, "new");
	gtk_list_box_row_set_selectable ((GtkListBoxRow*) self, FALSE);
	return self;
}

static TootleWidgetsAccountsButtonItem*
tootle_widgets_accounts_button_item_new_add_new (void)
{
	return tootle_widgets_accounts_button_item_construct_add_new (TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM);
}

static void
tootle_widgets_accounts_button_item_forget (TootleWidgetsAccountsButtonItem* self)
{
	gboolean forget = FALSE;
	TootleApplication* _tmp0_;
	GtkLabel* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	TootleDialogsMainWindow* _tmp6_;
	gboolean _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tootle_app;
	_tmp1_ = self->priv->handle;
	_tmp2_ = gtk_label_get_label (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup_printf ("Forget %s?", _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tootle_window;
	_tmp7_ = tootle_application_question (_tmp0_, _ (_tmp5_), _ ("This account will be removed from the application."), (GtkWindow*) _tmp6_);
	_g_free0 (_tmp5_);
	forget = _tmp7_;
	if (forget) {
		TootleWidgetsAccountsButton* _tmp8_;
		TootleAccounts* _tmp9_;
		TootleInstanceAccount* _tmp10_;
		_tmp8_ = self->priv->button;
		gtk_toggle_button_set_active ((GtkToggleButton*) _tmp8_, FALSE);
		_tmp9_ = tootle_accounts;
		_tmp10_ = self->priv->account;
		tootle_accounts_remove (_tmp9_, _tmp10_);
	}
}

static void
_tootle_widgets_accounts_button_item_forget_gtk_button_clicked (GtkButton* _sender,
                                                                gpointer self)
{
	tootle_widgets_accounts_button_item_forget ((TootleWidgetsAccountsButtonItem*) self);
}

static void
tootle_widgets_accounts_button_item_open_profile (TootleWidgetsAccountsButtonItem* self)
{
	TootleWidgetsAccountsButton* _tmp0_;
	TootleInstanceAccount* _tmp1_;
	TootleAccounts* _tmp2_;
	TootleInstanceAccount* _tmp3_;
	TootleInstanceAccount* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->button;
	gtk_toggle_button_set_active ((GtkToggleButton*) _tmp0_, FALSE);
	_tmp1_ = self->priv->account;
	_tmp2_ = tootle_accounts;
	_tmp3_ = tootle_accounts_get_active (_tmp2_);
	_tmp4_ = _tmp3_;
	tootle_widgetizable_resolve_open ((TootleWidgetizable*) _tmp1_, _tmp4_);
}

static void
_tootle_widgets_accounts_button_item_open_profile_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	tootle_widgets_accounts_button_item_open_profile ((TootleWidgetsAccountsButtonItem*) self);
}

static void
tootle_widgets_accounts_button_item_class_init (TootleWidgetsAccountsButtonItemClass * klass,
                                                gpointer klass_data)
{
	tootle_widgets_accounts_button_item_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TootleWidgetsAccountsButtonItem_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tootle_widgets_accounts_button_item_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/bleakgrey/tootle/ui/widgets/accounts_button_item.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, TootleWidgetsAccountsButtonItem_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonItemPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "avatar", FALSE, TootleWidgetsAccountsButtonItem_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonItemPrivate, avatar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "title", FALSE, TootleWidgetsAccountsButtonItem_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonItemPrivate, title));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "handle", FALSE, TootleWidgetsAccountsButtonItem_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonItemPrivate, handle));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "forget_button", FALSE, TootleWidgetsAccountsButtonItem_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonItemPrivate, forget_button));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "forget", G_CALLBACK(_tootle_widgets_accounts_button_item_forget_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "open_profile", G_CALLBACK(_tootle_widgets_accounts_button_item_open_profile_gtk_button_clicked));
}

static void
tootle_widgets_accounts_button_item_instance_init (TootleWidgetsAccountsButtonItem * self,
                                                   gpointer klass)
{
	self->priv = tootle_widgets_accounts_button_item_get_instance_private (self);
	g_type_ensure (TOOTLE_WIDGETS_TYPE_AVATAR);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tootle_widgets_accounts_button_item_finalize (GObject * obj)
{
	TootleWidgetsAccountsButtonItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_WIDGETS_ACCOUNTS_BUTTON_TYPE_ITEM, TootleWidgetsAccountsButtonItem);
	_g_object_unref0 (self->priv->button);
	_g_object_unref0 (self->priv->account);
	G_OBJECT_CLASS (tootle_widgets_accounts_button_item_parent_class)->finalize (obj);
}

static GType
tootle_widgets_accounts_button_item_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleWidgetsAccountsButtonItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_widgets_accounts_button_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleWidgetsAccountsButtonItem), 0, (GInstanceInitFunc) tootle_widgets_accounts_button_item_instance_init, NULL };
	GType tootle_widgets_accounts_button_item_type_id;
	tootle_widgets_accounts_button_item_type_id = g_type_register_static (gtk_list_box_row_get_type (), "TootleWidgetsAccountsButtonItem", &g_define_type_info, 0);
	TootleWidgetsAccountsButtonItem_private_offset = g_type_add_instance_private (tootle_widgets_accounts_button_item_type_id, sizeof (TootleWidgetsAccountsButtonItemPrivate));
	return tootle_widgets_accounts_button_item_type_id;
}

static GType
tootle_widgets_accounts_button_item_get_type (void)
{
	static volatile gsize tootle_widgets_accounts_button_item_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_widgets_accounts_button_item_type_id__volatile)) {
		GType tootle_widgets_accounts_button_item_type_id;
		tootle_widgets_accounts_button_item_type_id = tootle_widgets_accounts_button_item_get_type_once ();
		g_once_init_leave (&tootle_widgets_accounts_button_item_type_id__volatile, tootle_widgets_accounts_button_item_type_id);
	}
	return tootle_widgets_accounts_button_item_type_id__volatile;
}

static void
_tootle_widgets_accounts_button___lambda107_ (TootleWidgetsAccountsButton* self)
{
	TootleApplication* _tmp0_;
	_tmp0_ = tootle_app;
	g_signal_emit_by_name (_tmp0_, "refresh");
}

static void
__tootle_widgets_accounts_button___lambda107__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_tootle_widgets_accounts_button___lambda107_ ((TootleWidgetsAccountsButton*) self);
}

static void
_tootle_widgets_accounts_button___lambda108_ (TootleWidgetsAccountsButton* self)
{
	TootleDialogsMainWindow* _tmp0_;
	TootleViewsFavorites* _tmp1_;
	TootleViewsFavorites* _tmp2_;
	TootleViewsBase* _tmp3_;
	TootleViewsBase* _tmp4_;
	GtkPopover* _tmp5_;
	GtkPopover* _tmp6_;
	_tmp0_ = tootle_window;
	_tmp1_ = tootle_views_favorites_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tootle_dialogs_main_window_open_view (_tmp0_, (TootleViewsBase*) _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
	_tmp5_ = gtk_menu_button_get_popover ((GtkMenuButton*) self);
	_tmp6_ = _tmp5_;
	gtk_popover_popdown (_tmp6_);
}

static void
__tootle_widgets_accounts_button___lambda108__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_tootle_widgets_accounts_button___lambda108_ ((TootleWidgetsAccountsButton*) self);
}

static void
_tootle_widgets_accounts_button___lambda109_ (TootleWidgetsAccountsButton* self)
{
	TootleDialogsMainWindow* _tmp0_;
	TootleViewsConversations* _tmp1_;
	TootleViewsConversations* _tmp2_;
	TootleViewsBase* _tmp3_;
	TootleViewsBase* _tmp4_;
	GtkPopover* _tmp5_;
	GtkPopover* _tmp6_;
	_tmp0_ = tootle_window;
	_tmp1_ = tootle_views_conversations_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tootle_dialogs_main_window_open_view (_tmp0_, (TootleViewsBase*) _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
	_tmp5_ = gtk_menu_button_get_popover ((GtkMenuButton*) self);
	_tmp6_ = _tmp5_;
	gtk_popover_popdown (_tmp6_);
}

static void
__tootle_widgets_accounts_button___lambda109__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_tootle_widgets_accounts_button___lambda109_ ((TootleWidgetsAccountsButton*) self);
}

static void
_tootle_widgets_accounts_button___lambda112_ (TootleWidgetsAccountsButton* self)
{
	TootleDialogsMainWindow* _tmp0_;
	TootleViewsBookmarks* _tmp1_;
	TootleViewsBookmarks* _tmp2_;
	TootleViewsBase* _tmp3_;
	TootleViewsBase* _tmp4_;
	GtkPopover* _tmp5_;
	GtkPopover* _tmp6_;
	_tmp0_ = tootle_window;
	_tmp1_ = tootle_views_bookmarks_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tootle_dialogs_main_window_open_view (_tmp0_, (TootleViewsBase*) _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
	_tmp5_ = gtk_menu_button_get_popover ((GtkMenuButton*) self);
	_tmp6_ = _tmp5_;
	gtk_popover_popdown (_tmp6_);
}

static void
__tootle_widgets_accounts_button___lambda112__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_tootle_widgets_accounts_button___lambda112_ ((TootleWidgetsAccountsButton*) self);
}

static void
_tootle_widgets_accounts_button___lambda113_ (TootleWidgetsAccountsButton* self)
{
	TootleDialogsMainWindow* _tmp0_;
	TootleViewsLists* _tmp1_;
	TootleViewsLists* _tmp2_;
	TootleViewsBase* _tmp3_;
	TootleViewsBase* _tmp4_;
	GtkPopover* _tmp5_;
	GtkPopover* _tmp6_;
	_tmp0_ = tootle_window;
	_tmp1_ = tootle_views_lists_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tootle_dialogs_main_window_open_view (_tmp0_, (TootleViewsBase*) _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
	_tmp5_ = gtk_menu_button_get_popover ((GtkMenuButton*) self);
	_tmp6_ = _tmp5_;
	gtk_popover_popdown (_tmp6_);
}

static void
__tootle_widgets_accounts_button___lambda113__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_tootle_widgets_accounts_button___lambda113_ ((TootleWidgetsAccountsButton*) self);
}

static void
_tootle_widgets_accounts_button___lambda124_ (TootleWidgetsAccountsButton* self)
{
	GtkPopover* _tmp0_;
	GtkPopover* _tmp1_;
	tootle_dialogs_preferences_open ();
	_tmp0_ = gtk_menu_button_get_popover ((GtkMenuButton*) self);
	_tmp1_ = _tmp0_;
	gtk_popover_popdown (_tmp1_);
}

static void
__tootle_widgets_accounts_button___lambda124__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_tootle_widgets_accounts_button___lambda124_ ((TootleWidgetsAccountsButton*) self);
}

static void
_tootle_widgets_accounts_button___lambda127_ (TootleWidgetsAccountsButton* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = self->priv->invalidated;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		tootle_widgets_accounts_button_rebuild (self);
	}
}

static void
__tootle_widgets_accounts_button___lambda127__g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self)
{
	_tootle_widgets_accounts_button___lambda127_ ((TootleWidgetsAccountsButton*) self);
}

static void
_tootle_widgets_accounts_button_on_selection_changed_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                 GtkListBoxRow* row,
                                                                                 gpointer self)
{
	tootle_widgets_accounts_button_on_selection_changed ((TootleWidgetsAccountsButton*) self, row);
}

static GObject *
tootle_widgets_accounts_button_constructor (GType type,
                                            guint n_construct_properties,
                                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TootleWidgetsAccountsButton * self;
	GtkStyleContext* _tmp0_;
	GtkModelButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkModelButton* _tmp6_;
	GtkListBox* _tmp7_;
	parent_class = G_OBJECT_CLASS (tootle_widgets_accounts_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON, TootleWidgetsAccountsButton);
	tootle_iaccount_listener_account_listener_init ((TootleIAccountListener*) self);
	_tmp0_ = gtk_widget_get_style_context ((GtkWidget*) self);
	gtk_style_context_add_class (_tmp0_, "image-button");
	_tmp1_ = self->priv->item_refresh;
	g_signal_connect_object ((GtkButton*) _tmp1_, "clicked", (GCallback) __tootle_widgets_accounts_button___lambda107__gtk_button_clicked, self, 0);
	_tmp2_ = self->priv->item_favs;
	g_signal_connect_object (_tmp2_, "clicked", (GCallback) __tootle_widgets_accounts_button___lambda108__gtk_button_clicked, self, 0);
	_tmp3_ = self->priv->item_conversations;
	g_signal_connect_object (_tmp3_, "clicked", (GCallback) __tootle_widgets_accounts_button___lambda109__gtk_button_clicked, self, 0);
	_tmp4_ = self->priv->item_bookmarks;
	g_signal_connect_object (_tmp4_, "clicked", (GCallback) __tootle_widgets_accounts_button___lambda112__gtk_button_clicked, self, 0);
	_tmp5_ = self->priv->item_lists;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) __tootle_widgets_accounts_button___lambda113__gtk_button_clicked, self, 0);
	_tmp6_ = self->priv->item_prefs;
	g_signal_connect_object ((GtkButton*) _tmp6_, "clicked", (GCallback) __tootle_widgets_accounts_button___lambda124__gtk_button_clicked, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::active", (GCallback) __tootle_widgets_accounts_button___lambda127__g_object_notify, self, 0);
	_tmp7_ = self->priv->account_list;
	g_signal_connect_object (_tmp7_, "row-activated", (GCallback) _tootle_widgets_accounts_button_on_selection_changed_gtk_list_box_row_activated, self, 0);
	return obj;
}

static void
tootle_widgets_accounts_button_class_init (TootleWidgetsAccountsButtonClass * klass,
                                           gpointer klass_data)
{
	tootle_widgets_accounts_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TootleWidgetsAccountsButton_private_offset);
	((TootleWidgetsAccountsButtonClass *) klass)->on_accounts_changed = (void (*) (TootleWidgetsAccountsButton*, GeeArrayList*)) tootle_widgets_accounts_button_real_on_accounts_changed;
	((TootleWidgetsAccountsButtonClass *) klass)->on_account_changed = (void (*) (TootleWidgetsAccountsButton*, TootleInstanceAccount*)) tootle_widgets_accounts_button_real_on_account_changed;
	G_OBJECT_CLASS (klass)->constructor = tootle_widgets_accounts_button_constructor;
	G_OBJECT_CLASS (klass)->finalize = tootle_widgets_accounts_button_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/github/bleakgrey/tootle/ui/widgets/accounts_button.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "avatar", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, avatar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "account_list", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, account_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "item_accounts", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, item_accounts));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "item_prefs", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, item_prefs));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "item_refresh", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, item_refresh));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "item_favs", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, item_favs));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "item_conversations", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, item_conversations));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "item_bookmarks", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, item_bookmarks));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "item_lists", FALSE, TootleWidgetsAccountsButton_private_offset + G_STRUCT_OFFSET (TootleWidgetsAccountsButtonPrivate, item_lists));
}

static void
tootle_widgets_accounts_button_tootle_iaccount_listener_interface_init (TootleIAccountListenerIface * iface,
                                                                        gpointer iface_data)
{
	tootle_widgets_accounts_button_tootle_iaccount_listener_parent_iface = g_type_interface_peek_parent (iface);
	iface->on_accounts_changed = (void (*) (TootleIAccountListener*, GeeArrayList*)) tootle_widgets_accounts_button_on_accounts_changed;
	iface->on_account_changed = (void (*) (TootleIAccountListener*, TootleInstanceAccount*)) tootle_widgets_accounts_button_on_account_changed;
}

static void
tootle_widgets_accounts_button_instance_init (TootleWidgetsAccountsButton * self,
                                              gpointer klass)
{
	self->priv = tootle_widgets_accounts_button_get_instance_private (self);
	self->priv->invalidated = TRUE;
	g_type_ensure (TOOTLE_WIDGETS_TYPE_AVATAR);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tootle_widgets_accounts_button_finalize (GObject * obj)
{
	TootleWidgetsAccountsButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_WIDGETS_TYPE_ACCOUNTS_BUTTON, TootleWidgetsAccountsButton);
	tootle_iaccount_listener_account_listener_free ((TootleIAccountListener*) self);
	G_OBJECT_CLASS (tootle_widgets_accounts_button_parent_class)->finalize (obj);
}

static GType
tootle_widgets_accounts_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleWidgetsAccountsButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_widgets_accounts_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleWidgetsAccountsButton), 0, (GInstanceInitFunc) tootle_widgets_accounts_button_instance_init, NULL };
	static const GInterfaceInfo tootle_iaccount_listener_info = { (GInterfaceInitFunc) tootle_widgets_accounts_button_tootle_iaccount_listener_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tootle_widgets_accounts_button_type_id;
	tootle_widgets_accounts_button_type_id = g_type_register_static (gtk_menu_button_get_type (), "TootleWidgetsAccountsButton", &g_define_type_info, 0);
	g_type_add_interface_static (tootle_widgets_accounts_button_type_id, TOOTLE_TYPE_IACCOUNT_LISTENER, &tootle_iaccount_listener_info);
	TootleWidgetsAccountsButton_private_offset = g_type_add_instance_private (tootle_widgets_accounts_button_type_id, sizeof (TootleWidgetsAccountsButtonPrivate));
	return tootle_widgets_accounts_button_type_id;
}

GType
tootle_widgets_accounts_button_get_type (void)
{
	static volatile gsize tootle_widgets_accounts_button_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_widgets_accounts_button_type_id__volatile)) {
		GType tootle_widgets_accounts_button_type_id;
		tootle_widgets_accounts_button_type_id = tootle_widgets_accounts_button_get_type_once ();
		g_once_init_leave (&tootle_widgets_accounts_button_type_id__volatile, tootle_widgets_accounts_button_type_id);
	}
	return tootle_widgets_accounts_button_type_id__volatile;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

