/* accounts-editor-list-pane.c generated by valac 0.56.19, the Vala compiler
 * generated from accounts-editor-list-pane.vala, do not modify */

/*
 * Copyright 2018-2019 Michael Gratton <mike@vee.net>
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include "geary-client-46.0.h"
#include <glib.h>
#include <gio/gio.h>
#include <gee.h>
#include "geary-engine.h"
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>

#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

#define ACCOUNTS_TYPE_EDITOR_PANE (accounts_editor_pane_get_type ())
#define ACCOUNTS_EDITOR_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane))
#define ACCOUNTS_IS_EDITOR_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EDITOR_PANE))
#define ACCOUNTS_EDITOR_PANE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPaneIface))

typedef struct _AccountsEditorPane AccountsEditorPane;
typedef struct _AccountsEditorPaneIface AccountsEditorPaneIface;

#define ACCOUNTS_TYPE_COMMAND_PANE (accounts_command_pane_get_type ())
#define ACCOUNTS_COMMAND_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane))
#define ACCOUNTS_IS_COMMAND_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_COMMAND_PANE))
#define ACCOUNTS_COMMAND_PANE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPaneIface))

typedef struct _AccountsCommandPane AccountsCommandPane;
typedef struct _AccountsCommandPaneIface AccountsCommandPaneIface;

#define ACCOUNTS_TYPE_EDITOR_LIST_PANE (accounts_editor_list_pane_get_type ())
#define ACCOUNTS_EDITOR_LIST_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane))
#define ACCOUNTS_EDITOR_LIST_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPaneClass))
#define ACCOUNTS_IS_EDITOR_LIST_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EDITOR_LIST_PANE))
#define ACCOUNTS_IS_EDITOR_LIST_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_EDITOR_LIST_PANE))
#define ACCOUNTS_EDITOR_LIST_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPaneClass))

typedef struct _AccountsEditorListPane AccountsEditorListPane;
typedef struct _AccountsEditorListPaneClass AccountsEditorListPaneClass;
typedef struct _AccountsEditorListPanePrivate AccountsEditorListPanePrivate;

#define ACCOUNTS_TYPE_EDITOR_EDIT_PANE (accounts_editor_edit_pane_get_type ())
#define ACCOUNTS_EDITOR_EDIT_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EDITOR_EDIT_PANE, AccountsEditorEditPane))
#define ACCOUNTS_EDITOR_EDIT_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_EDITOR_EDIT_PANE, AccountsEditorEditPaneClass))
#define ACCOUNTS_IS_EDITOR_EDIT_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EDITOR_EDIT_PANE))
#define ACCOUNTS_IS_EDITOR_EDIT_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_EDITOR_EDIT_PANE))
#define ACCOUNTS_EDITOR_EDIT_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_EDITOR_EDIT_PANE, AccountsEditorEditPaneClass))

typedef struct _AccountsEditorEditPane AccountsEditorEditPane;
typedef struct _AccountsEditorEditPaneClass AccountsEditorEditPaneClass;
enum  {
	ACCOUNTS_EDITOR_LIST_PANE_0_PROPERTY,
	ACCOUNTS_EDITOR_LIST_PANE_INITIAL_WIDGET_PROPERTY,
	ACCOUNTS_EDITOR_LIST_PANE_COMMANDS_PROPERTY,
	ACCOUNTS_EDITOR_LIST_PANE_IS_OPERATION_RUNNING_PROPERTY,
	ACCOUNTS_EDITOR_LIST_PANE_OP_CANCELLABLE_PROPERTY,
	ACCOUNTS_EDITOR_LIST_PANE_ACCOUNTS_PROPERTY,
	ACCOUNTS_EDITOR_LIST_PANE_EDITOR_PROPERTY,
	ACCOUNTS_EDITOR_LIST_PANE_NUM_PROPERTIES
};
static GParamSpec* accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_NUM_PROPERTIES];

#define ACCOUNTS_TYPE_EDITOR_ROW (accounts_editor_row_get_type ())
#define ACCOUNTS_EDITOR_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow))
#define ACCOUNTS_EDITOR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRowClass))
#define ACCOUNTS_IS_EDITOR_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EDITOR_ROW))
#define ACCOUNTS_IS_EDITOR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_EDITOR_ROW))
#define ACCOUNTS_EDITOR_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRowClass))

typedef struct _AccountsEditorRow AccountsEditorRow;
typedef struct _AccountsEditorRowClass AccountsEditorRowClass;

#define ACCOUNTS_TYPE_LABELLED_EDITOR_ROW (accounts_labelled_editor_row_get_type ())
#define ACCOUNTS_LABELLED_EDITOR_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow))
#define ACCOUNTS_LABELLED_EDITOR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRowClass))
#define ACCOUNTS_IS_LABELLED_EDITOR_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_LABELLED_EDITOR_ROW))
#define ACCOUNTS_IS_LABELLED_EDITOR_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_LABELLED_EDITOR_ROW))
#define ACCOUNTS_LABELLED_EDITOR_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRowClass))

typedef struct _AccountsLabelledEditorRow AccountsLabelledEditorRow;
typedef struct _AccountsLabelledEditorRowClass AccountsLabelledEditorRowClass;

#define ACCOUNTS_TYPE_ACCOUNT_ROW (accounts_account_row_get_type ())
#define ACCOUNTS_ACCOUNT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow))
#define ACCOUNTS_ACCOUNT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRowClass))
#define ACCOUNTS_IS_ACCOUNT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_ACCOUNT_ROW))
#define ACCOUNTS_IS_ACCOUNT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_ACCOUNT_ROW))
#define ACCOUNTS_ACCOUNT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRowClass))

typedef struct _AccountsAccountRow AccountsAccountRow;
typedef struct _AccountsAccountRowClass AccountsAccountRowClass;

#define ACCOUNTS_TYPE_ACCOUNT_LIST_ROW (accounts_account_list_row_get_type ())
#define ACCOUNTS_ACCOUNT_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRow))
#define ACCOUNTS_ACCOUNT_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRowClass))
#define ACCOUNTS_IS_ACCOUNT_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_ACCOUNT_LIST_ROW))
#define ACCOUNTS_IS_ACCOUNT_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_ACCOUNT_LIST_ROW))
#define ACCOUNTS_ACCOUNT_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRowClass))

typedef struct _AccountsAccountListRow AccountsAccountListRow;
typedef struct _AccountsAccountListRowClass AccountsAccountListRowClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define ACCOUNTS_TYPE_EDITOR_ADD_PANE (accounts_editor_add_pane_get_type ())
#define ACCOUNTS_EDITOR_ADD_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane))
#define ACCOUNTS_EDITOR_ADD_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPaneClass))
#define ACCOUNTS_IS_EDITOR_ADD_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EDITOR_ADD_PANE))
#define ACCOUNTS_IS_EDITOR_ADD_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_EDITOR_ADD_PANE))
#define ACCOUNTS_EDITOR_ADD_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPaneClass))

typedef struct _AccountsEditorAddPane AccountsEditorAddPane;
typedef struct _AccountsEditorAddPaneClass AccountsEditorAddPaneClass;

#define ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND (accounts_remove_account_command_get_type ())
#define ACCOUNTS_REMOVE_ACCOUNT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND, AccountsRemoveAccountCommand))
#define ACCOUNTS_REMOVE_ACCOUNT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND, AccountsRemoveAccountCommandClass))
#define ACCOUNTS_IS_REMOVE_ACCOUNT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND))
#define ACCOUNTS_IS_REMOVE_ACCOUNT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND))
#define ACCOUNTS_REMOVE_ACCOUNT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND, AccountsRemoveAccountCommandClass))

typedef struct _AccountsRemoveAccountCommand AccountsRemoveAccountCommand;
typedef struct _AccountsRemoveAccountCommandClass AccountsRemoveAccountCommandClass;
typedef struct _Block48Data Block48Data;

#define ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND (accounts_reorder_account_command_get_type ())
#define ACCOUNTS_REORDER_ACCOUNT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND, AccountsReorderAccountCommand))
#define ACCOUNTS_REORDER_ACCOUNT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND, AccountsReorderAccountCommandClass))
#define ACCOUNTS_IS_REORDER_ACCOUNT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND))
#define ACCOUNTS_IS_REORDER_ACCOUNT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND))
#define ACCOUNTS_REORDER_ACCOUNT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND, AccountsReorderAccountCommandClass))

typedef struct _AccountsReorderAccountCommand AccountsReorderAccountCommand;
typedef struct _AccountsReorderAccountCommandClass AccountsReorderAccountCommandClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _AccountsEditorRowPrivate AccountsEditorRowPrivate;
typedef struct _AccountsLabelledEditorRowPrivate AccountsLabelledEditorRowPrivate;
typedef struct _AccountsAccountRowPrivate AccountsAccountRowPrivate;
typedef struct _AccountsAccountListRowPrivate AccountsAccountListRowPrivate;
enum  {
	ACCOUNTS_ACCOUNT_LIST_ROW_0_PROPERTY,
	ACCOUNTS_ACCOUNT_LIST_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_account_list_row_properties[ACCOUNTS_ACCOUNT_LIST_ROW_NUM_PROPERTIES];
typedef struct _Block49Data Block49Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _AccountsReorderAccountCommandPrivate AccountsReorderAccountCommandPrivate;
enum  {
	ACCOUNTS_REORDER_ACCOUNT_COMMAND_0_PROPERTY,
	ACCOUNTS_REORDER_ACCOUNT_COMMAND_NUM_PROPERTIES
};
static GParamSpec* accounts_reorder_account_command_properties[ACCOUNTS_REORDER_ACCOUNT_COMMAND_NUM_PROPERTIES];
typedef struct _AccountsReorderAccountCommandExecuteData AccountsReorderAccountCommandExecuteData;
typedef struct _AccountsReorderAccountCommandUndoData AccountsReorderAccountCommandUndoData;
typedef struct _AccountsRemoveAccountCommandPrivate AccountsRemoveAccountCommandPrivate;
enum  {
	ACCOUNTS_REMOVE_ACCOUNT_COMMAND_0_PROPERTY,
	ACCOUNTS_REMOVE_ACCOUNT_COMMAND_NUM_PROPERTIES
};
static GParamSpec* accounts_remove_account_command_properties[ACCOUNTS_REMOVE_ACCOUNT_COMMAND_NUM_PROPERTIES];
typedef struct _AccountsRemoveAccountCommandExecuteData AccountsRemoveAccountCommandExecuteData;
typedef struct _AccountsRemoveAccountCommandUndoData AccountsRemoveAccountCommandUndoData;

struct _AccountsEditorPaneIface {
	GTypeInterface parent_iface;
	AccountsEditor* (*get_editor) (AccountsEditorPane* self);
	void (*set_editor) (AccountsEditorPane* self, AccountsEditor* value);
	GtkWidget* (*get_initial_widget) (AccountsEditorPane* self);
	gboolean (*get_is_operation_running) (AccountsEditorPane* self);
	void (*set_is_operation_running) (AccountsEditorPane* self, gboolean value);
	GCancellable* (*get_op_cancellable) (AccountsEditorPane* self);
	void (*set_op_cancellable) (AccountsEditorPane* self, GCancellable* value);
	GtkHeaderBar* (*get_header) (AccountsEditorPane* self);
};

struct _AccountsCommandPaneIface {
	GTypeInterface parent_iface;
	ApplicationCommandStack* (*get_commands) (AccountsCommandPane* self);
	void (*set_commands) (AccountsCommandPane* self, ApplicationCommandStack* value);
	void (*undo) (AccountsCommandPane* self);
	void (*redo) (AccountsCommandPane* self);
	void (*command_executed) (AccountsCommandPane* self);
};

struct _AccountsEditorListPane {
	GtkGrid parent_instance;
	AccountsEditorListPanePrivate * priv;
};

struct _AccountsEditorListPaneClass {
	GtkGridClass parent_class;
};

struct _AccountsEditorListPanePrivate {
	ApplicationCommandStack* _commands;
	gboolean _is_operation_running;
	GCancellable* _op_cancellable;
	AccountsManager* _accounts;
	AccountsEditor* _editor;
	GtkHeaderBar* header;
	GtkGrid* pane_content;
	GtkAdjustment* pane_adjustment;
	GtkGrid* welcome_panel;
	GtkImage* welcome_icon;
	GtkListBox* accounts_list;
	GtkFrame* accounts_list_frame;
	GeeMap* edit_pane_cache;
};

struct _Block48Data {
	int _ref_count_;
	AccountsEditorListPane* self;
	AccountsAccountListRow* row;
	GearyAccountInformation* account;
};

struct _AccountsEditorRow {
	GtkListBoxRow parent_instance;
	AccountsEditorRowPrivate * priv;
};

struct _AccountsEditorRowClass {
	GtkListBoxRowClass parent_class;
	void (*activated) (AccountsEditorRow* self, gconstpointer pane);
};

struct _AccountsLabelledEditorRow {
	AccountsEditorRow parent_instance;
	AccountsLabelledEditorRowPrivate * priv;
};

struct _AccountsLabelledEditorRowClass {
	AccountsEditorRowClass parent_class;
};

struct _AccountsAccountRow {
	AccountsLabelledEditorRow parent_instance;
	AccountsAccountRowPrivate * priv;
};

struct _AccountsAccountRowClass {
	AccountsLabelledEditorRowClass parent_class;
	void (*update) (AccountsAccountRow* self);
};

struct _AccountsAccountListRow {
	AccountsAccountRow parent_instance;
	AccountsAccountListRowPrivate * priv;
};

struct _AccountsAccountListRowClass {
	AccountsAccountRowClass parent_class;
};

struct _AccountsAccountListRowPrivate {
	GtkLabel* service_label;
	GtkImage* unavailable_icon;
};

struct _Block49Data {
	int _ref_count_;
	AccountsAccountListRow* self;
	AccountsManager* manager;
};

struct _AccountsReorderAccountCommand {
	ApplicationCommand parent_instance;
	AccountsReorderAccountCommandPrivate * priv;
};

struct _AccountsReorderAccountCommandClass {
	ApplicationCommandClass parent_class;
};

struct _AccountsReorderAccountCommandPrivate {
	AccountsAccountListRow* source;
	gint source_index;
	gint target_index;
	AccountsManager* manager;
};

struct _AccountsReorderAccountCommandExecuteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsReorderAccountCommand* self;
	GCancellable* cancellable;
};

struct _AccountsReorderAccountCommandUndoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsReorderAccountCommand* self;
	GCancellable* cancellable;
};

struct _AccountsRemoveAccountCommand {
	ApplicationCommand parent_instance;
	AccountsRemoveAccountCommandPrivate * priv;
};

struct _AccountsRemoveAccountCommandClass {
	ApplicationCommandClass parent_class;
};

struct _AccountsRemoveAccountCommandPrivate {
	GearyAccountInformation* account;
	AccountsManager* manager;
};

struct _AccountsRemoveAccountCommandExecuteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsRemoveAccountCommand* self;
	GCancellable* cancellable;
	AccountsManager* _tmp0_;
	GearyAccountInformation* _tmp1_;
	GError* _inner_error0_;
};

struct _AccountsRemoveAccountCommandUndoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsRemoveAccountCommand* self;
	GCancellable* cancellable;
	AccountsManager* _tmp0_;
	GearyAccountInformation* _tmp1_;
	GError* _inner_error0_;
};

static gint AccountsEditorListPane_private_offset;
static gpointer accounts_editor_list_pane_parent_class = NULL;
static AccountsEditorPaneIface * accounts_editor_list_pane_accounts_editor_pane_parent_iface = NULL;
static AccountsCommandPaneIface * accounts_editor_list_pane_accounts_command_pane_parent_iface = NULL;
static gint AccountsAccountListRow_private_offset;
static gpointer accounts_account_list_row_parent_class = NULL;
static gint AccountsReorderAccountCommand_private_offset;
static gpointer accounts_reorder_account_command_parent_class = NULL;
static gint AccountsRemoveAccountCommand_private_offset;
static gpointer accounts_remove_account_command_parent_class = NULL;

VALA_EXTERN GType accounts_editor_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_command_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_editor_list_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_editor_edit_pane_get_type (void) G_GNUC_CONST ;
static gint accounts_editor_list_pane_ordinal_sort (GtkListBoxRow* a,
                                             GtkListBoxRow* b);
VALA_EXTERN GType accounts_editor_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_labelled_editor_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_account_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_account_list_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GearyAccountInformation* accounts_account_row_get_account (AccountsAccountRow* self);
VALA_EXTERN AccountsManager* accounts_editor_list_pane_get_accounts (AccountsEditorListPane* self);
static void accounts_editor_list_pane_set_accounts (AccountsEditorListPane* self,
                                             AccountsManager* value);
static gboolean accounts_editor_list_pane_get_show_welcome (AccountsEditorListPane* self);
VALA_EXTERN AccountsEditorListPane* accounts_editor_list_pane_new (AccountsEditor* editor);
VALA_EXTERN AccountsEditorListPane* accounts_editor_list_pane_construct (GType object_type,
                                                             AccountsEditor* editor);
VALA_EXTERN void accounts_editor_pane_set_editor (AccountsEditorPane* self,
                                      AccountsEditor* value);
VALA_EXTERN AccountsManager* accounts_editor_get_accounts (AccountsEditor* self);
VALA_EXTERN void accounts_editor_seperator_headers (GtkListBoxRow* row,
                                        GtkListBoxRow* first);
static void _accounts_editor_seperator_headers_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                         GtkListBoxRow* before,
                                                                         gpointer self);
static gint _accounts_editor_list_pane_ordinal_sort_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                     GtkListBoxRow* row2,
                                                                     gpointer self);
static void accounts_editor_list_pane_add_account (AccountsEditorListPane* self,
                                            GearyAccountInformation* account,
                                            AccountsManagerStatus status);
static void accounts_editor_list_pane_on_account_added (AccountsEditorListPane* self,
                                                 GearyAccountInformation* account,
                                                 AccountsManagerStatus status);
static void _accounts_editor_list_pane_on_account_added_accounts_manager_account_added (AccountsManager* _sender,
                                                                                 GearyAccountInformation* added,
                                                                                 AccountsManagerStatus status,
                                                                                 gpointer self);
static void accounts_editor_list_pane_on_account_status_changed (AccountsEditorListPane* self,
                                                          GearyAccountInformation* account,
                                                          AccountsManagerStatus status);
static void _accounts_editor_list_pane_on_account_status_changed_accounts_manager_account_status_changed (AccountsManager* _sender,
                                                                                                   GearyAccountInformation* changed,
                                                                                                   AccountsManagerStatus new_status,
                                                                                                   gpointer self);
static void accounts_editor_list_pane_on_account_removed (AccountsEditorListPane* self,
                                                   GearyAccountInformation* account);
static void _accounts_editor_list_pane_on_account_removed_accounts_manager_account_removed (AccountsManager* _sender,
                                                                                     GearyAccountInformation* removed,
                                                                                     gpointer self);
VALA_EXTERN ApplicationCommandStack* accounts_command_pane_get_commands (AccountsCommandPane* self);
static void accounts_editor_list_pane_on_execute (AccountsEditorListPane* self,
                                           ApplicationCommand* command);
static void _accounts_editor_list_pane_on_execute_application_command_stack_executed (ApplicationCommandStack* _sender,
                                                                               ApplicationCommand* command,
                                                                               gpointer self);
static void accounts_editor_list_pane_on_undo (AccountsEditorListPane* self,
                                        ApplicationCommand* command);
static void _accounts_editor_list_pane_on_undo_application_command_stack_undone (ApplicationCommandStack* _sender,
                                                                          ApplicationCommand* command,
                                                                          gpointer self);
static void _accounts_editor_list_pane_on_execute_application_command_stack_redone (ApplicationCommandStack* _sender,
                                                                             ApplicationCommand* command,
                                                                             gpointer self);
VALA_EXTERN void accounts_command_pane_connect_command_signals (AccountsCommandPane* self);
static void accounts_editor_list_pane_update_welcome_panel (AccountsEditorListPane* self);
static void accounts_editor_list_pane_real_destroy (GtkWidget* base);
VALA_EXTERN void accounts_command_pane_disconnect_command_signals (AccountsCommandPane* self);
VALA_EXTERN void accounts_editor_list_pane_show_new_account (AccountsEditorListPane* self);
VALA_EXTERN AccountsEditor* accounts_editor_pane_get_editor (AccountsEditorPane* self);
VALA_EXTERN void accounts_editor_push (AccountsEditor* self,
                           AccountsEditorPane* pane);
VALA_EXTERN AccountsEditorAddPane* accounts_editor_add_pane_new (AccountsEditor* editor);
VALA_EXTERN AccountsEditorAddPane* accounts_editor_add_pane_construct (GType object_type,
                                                           AccountsEditor* editor);
VALA_EXTERN GType accounts_editor_add_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void accounts_editor_list_pane_show_existing_account (AccountsEditorListPane* self,
                                                      GearyAccountInformation* account);
VALA_EXTERN AccountsEditorEditPane* accounts_editor_edit_pane_new (AccountsEditor* editor,
                                                       GearyAccountInformation* account);
VALA_EXTERN AccountsEditorEditPane* accounts_editor_edit_pane_construct (GType object_type,
                                                             AccountsEditor* editor,
                                                             GearyAccountInformation* account);
VALA_EXTERN void accounts_editor_list_pane_remove_account (AccountsEditorListPane* self,
                                               GearyAccountInformation* account);
static AccountsAccountListRow* accounts_editor_list_pane_get_account_row (AccountsEditorListPane* self,
                                                                   GearyAccountInformation* account);
VALA_EXTERN AccountsRemoveAccountCommand* accounts_remove_account_command_new (GearyAccountInformation* account,
                                                                   AccountsManager* manager);
VALA_EXTERN AccountsRemoveAccountCommand* accounts_remove_account_command_construct (GType object_type,
                                                                         GearyAccountInformation* account,
                                                                         AccountsManager* manager);
VALA_EXTERN GType accounts_remove_account_command_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GCancellable* accounts_editor_pane_get_op_cancellable (AccountsEditorPane* self);
static GtkHeaderBar* accounts_editor_list_pane_real_get_header (AccountsEditorPane* base);
VALA_EXTERN AccountsAccountListRow* accounts_account_list_row_new (GearyAccountInformation* account,
                                                       AccountsManagerStatus status);
VALA_EXTERN AccountsAccountListRow* accounts_account_list_row_construct (GType object_type,
                                                             GearyAccountInformation* account,
                                                             AccountsManagerStatus status);
static void accounts_editor_list_pane_on_editor_row_moved (AccountsEditorListPane* self,
                                                    AccountsEditorRow* source,
                                                    gint new_position);
static void _accounts_editor_list_pane_on_editor_row_moved_accounts_editor_row_move_to (AccountsEditorRow* _sender,
                                                                                 gint new_position,
                                                                                 gpointer self);
static void accounts_editor_list_pane_on_editor_row_dropped (AccountsEditorListPane* self,
                                                      AccountsEditorRow* source,
                                                      AccountsEditorRow* target);
static void _accounts_editor_list_pane_on_editor_row_dropped_accounts_editor_row_dropped (AccountsEditorRow* _sender,
                                                                                   AccountsEditorRow* target,
                                                                                   gpointer self);
static Block48Data* block48_data_ref (Block48Data* _data48_);
static void block48_data_unref (void * _userdata_);
static void __lambda72_ (Block48Data* _data48_,
                  GtkWidget* child);
static void ___lambda72__gtk_callback (GtkWidget* widget,
                                gpointer self);
VALA_EXTERN void accounts_account_list_row_update_status (AccountsAccountListRow* self,
                                              AccountsManagerStatus status);
VALA_EXTERN AccountsReorderAccountCommand* accounts_reorder_account_command_new (AccountsAccountListRow* source,
                                                                     gint target_index,
                                                                     AccountsManager* manager);
VALA_EXTERN AccountsReorderAccountCommand* accounts_reorder_account_command_construct (GType object_type,
                                                                           AccountsAccountListRow* source,
                                                                           gint target_index,
                                                                           AccountsManager* manager);
VALA_EXTERN GType accounts_reorder_account_command_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void accounts_editor_add_notification (AccountsEditor* self,
                                       ComponentsInAppNotification* notification);
static void accounts_editor_list_pane_on_row_activated (AccountsEditorListPane* self,
                                                 GtkListBoxRow* row);
VALA_EXTERN void accounts_editor_row_activated (AccountsEditorRow* self,
                                    gconstpointer pane);
static void _accounts_editor_list_pane_on_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                             GtkListBoxRow* row,
                                                                             gpointer self);
static void accounts_editor_list_pane_on_add_button_clicked (AccountsEditorListPane* self);
static void _accounts_editor_list_pane_on_add_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
VALA_EXTERN GtkHeaderBar* accounts_editor_pane_get_header (AccountsEditorPane* self);
VALA_EXTERN GtkWidget* accounts_editor_pane_get_initial_widget (AccountsEditorPane* self);
VALA_EXTERN gboolean accounts_editor_pane_get_is_operation_running (AccountsEditorPane* self);
VALA_EXTERN void accounts_editor_pane_set_is_operation_running (AccountsEditorPane* self,
                                                    gboolean value);
VALA_EXTERN void accounts_editor_pane_set_op_cancellable (AccountsEditorPane* self,
                                              GCancellable* value);
VALA_EXTERN void accounts_command_pane_set_commands (AccountsCommandPane* self,
                                         ApplicationCommandStack* value);
static void accounts_editor_list_pane_finalize (GObject * obj);
static GType accounts_editor_list_pane_get_type_once (void);
static void _vala_accounts_editor_list_pane_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_accounts_editor_list_pane_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
VALA_EXTERN void accounts_account_row_update (AccountsAccountRow* self);
static void accounts_account_list_row_on_account_changed (AccountsAccountListRow* self);
static void _accounts_account_list_row_on_account_changed_geary_account_information_changed (GearyAccountInformation* _sender,
                                                                                      gpointer self);
VALA_EXTERN AccountsAccountRow* accounts_account_row_construct (GType object_type,
                                                    GType panetype_type,
                                                    GBoxedCopyFunc panetype_dup_func,
                                                    GDestroyNotify panetype_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GearyAccountInformation* account,
                                                    const gchar* label,
                                                    gconstpointer value);
VALA_EXTERN void accounts_editor_row_enable_drag (AccountsEditorRow* self);
VALA_EXTERN gconstpointer accounts_labelled_editor_row_get_value (AccountsLabelledEditorRow* self);
static void accounts_account_list_row_real_activated (AccountsEditorRow* base,
                                               AccountsEditorListPane* pane);
static Block49Data* block49_data_ref (Block49Data* _data49_);
static void block49_data_unref (void * _userdata_);
static void ___lambda71_ (Block49Data* _data49_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda71__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void accounts_account_list_row_real_update (AccountsAccountRow* base);
VALA_EXTERN GtkLabel* accounts_labelled_editor_row_get_label (AccountsLabelledEditorRow* self);
static void accounts_account_list_row_finalize (GObject * obj);
static GType accounts_account_list_row_get_type_once (void);
static void accounts_reorder_account_command_real_execute_data_free (gpointer _data);
static void accounts_reorder_account_command_real_execute (ApplicationCommand* base,
                                                    GCancellable* cancellable,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static gboolean accounts_reorder_account_command_real_execute_co (AccountsReorderAccountCommandExecuteData* _data_);
static void accounts_reorder_account_command_move_source (AccountsReorderAccountCommand* self,
                                                   gint destination);
static void accounts_reorder_account_command_real_undo_data_free (gpointer _data);
static void accounts_reorder_account_command_real_undo (ApplicationCommand* base,
                                                 GCancellable* cancellable,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
static gboolean accounts_reorder_account_command_real_undo_co (AccountsReorderAccountCommandUndoData* _data_);
static gint _geary_account_information_compare_ascending_gcompare_data_func (gconstpointer a,
                                                                      gconstpointer b,
                                                                      gpointer self);
static void accounts_reorder_account_command_finalize (GObject * obj);
static GType accounts_reorder_account_command_get_type_once (void);
static void accounts_remove_account_command_real_execute_data_free (gpointer _data);
static void accounts_remove_account_command_real_execute (ApplicationCommand* base,
                                                   GCancellable* cancellable,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static gboolean accounts_remove_account_command_real_execute_co (AccountsRemoveAccountCommandExecuteData* _data_);
static void accounts_remove_account_command_execute_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
static void accounts_remove_account_command_real_undo_data_free (gpointer _data);
static void accounts_remove_account_command_real_undo (ApplicationCommand* base,
                                                GCancellable* cancellable,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static gboolean accounts_remove_account_command_real_undo_co (AccountsRemoveAccountCommandUndoData* _data_);
static void accounts_remove_account_command_undo_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_);
static void accounts_remove_account_command_finalize (GObject * obj);
static GType accounts_remove_account_command_get_type_once (void);

static inline gpointer
accounts_editor_list_pane_get_instance_private (AccountsEditorListPane* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsEditorListPane_private_offset);
}

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

static gint
accounts_editor_list_pane_ordinal_sort (GtkListBoxRow* a,
                                        GtkListBoxRow* b)
{
	AccountsAccountListRow* account_a = NULL;
	AccountsAccountListRow* _tmp0_;
	AccountsAccountListRow* account_b = NULL;
	AccountsAccountListRow* _tmp1_;
	AccountsAccountListRow* _tmp2_;
	AccountsAccountListRow* _tmp6_;
	GearyAccountInformation* _tmp7_;
	GearyAccountInformation* _tmp8_;
	AccountsAccountListRow* _tmp9_;
	GearyAccountInformation* _tmp10_;
	GearyAccountInformation* _tmp11_;
	gint result;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (a, gtk_list_box_row_get_type ()), -1);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (b, gtk_list_box_row_get_type ()), -1);
	_tmp0_ = _g_object_ref0 (ACCOUNTS_IS_ACCOUNT_LIST_ROW (a) ? ((AccountsAccountListRow*) a) : NULL);
	account_a = _tmp0_;
	_tmp1_ = _g_object_ref0 (ACCOUNTS_IS_ACCOUNT_LIST_ROW (b) ? ((AccountsAccountListRow*) b) : NULL);
	account_b = _tmp1_;
	_tmp2_ = account_a;
	if (_tmp2_ == NULL) {
		gint _tmp3_ = 0;
		AccountsAccountListRow* _tmp4_;
		_tmp4_ = account_b;
		if (_tmp4_ == NULL) {
			_tmp3_ = 0;
		} else {
			_tmp3_ = 1;
		}
		result = _tmp3_;
		_g_object_unref0 (account_b);
		_g_object_unref0 (account_a);
		return result;
	} else {
		AccountsAccountListRow* _tmp5_;
		_tmp5_ = account_b;
		if (_tmp5_ == NULL) {
			result = -1;
			_g_object_unref0 (account_b);
			_g_object_unref0 (account_a);
			return result;
		}
	}
	_tmp6_ = account_a;
	_tmp7_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp8_ = _tmp7_;
	_tmp9_ = account_b;
	_tmp10_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp11_ = _tmp10_;
	result = geary_account_information_compare_ascending (_tmp8_, _tmp11_);
	_g_object_unref0 (account_b);
	_g_object_unref0 (account_a);
	return result;
}

static GtkWidget*
accounts_editor_list_pane_real_get_initial_widget (AccountsEditorPane* base)
{
	GtkWidget* result;
	AccountsEditorListPane* self;
	GtkListBox* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	_tmp0_ = self->priv->accounts_list;
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget);
	return result;
}

static ApplicationCommandStack*
accounts_editor_list_pane_real_get_commands (AccountsCommandPane* base)
{
	ApplicationCommandStack* result;
	AccountsEditorListPane* self;
	ApplicationCommandStack* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	_tmp0_ = self->priv->_commands;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_list_pane_real_set_commands (AccountsCommandPane* base,
                                             ApplicationCommandStack* value)
{
	AccountsEditorListPane* self;
	ApplicationCommandStack* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	old_value = accounts_editor_list_pane_real_get_commands (base);
	if (old_value != value) {
		ApplicationCommandStack* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_commands);
		self->priv->_commands = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_COMMANDS_PROPERTY]);
	}
}

static gboolean
accounts_editor_list_pane_real_get_is_operation_running (AccountsEditorPane* base)
{
	gboolean result;
	AccountsEditorListPane* self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	result = self->priv->_is_operation_running;
	return result;
}

static void
accounts_editor_list_pane_real_set_is_operation_running (AccountsEditorPane* base,
                                                         gboolean value)
{
	AccountsEditorListPane* self;
	gboolean old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	old_value = accounts_editor_list_pane_real_get_is_operation_running (base);
	if (old_value != value) {
		self->priv->_is_operation_running = value;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_IS_OPERATION_RUNNING_PROPERTY]);
	}
}

static GCancellable*
accounts_editor_list_pane_real_get_op_cancellable (AccountsEditorPane* base)
{
	GCancellable* result;
	AccountsEditorListPane* self;
	GCancellable* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	_tmp0_ = self->priv->_op_cancellable;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_list_pane_real_set_op_cancellable (AccountsEditorPane* base,
                                                   GCancellable* value)
{
	AccountsEditorListPane* self;
	GCancellable* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	old_value = accounts_editor_list_pane_real_get_op_cancellable (base);
	if (old_value != value) {
		GCancellable* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_op_cancellable);
		self->priv->_op_cancellable = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_OP_CANCELLABLE_PROPERTY]);
	}
}

AccountsManager*
accounts_editor_list_pane_get_accounts (AccountsEditorListPane* self)
{
	AccountsManager* result;
	AccountsManager* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self), NULL);
	_tmp0_ = self->priv->_accounts;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_list_pane_set_accounts (AccountsEditorListPane* self,
                                        AccountsManager* value)
{
	AccountsManager* old_value;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	old_value = accounts_editor_list_pane_get_accounts (self);
	if (old_value != value) {
		AccountsManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_accounts);
		self->priv->_accounts = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_ACCOUNTS_PROPERTY]);
	}
}

static AccountsEditor*
accounts_editor_list_pane_real_get_editor (AccountsEditorPane* base)
{
	AccountsEditor* result;
	AccountsEditorListPane* self;
	AccountsEditor* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	_tmp0_ = self->priv->_editor;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_list_pane_real_set_editor (AccountsEditorPane* base,
                                           AccountsEditor* value)
{
	AccountsEditorListPane* self;
	AccountsEditor* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	old_value = accounts_editor_list_pane_real_get_editor (base);
	if (old_value != value) {
		self->priv->_editor = value;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_EDITOR_PROPERTY]);
	}
}

static gboolean
accounts_editor_list_pane_get_show_welcome (AccountsEditorListPane* self)
{
	gboolean result;
	GtkListBox* _tmp0_;
	GtkListBoxRow* _tmp1_;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self), FALSE);
	_tmp0_ = self->priv->accounts_list;
	_tmp1_ = gtk_list_box_get_row_at_index (_tmp0_, 0);
	result = _tmp1_ == NULL;
	return result;
}

static void
_accounts_editor_seperator_headers_gtk_list_box_update_header_func (GtkListBoxRow* row,
                                                                    GtkListBoxRow* before,
                                                                    gpointer self)
{
	accounts_editor_seperator_headers (row, before);
}

static gint
_accounts_editor_list_pane_ordinal_sort_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                GtkListBoxRow* row2,
                                                                gpointer self)
{
	gint result;
	result = accounts_editor_list_pane_ordinal_sort (row1, row2);
	return result;
}

static void
_accounts_editor_list_pane_on_account_added_accounts_manager_account_added (AccountsManager* _sender,
                                                                            GearyAccountInformation* added,
                                                                            AccountsManagerStatus status,
                                                                            gpointer self)
{
	accounts_editor_list_pane_on_account_added ((AccountsEditorListPane*) self, added, status);
}

static void
_accounts_editor_list_pane_on_account_status_changed_accounts_manager_account_status_changed (AccountsManager* _sender,
                                                                                              GearyAccountInformation* changed,
                                                                                              AccountsManagerStatus new_status,
                                                                                              gpointer self)
{
	accounts_editor_list_pane_on_account_status_changed ((AccountsEditorListPane*) self, changed, new_status);
}

static void
_accounts_editor_list_pane_on_account_removed_accounts_manager_account_removed (AccountsManager* _sender,
                                                                                GearyAccountInformation* removed,
                                                                                gpointer self)
{
	accounts_editor_list_pane_on_account_removed ((AccountsEditorListPane*) self, removed);
}

static void
_accounts_editor_list_pane_on_execute_application_command_stack_executed (ApplicationCommandStack* _sender,
                                                                          ApplicationCommand* command,
                                                                          gpointer self)
{
	accounts_editor_list_pane_on_execute ((AccountsEditorListPane*) self, command);
}

static void
_accounts_editor_list_pane_on_undo_application_command_stack_undone (ApplicationCommandStack* _sender,
                                                                     ApplicationCommand* command,
                                                                     gpointer self)
{
	accounts_editor_list_pane_on_undo ((AccountsEditorListPane*) self, command);
}

static void
_accounts_editor_list_pane_on_execute_application_command_stack_redone (ApplicationCommandStack* _sender,
                                                                        ApplicationCommand* command,
                                                                        gpointer self)
{
	accounts_editor_list_pane_on_execute ((AccountsEditorListPane*) self, command);
}

AccountsEditorListPane*
accounts_editor_list_pane_construct (GType object_type,
                                     AccountsEditor* editor)
{
	AccountsEditorListPane * self = NULL;
	GtkImage* _tmp0_;
	AccountsManager* _tmp1_;
	AccountsManager* _tmp2_;
	GtkGrid* _tmp3_;
	GtkAdjustment* _tmp4_;
	GtkListBox* _tmp5_;
	GtkListBox* _tmp6_;
	AccountsManager* _tmp18_;
	AccountsManager* _tmp19_;
	AccountsManager* _tmp20_;
	ApplicationCommandStack* _tmp21_;
	ApplicationCommandStack* _tmp22_;
	ApplicationCommandStack* _tmp23_;
	ApplicationCommandStack* _tmp24_;
	ApplicationCommandStack* _tmp25_;
	ApplicationCommandStack* _tmp26_;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR (editor), NULL);
	self = (AccountsEditorListPane*) g_object_new (object_type, NULL);
	accounts_editor_pane_set_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), editor);
	_tmp0_ = self->priv->welcome_icon;
	g_object_set (_tmp0_, "icon-name", APPLICATION_CLIENT_APP_ID, NULL);
	_tmp1_ = accounts_editor_get_accounts (editor);
	_tmp2_ = _tmp1_;
	accounts_editor_list_pane_set_accounts (self, _tmp2_);
	_tmp3_ = self->priv->pane_content;
	_tmp4_ = self->priv->pane_adjustment;
	gtk_container_set_focus_vadjustment (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_container_get_type (), GtkContainer), _tmp4_);
	_tmp5_ = self->priv->accounts_list;
	gtk_list_box_set_header_func (_tmp5_, _accounts_editor_seperator_headers_gtk_list_box_update_header_func, NULL, NULL);
	_tmp6_ = self->priv->accounts_list;
	gtk_list_box_set_sort_func (_tmp6_, _accounts_editor_list_pane_ordinal_sort_gtk_list_box_sort_func, NULL, NULL);
	{
		GeeIterator* _account_it = NULL;
		AccountsManager* _tmp7_;
		GearyIterable* _tmp8_;
		GearyIterable* _tmp9_;
		GeeIterator* _tmp10_;
		GeeIterator* _tmp11_;
		_tmp7_ = self->priv->_accounts;
		_tmp8_ = accounts_manager_iterable (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = geary_iterable_iterator (_tmp9_);
		_tmp11_ = _tmp10_;
		_g_object_unref0 (_tmp9_);
		_account_it = _tmp11_;
		while (TRUE) {
			GeeIterator* _tmp12_;
			GearyAccountInformation* account = NULL;
			GeeIterator* _tmp13_;
			gpointer _tmp14_;
			GearyAccountInformation* _tmp15_;
			AccountsManager* _tmp16_;
			GearyAccountInformation* _tmp17_;
			_tmp12_ = _account_it;
			if (!gee_iterator_next (_tmp12_)) {
				break;
			}
			_tmp13_ = _account_it;
			_tmp14_ = gee_iterator_get (_tmp13_);
			account = (GearyAccountInformation*) _tmp14_;
			_tmp15_ = account;
			_tmp16_ = self->priv->_accounts;
			_tmp17_ = account;
			accounts_editor_list_pane_add_account (self, _tmp15_, accounts_manager_get_status (_tmp16_, _tmp17_));
			_g_object_unref0 (account);
		}
		_g_object_unref0 (_account_it);
	}
	_tmp18_ = self->priv->_accounts;
	g_signal_connect_object (_tmp18_, "account-added", (GCallback) _accounts_editor_list_pane_on_account_added_accounts_manager_account_added, self, 0);
	_tmp19_ = self->priv->_accounts;
	g_signal_connect_object (_tmp19_, "account-status-changed", (GCallback) _accounts_editor_list_pane_on_account_status_changed_accounts_manager_account_status_changed, self, 0);
	_tmp20_ = self->priv->_accounts;
	g_signal_connect_object (_tmp20_, "account-removed", (GCallback) _accounts_editor_list_pane_on_account_removed_accounts_manager_account_removed, self, 0);
	_tmp21_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp22_ = _tmp21_;
	g_signal_connect_object (_tmp22_, "executed", (GCallback) _accounts_editor_list_pane_on_execute_application_command_stack_executed, self, 0);
	_tmp23_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp24_ = _tmp23_;
	g_signal_connect_object (_tmp24_, "undone", (GCallback) _accounts_editor_list_pane_on_undo_application_command_stack_undone, self, 0);
	_tmp25_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp26_ = _tmp25_;
	g_signal_connect_object (_tmp26_, "redone", (GCallback) _accounts_editor_list_pane_on_execute_application_command_stack_redone, self, 0);
	accounts_command_pane_connect_command_signals (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	accounts_editor_list_pane_update_welcome_panel (self);
	return self;
}

AccountsEditorListPane*
accounts_editor_list_pane_new (AccountsEditor* editor)
{
	return accounts_editor_list_pane_construct (ACCOUNTS_TYPE_EDITOR_LIST_PANE, editor);
}

static void
accounts_editor_list_pane_real_destroy (GtkWidget* base)
{
	AccountsEditorListPane * self;
	ApplicationCommandStack* _tmp0_;
	ApplicationCommandStack* _tmp1_;
	guint _tmp2_;
	ApplicationCommandStack* _tmp3_;
	ApplicationCommandStack* _tmp4_;
	guint _tmp5_;
	ApplicationCommandStack* _tmp6_;
	ApplicationCommandStack* _tmp7_;
	guint _tmp8_;
	AccountsManager* _tmp9_;
	guint _tmp10_;
	AccountsManager* _tmp11_;
	guint _tmp12_;
	AccountsManager* _tmp13_;
	guint _tmp14_;
	GeeMap* _tmp15_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	_tmp0_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp1_ = _tmp0_;
	g_signal_parse_name ("executed", APPLICATION_TYPE_COMMAND_STACK, &_tmp2_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _accounts_editor_list_pane_on_execute_application_command_stack_executed, self);
	_tmp3_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp4_ = _tmp3_;
	g_signal_parse_name ("undone", APPLICATION_TYPE_COMMAND_STACK, &_tmp5_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _accounts_editor_list_pane_on_undo_application_command_stack_undone, self);
	_tmp6_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp7_ = _tmp6_;
	g_signal_parse_name ("redone", APPLICATION_TYPE_COMMAND_STACK, &_tmp8_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _accounts_editor_list_pane_on_execute_application_command_stack_redone, self);
	accounts_command_pane_disconnect_command_signals (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp9_ = self->priv->_accounts;
	g_signal_parse_name ("account-added", ACCOUNTS_TYPE_MANAGER, &_tmp10_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _accounts_editor_list_pane_on_account_added_accounts_manager_account_added, self);
	_tmp11_ = self->priv->_accounts;
	g_signal_parse_name ("account-status-changed", ACCOUNTS_TYPE_MANAGER, &_tmp12_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp11_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _accounts_editor_list_pane_on_account_status_changed_accounts_manager_account_status_changed, self);
	_tmp13_ = self->priv->_accounts;
	g_signal_parse_name ("account-removed", ACCOUNTS_TYPE_MANAGER, &_tmp14_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp13_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, 0, NULL, (GCallback) _accounts_editor_list_pane_on_account_removed_accounts_manager_account_removed, self);
	_tmp15_ = self->priv->edit_pane_cache;
	gee_map_clear (_tmp15_);
	GTK_WIDGET_CLASS (accounts_editor_list_pane_parent_class)->destroy (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_grid_get_type (), GtkGrid), gtk_widget_get_type (), GtkWidget));
}

void
accounts_editor_list_pane_show_new_account (AccountsEditorListPane* self)
{
	AccountsEditor* _tmp0_;
	AccountsEditor* _tmp1_;
	AccountsEditor* _tmp2_;
	AccountsEditor* _tmp3_;
	AccountsEditorAddPane* _tmp4_;
	AccountsEditorAddPane* _tmp5_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	_tmp0_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp3_ = _tmp2_;
	_tmp4_ = accounts_editor_add_pane_new (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	accounts_editor_push (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_g_object_unref0 (_tmp5_);
}

void
accounts_editor_list_pane_show_existing_account (AccountsEditorListPane* self,
                                                 GearyAccountInformation* account)
{
	AccountsEditorEditPane* edit_pane = NULL;
	GeeMap* _tmp0_;
	gpointer _tmp1_;
	AccountsEditorEditPane* _tmp2_;
	AccountsEditor* _tmp8_;
	AccountsEditor* _tmp9_;
	AccountsEditorEditPane* _tmp10_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION));
	_tmp0_ = self->priv->edit_pane_cache;
	_tmp1_ = gee_map_get (_tmp0_, account);
	edit_pane = (AccountsEditorEditPane*) _tmp1_;
	_tmp2_ = edit_pane;
	if (_tmp2_ == NULL) {
		AccountsEditor* _tmp3_;
		AccountsEditor* _tmp4_;
		AccountsEditorEditPane* _tmp5_;
		GeeMap* _tmp6_;
		AccountsEditorEditPane* _tmp7_;
		_tmp3_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp4_ = _tmp3_;
		_tmp5_ = accounts_editor_edit_pane_new (_tmp4_, account);
		g_object_ref_sink (_tmp5_);
		_g_object_unref0 (edit_pane);
		edit_pane = _tmp5_;
		_tmp6_ = self->priv->edit_pane_cache;
		_tmp7_ = edit_pane;
		gee_map_set (_tmp6_, account, _tmp7_);
	}
	_tmp8_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp9_ = _tmp8_;
	_tmp10_ = edit_pane;
	accounts_editor_push (_tmp9_, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_g_object_unref0 (edit_pane);
}

/** Removes an account from the list. */
void
accounts_editor_list_pane_remove_account (AccountsEditorListPane* self,
                                          GearyAccountInformation* account)
{
	AccountsAccountListRow* row = NULL;
	AccountsAccountListRow* _tmp0_;
	AccountsAccountListRow* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION));
	_tmp0_ = accounts_editor_list_pane_get_account_row (self, account);
	row = _tmp0_;
	_tmp1_ = row;
	if (_tmp1_ != NULL) {
		ApplicationCommandStack* _tmp2_;
		ApplicationCommandStack* _tmp3_;
		AccountsManager* _tmp4_;
		AccountsRemoveAccountCommand* _tmp5_;
		AccountsRemoveAccountCommand* _tmp6_;
		GCancellable* _tmp7_;
		GCancellable* _tmp8_;
		_tmp2_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
		_tmp3_ = _tmp2_;
		_tmp4_ = self->priv->_accounts;
		_tmp5_ = accounts_remove_account_command_new (account, _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp8_ = _tmp7_;
		application_command_stack_execute (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp8_, NULL, NULL);
		_g_object_unref0 (_tmp6_);
	}
	_g_object_unref0 (row);
}

/** {@inheritDoc} */
static GtkHeaderBar*
accounts_editor_list_pane_real_get_header (AccountsEditorPane* base)
{
	AccountsEditorListPane * self;
	GtkHeaderBar* _tmp0_;
	GtkHeaderBar* _tmp1_;
	GtkHeaderBar* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	_tmp0_ = self->priv->header;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
_accounts_editor_list_pane_on_editor_row_moved_accounts_editor_row_move_to (AccountsEditorRow* _sender,
                                                                            gint new_position,
                                                                            gpointer self)
{
	accounts_editor_list_pane_on_editor_row_moved ((AccountsEditorListPane*) self, _sender, new_position);
}

static void
_accounts_editor_list_pane_on_editor_row_dropped_accounts_editor_row_dropped (AccountsEditorRow* _sender,
                                                                              AccountsEditorRow* target,
                                                                              gpointer self)
{
	accounts_editor_list_pane_on_editor_row_dropped ((AccountsEditorListPane*) self, _sender, target);
}

static void
accounts_editor_list_pane_add_account (AccountsEditorListPane* self,
                                       GearyAccountInformation* account,
                                       AccountsManagerStatus status)
{
	AccountsAccountListRow* row = NULL;
	AccountsAccountListRow* _tmp0_;
	GtkListBox* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION));
	_tmp0_ = accounts_account_list_row_new (account, status);
	g_object_ref_sink (_tmp0_);
	row = _tmp0_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (row, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow), "move-to", (GCallback) _accounts_editor_list_pane_on_editor_row_moved_accounts_editor_row_move_to, self, 0);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (row, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow), "dropped", (GCallback) _accounts_editor_list_pane_on_editor_row_dropped_accounts_editor_row_dropped, self, 0);
	_tmp1_ = self->priv->accounts_list;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (row, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (row);
}

static void
accounts_editor_list_pane_update_welcome_panel (AccountsEditorListPane* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	_tmp0_ = accounts_editor_list_pane_get_show_welcome (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GtkGrid* _tmp2_;
		GtkFrame* _tmp3_;
		_tmp2_ = self->priv->welcome_panel;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
		_tmp3_ = self->priv->accounts_list_frame;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	} else {
		GtkGrid* _tmp4_;
		GtkFrame* _tmp5_;
		_tmp4_ = self->priv->welcome_panel;
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
		_tmp5_ = self->priv->accounts_list_frame;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
	}
}

static Block48Data*
block48_data_ref (Block48Data* _data48_)
{
	g_atomic_int_inc (&_data48_->_ref_count_);
	return _data48_;
}

static void
block48_data_unref (void * _userdata_)
{
	Block48Data* _data48_;
	_data48_ = (Block48Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data48_->_ref_count_)) {
		AccountsEditorListPane* self;
		self = _data48_->self;
		_g_object_unref0 (_data48_->row);
		_g_object_unref0 (_data48_->account);
		_g_object_unref0 (self);
		g_slice_free (Block48Data, _data48_);
	}
}

static void
__lambda72_ (Block48Data* _data48_,
             GtkWidget* child)
{
	AccountsEditorListPane* self;
	AccountsAccountListRow* account_row = NULL;
	AccountsAccountListRow* _tmp0_;
	gboolean _tmp1_ = FALSE;
	AccountsAccountListRow* _tmp2_;
	self = _data48_->self;
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (child, gtk_widget_get_type ()));
	_tmp0_ = _g_object_ref0 (ACCOUNTS_IS_ACCOUNT_LIST_ROW (child) ? ((AccountsAccountListRow*) child) : NULL);
	account_row = _tmp0_;
	_tmp2_ = account_row;
	if (_tmp2_ != NULL) {
		AccountsAccountListRow* _tmp3_;
		GearyAccountInformation* _tmp4_;
		GearyAccountInformation* _tmp5_;
		_tmp3_ = account_row;
		_tmp4_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ == _data48_->account;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		AccountsAccountListRow* _tmp6_;
		AccountsAccountListRow* _tmp7_;
		_tmp6_ = account_row;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		_g_object_unref0 (_data48_->row);
		_data48_->row = _tmp7_;
	}
	_g_object_unref0 (account_row);
}

static void
___lambda72__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda72_ (self, widget);
}

static AccountsAccountListRow*
accounts_editor_list_pane_get_account_row (AccountsEditorListPane* self,
                                           GearyAccountInformation* account)
{
	Block48Data* _data48_;
	GearyAccountInformation* _tmp0_;
	GtkListBox* _tmp1_;
	AccountsAccountListRow* _tmp2_;
	AccountsAccountListRow* result;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	_data48_ = g_slice_new0 (Block48Data);
	_data48_->_ref_count_ = 1;
	_data48_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (account);
	_g_object_unref0 (_data48_->account);
	_data48_->account = _tmp0_;
	_data48_->row = NULL;
	_tmp1_ = self->priv->accounts_list;
	gtk_container_foreach (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_container_get_type (), GtkContainer), ___lambda72__gtk_callback, _data48_);
	_tmp2_ = _g_object_ref0 (_data48_->row);
	result = _tmp2_;
	block48_data_unref (_data48_);
	_data48_ = NULL;
	return result;
}

static void
accounts_editor_list_pane_on_account_added (AccountsEditorListPane* self,
                                            GearyAccountInformation* account,
                                            AccountsManagerStatus status)
{
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION));
	accounts_editor_list_pane_add_account (self, account, status);
	accounts_editor_list_pane_update_welcome_panel (self);
}

static void
accounts_editor_list_pane_on_account_status_changed (AccountsEditorListPane* self,
                                                     GearyAccountInformation* account,
                                                     AccountsManagerStatus status)
{
	AccountsAccountListRow* row = NULL;
	AccountsAccountListRow* _tmp0_;
	AccountsAccountListRow* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION));
	_tmp0_ = accounts_editor_list_pane_get_account_row (self, account);
	row = _tmp0_;
	_tmp1_ = row;
	if (_tmp1_ != NULL) {
		AccountsAccountListRow* _tmp2_;
		_tmp2_ = row;
		accounts_account_list_row_update_status (_tmp2_, status);
	}
	_g_object_unref0 (row);
}

static void
accounts_editor_list_pane_on_editor_row_moved (AccountsEditorListPane* self,
                                               AccountsEditorRow* source,
                                               gint new_position)
{
	ApplicationCommandStack* _tmp0_;
	ApplicationCommandStack* _tmp1_;
	AccountsManager* _tmp2_;
	AccountsReorderAccountCommand* _tmp3_;
	AccountsReorderAccountCommand* _tmp4_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (source));
	_tmp0_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_accounts;
	_tmp3_ = accounts_reorder_account_command_new (G_TYPE_CHECK_INSTANCE_CAST (source, ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRow), new_position, _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp6_ = _tmp5_;
	application_command_stack_execute (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp6_, NULL, NULL);
	_g_object_unref0 (_tmp4_);
}

static void
accounts_editor_list_pane_on_editor_row_dropped (AccountsEditorListPane* self,
                                                 AccountsEditorRow* source,
                                                 AccountsEditorRow* target)
{
	ApplicationCommandStack* _tmp0_;
	ApplicationCommandStack* _tmp1_;
	AccountsManager* _tmp2_;
	AccountsReorderAccountCommand* _tmp3_;
	AccountsReorderAccountCommand* _tmp4_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (source));
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (target));
	_tmp0_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_accounts;
	_tmp3_ = accounts_reorder_account_command_new (G_TYPE_CHECK_INSTANCE_CAST (source, ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRow), gtk_list_box_row_get_index (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_list_box_row_get_type (), GtkListBoxRow)), _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp6_ = _tmp5_;
	application_command_stack_execute (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp6_, NULL, NULL);
	_g_object_unref0 (_tmp4_);
}

static void
accounts_editor_list_pane_on_account_removed (AccountsEditorListPane* self,
                                              GearyAccountInformation* account)
{
	AccountsAccountListRow* row = NULL;
	AccountsAccountListRow* _tmp0_;
	AccountsAccountListRow* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION));
	_tmp0_ = accounts_editor_list_pane_get_account_row (self, account);
	row = _tmp0_;
	_tmp1_ = row;
	if (_tmp1_ != NULL) {
		GtkListBox* _tmp2_;
		AccountsAccountListRow* _tmp3_;
		_tmp2_ = self->priv->accounts_list;
		_tmp3_ = row;
		gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
		accounts_editor_list_pane_update_welcome_panel (self);
	}
	_g_object_unref0 (row);
}

static void
accounts_editor_list_pane_on_execute (AccountsEditorListPane* self,
                                      ApplicationCommand* command)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (APPLICATION_IS_COMMAND (command));
	_tmp0_ = application_command_get_executed_label (command);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		guint notification_time = 0U;
		gboolean _tmp2_;
		gboolean _tmp3_;
		ComponentsInAppNotification* ian = NULL;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		ComponentsInAppNotification* _tmp14_;
		ComponentsInAppNotification* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		AccountsEditor* _tmp18_;
		AccountsEditor* _tmp19_;
		ComponentsInAppNotification* _tmp20_;
		notification_time = COMPONENTS_IN_APP_NOTIFICATION_DEFAULT_DURATION;
		_tmp2_ = application_command_get_executed_notification_brief (command);
		_tmp3_ = _tmp2_;
		if (_tmp3_) {
			AccountsEditor* _tmp4_;
			AccountsEditor* _tmp5_;
			ApplicationClient* _tmp6_;
			ApplicationClient* _tmp7_;
			ApplicationConfiguration* _tmp8_;
			ApplicationConfiguration* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			_tmp4_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
			_tmp5_ = _tmp4_;
			_tmp6_ = accounts_editor_get_application (_tmp5_);
			_tmp7_ = _tmp6_;
			_tmp8_ = application_client_get_config (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = application_configuration_get_brief_notification_duration (_tmp9_);
			_tmp11_ = _tmp10_;
			notification_time = (guint) _tmp11_;
		}
		_tmp12_ = application_command_get_executed_label (command);
		_tmp13_ = _tmp12_;
		_tmp14_ = components_in_app_notification_new (_tmp13_, notification_time);
		g_object_ref_sink (_tmp14_);
		ian = _tmp14_;
		_tmp15_ = ian;
		_tmp16_ = action_edit_prefix (ACTION_EDIT_UNDO);
		_tmp17_ = _tmp16_;
		components_in_app_notification_set_button (_tmp15_, _ ("Undo"), _tmp17_);
		_g_free0 (_tmp17_);
		_tmp18_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp19_ = _tmp18_;
		_tmp20_ = ian;
		accounts_editor_add_notification (_tmp19_, _tmp20_);
		_g_object_unref0 (ian);
	}
}

static void
accounts_editor_list_pane_on_undo (AccountsEditorListPane* self,
                                   ApplicationCommand* command)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (APPLICATION_IS_COMMAND (command));
	_tmp0_ = application_command_get_undone_label (command);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		ComponentsInAppNotification* ian = NULL;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		ComponentsInAppNotification* _tmp4_;
		ComponentsInAppNotification* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		AccountsEditor* _tmp8_;
		AccountsEditor* _tmp9_;
		ComponentsInAppNotification* _tmp10_;
		_tmp2_ = application_command_get_undone_label (command);
		_tmp3_ = _tmp2_;
		_tmp4_ = components_in_app_notification_new (_tmp3_, COMPONENTS_IN_APP_NOTIFICATION_DEFAULT_DURATION);
		g_object_ref_sink (_tmp4_);
		ian = _tmp4_;
		_tmp5_ = ian;
		_tmp6_ = action_edit_prefix (ACTION_EDIT_REDO);
		_tmp7_ = _tmp6_;
		components_in_app_notification_set_button (_tmp5_, _ ("Redo"), _tmp7_);
		_g_free0 (_tmp7_);
		_tmp8_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp9_ = _tmp8_;
		_tmp10_ = ian;
		accounts_editor_add_notification (_tmp9_, _tmp10_);
		_g_object_unref0 (ian);
	}
}

static void
accounts_editor_list_pane_on_row_activated (AccountsEditorListPane* self,
                                            GtkListBoxRow* row)
{
	AccountsEditorRow* setting = NULL;
	AccountsEditorRow* _tmp0_;
	AccountsEditorRow* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (row, gtk_list_box_row_get_type ()));
	_tmp0_ = _g_object_ref0 (ACCOUNTS_IS_EDITOR_ROW (row) ? ((AccountsEditorRow*) row) : NULL);
	setting = _tmp0_;
	_tmp1_ = setting;
	if (_tmp1_ != NULL) {
		AccountsEditorRow* _tmp2_;
		_tmp2_ = setting;
		accounts_editor_row_activated (_tmp2_, self);
	}
	_g_object_unref0 (setting);
}

static void
_accounts_editor_list_pane_on_row_activated_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                        GtkListBoxRow* row,
                                                                        gpointer self)
{
	accounts_editor_list_pane_on_row_activated ((AccountsEditorListPane*) self, row);
}

static void
accounts_editor_list_pane_on_add_button_clicked (AccountsEditorListPane* self)
{
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (self));
	accounts_editor_list_pane_show_new_account (self);
}

static void
_accounts_editor_list_pane_on_add_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	accounts_editor_list_pane_on_add_button_clicked ((AccountsEditorListPane*) self);
}

static void
accounts_editor_list_pane_class_init (AccountsEditorListPaneClass * klass,
                                      gpointer klass_data)
{
	accounts_editor_list_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsEditorListPane_private_offset);
	((GtkWidgetClass *) klass)->destroy = (void (*) (GtkWidget*)) accounts_editor_list_pane_real_destroy;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_editor_list_pane_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_editor_list_pane_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_editor_list_pane_finalize;
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_LIST_PANE_INITIAL_WIDGET_PROPERTY, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_INITIAL_WIDGET_PROPERTY] = g_param_spec_object ("initial-widget", "initial-widget", "initial-widget", gtk_widget_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_LIST_PANE_COMMANDS_PROPERTY, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_COMMANDS_PROPERTY] = g_param_spec_object ("commands", "commands", "commands", APPLICATION_TYPE_COMMAND_STACK, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_LIST_PANE_IS_OPERATION_RUNNING_PROPERTY, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_IS_OPERATION_RUNNING_PROPERTY] = g_param_spec_boolean ("is-operation-running", "is-operation-running", "is-operation-running", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_LIST_PANE_OP_CANCELLABLE_PROPERTY, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_OP_CANCELLABLE_PROPERTY] = g_param_spec_object ("op-cancellable", "op-cancellable", "op-cancellable", g_cancellable_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_LIST_PANE_ACCOUNTS_PROPERTY, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_ACCOUNTS_PROPERTY] = g_param_spec_object ("accounts", "accounts", "accounts", ACCOUNTS_TYPE_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_LIST_PANE_EDITOR_PROPERTY, accounts_editor_list_pane_properties[ACCOUNTS_EDITOR_LIST_PANE_EDITOR_PROPERTY] = g_param_spec_object ("editor", "editor", "editor", ACCOUNTS_TYPE_EDITOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Geary/accounts_editor_list_pane.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header", FALSE, AccountsEditorListPane_private_offset + G_STRUCT_OFFSET (AccountsEditorListPanePrivate, header));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pane_content", FALSE, AccountsEditorListPane_private_offset + G_STRUCT_OFFSET (AccountsEditorListPanePrivate, pane_content));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pane_adjustment", FALSE, AccountsEditorListPane_private_offset + G_STRUCT_OFFSET (AccountsEditorListPanePrivate, pane_adjustment));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "welcome_panel", FALSE, AccountsEditorListPane_private_offset + G_STRUCT_OFFSET (AccountsEditorListPanePrivate, welcome_panel));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "welcome_icon", FALSE, AccountsEditorListPane_private_offset + G_STRUCT_OFFSET (AccountsEditorListPanePrivate, welcome_icon));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "accounts_list", FALSE, AccountsEditorListPane_private_offset + G_STRUCT_OFFSET (AccountsEditorListPanePrivate, accounts_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "accounts_list_frame", FALSE, AccountsEditorListPane_private_offset + G_STRUCT_OFFSET (AccountsEditorListPanePrivate, accounts_list_frame));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_row_activated", G_CALLBACK(_accounts_editor_list_pane_on_row_activated_gtk_list_box_row_activated));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_add_button_clicked", G_CALLBACK(_accounts_editor_list_pane_on_add_button_clicked_gtk_button_clicked));
}

static void
accounts_editor_list_pane_accounts_editor_pane_interface_init (AccountsEditorPaneIface * iface,
                                                               gpointer iface_data)
{
	accounts_editor_list_pane_accounts_editor_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_header = (GtkHeaderBar* (*) (AccountsEditorPane*)) accounts_editor_list_pane_real_get_header;
	iface->get_initial_widget = accounts_editor_list_pane_real_get_initial_widget;
	iface->get_is_operation_running = accounts_editor_list_pane_real_get_is_operation_running;
	iface->set_is_operation_running = accounts_editor_list_pane_real_set_is_operation_running;
	iface->get_op_cancellable = accounts_editor_list_pane_real_get_op_cancellable;
	iface->set_op_cancellable = accounts_editor_list_pane_real_set_op_cancellable;
	iface->get_editor = accounts_editor_list_pane_real_get_editor;
	iface->set_editor = accounts_editor_list_pane_real_set_editor;
}

static void
accounts_editor_list_pane_accounts_command_pane_interface_init (AccountsCommandPaneIface * iface,
                                                                gpointer iface_data)
{
	accounts_editor_list_pane_accounts_command_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_commands = accounts_editor_list_pane_real_get_commands;
	iface->set_commands = accounts_editor_list_pane_real_set_commands;
}

static void
accounts_editor_list_pane_instance_init (AccountsEditorListPane * self,
                                         gpointer klass)
{
	ApplicationCommandStack* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = accounts_editor_list_pane_get_instance_private (self);
	_tmp0_ = application_command_stack_new ();
	self->priv->_commands = _tmp0_;
	self->priv->_is_operation_running = FALSE;
	self->priv->_op_cancellable = NULL;
	_tmp1_ = gee_hash_map_new (GEARY_TYPE_ACCOUNT_INFORMATION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, ACCOUNTS_TYPE_EDITOR_EDIT_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->edit_pane_cache = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_MAP, GeeMap);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
accounts_editor_list_pane_finalize (GObject * obj)
{
	AccountsEditorListPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	_g_object_unref0 (self->priv->_commands);
	_g_object_unref0 (self->priv->_op_cancellable);
	_g_object_unref0 (self->priv->_accounts);
	_g_object_unref0 (self->priv->edit_pane_cache);
	G_OBJECT_CLASS (accounts_editor_list_pane_parent_class)->finalize (obj);
}

/**
 * An account editor pane for listing all known accounts.
 */
static GType
accounts_editor_list_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsEditorListPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_editor_list_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsEditorListPane), 0, (GInstanceInitFunc) accounts_editor_list_pane_instance_init, NULL };
	static const GInterfaceInfo accounts_editor_pane_info = { (GInterfaceInitFunc) accounts_editor_list_pane_accounts_editor_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo accounts_command_pane_info = { (GInterfaceInitFunc) accounts_editor_list_pane_accounts_command_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType accounts_editor_list_pane_type_id;
	accounts_editor_list_pane_type_id = g_type_register_static (gtk_grid_get_type (), "AccountsEditorListPane", &g_define_type_info, 0);
	g_type_add_interface_static (accounts_editor_list_pane_type_id, ACCOUNTS_TYPE_EDITOR_PANE, &accounts_editor_pane_info);
	g_type_add_interface_static (accounts_editor_list_pane_type_id, ACCOUNTS_TYPE_COMMAND_PANE, &accounts_command_pane_info);
	AccountsEditorListPane_private_offset = g_type_add_instance_private (accounts_editor_list_pane_type_id, sizeof (AccountsEditorListPanePrivate));
	return accounts_editor_list_pane_type_id;
}

GType
accounts_editor_list_pane_get_type (void)
{
	static volatile gsize accounts_editor_list_pane_type_id__once = 0;
	if (g_once_init_enter (&accounts_editor_list_pane_type_id__once)) {
		GType accounts_editor_list_pane_type_id;
		accounts_editor_list_pane_type_id = accounts_editor_list_pane_get_type_once ();
		g_once_init_leave (&accounts_editor_list_pane_type_id__once, accounts_editor_list_pane_type_id);
	}
	return accounts_editor_list_pane_type_id__once;
}

static void
_vala_accounts_editor_list_pane_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	AccountsEditorListPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	switch (property_id) {
		case ACCOUNTS_EDITOR_LIST_PANE_INITIAL_WIDGET_PROPERTY:
		g_value_set_object (value, accounts_editor_pane_get_initial_widget (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane)));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_COMMANDS_PROPERTY:
		g_value_set_object (value, accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane)));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_IS_OPERATION_RUNNING_PROPERTY:
		g_value_set_boolean (value, accounts_editor_pane_get_is_operation_running (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane)));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_OP_CANCELLABLE_PROPERTY:
		g_value_set_object (value, accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane)));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_ACCOUNTS_PROPERTY:
		g_value_set_object (value, accounts_editor_list_pane_get_accounts (self));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_EDITOR_PROPERTY:
		g_value_set_object (value, accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane)));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_editor_list_pane_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	AccountsEditorListPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_LIST_PANE, AccountsEditorListPane);
	switch (property_id) {
		case ACCOUNTS_EDITOR_LIST_PANE_COMMANDS_PROPERTY:
		accounts_command_pane_set_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane), g_value_get_object (value));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_IS_OPERATION_RUNNING_PROPERTY:
		accounts_editor_pane_set_is_operation_running (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), g_value_get_boolean (value));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_OP_CANCELLABLE_PROPERTY:
		accounts_editor_pane_set_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), g_value_get_object (value));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_ACCOUNTS_PROPERTY:
		accounts_editor_list_pane_set_accounts (self, g_value_get_object (value));
		break;
		case ACCOUNTS_EDITOR_LIST_PANE_EDITOR_PROPERTY:
		accounts_editor_pane_set_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_account_list_row_get_instance_private (AccountsAccountListRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsAccountListRow_private_offset);
}

static void
_accounts_account_list_row_on_account_changed_geary_account_information_changed (GearyAccountInformation* _sender,
                                                                                 gpointer self)
{
	accounts_account_list_row_on_account_changed ((AccountsAccountListRow*) self);
}

AccountsAccountListRow*
accounts_account_list_row_construct (GType object_type,
                                     GearyAccountInformation* account,
                                     AccountsManagerStatus status)
{
	AccountsAccountListRow * self = NULL;
	GtkGrid* _tmp0_;
	GtkGrid* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	GtkImage* _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	GearyAccountInformation* _tmp11_;
	GearyAccountInformation* _tmp12_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	self = (AccountsAccountListRow*) accounts_account_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_LIST_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_grid_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, "", _tmp1_);
	_g_object_unref0 (_tmp1_);
	accounts_editor_row_enable_drag (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->unavailable_icon;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST ((GtkGrid*) _tmp3_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
	_tmp5_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->service_label;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST ((GtkGrid*) _tmp6_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
	_tmp8_ = self->priv->service_label;
	gtk_label_set_line_wrap_mode (_tmp8_, PANGO_WRAP_WORD_CHAR);
	_tmp9_ = self->priv->service_label;
	gtk_label_set_line_wrap (_tmp9_, TRUE);
	_tmp10_ = self->priv->service_label;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget));
	_tmp11_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp12_ = _tmp11_;
	g_signal_connect_object (_tmp12_, "changed", (GCallback) _accounts_account_list_row_on_account_changed_geary_account_information_changed, self, 0);
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	accounts_account_list_row_update_status (self, status);
	return self;
}

AccountsAccountListRow*
accounts_account_list_row_new (GearyAccountInformation* account,
                               AccountsManagerStatus status)
{
	return accounts_account_list_row_construct (ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, account, status);
}

static Block49Data*
block49_data_ref (Block49Data* _data49_)
{
	g_atomic_int_inc (&_data49_->_ref_count_);
	return _data49_;
}

static void
block49_data_unref (void * _userdata_)
{
	Block49Data* _data49_;
	_data49_ = (Block49Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data49_->_ref_count_)) {
		AccountsAccountListRow* self;
		self = _data49_->self;
		_g_object_unref0 (_data49_->manager);
		_g_object_unref0 (self);
		g_slice_free (Block49Data, _data49_);
	}
}

static void
___lambda71_ (Block49Data* _data49_,
              GObject* obj,
              GAsyncResult* res)
{
	AccountsAccountListRow* self;
	GError* _inner_error0_ = NULL;
	self = _data49_->self;
	g_return_if_fail ((obj == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (obj, G_TYPE_OBJECT));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (res, g_async_result_get_type ()));
	{
		AccountsManager* _tmp0_;
		_tmp0_ = _data49_->manager;
		accounts_manager_show_goa_account_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GearyAccountInformation* _tmp1_;
		GearyAccountInformation* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		GError* _tmp5_;
		const gchar* _tmp6_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp2_ = _tmp1_;
		_tmp3_ = geary_account_information_get_id (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = err;
		_tmp6_ = _tmp5_->message;
		g_debug ("accounts-editor-list-pane.vala:305: Failed to show GOA account \"%s\":" \
" %s", _tmp4_, _tmp6_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda71__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda71_ (self, source_object, res);
	block49_data_unref (self);
}

static void
accounts_account_list_row_real_activated (AccountsEditorRow* base,
                                          AccountsEditorListPane* pane)
{
	AccountsAccountListRow * self;
	Block49Data* _data49_;
	AccountsManager* _tmp0_;
	AccountsManager* _tmp1_;
	AccountsManager* _tmp2_;
	gboolean _tmp3_ = FALSE;
	AccountsManager* _tmp4_;
	GearyAccountInformation* _tmp5_;
	GearyAccountInformation* _tmp6_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRow);
	g_return_if_fail (ACCOUNTS_IS_EDITOR_LIST_PANE (pane));
	_data49_ = g_slice_new0 (Block49Data);
	_data49_->_ref_count_ = 1;
	_data49_->self = g_object_ref (self);
	_tmp0_ = accounts_editor_list_pane_get_accounts (pane);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data49_->manager = _tmp2_;
	_tmp4_ = _data49_->manager;
	_tmp5_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp6_ = _tmp5_;
	if (accounts_manager_is_goa_account (_tmp4_, _tmp6_)) {
		AccountsManager* _tmp7_;
		GearyAccountInformation* _tmp8_;
		GearyAccountInformation* _tmp9_;
		_tmp7_ = _data49_->manager;
		_tmp8_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp9_ = _tmp8_;
		_tmp3_ = accounts_manager_get_status (_tmp7_, _tmp9_) != ACCOUNTS_MANAGER_STATUS_ENABLED;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		AccountsManager* _tmp10_;
		GearyAccountInformation* _tmp11_;
		GearyAccountInformation* _tmp12_;
		GCancellable* _tmp13_;
		GCancellable* _tmp14_;
		_tmp10_ = _data49_->manager;
		_tmp11_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp12_ = _tmp11_;
		_tmp13_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (pane, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp14_ = _tmp13_;
		accounts_manager_show_goa_account (_tmp10_, _tmp12_, _tmp14_, ____lambda71__gasync_ready_callback, block49_data_ref (_data49_));
	} else {
		GearyAccountInformation* _tmp15_;
		GearyAccountInformation* _tmp16_;
		_tmp15_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp16_ = _tmp15_;
		accounts_editor_list_pane_show_existing_account (pane, _tmp16_);
	}
	block49_data_unref (_data49_);
	_data49_ = NULL;
}

static void
accounts_account_list_row_real_update (AccountsAccountRow* base)
{
	AccountsAccountListRow * self;
	gchar* name = NULL;
	GearyAccountInformation* _tmp0_;
	GearyAccountInformation* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	GtkLabel* _tmp12_;
	GtkLabel* _tmp13_;
	const gchar* _tmp14_;
	gchar* details = NULL;
	GearyAccountInformation* _tmp15_;
	GearyAccountInformation* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	GearyAccountInformation* _tmp19_;
	GearyAccountInformation* _tmp20_;
	GearyServiceProvider _tmp21_;
	GearyServiceProvider _tmp22_;
	GtkLabel* _tmp25_;
	const gchar* _tmp26_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRow);
	_tmp0_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = geary_account_information_get_display_name (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	name = _tmp4_;
	_tmp5_ = name;
	if (geary_string_is_empty (_tmp5_)) {
		GearyAccountInformation* _tmp6_;
		GearyAccountInformation* _tmp7_;
		GearyRFC822MailboxAddress* _tmp8_;
		GearyRFC822MailboxAddress* _tmp9_;
		GearyRFC822MailboxAddress* _tmp10_;
		gchar* _tmp11_;
		_tmp6_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp7_ = _tmp6_;
		_tmp8_ = geary_account_information_get_primary_mailbox (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_;
		_tmp11_ = geary_rf_c822_mailbox_address_to_address_display (_tmp10_, "", "");
		_g_free0 (name);
		name = _tmp11_;
		_g_object_unref0 (_tmp10_);
	}
	_tmp12_ = accounts_labelled_editor_row_get_label (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp13_ = _tmp12_;
	_tmp14_ = name;
	gtk_label_set_text (_tmp13_, _tmp14_);
	_tmp15_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp16_ = _tmp15_;
	_tmp17_ = geary_account_information_get_service_label (_tmp16_);
	_tmp18_ = _tmp17_;
	details = _tmp18_;
	_tmp19_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp20_ = _tmp19_;
	_tmp21_ = geary_account_information_get_service_provider (_tmp20_);
	_tmp22_ = _tmp21_;
	switch (_tmp22_) {
		case GEARY_SERVICE_PROVIDER_GMAIL:
		{
			gchar* _tmp23_;
			_tmp23_ = g_strdup (_ ("Gmail"));
			_g_free0 (details);
			details = _tmp23_;
			break;
		}
		case GEARY_SERVICE_PROVIDER_OUTLOOK:
		{
			gchar* _tmp24_;
			_tmp24_ = g_strdup (_ ("Outlook.com"));
			_g_free0 (details);
			details = _tmp24_;
			break;
		}
		case GEARY_SERVICE_PROVIDER_OTHER:
		{
			break;
		}
		default:
		break;
	}
	_tmp25_ = self->priv->service_label;
	_tmp26_ = details;
	gtk_label_set_text (_tmp25_, _tmp26_);
	_g_free0 (details);
	_g_free0 (name);
}

void
accounts_account_list_row_update_status (AccountsAccountListRow* self,
                                         AccountsManagerStatus status)
{
	gboolean enabled = FALSE;
	GtkImage* _tmp0_;
	g_return_if_fail (ACCOUNTS_IS_ACCOUNT_LIST_ROW (self));
	enabled = FALSE;
	switch (status) {
		case ACCOUNTS_MANAGER_STATUS_ENABLED:
		{
			enabled = TRUE;
			gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "");
			break;
		}
		case ACCOUNTS_MANAGER_STATUS_DISABLED:
		{
			gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _ ("This account has been disabled"));
			break;
		}
		case ACCOUNTS_MANAGER_STATUS_UNAVAILABLE:
		{
			gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _ ("This account has encountered a problem and is unavailable"));
			break;
		}
		case ACCOUNTS_MANAGER_STATUS_REMOVED:
		{
			break;
		}
		default:
		break;
	}
	_tmp0_ = self->priv->unavailable_icon;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), !enabled);
	if (enabled) {
		GtkLabel* _tmp1_;
		GtkLabel* _tmp2_;
		GtkStyleContext* _tmp3_;
		GtkLabel* _tmp4_;
		GtkStyleContext* _tmp5_;
		_tmp1_ = accounts_labelled_editor_row_get_label (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp2_ = _tmp1_;
		_tmp3_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
		gtk_style_context_remove_class (_tmp3_, GTK_STYLE_CLASS_DIM_LABEL);
		_tmp4_ = self->priv->service_label;
		_tmp5_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
		gtk_style_context_remove_class (_tmp5_, GTK_STYLE_CLASS_DIM_LABEL);
	} else {
		GtkLabel* _tmp6_;
		GtkLabel* _tmp7_;
		GtkStyleContext* _tmp8_;
		GtkLabel* _tmp9_;
		GtkStyleContext* _tmp10_;
		_tmp6_ = accounts_labelled_editor_row_get_label (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp7_ = _tmp6_;
		_tmp8_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
		gtk_style_context_add_class (_tmp8_, GTK_STYLE_CLASS_DIM_LABEL);
		_tmp9_ = self->priv->service_label;
		_tmp10_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
		gtk_style_context_add_class (_tmp10_, GTK_STYLE_CLASS_DIM_LABEL);
	}
}

static void
accounts_account_list_row_on_account_changed (AccountsAccountListRow* self)
{
	GtkListBox* parent = NULL;
	GtkContainer* _tmp0_;
	GtkListBox* _tmp1_;
	GtkListBox* _tmp2_;
	g_return_if_fail (ACCOUNTS_IS_ACCOUNT_LIST_ROW (self));
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp0_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_list_box_get_type ()) ? ((GtkListBox*) _tmp0_) : NULL);
	parent = _tmp1_;
	_tmp2_ = parent;
	if (_tmp2_ != NULL) {
		GtkListBox* _tmp3_;
		_tmp3_ = parent;
		gtk_list_box_invalidate_sort (_tmp3_);
	}
	_g_object_unref0 (parent);
}

static void
accounts_account_list_row_class_init (AccountsAccountListRowClass * klass,
                                      gpointer klass_data)
{
	accounts_account_list_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsAccountListRow_private_offset);
	((AccountsEditorRowClass *) klass)->activated = (void (*) (AccountsEditorRow*, gconstpointer)) accounts_account_list_row_real_activated;
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_account_list_row_real_update;
	G_OBJECT_CLASS (klass)->finalize = accounts_account_list_row_finalize;
}

static void
accounts_account_list_row_instance_init (AccountsAccountListRow * self,
                                         gpointer klass)
{
	GtkLabel* _tmp0_;
	GtkImage* _tmp1_;
	self->priv = accounts_account_list_row_get_instance_private (self);
	_tmp0_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp0_);
	self->priv->service_label = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-warning-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp1_);
	self->priv->unavailable_icon = _tmp1_;
}

static void
accounts_account_list_row_finalize (GObject * obj)
{
	AccountsAccountListRow * self;
	GearyAccountInformation* _tmp0_;
	GearyAccountInformation* _tmp1_;
	guint _tmp2_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_ACCOUNT_LIST_ROW, AccountsAccountListRow);
	_tmp0_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp1_ = _tmp0_;
	g_signal_parse_name ("changed", GEARY_TYPE_ACCOUNT_INFORMATION, &_tmp2_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _accounts_account_list_row_on_account_changed_geary_account_information_changed, self);
	_g_object_unref0 (self->priv->service_label);
	_g_object_unref0 (self->priv->unavailable_icon);
	G_OBJECT_CLASS (accounts_account_list_row_parent_class)->finalize (obj);
}

static GType
accounts_account_list_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsAccountListRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_account_list_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsAccountListRow), 0, (GInstanceInitFunc) accounts_account_list_row_instance_init, NULL };
	GType accounts_account_list_row_type_id;
	accounts_account_list_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ACCOUNT_ROW, "AccountsAccountListRow", &g_define_type_info, 0);
	AccountsAccountListRow_private_offset = g_type_add_instance_private (accounts_account_list_row_type_id, sizeof (AccountsAccountListRowPrivate));
	return accounts_account_list_row_type_id;
}

GType
accounts_account_list_row_get_type (void)
{
	static volatile gsize accounts_account_list_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_account_list_row_type_id__once)) {
		GType accounts_account_list_row_type_id;
		accounts_account_list_row_type_id = accounts_account_list_row_get_type_once ();
		g_once_init_leave (&accounts_account_list_row_type_id__once, accounts_account_list_row_type_id);
	}
	return accounts_account_list_row_type_id__once;
}

static inline gpointer
accounts_reorder_account_command_get_instance_private (AccountsReorderAccountCommand* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsReorderAccountCommand_private_offset);
}

AccountsReorderAccountCommand*
accounts_reorder_account_command_construct (GType object_type,
                                            AccountsAccountListRow* source,
                                            gint target_index,
                                            AccountsManager* manager)
{
	AccountsReorderAccountCommand * self = NULL;
	AccountsAccountListRow* _tmp0_;
	AccountsManager* _tmp1_;
	g_return_val_if_fail (ACCOUNTS_IS_ACCOUNT_LIST_ROW (source), NULL);
	g_return_val_if_fail (ACCOUNTS_IS_MANAGER (manager), NULL);
	self = (AccountsReorderAccountCommand*) application_command_construct (object_type);
	_tmp0_ = _g_object_ref0 (source);
	_g_object_unref0 (self->priv->source);
	self->priv->source = _tmp0_;
	self->priv->source_index = gtk_list_box_row_get_index (G_TYPE_CHECK_INSTANCE_CAST (source, gtk_list_box_row_get_type (), GtkListBoxRow));
	self->priv->target_index = target_index;
	_tmp1_ = _g_object_ref0 (manager);
	_g_object_unref0 (self->priv->manager);
	self->priv->manager = _tmp1_;
	return self;
}

AccountsReorderAccountCommand*
accounts_reorder_account_command_new (AccountsAccountListRow* source,
                                      gint target_index,
                                      AccountsManager* manager)
{
	return accounts_reorder_account_command_construct (ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND, source, target_index, manager);
}

static void
accounts_reorder_account_command_real_execute_data_free (gpointer _data)
{
	AccountsReorderAccountCommandExecuteData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (AccountsReorderAccountCommandExecuteData, _data_);
}

static void
accounts_reorder_account_command_real_execute (ApplicationCommand* base,
                                               GCancellable* cancellable,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	AccountsReorderAccountCommand * self;
	AccountsReorderAccountCommandExecuteData* _data_;
	AccountsReorderAccountCommand* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND, AccountsReorderAccountCommand);
	_data_ = g_slice_new0 (AccountsReorderAccountCommandExecuteData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_reorder_account_command_real_execute_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	accounts_reorder_account_command_real_execute_co (_data_);
}

static void
accounts_reorder_account_command_execute_finish (ApplicationCommand* base,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	AccountsReorderAccountCommandExecuteData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
accounts_reorder_account_command_real_execute_co (AccountsReorderAccountCommandExecuteData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	accounts_reorder_account_command_move_source (_data_->self, _data_->self->priv->target_index);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
accounts_reorder_account_command_real_undo_data_free (gpointer _data)
{
	AccountsReorderAccountCommandUndoData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (AccountsReorderAccountCommandUndoData, _data_);
}

static void
accounts_reorder_account_command_real_undo (ApplicationCommand* base,
                                            GCancellable* cancellable,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	AccountsReorderAccountCommand * self;
	AccountsReorderAccountCommandUndoData* _data_;
	AccountsReorderAccountCommand* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND, AccountsReorderAccountCommand);
	_data_ = g_slice_new0 (AccountsReorderAccountCommandUndoData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_reorder_account_command_real_undo_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	accounts_reorder_account_command_real_undo_co (_data_);
}

static void
accounts_reorder_account_command_undo_finish (ApplicationCommand* base,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	AccountsReorderAccountCommandUndoData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
accounts_reorder_account_command_real_undo_co (AccountsReorderAccountCommandUndoData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	accounts_reorder_account_command_move_source (_data_->self, _data_->self->priv->source_index);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gint
_geary_account_information_compare_ascending_gcompare_data_func (gconstpointer a,
                                                                 gconstpointer b,
                                                                 gpointer self)
{
	gint result;
	result = geary_account_information_compare_ascending ((GearyAccountInformation*) a, (GearyAccountInformation*) b);
	return result;
}

static void
accounts_reorder_account_command_move_source (AccountsReorderAccountCommand* self,
                                              gint destination)
{
	GeeList* accounts = NULL;
	AccountsManager* _tmp0_;
	GearyIterable* _tmp1_;
	GearyIterable* _tmp2_;
	GeeLinkedList* _tmp3_;
	GeeList* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	AccountsAccountListRow* _tmp7_;
	GearyAccountInformation* _tmp8_;
	GearyAccountInformation* _tmp9_;
	GeeList* _tmp10_;
	AccountsAccountListRow* _tmp11_;
	GearyAccountInformation* _tmp12_;
	GearyAccountInformation* _tmp13_;
	gint ord = 0;
	AccountsAccountListRow* _tmp28_;
	g_return_if_fail (ACCOUNTS_IS_REORDER_ACCOUNT_COMMAND (self));
	_tmp0_ = self->priv->manager;
	_tmp1_ = accounts_manager_iterable (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = geary_iterable_to_linked_list (_tmp2_, NULL, NULL, NULL);
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_LIST, GeeList);
	_g_object_unref0 (_tmp2_);
	accounts = _tmp4_;
	_tmp5_ = accounts;
	gee_list_sort (_tmp5_, _geary_account_information_compare_ascending_gcompare_data_func, NULL, NULL);
	_tmp6_ = accounts;
	_tmp7_ = self->priv->source;
	_tmp8_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp9_ = _tmp8_;
	gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection), _tmp9_);
	_tmp10_ = accounts;
	_tmp11_ = self->priv->source;
	_tmp12_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp13_ = _tmp12_;
	gee_list_insert (_tmp10_, destination, _tmp13_);
	ord = 0;
	{
		GeeList* _account_list = NULL;
		GeeList* _tmp14_;
		gint _account_size = 0;
		GeeList* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gint _account_index = 0;
		_tmp14_ = accounts;
		_account_list = _tmp14_;
		_tmp15_ = _account_list;
		_tmp16_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection));
		_tmp17_ = _tmp16_;
		_account_size = _tmp17_;
		_account_index = -1;
		while (TRUE) {
			gint _tmp18_;
			gint _tmp19_;
			GearyAccountInformation* account = NULL;
			GeeList* _tmp20_;
			gpointer _tmp21_;
			GearyAccountInformation* _tmp22_;
			gint _tmp23_;
			gint _tmp24_;
			gint _tmp27_;
			_account_index = _account_index + 1;
			_tmp18_ = _account_index;
			_tmp19_ = _account_size;
			if (!(_tmp18_ < _tmp19_)) {
				break;
			}
			_tmp20_ = _account_list;
			_tmp21_ = gee_list_get (_tmp20_, _account_index);
			account = (GearyAccountInformation*) _tmp21_;
			_tmp22_ = account;
			_tmp23_ = geary_account_information_get_ordinal (_tmp22_);
			_tmp24_ = _tmp23_;
			if (_tmp24_ != ord) {
				GearyAccountInformation* _tmp25_;
				GearyAccountInformation* _tmp26_;
				_tmp25_ = account;
				geary_account_information_set_ordinal (_tmp25_, ord);
				_tmp26_ = account;
				g_signal_emit_by_name (_tmp26_, "changed");
			}
			_tmp27_ = ord;
			ord = _tmp27_ + 1;
			_g_object_unref0 (account);
		}
	}
	_tmp28_ = self->priv->source;
	gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (accounts);
}

static void
accounts_reorder_account_command_class_init (AccountsReorderAccountCommandClass * klass,
                                             gpointer klass_data)
{
	accounts_reorder_account_command_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsReorderAccountCommand_private_offset);
	((ApplicationCommandClass *) klass)->execute = (void (*) (ApplicationCommand*, GCancellable*, GAsyncReadyCallback, gpointer)) accounts_reorder_account_command_real_execute;
	((ApplicationCommandClass *) klass)->execute_finish = (void (*) (ApplicationCommand*, GAsyncResult*, GError**)) accounts_reorder_account_command_execute_finish;
	((ApplicationCommandClass *) klass)->undo = (void (*) (ApplicationCommand*, GCancellable*, GAsyncReadyCallback, gpointer)) accounts_reorder_account_command_real_undo;
	((ApplicationCommandClass *) klass)->undo_finish = (void (*) (ApplicationCommand*, GAsyncResult*, GError**)) accounts_reorder_account_command_undo_finish;
	G_OBJECT_CLASS (klass)->finalize = accounts_reorder_account_command_finalize;
}

static void
accounts_reorder_account_command_instance_init (AccountsReorderAccountCommand * self,
                                                gpointer klass)
{
	self->priv = accounts_reorder_account_command_get_instance_private (self);
}

static void
accounts_reorder_account_command_finalize (GObject * obj)
{
	AccountsReorderAccountCommand * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_REORDER_ACCOUNT_COMMAND, AccountsReorderAccountCommand);
	_g_object_unref0 (self->priv->source);
	_g_object_unref0 (self->priv->manager);
	G_OBJECT_CLASS (accounts_reorder_account_command_parent_class)->finalize (obj);
}

static GType
accounts_reorder_account_command_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsReorderAccountCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_reorder_account_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsReorderAccountCommand), 0, (GInstanceInitFunc) accounts_reorder_account_command_instance_init, NULL };
	GType accounts_reorder_account_command_type_id;
	accounts_reorder_account_command_type_id = g_type_register_static (APPLICATION_TYPE_COMMAND, "AccountsReorderAccountCommand", &g_define_type_info, 0);
	AccountsReorderAccountCommand_private_offset = g_type_add_instance_private (accounts_reorder_account_command_type_id, sizeof (AccountsReorderAccountCommandPrivate));
	return accounts_reorder_account_command_type_id;
}

GType
accounts_reorder_account_command_get_type (void)
{
	static volatile gsize accounts_reorder_account_command_type_id__once = 0;
	if (g_once_init_enter (&accounts_reorder_account_command_type_id__once)) {
		GType accounts_reorder_account_command_type_id;
		accounts_reorder_account_command_type_id = accounts_reorder_account_command_get_type_once ();
		g_once_init_leave (&accounts_reorder_account_command_type_id__once, accounts_reorder_account_command_type_id);
	}
	return accounts_reorder_account_command_type_id__once;
}

static inline gpointer
accounts_remove_account_command_get_instance_private (AccountsRemoveAccountCommand* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsRemoveAccountCommand_private_offset);
}

AccountsRemoveAccountCommand*
accounts_remove_account_command_construct (GType object_type,
                                           GearyAccountInformation* account,
                                           AccountsManager* manager)
{
	AccountsRemoveAccountCommand * self = NULL;
	GearyAccountInformation* _tmp0_;
	AccountsManager* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (ACCOUNTS_IS_MANAGER (manager), NULL);
	self = (AccountsRemoveAccountCommand*) application_command_construct (object_type);
	_tmp0_ = _g_object_ref0 (account);
	_g_object_unref0 (self->priv->account);
	self->priv->account = _tmp0_;
	_tmp1_ = _g_object_ref0 (manager);
	_g_object_unref0 (self->priv->manager);
	self->priv->manager = _tmp1_;
	_tmp2_ = geary_account_information_get_display_name (account);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup_printf (_ ("Account “%s” removed"), _tmp3_);
	_tmp5_ = _tmp4_;
	application_command_set_executed_label (G_TYPE_CHECK_INSTANCE_CAST (self, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp5_);
	_g_free0 (_tmp5_);
	_tmp6_ = geary_account_information_get_display_name (account);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf (_ ("Account “%s” restored"), _tmp7_);
	_tmp9_ = _tmp8_;
	application_command_set_undone_label (G_TYPE_CHECK_INSTANCE_CAST (self, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp9_);
	_g_free0 (_tmp9_);
	return self;
}

AccountsRemoveAccountCommand*
accounts_remove_account_command_new (GearyAccountInformation* account,
                                     AccountsManager* manager)
{
	return accounts_remove_account_command_construct (ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND, account, manager);
}

static void
accounts_remove_account_command_real_execute_data_free (gpointer _data)
{
	AccountsRemoveAccountCommandExecuteData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (AccountsRemoveAccountCommandExecuteData, _data_);
}

static void
accounts_remove_account_command_real_execute (ApplicationCommand* base,
                                              GCancellable* cancellable,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	AccountsRemoveAccountCommand * self;
	AccountsRemoveAccountCommandExecuteData* _data_;
	AccountsRemoveAccountCommand* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND, AccountsRemoveAccountCommand);
	_data_ = g_slice_new0 (AccountsRemoveAccountCommandExecuteData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_remove_account_command_real_execute_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	accounts_remove_account_command_real_execute_co (_data_);
}

static void
accounts_remove_account_command_execute_finish (ApplicationCommand* base,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	AccountsRemoveAccountCommandExecuteData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
accounts_remove_account_command_execute_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	AccountsRemoveAccountCommandExecuteData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	accounts_remove_account_command_real_execute_co (_data_);
}

static gboolean
accounts_remove_account_command_real_execute_co (AccountsRemoveAccountCommandExecuteData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->manager;
	_data_->_tmp1_ = _data_->self->priv->account;
	_data_->_state_ = 1;
	accounts_manager_remove_account (_data_->_tmp0_, _data_->_tmp1_, _data_->cancellable, accounts_remove_account_command_execute_ready, _data_);
	return FALSE;
	_state_1:
	accounts_manager_remove_account_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
accounts_remove_account_command_real_undo_data_free (gpointer _data)
{
	AccountsRemoveAccountCommandUndoData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (AccountsRemoveAccountCommandUndoData, _data_);
}

static void
accounts_remove_account_command_real_undo (ApplicationCommand* base,
                                           GCancellable* cancellable,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	AccountsRemoveAccountCommand * self;
	AccountsRemoveAccountCommandUndoData* _data_;
	AccountsRemoveAccountCommand* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND, AccountsRemoveAccountCommand);
	_data_ = g_slice_new0 (AccountsRemoveAccountCommandUndoData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_remove_account_command_real_undo_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	accounts_remove_account_command_real_undo_co (_data_);
}

static void
accounts_remove_account_command_undo_finish (ApplicationCommand* base,
                                             GAsyncResult* _res_,
                                             GError** error)
{
	AccountsRemoveAccountCommandUndoData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
accounts_remove_account_command_undo_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_)
{
	AccountsRemoveAccountCommandUndoData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	accounts_remove_account_command_real_undo_co (_data_);
}

static gboolean
accounts_remove_account_command_real_undo_co (AccountsRemoveAccountCommandUndoData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->manager;
	_data_->_tmp1_ = _data_->self->priv->account;
	_data_->_state_ = 1;
	accounts_manager_restore_account (_data_->_tmp0_, _data_->_tmp1_, _data_->cancellable, accounts_remove_account_command_undo_ready, _data_);
	return FALSE;
	_state_1:
	accounts_manager_restore_account_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
accounts_remove_account_command_class_init (AccountsRemoveAccountCommandClass * klass,
                                            gpointer klass_data)
{
	accounts_remove_account_command_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsRemoveAccountCommand_private_offset);
	((ApplicationCommandClass *) klass)->execute = (void (*) (ApplicationCommand*, GCancellable*, GAsyncReadyCallback, gpointer)) accounts_remove_account_command_real_execute;
	((ApplicationCommandClass *) klass)->execute_finish = (void (*) (ApplicationCommand*, GAsyncResult*, GError**)) accounts_remove_account_command_execute_finish;
	((ApplicationCommandClass *) klass)->undo = (void (*) (ApplicationCommand*, GCancellable*, GAsyncReadyCallback, gpointer)) accounts_remove_account_command_real_undo;
	((ApplicationCommandClass *) klass)->undo_finish = (void (*) (ApplicationCommand*, GAsyncResult*, GError**)) accounts_remove_account_command_undo_finish;
	G_OBJECT_CLASS (klass)->finalize = accounts_remove_account_command_finalize;
}

static void
accounts_remove_account_command_instance_init (AccountsRemoveAccountCommand * self,
                                               gpointer klass)
{
	self->priv = accounts_remove_account_command_get_instance_private (self);
}

static void
accounts_remove_account_command_finalize (GObject * obj)
{
	AccountsRemoveAccountCommand * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_REMOVE_ACCOUNT_COMMAND, AccountsRemoveAccountCommand);
	_g_object_unref0 (self->priv->account);
	_g_object_unref0 (self->priv->manager);
	G_OBJECT_CLASS (accounts_remove_account_command_parent_class)->finalize (obj);
}

static GType
accounts_remove_account_command_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsRemoveAccountCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_remove_account_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsRemoveAccountCommand), 0, (GInstanceInitFunc) accounts_remove_account_command_instance_init, NULL };
	GType accounts_remove_account_command_type_id;
	accounts_remove_account_command_type_id = g_type_register_static (APPLICATION_TYPE_COMMAND, "AccountsRemoveAccountCommand", &g_define_type_info, 0);
	AccountsRemoveAccountCommand_private_offset = g_type_add_instance_private (accounts_remove_account_command_type_id, sizeof (AccountsRemoveAccountCommandPrivate));
	return accounts_remove_account_command_type_id;
}

GType
accounts_remove_account_command_get_type (void)
{
	static volatile gsize accounts_remove_account_command_type_id__once = 0;
	if (g_once_init_enter (&accounts_remove_account_command_type_id__once)) {
		GType accounts_remove_account_command_type_id;
		accounts_remove_account_command_type_id = accounts_remove_account_command_get_type_once ();
		g_once_init_leave (&accounts_remove_account_command_type_id__once, accounts_remove_account_command_type_id);
	}
	return accounts_remove_account_command_type_id__once;
}

