/* accounts-editor-add-pane.c generated by valac 0.56.19, the Vala compiler
 * generated from accounts-editor-add-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 "geary-engine.h"
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.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_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;
typedef struct _AccountsEditorAddPanePrivate AccountsEditorAddPanePrivate;

#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_ADD_PANE_ROW (accounts_add_pane_row_get_type ())
#define ACCOUNTS_ADD_PANE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow))
#define ACCOUNTS_ADD_PANE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRowClass))
#define ACCOUNTS_IS_ADD_PANE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_ADD_PANE_ROW))
#define ACCOUNTS_IS_ADD_PANE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_ADD_PANE_ROW))
#define ACCOUNTS_ADD_PANE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRowClass))

typedef struct _AccountsAddPaneRow AccountsAddPaneRow;
typedef struct _AccountsAddPaneRowClass AccountsAddPaneRowClass;

#define ACCOUNTS_TYPE_ENTRY_ROW (accounts_entry_row_get_type ())
#define ACCOUNTS_ENTRY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_ENTRY_ROW, AccountsEntryRow))
#define ACCOUNTS_ENTRY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_ENTRY_ROW, AccountsEntryRowClass))
#define ACCOUNTS_IS_ENTRY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_ENTRY_ROW))
#define ACCOUNTS_IS_ENTRY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_ENTRY_ROW))
#define ACCOUNTS_ENTRY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_ENTRY_ROW, AccountsEntryRowClass))

typedef struct _AccountsEntryRow AccountsEntryRow;
typedef struct _AccountsEntryRowClass AccountsEntryRowClass;

#define ACCOUNTS_TYPE_NAME_ROW (accounts_name_row_get_type ())
#define ACCOUNTS_NAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_NAME_ROW, AccountsNameRow))
#define ACCOUNTS_NAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_NAME_ROW, AccountsNameRowClass))
#define ACCOUNTS_IS_NAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_NAME_ROW))
#define ACCOUNTS_IS_NAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_NAME_ROW))
#define ACCOUNTS_NAME_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_NAME_ROW, AccountsNameRowClass))

typedef struct _AccountsNameRow AccountsNameRow;
typedef struct _AccountsNameRowClass AccountsNameRowClass;

#define ACCOUNTS_TYPE_EMAIL_ROW (accounts_email_row_get_type ())
#define ACCOUNTS_EMAIL_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EMAIL_ROW, AccountsEmailRow))
#define ACCOUNTS_EMAIL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_EMAIL_ROW, AccountsEmailRowClass))
#define ACCOUNTS_IS_EMAIL_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EMAIL_ROW))
#define ACCOUNTS_IS_EMAIL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_EMAIL_ROW))
#define ACCOUNTS_EMAIL_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_EMAIL_ROW, AccountsEmailRowClass))

typedef struct _AccountsEmailRow AccountsEmailRow;
typedef struct _AccountsEmailRowClass AccountsEmailRowClass;

#define ACCOUNTS_TYPE_HOSTNAME_ROW (accounts_hostname_row_get_type ())
#define ACCOUNTS_HOSTNAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_HOSTNAME_ROW, AccountsHostnameRow))
#define ACCOUNTS_HOSTNAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_HOSTNAME_ROW, AccountsHostnameRowClass))
#define ACCOUNTS_IS_HOSTNAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_HOSTNAME_ROW))
#define ACCOUNTS_IS_HOSTNAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_HOSTNAME_ROW))
#define ACCOUNTS_HOSTNAME_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_HOSTNAME_ROW, AccountsHostnameRowClass))

typedef struct _AccountsHostnameRow AccountsHostnameRow;
typedef struct _AccountsHostnameRowClass AccountsHostnameRowClass;

#define ACCOUNTS_TYPE_TRANSPORT_SECURITY_ROW (accounts_transport_security_row_get_type ())
#define ACCOUNTS_TRANSPORT_SECURITY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_TRANSPORT_SECURITY_ROW, AccountsTransportSecurityRow))
#define ACCOUNTS_TRANSPORT_SECURITY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_TRANSPORT_SECURITY_ROW, AccountsTransportSecurityRowClass))
#define ACCOUNTS_IS_TRANSPORT_SECURITY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_TRANSPORT_SECURITY_ROW))
#define ACCOUNTS_IS_TRANSPORT_SECURITY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_TRANSPORT_SECURITY_ROW))
#define ACCOUNTS_TRANSPORT_SECURITY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_TRANSPORT_SECURITY_ROW, AccountsTransportSecurityRowClass))

typedef struct _AccountsTransportSecurityRow AccountsTransportSecurityRow;
typedef struct _AccountsTransportSecurityRowClass AccountsTransportSecurityRowClass;

#define ACCOUNTS_TYPE_LOGIN_ROW (accounts_login_row_get_type ())
#define ACCOUNTS_LOGIN_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_LOGIN_ROW, AccountsLoginRow))
#define ACCOUNTS_LOGIN_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_LOGIN_ROW, AccountsLoginRowClass))
#define ACCOUNTS_IS_LOGIN_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_LOGIN_ROW))
#define ACCOUNTS_IS_LOGIN_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_LOGIN_ROW))
#define ACCOUNTS_LOGIN_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_LOGIN_ROW, AccountsLoginRowClass))

typedef struct _AccountsLoginRow AccountsLoginRow;
typedef struct _AccountsLoginRowClass AccountsLoginRowClass;

#define ACCOUNTS_TYPE_PASSWORD_ROW (accounts_password_row_get_type ())
#define ACCOUNTS_PASSWORD_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_PASSWORD_ROW, AccountsPasswordRow))
#define ACCOUNTS_PASSWORD_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_PASSWORD_ROW, AccountsPasswordRowClass))
#define ACCOUNTS_IS_PASSWORD_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_PASSWORD_ROW))
#define ACCOUNTS_IS_PASSWORD_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_PASSWORD_ROW))
#define ACCOUNTS_PASSWORD_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_PASSWORD_ROW, AccountsPasswordRowClass))

typedef struct _AccountsPasswordRow AccountsPasswordRow;
typedef struct _AccountsPasswordRowClass AccountsPasswordRowClass;

#define ACCOUNTS_TYPE_OUTGOING_AUTH_ROW (accounts_outgoing_auth_row_get_type ())
#define ACCOUNTS_OUTGOING_AUTH_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_OUTGOING_AUTH_ROW, AccountsOutgoingAuthRow))
#define ACCOUNTS_OUTGOING_AUTH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_OUTGOING_AUTH_ROW, AccountsOutgoingAuthRowClass))
#define ACCOUNTS_IS_OUTGOING_AUTH_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_OUTGOING_AUTH_ROW))
#define ACCOUNTS_IS_OUTGOING_AUTH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_OUTGOING_AUTH_ROW))
#define ACCOUNTS_OUTGOING_AUTH_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_OUTGOING_AUTH_ROW, AccountsOutgoingAuthRowClass))

typedef struct _AccountsOutgoingAuthRow AccountsOutgoingAuthRow;
typedef struct _AccountsOutgoingAuthRowClass AccountsOutgoingAuthRowClass;
enum  {
	ACCOUNTS_EDITOR_ADD_PANE_0_PROPERTY,
	ACCOUNTS_EDITOR_ADD_PANE_INITIAL_WIDGET_PROPERTY,
	ACCOUNTS_EDITOR_ADD_PANE_IS_OPERATION_RUNNING_PROPERTY,
	ACCOUNTS_EDITOR_ADD_PANE_OP_CANCELLABLE_PROPERTY,
	ACCOUNTS_EDITOR_ADD_PANE_EDITOR_PROPERTY,
	ACCOUNTS_EDITOR_ADD_PANE_NUM_PROPERTIES
};
static GParamSpec* accounts_editor_add_pane_properties[ACCOUNTS_EDITOR_ADD_PANE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define APPLICATION_TYPE_CONTROLLER (application_controller_get_type ())
#define APPLICATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), APPLICATION_TYPE_CONTROLLER, ApplicationController))
#define APPLICATION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), APPLICATION_TYPE_CONTROLLER, ApplicationControllerClass))
#define APPLICATION_IS_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), APPLICATION_TYPE_CONTROLLER))
#define APPLICATION_IS_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), APPLICATION_TYPE_CONTROLLER))
#define APPLICATION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), APPLICATION_TYPE_CONTROLLER, ApplicationControllerClass))

typedef struct _ApplicationController ApplicationController;
typedef struct _ApplicationControllerClass ApplicationControllerClass;

#define ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX (accounts_outgoing_auth_combo_box_get_type ())
#define ACCOUNTS_OUTGOING_AUTH_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, AccountsOutgoingAuthComboBox))
#define ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, AccountsOutgoingAuthComboBoxClass))
#define ACCOUNTS_IS_OUTGOING_AUTH_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX))
#define ACCOUNTS_IS_OUTGOING_AUTH_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX))
#define ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, AccountsOutgoingAuthComboBoxClass))

typedef struct _AccountsOutgoingAuthComboBox AccountsOutgoingAuthComboBox;
typedef struct _AccountsOutgoingAuthComboBoxClass AccountsOutgoingAuthComboBoxClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _AccountsEditorAddPaneValidateAccountData AccountsEditorAddPaneValidateAccountData;

#define ACCOUNTS_TYPE_TLS_COMBO_BOX (accounts_tls_combo_box_get_type ())
#define ACCOUNTS_TLS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_TLS_COMBO_BOX, AccountsTlsComboBox))
#define ACCOUNTS_TLS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_TLS_COMBO_BOX, AccountsTlsComboBoxClass))
#define ACCOUNTS_IS_TLS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_TLS_COMBO_BOX))
#define ACCOUNTS_IS_TLS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_TLS_COMBO_BOX))
#define ACCOUNTS_TLS_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_TLS_COMBO_BOX, AccountsTlsComboBoxClass))

typedef struct _AccountsTlsComboBox AccountsTlsComboBox;
typedef struct _AccountsTlsComboBoxClass AccountsTlsComboBoxClass;
typedef struct _Block41Data Block41Data;

#define ACCOUNTS_TYPE_AUTO_CONFIG (accounts_auto_config_get_type ())
#define ACCOUNTS_AUTO_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_AUTO_CONFIG, AccountsAutoConfig))
#define ACCOUNTS_AUTO_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_AUTO_CONFIG, AccountsAutoConfigClass))
#define ACCOUNTS_IS_AUTO_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_AUTO_CONFIG))
#define ACCOUNTS_IS_AUTO_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_AUTO_CONFIG))
#define ACCOUNTS_AUTO_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_AUTO_CONFIG, AccountsAutoConfigClass))

typedef struct _AccountsAutoConfig AccountsAutoConfig;
typedef struct _AccountsAutoConfigClass AccountsAutoConfigClass;

#define ACCOUNTS_TYPE_AUTO_CONFIG_ERROR (accounts_auto_config_error_get_type ())

#define ACCOUNTS_TYPE_AUTO_CONFIG_VALUES (accounts_auto_config_values_get_type ())
#define ACCOUNTS_AUTO_CONFIG_VALUES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_AUTO_CONFIG_VALUES, AccountsAutoConfigValues))
#define ACCOUNTS_AUTO_CONFIG_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_AUTO_CONFIG_VALUES, AccountsAutoConfigValuesClass))
#define ACCOUNTS_IS_AUTO_CONFIG_VALUES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_AUTO_CONFIG_VALUES))
#define ACCOUNTS_IS_AUTO_CONFIG_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_AUTO_CONFIG_VALUES))
#define ACCOUNTS_AUTO_CONFIG_VALUES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_AUTO_CONFIG_VALUES, AccountsAutoConfigValuesClass))

typedef struct _AccountsAutoConfigValues AccountsAutoConfigValues;
typedef struct _AccountsAutoConfigValuesClass AccountsAutoConfigValuesClass;
#define _accounts_auto_config_values_unref0(var) ((var == NULL) ? NULL : (var = (accounts_auto_config_values_unref (var), NULL)))
typedef struct _Block42Data Block42Data;
#define _accounts_auto_config_unref0(var) ((var == NULL) ? NULL : (var = (accounts_auto_config_unref (var), NULL)))
typedef struct _AccountsEditorRowPrivate AccountsEditorRowPrivate;
typedef struct _AccountsLabelledEditorRowPrivate AccountsLabelledEditorRowPrivate;
typedef struct _AccountsAddPaneRowPrivate AccountsAddPaneRowPrivate;
enum  {
	ACCOUNTS_ADD_PANE_ROW_0_PROPERTY,
	ACCOUNTS_ADD_PANE_ROW_VALUE_TYPE,
	ACCOUNTS_ADD_PANE_ROW_VALUE_DUP_FUNC,
	ACCOUNTS_ADD_PANE_ROW_VALUE_DESTROY_FUNC,
	ACCOUNTS_ADD_PANE_ROW_VALIDATOR_PROPERTY,
	ACCOUNTS_ADD_PANE_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_add_pane_row_properties[ACCOUNTS_ADD_PANE_ROW_NUM_PROPERTIES];
typedef struct _AccountsEntryRowPrivate AccountsEntryRowPrivate;
enum  {
	ACCOUNTS_ENTRY_ROW_0_PROPERTY,
	ACCOUNTS_ENTRY_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_entry_row_properties[ACCOUNTS_ENTRY_ROW_NUM_PROPERTIES];
typedef struct _AccountsNameRowPrivate AccountsNameRowPrivate;
enum  {
	ACCOUNTS_NAME_ROW_0_PROPERTY,
	ACCOUNTS_NAME_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_name_row_properties[ACCOUNTS_NAME_ROW_NUM_PROPERTIES];
typedef struct _AccountsEmailRowPrivate AccountsEmailRowPrivate;
enum  {
	ACCOUNTS_EMAIL_ROW_0_PROPERTY,
	ACCOUNTS_EMAIL_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_email_row_properties[ACCOUNTS_EMAIL_ROW_NUM_PROPERTIES];
typedef struct _AccountsLoginRowPrivate AccountsLoginRowPrivate;
enum  {
	ACCOUNTS_LOGIN_ROW_0_PROPERTY,
	ACCOUNTS_LOGIN_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_login_row_properties[ACCOUNTS_LOGIN_ROW_NUM_PROPERTIES];
typedef struct _AccountsPasswordRowPrivate AccountsPasswordRowPrivate;
enum  {
	ACCOUNTS_PASSWORD_ROW_0_PROPERTY,
	ACCOUNTS_PASSWORD_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_password_row_properties[ACCOUNTS_PASSWORD_ROW_NUM_PROPERTIES];
typedef struct _AccountsHostnameRowPrivate AccountsHostnameRowPrivate;
enum  {
	ACCOUNTS_HOSTNAME_ROW_0_PROPERTY,
	ACCOUNTS_HOSTNAME_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_hostname_row_properties[ACCOUNTS_HOSTNAME_ROW_NUM_PROPERTIES];
typedef struct _AccountsTransportSecurityRowPrivate AccountsTransportSecurityRowPrivate;
enum  {
	ACCOUNTS_TRANSPORT_SECURITY_ROW_0_PROPERTY,
	ACCOUNTS_TRANSPORT_SECURITY_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_transport_security_row_properties[ACCOUNTS_TRANSPORT_SECURITY_ROW_NUM_PROPERTIES];
typedef struct _AccountsOutgoingAuthRowPrivate AccountsOutgoingAuthRowPrivate;
enum  {
	ACCOUNTS_OUTGOING_AUTH_ROW_0_PROPERTY,
	ACCOUNTS_OUTGOING_AUTH_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_outgoing_auth_row_properties[ACCOUNTS_OUTGOING_AUTH_ROW_NUM_PROPERTIES];

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 _AccountsEditorAddPane {
	GtkGrid parent_instance;
	AccountsEditorAddPanePrivate * priv;
};

struct _AccountsEditorAddPaneClass {
	GtkGridClass parent_class;
};

struct _AccountsEditorAddPanePrivate {
	GCancellable* _op_cancellable;
	AccountsEditor* _editor;
	GearyServiceProvider provider;
	AccountsManager* accounts;
	GearyEngine* engine;
	GtkHeaderBar* header;
	GtkStack* stack;
	GtkAdjustment* pane_adjustment;
	GtkListBox* details_list;
	GtkListBox* receiving_list;
	GtkListBox* sending_list;
	GtkButton* action_button;
	GtkButton* back_button;
	GtkSpinner* action_spinner;
	AccountsNameRow* real_name;
	AccountsEmailRow* email;
	gchar* last_valid_email;
	gchar* last_valid_hostname;
	GCancellable* auto_config_cancellable;
	AccountsHostnameRow* imap_hostname;
	AccountsTransportSecurityRow* imap_tls;
	AccountsLoginRow* imap_login;
	AccountsPasswordRow* imap_password;
	AccountsHostnameRow* smtp_hostname;
	AccountsTransportSecurityRow* smtp_tls;
	AccountsOutgoingAuthRow* smtp_auth;
	AccountsLoginRow* smtp_login;
	AccountsPasswordRow* smtp_password;
	gboolean controls_valid;
};

struct _AccountsEditorAddPaneValidateAccountData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsEditorAddPane* self;
	GCancellable* cancellable;
	gboolean is_valid;
	gchar* message;
	GtkWidget* to_focus;
	GearyAccountInformation* account;
	AccountsManager* _tmp0_;
	AccountsNameRow* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	AccountsEmailRow* _tmp8_;
	gconstpointer _tmp9_;
	gconstpointer _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	GearyRFC822MailboxAddress* _tmp15_;
	GearyRFC822MailboxAddress* _tmp16_;
	GearyAccountInformation* _tmp17_;
	GearyAccountInformation* _tmp18_;
	GearyAccountInformation* _tmp19_;
	GearyServiceInformation* _tmp20_;
	GearyServiceInformation* _tmp21_;
	GearyAccountInformation* _tmp22_;
	GearyServiceInformation* _tmp23_;
	GearyServiceInformation* _tmp24_;
	GearyAccountInformation* _tmp25_;
	gboolean _tmp26_;
	AccountsHostnameRow* _tmp27_;
	gboolean imap_valid;
	gboolean smtp_valid;
	GearyEngine* _tmp28_;
	GearyAccountInformation* _tmp29_;
	GearyAccountInformation* _tmp30_;
	GearyServiceInformation* _tmp31_;
	GearyServiceInformation* _tmp32_;
	GError* err;
	GError* _tmp33_;
	const gchar* _tmp34_;
	AccountsLoginRow* _tmp35_;
	gconstpointer _tmp36_;
	gconstpointer _tmp37_;
	GtkWidget* _tmp38_;
	gchar* _tmp39_;
	GError* _vala1_err;
	GError* _tmp40_;
	const gchar* _tmp41_;
	GError* _vala2_err;
	GError* _tmp42_;
	const gchar* _tmp43_;
	GError* _vala3_err;
	GearyErrorContext* context;
	GError* _tmp44_;
	GearyErrorContext* _tmp45_;
	GearyErrorContext* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	AccountsTransportSecurityRow* _tmp49_;
	AccountsHostnameRow* _tmp50_;
	gconstpointer _tmp51_;
	gconstpointer _tmp52_;
	GtkWidget* _tmp53_;
	gchar* _tmp54_;
	GearyEngine* _tmp55_;
	GearyAccountInformation* _tmp56_;
	GearyAccountInformation* _tmp57_;
	GearyServiceInformation* _tmp58_;
	GearyServiceInformation* _tmp59_;
	GearyAccountInformation* _tmp60_;
	GearyServiceInformation* _tmp61_;
	GearyServiceInformation* _tmp62_;
	GearyCredentials* _tmp63_;
	GearyCredentials* _tmp64_;
	GError* _vala4_err;
	GError* _tmp65_;
	const gchar* _tmp66_;
	AccountsOutgoingAuthRow* _tmp67_;
	gconstpointer _tmp68_;
	gconstpointer _tmp69_;
	AccountsLoginRow* _tmp70_;
	gconstpointer _tmp71_;
	gconstpointer _tmp72_;
	GtkWidget* _tmp73_;
	gchar* _tmp74_;
	GError* _vala5_err;
	GError* _tmp75_;
	const gchar* _tmp76_;
	GError* _vala6_err;
	GearyErrorContext* _vala1_context;
	GError* _tmp77_;
	GearyErrorContext* _tmp78_;
	GearyErrorContext* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	AccountsTransportSecurityRow* _tmp82_;
	AccountsHostnameRow* _tmp83_;
	gconstpointer _tmp84_;
	gconstpointer _tmp85_;
	GtkWidget* _tmp86_;
	gchar* _tmp87_;
	gboolean _tmp88_;
	GearyEngine* _tmp89_;
	GearyAccountInformation* _tmp90_;
	GearyAccountInformation* _tmp91_;
	GearyServiceInformation* _tmp92_;
	GearyServiceInformation* _tmp93_;
	GError* _vala7_err;
	GError* _tmp94_;
	const gchar* _tmp95_;
	AccountsEmailRow* _tmp96_;
	gconstpointer _tmp97_;
	gconstpointer _tmp98_;
	GtkWidget* _tmp99_;
	gchar* _tmp100_;
	GError* _vala8_err;
	GError* _tmp101_;
	const gchar* _tmp102_;
	GError* _vala9_err;
	GearyErrorContext* _vala2_context;
	GError* _tmp103_;
	GearyErrorContext* _tmp104_;
	GearyErrorContext* _tmp105_;
	gchar* _tmp106_;
	gchar* _tmp107_;
	gchar* _tmp108_;
	AccountsManager* _tmp109_;
	GearyAccountInformation* _tmp110_;
	AccountsEditor* _tmp111_;
	AccountsEditor* _tmp112_;
	GError* _vala10_err;
	GError* _tmp113_;
	const gchar* _tmp114_;
	gchar* _tmp115_;
	GearyAccountInformation* _tmp116_;
	guint _tmp117_;
	GtkWidget* _tmp118_;
	GtkWidget* _tmp119_;
	const gchar* _tmp120_;
	AccountsEditor* _tmp121_;
	AccountsEditor* _tmp122_;
	const gchar* _tmp123_;
	gchar* _tmp124_;
	gchar* _tmp125_;
	ComponentsInAppNotification* _tmp126_;
	ComponentsInAppNotification* _tmp127_;
	GError* _inner_error0_;
};

struct _Block41Data {
	int _ref_count_;
	AccountsEditorAddPane* self;
	gboolean controls_valid;
};

typedef enum  {
	ACCOUNTS_AUTO_CONFIG_ERROR_ERROR
} AccountsAutoConfigError;
#define ACCOUNTS_AUTO_CONFIG_ERROR accounts_auto_config_error_quark ()

struct _Block42Data {
	int _ref_count_;
	AccountsEditorAddPane* self;
	gchar* hostname;
	AccountsAutoConfig* auto_config;
};

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 _AccountsAddPaneRow {
	AccountsLabelledEditorRow parent_instance;
	AccountsAddPaneRowPrivate * priv;
};

struct _AccountsAddPaneRowClass {
	AccountsLabelledEditorRowClass parent_class;
};

struct _AccountsAddPaneRowPrivate {
	GType value_type;
	GBoxedCopyFunc value_dup_func;
	GDestroyNotify value_destroy_func;
	ComponentsValidator* _validator;
};

struct _AccountsEntryRow {
	AccountsAddPaneRow parent_instance;
	AccountsEntryRowPrivate * priv;
};

struct _AccountsEntryRowClass {
	AccountsAddPaneRowClass parent_class;
};

struct _AccountsEntryRowPrivate {
	ComponentsEntryUndo* undo;
};

struct _AccountsNameRow {
	AccountsEntryRow parent_instance;
	AccountsNameRowPrivate * priv;
};

struct _AccountsNameRowClass {
	AccountsEntryRowClass parent_class;
};

struct _AccountsEmailRow {
	AccountsEntryRow parent_instance;
	AccountsEmailRowPrivate * priv;
};

struct _AccountsEmailRowClass {
	AccountsEntryRowClass parent_class;
};

struct _AccountsLoginRow {
	AccountsEntryRow parent_instance;
	AccountsLoginRowPrivate * priv;
};

struct _AccountsLoginRowClass {
	AccountsEntryRowClass parent_class;
};

struct _AccountsPasswordRow {
	AccountsEntryRow parent_instance;
	AccountsPasswordRowPrivate * priv;
};

struct _AccountsPasswordRowClass {
	AccountsEntryRowClass parent_class;
};

struct _AccountsHostnameRow {
	AccountsEntryRow parent_instance;
	AccountsHostnameRowPrivate * priv;
};

struct _AccountsHostnameRowClass {
	AccountsEntryRowClass parent_class;
};

struct _AccountsHostnameRowPrivate {
	GearyProtocol type;
};

struct _AccountsTransportSecurityRow {
	AccountsLabelledEditorRow parent_instance;
	AccountsTransportSecurityRowPrivate * priv;
};

struct _AccountsTransportSecurityRowClass {
	AccountsLabelledEditorRowClass parent_class;
};

struct _AccountsOutgoingAuthRow {
	AccountsLabelledEditorRow parent_instance;
	AccountsOutgoingAuthRowPrivate * priv;
};

struct _AccountsOutgoingAuthRowClass {
	AccountsLabelledEditorRowClass parent_class;
};

static gint AccountsEditorAddPane_private_offset;
static gpointer accounts_editor_add_pane_parent_class = NULL;
static AccountsEditorPaneIface * accounts_editor_add_pane_accounts_editor_pane_parent_iface = NULL;
static gint AccountsAddPaneRow_private_offset;
static gpointer accounts_add_pane_row_parent_class = NULL;
static gint AccountsEntryRow_private_offset;
static gpointer accounts_entry_row_parent_class = NULL;
static gpointer accounts_name_row_parent_class = NULL;
static gpointer accounts_email_row_parent_class = NULL;
static gpointer accounts_login_row_parent_class = NULL;
static gpointer accounts_password_row_parent_class = NULL;
static gint AccountsHostnameRow_private_offset;
static gpointer accounts_hostname_row_parent_class = NULL;
static gpointer accounts_transport_security_row_parent_class = NULL;
static gpointer accounts_outgoing_auth_row_parent_class = NULL;

VALA_EXTERN GType accounts_editor_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_editor_add_pane_get_type (void) G_GNUC_CONST ;
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_add_pane_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_entry_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_name_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_email_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_hostname_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_transport_security_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_login_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_password_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_outgoing_auth_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gconstpointer accounts_labelled_editor_row_get_value (AccountsLabelledEditorRow* self);
static void accounts_editor_add_pane_update_operation_ui (AccountsEditorAddPane* self,
                                                   gboolean is_running);
VALA_EXTERN AccountsEmailRow* accounts_email_row_new (void);
VALA_EXTERN AccountsEmailRow* accounts_email_row_construct (GType object_type);
VALA_EXTERN AccountsHostnameRow* accounts_hostname_row_new (GearyProtocol type);
VALA_EXTERN AccountsHostnameRow* accounts_hostname_row_construct (GType object_type,
                                                      GearyProtocol type);
VALA_EXTERN AccountsTransportSecurityRow* accounts_transport_security_row_new (void);
VALA_EXTERN AccountsTransportSecurityRow* accounts_transport_security_row_construct (GType object_type);
VALA_EXTERN AccountsLoginRow* accounts_login_row_new (void);
VALA_EXTERN AccountsLoginRow* accounts_login_row_construct (GType object_type);
VALA_EXTERN AccountsPasswordRow* accounts_password_row_new (void);
VALA_EXTERN AccountsPasswordRow* accounts_password_row_construct (GType object_type);
VALA_EXTERN AccountsOutgoingAuthRow* accounts_outgoing_auth_row_new (void);
VALA_EXTERN AccountsOutgoingAuthRow* accounts_outgoing_auth_row_construct (GType object_type);
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 void accounts_editor_pane_set_editor (AccountsEditorPane* self,
                                      AccountsEditor* value);
VALA_EXTERN GType application_controller_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ApplicationController* application_client_get_controller (ApplicationClient* self);
VALA_EXTERN AccountsManager* application_controller_get_account_manager (ApplicationController* 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);
VALA_EXTERN AccountsNameRow* accounts_name_row_new (const gchar* default_name);
VALA_EXTERN AccountsNameRow* accounts_name_row_construct (GType object_type,
                                              const gchar* default_name);
VALA_EXTERN ComponentsValidator* accounts_add_pane_row_get_validator (AccountsAddPaneRow* self);
static void accounts_editor_add_pane_on_validated (AccountsEditorAddPane* self,
                                            ComponentsValidatorTrigger reason);
static void _accounts_editor_add_pane_on_validated_components_validator_state_changed (ComponentsValidator* _sender,
                                                                                ComponentsValidatorTrigger reason,
                                                                                ComponentsValidatorValidity prev_state,
                                                                                gpointer self);
static void accounts_editor_add_pane_on_activated (AccountsEditorAddPane* self);
static void _accounts_editor_add_pane_on_activated_gtk_entry_activate (GtkEntry* _sender,
                                                                gpointer self);
static void accounts_editor_add_pane_on_email_changed (AccountsEditorAddPane* self);
static void _accounts_editor_add_pane_on_email_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                      gpointer self);
VALA_EXTERN GType accounts_outgoing_auth_combo_box_get_type (void) G_GNUC_CONST ;
static void accounts_editor_add_pane_on_smtp_auth_changed (AccountsEditorAddPane* self);
static void _accounts_editor_add_pane_on_smtp_auth_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                           gpointer self);
static GtkHeaderBar* accounts_editor_add_pane_real_get_header (AccountsEditorPane* base);
static void accounts_editor_add_pane_validate_account_data_free (gpointer _data);
static void accounts_editor_add_pane_validate_account (AccountsEditorAddPane* self,
                                                GCancellable* cancellable,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static void accounts_editor_add_pane_validate_account_finish (AccountsEditorAddPane* self,
                                                       GAsyncResult* _res_);
static gboolean accounts_editor_add_pane_validate_account_co (AccountsEditorAddPaneValidateAccountData* _data_);
VALA_EXTERN void accounts_editor_pane_set_is_operation_running (AccountsEditorPane* self,
                                                    gboolean value);
static void accounts_editor_add_pane_validate_account_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
static GearyServiceInformation* accounts_editor_add_pane_new_imap_service (AccountsEditorAddPane* self);
static GearyServiceInformation* accounts_editor_add_pane_new_smtp_service (AccountsEditorAddPane* self);
static void accounts_editor_add_pane_on_untrusted_host (AccountsEditorAddPane* self,
                                                 GearyAccountInformation* account,
                                                 GearyServiceInformation* service,
                                                 GearyEndpoint* endpoint,
                                                 GTlsConnection* cx);
static void _accounts_editor_add_pane_on_untrusted_host_geary_account_information_untrusted_host (GearyAccountInformation* _sender,
                                                                                           GearyServiceInformation* service,
                                                                                           GearyEndpoint* endpoint,
                                                                                           GTlsConnection* cx,
                                                                                           gpointer self);
VALA_EXTERN void accounts_outgoing_auth_combo_box_set_source (AccountsOutgoingAuthComboBox* self,
                                                  GearyCredentialsRequirement value);
VALA_EXTERN AccountsEditor* accounts_editor_pane_get_editor (AccountsEditorPane* self);
VALA_EXTERN void accounts_editor_pop (AccountsEditor* self);
VALA_EXTERN void accounts_editor_add_notification (AccountsEditor* self,
                                       ComponentsInAppNotification* notification);
VALA_EXTERN GType accounts_tls_combo_box_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GearyTlsNegotiationMethod accounts_tls_combo_box_get_method (AccountsTlsComboBox* self);
VALA_EXTERN GearyCredentialsRequirement accounts_outgoing_auth_combo_box_get_source (AccountsOutgoingAuthComboBox* self);
static void accounts_editor_add_pane_check_validation (AccountsEditorAddPane* self);
static Block41Data* block41_data_ref (Block41Data* _data41_);
static void block41_data_unref (void * _userdata_);
static void ____lambda73_ (Block41Data* _data41_,
                    GtkWidget* child);
static void _____lambda73__gtk_callback (GtkWidget* widget,
                                  gpointer self);
static void accounts_editor_add_pane_switch_to_user_settings (AccountsEditorAddPane* self);
static void accounts_editor_add_pane_switch_to_server_settings (AccountsEditorAddPane* self);
VALA_EXTERN gpointer accounts_auto_config_ref (gpointer instance);
VALA_EXTERN void accounts_auto_config_unref (gpointer instance);
VALA_EXTERN GParamSpec* accounts_param_spec_auto_config (const gchar* name,
                                             const gchar* nick,
                                             const gchar* blurb,
                                             GType object_type,
                                             GParamFlags flags);
VALA_EXTERN void accounts_value_set_auto_config (GValue* value,
                                     gpointer v_object);
VALA_EXTERN void accounts_value_take_auto_config (GValue* value,
                                      gpointer v_object);
VALA_EXTERN gpointer accounts_value_get_auto_config (const GValue* value);
VALA_EXTERN GType accounts_auto_config_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GQuark accounts_auto_config_error_quark (void);
VALA_EXTERN GType accounts_auto_config_error_get_type (void) G_GNUC_CONST ;
static void accounts_editor_add_pane_set_server_settings_from_autoconfig (AccountsEditorAddPane* self,
                                                                   AccountsAutoConfig* auto_config,
                                                                   GAsyncResult* res,
                                                                   GError** error);
VALA_EXTERN gpointer accounts_auto_config_values_ref (gpointer instance);
VALA_EXTERN void accounts_auto_config_values_unref (gpointer instance);
VALA_EXTERN GParamSpec* accounts_param_spec_auto_config_values (const gchar* name,
                                                    const gchar* nick,
                                                    const gchar* blurb,
                                                    GType object_type,
                                                    GParamFlags flags);
VALA_EXTERN void accounts_value_set_auto_config_values (GValue* value,
                                            gpointer v_object);
VALA_EXTERN void accounts_value_take_auto_config_values (GValue* value,
                                             gpointer v_object);
VALA_EXTERN gpointer accounts_value_get_auto_config_values (const GValue* value);
VALA_EXTERN GType accounts_auto_config_values_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void accounts_auto_config_get_config (AccountsAutoConfig* self,
                                      const gchar* hostname,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN AccountsAutoConfigValues* accounts_auto_config_get_config_finish (AccountsAutoConfig* self,
                                                                  GAsyncResult* _res_,
                                                                  GError** error);
VALA_EXTERN const gchar* accounts_auto_config_values_get_imap_server (AccountsAutoConfigValues* self);
VALA_EXTERN const gchar* accounts_auto_config_values_get_imap_port (AccountsAutoConfigValues* self);
VALA_EXTERN const gchar* accounts_auto_config_values_get_smtp_server (AccountsAutoConfigValues* self);
VALA_EXTERN const gchar* accounts_auto_config_values_get_smtp_port (AccountsAutoConfigValues* self);
VALA_EXTERN GearyTlsNegotiationMethod accounts_auto_config_values_get_imap_tls_method (AccountsAutoConfigValues* self);
VALA_EXTERN void accounts_tls_combo_box_set_method (AccountsTlsComboBox* self,
                                        GearyTlsNegotiationMethod value);
VALA_EXTERN GearyTlsNegotiationMethod accounts_auto_config_values_get_smtp_tls_method (AccountsAutoConfigValues* self);
VALA_EXTERN const gchar* accounts_auto_config_values_get_id (AccountsAutoConfigValues* self);
static void accounts_editor_add_pane_set_server_settings_from_hostname (AccountsEditorAddPane* self,
                                                                 const gchar* hostname);
static void accounts_editor_add_pane_add_goa_account (AccountsEditorAddPane* self);
VALA_EXTERN GCancellable* accounts_editor_pane_get_op_cancellable (AccountsEditorPane* self);
static void __lambda76_ (AccountsEditorAddPane* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda76__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static Block42Data* block42_data_ref (Block42Data* _data42_);
static void block42_data_unref (void * _userdata_);
VALA_EXTERN AccountsAutoConfig* accounts_auto_config_new (GCancellable* auto_config_cancellable);
VALA_EXTERN AccountsAutoConfig* accounts_auto_config_construct (GType object_type,
                                                    GCancellable* auto_config_cancellable);
static void __lambda74_ (Block42Data* _data42_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda74__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
VALA_EXTERN void accounts_editor_prompt_pin_certificate (AccountsEditor* self,
                                             GearyAccountInformation* account,
                                             GearyServiceInformation* service,
                                             GearyEndpoint* endpoint,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN void accounts_editor_prompt_pin_certificate_finish (AccountsEditor* self,
                                                    GAsyncResult* _res_,
                                                    GError** error);
static void __lambda75_ (AccountsEditorAddPane* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda75__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void accounts_editor_add_pane_on_action_button_clicked (AccountsEditorAddPane* self);
static void _accounts_editor_add_pane_on_action_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void accounts_editor_add_pane_on_back_button_clicked (AccountsEditorAddPane* self);
static void _accounts_editor_add_pane_on_back_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static gboolean accounts_editor_add_pane_on_list_keynav_failed (AccountsEditorAddPane* self,
                                                         GtkWidget* widget,
                                                         GtkDirectionType direction);
static gboolean _accounts_editor_add_pane_on_list_keynav_failed_gtk_widget_keynav_failed (GtkWidget* _sender,
                                                                                   GtkDirectionType direction,
                                                                                   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_op_cancellable (AccountsEditorPane* self,
                                              GCancellable* value);
static void accounts_editor_add_pane_finalize (GObject * obj);
static GType accounts_editor_add_pane_get_type_once (void);
static void _vala_accounts_editor_add_pane_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_accounts_editor_add_pane_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);
VALA_EXTERN void accounts_add_pane_row_set_validator (AccountsAddPaneRow* self,
                                          ComponentsValidator* value);
VALA_EXTERN AccountsAddPaneRow* accounts_add_pane_row_construct (GType object_type,
                                                     GType value_type,
                                                     GBoxedCopyFunc value_dup_func,
                                                     GDestroyNotify value_destroy_func,
                                                     const gchar* label,
                                                     gconstpointer value);
VALA_EXTERN AccountsLabelledEditorRow* accounts_labelled_editor_row_new (GType panetype_type,
                                                             GBoxedCopyFunc panetype_dup_func,
                                                             GDestroyNotify panetype_destroy_func,
                                                             GType v_type,
                                                             GBoxedCopyFunc v_dup_func,
                                                             GDestroyNotify v_destroy_func,
                                                             const gchar* label,
                                                             gconstpointer value);
VALA_EXTERN AccountsLabelledEditorRow* accounts_labelled_editor_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,
                                                                   const gchar* label,
                                                                   gconstpointer value);
static void accounts_add_pane_row_finalize (GObject * obj);
static GType accounts_add_pane_row_get_type_once (void);
static void _vala_accounts_add_pane_row_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_accounts_add_pane_row_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);
VALA_EXTERN AccountsEntryRow* accounts_entry_row_construct (GType object_type,
                                                const gchar* label,
                                                const gchar* initial_value,
                                                const gchar* placeholder);
static gboolean accounts_entry_row_real_focus (GtkWidget* base,
                                        GtkDirectionType direction);
static void accounts_entry_row_finalize (GObject * obj);
static GType accounts_entry_row_get_type_once (void);
static GType accounts_name_row_get_type_once (void);
static GType accounts_email_row_get_type_once (void);
static GType accounts_login_row_get_type_once (void);
static GType accounts_password_row_get_type_once (void);
static void accounts_hostname_row_finalize (GObject * obj);
static GType accounts_hostname_row_get_type_once (void);
VALA_EXTERN AccountsTlsComboBox* accounts_tls_combo_box_new (void);
VALA_EXTERN AccountsTlsComboBox* accounts_tls_combo_box_construct (GType object_type);
VALA_EXTERN const gchar* accounts_tls_combo_box_get_label (AccountsTlsComboBox* self);
static GType accounts_transport_security_row_get_type_once (void);
VALA_EXTERN AccountsOutgoingAuthComboBox* accounts_outgoing_auth_combo_box_new (void);
VALA_EXTERN AccountsOutgoingAuthComboBox* accounts_outgoing_auth_combo_box_construct (GType object_type);
VALA_EXTERN const gchar* accounts_outgoing_auth_combo_box_get_label (AccountsOutgoingAuthComboBox* self);
static GType accounts_outgoing_auth_row_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
accounts_editor_add_pane_get_instance_private (AccountsEditorAddPane* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsEditorAddPane_private_offset);
}

static GtkWidget*
accounts_editor_add_pane_real_get_initial_widget (AccountsEditorPane* base)
{
	GtkWidget* result;
	AccountsEditorAddPane* self;
	AccountsNameRow* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	_tmp0_ = self->priv->real_name;
	_tmp1_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp2_ = _tmp1_;
	result = G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _tmp2_, gtk_widget_get_type (), GtkWidget);
	return result;
}

static gboolean
accounts_editor_add_pane_real_get_is_operation_running (AccountsEditorPane* base)
{
	gboolean result;
	AccountsEditorAddPane* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	_tmp0_ = gtk_widget_get_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp1_ = _tmp0_;
	result = !_tmp1_;
	return result;
}

static void
accounts_editor_add_pane_real_set_is_operation_running (AccountsEditorPane* base,
                                                        gboolean value)
{
	AccountsEditorAddPane* self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	accounts_editor_add_pane_update_operation_ui (self, value);
	g_object_notify_by_pspec ((GObject *) self, accounts_editor_add_pane_properties[ACCOUNTS_EDITOR_ADD_PANE_IS_OPERATION_RUNNING_PROPERTY]);
}

static GCancellable*
accounts_editor_add_pane_real_get_op_cancellable (AccountsEditorPane* base)
{
	GCancellable* result;
	AccountsEditorAddPane* self;
	GCancellable* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	_tmp0_ = self->priv->_op_cancellable;
	result = _tmp0_;
	return result;
}

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

static void
accounts_editor_add_pane_real_set_op_cancellable (AccountsEditorPane* base,
                                                  GCancellable* value)
{
	AccountsEditorAddPane* self;
	GCancellable* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	old_value = accounts_editor_add_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_add_pane_properties[ACCOUNTS_EDITOR_ADD_PANE_OP_CANCELLABLE_PROPERTY]);
	}
}

static AccountsEditor*
accounts_editor_add_pane_real_get_editor (AccountsEditorPane* base)
{
	AccountsEditor* result;
	AccountsEditorAddPane* self;
	AccountsEditor* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	_tmp0_ = self->priv->_editor;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_add_pane_real_set_editor (AccountsEditorPane* base,
                                          AccountsEditor* value)
{
	AccountsEditorAddPane* self;
	AccountsEditor* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	old_value = accounts_editor_add_pane_real_get_editor (base);
	if (old_value != value) {
		self->priv->_editor = value;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_add_pane_properties[ACCOUNTS_EDITOR_ADD_PANE_EDITOR_PROPERTY]);
	}
}

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 void
_accounts_editor_add_pane_on_validated_components_validator_state_changed (ComponentsValidator* _sender,
                                                                           ComponentsValidatorTrigger reason,
                                                                           ComponentsValidatorValidity prev_state,
                                                                           gpointer self)
{
	accounts_editor_add_pane_on_validated ((AccountsEditorAddPane*) self, reason);
}

static void
_accounts_editor_add_pane_on_activated_gtk_entry_activate (GtkEntry* _sender,
                                                           gpointer self)
{
	accounts_editor_add_pane_on_activated ((AccountsEditorAddPane*) self);
}

static void
_accounts_editor_add_pane_on_email_changed_gtk_editable_changed (GtkEditable* _sender,
                                                                 gpointer self)
{
	accounts_editor_add_pane_on_email_changed ((AccountsEditorAddPane*) self);
}

static void
_accounts_editor_add_pane_on_smtp_auth_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                      gpointer self)
{
	accounts_editor_add_pane_on_smtp_auth_changed ((AccountsEditorAddPane*) self);
}

AccountsEditorAddPane*
accounts_editor_add_pane_construct (GType object_type,
                                    AccountsEditor* editor)
{
	AccountsEditorAddPane * self = NULL;
	ApplicationClient* _tmp0_;
	ApplicationClient* _tmp1_;
	ApplicationController* _tmp2_;
	ApplicationController* _tmp3_;
	AccountsManager* _tmp4_;
	AccountsManager* _tmp5_;
	AccountsManager* _tmp6_;
	ApplicationClient* _tmp7_;
	ApplicationClient* _tmp8_;
	GearyEngine* _tmp9_;
	GearyEngine* _tmp10_;
	GearyEngine* _tmp11_;
	GtkStack* _tmp12_;
	GtkAdjustment* _tmp13_;
	GtkListBox* _tmp14_;
	GtkListBox* _tmp15_;
	GtkListBox* _tmp16_;
	AccountsManager* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	AccountsNameRow* _tmp20_;
	GtkListBox* _tmp21_;
	AccountsNameRow* _tmp22_;
	GtkListBox* _tmp23_;
	AccountsEmailRow* _tmp24_;
	AccountsNameRow* _tmp25_;
	ComponentsValidator* _tmp26_;
	ComponentsValidator* _tmp27_;
	AccountsNameRow* _tmp28_;
	gconstpointer _tmp29_;
	gconstpointer _tmp30_;
	AccountsEmailRow* _tmp31_;
	ComponentsValidator* _tmp32_;
	ComponentsValidator* _tmp33_;
	AccountsEmailRow* _tmp34_;
	gconstpointer _tmp35_;
	gconstpointer _tmp36_;
	AccountsEmailRow* _tmp37_;
	gconstpointer _tmp38_;
	gconstpointer _tmp39_;
	AccountsHostnameRow* _tmp40_;
	ComponentsValidator* _tmp41_;
	ComponentsValidator* _tmp42_;
	AccountsHostnameRow* _tmp43_;
	gconstpointer _tmp44_;
	gconstpointer _tmp45_;
	AccountsTransportSecurityRow* _tmp46_;
	AccountsLoginRow* _tmp47_;
	ComponentsValidator* _tmp48_;
	ComponentsValidator* _tmp49_;
	AccountsLoginRow* _tmp50_;
	gconstpointer _tmp51_;
	gconstpointer _tmp52_;
	AccountsPasswordRow* _tmp53_;
	ComponentsValidator* _tmp54_;
	ComponentsValidator* _tmp55_;
	AccountsPasswordRow* _tmp56_;
	gconstpointer _tmp57_;
	gconstpointer _tmp58_;
	AccountsHostnameRow* _tmp59_;
	ComponentsValidator* _tmp60_;
	ComponentsValidator* _tmp61_;
	AccountsHostnameRow* _tmp62_;
	gconstpointer _tmp63_;
	gconstpointer _tmp64_;
	AccountsTransportSecurityRow* _tmp65_;
	AccountsOutgoingAuthRow* _tmp66_;
	gconstpointer _tmp67_;
	gconstpointer _tmp68_;
	AccountsLoginRow* _tmp69_;
	ComponentsValidator* _tmp70_;
	ComponentsValidator* _tmp71_;
	AccountsLoginRow* _tmp72_;
	gconstpointer _tmp73_;
	gconstpointer _tmp74_;
	AccountsPasswordRow* _tmp75_;
	ComponentsValidator* _tmp76_;
	ComponentsValidator* _tmp77_;
	AccountsPasswordRow* _tmp78_;
	gconstpointer _tmp79_;
	gconstpointer _tmp80_;
	GtkListBox* _tmp81_;
	AccountsHostnameRow* _tmp82_;
	GtkListBox* _tmp83_;
	AccountsTransportSecurityRow* _tmp84_;
	GtkListBox* _tmp85_;
	AccountsLoginRow* _tmp86_;
	GtkListBox* _tmp87_;
	AccountsPasswordRow* _tmp88_;
	GtkListBox* _tmp89_;
	AccountsHostnameRow* _tmp90_;
	GtkListBox* _tmp91_;
	AccountsTransportSecurityRow* _tmp92_;
	GtkListBox* _tmp93_;
	AccountsOutgoingAuthRow* _tmp94_;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR (editor), NULL);
	self = (AccountsEditorAddPane*) g_object_new (object_type, NULL);
	accounts_editor_pane_set_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), editor);
	self->priv->provider = GEARY_SERVICE_PROVIDER_OTHER;
	_tmp0_ = accounts_editor_get_application (editor);
	_tmp1_ = _tmp0_;
	_tmp2_ = application_client_get_controller (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = application_controller_get_account_manager (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_g_object_unref0 (self->priv->accounts);
	self->priv->accounts = _tmp6_;
	_tmp7_ = accounts_editor_get_application (editor);
	_tmp8_ = _tmp7_;
	_tmp9_ = application_client_get_engine (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = _g_object_ref0 (_tmp10_);
	_g_object_unref0 (self->priv->engine);
	self->priv->engine = _tmp11_;
	_tmp12_ = self->priv->stack;
	_tmp13_ = self->priv->pane_adjustment;
	gtk_container_set_focus_vadjustment (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_container_get_type (), GtkContainer), _tmp13_);
	_tmp14_ = self->priv->details_list;
	gtk_list_box_set_header_func (_tmp14_, _accounts_editor_seperator_headers_gtk_list_box_update_header_func, NULL, NULL);
	_tmp15_ = self->priv->receiving_list;
	gtk_list_box_set_header_func (_tmp15_, _accounts_editor_seperator_headers_gtk_list_box_update_header_func, NULL, NULL);
	_tmp16_ = self->priv->sending_list;
	gtk_list_box_set_header_func (_tmp16_, _accounts_editor_seperator_headers_gtk_list_box_update_header_func, NULL, NULL);
	_tmp17_ = self->priv->accounts;
	_tmp18_ = accounts_manager_get_account_name (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = accounts_name_row_new (_tmp19_);
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->real_name);
	self->priv->real_name = _tmp20_;
	_g_free0 (_tmp19_);
	_tmp21_ = self->priv->details_list;
	_tmp22_ = self->priv->real_name;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget));
	_tmp23_ = self->priv->details_list;
	_tmp24_ = self->priv->email;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget));
	_tmp25_ = self->priv->real_name;
	_tmp26_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp27_ = _tmp26_;
	g_signal_connect_object (_tmp27_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp28_ = self->priv->real_name;
	_tmp29_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp30_ = _tmp29_;
	g_signal_connect_object ((GtkEntry*) _tmp30_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp31_ = self->priv->email;
	_tmp32_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp33_ = _tmp32_;
	g_signal_connect_object (_tmp33_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp34_ = self->priv->email;
	_tmp35_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp36_ = _tmp35_;
	g_signal_connect_object ((GtkEntry*) _tmp36_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp37_ = self->priv->email;
	_tmp38_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp39_ = _tmp38_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _tmp39_, gtk_editable_get_type (), GtkEditable), "changed", (GCallback) _accounts_editor_add_pane_on_email_changed_gtk_editable_changed, self, 0);
	_tmp40_ = self->priv->imap_hostname;
	_tmp41_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp42_ = _tmp41_;
	g_signal_connect_object (_tmp42_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp43_ = self->priv->imap_hostname;
	_tmp44_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp45_ = _tmp44_;
	g_signal_connect_object ((GtkEntry*) _tmp45_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp46_ = self->priv->imap_tls;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, gtk_widget_get_type (), GtkWidget));
	_tmp47_ = self->priv->imap_login;
	_tmp48_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp49_ = _tmp48_;
	g_signal_connect_object (_tmp49_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp50_ = self->priv->imap_login;
	_tmp51_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp52_ = _tmp51_;
	g_signal_connect_object ((GtkEntry*) _tmp52_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp53_ = self->priv->imap_password;
	_tmp54_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp55_ = _tmp54_;
	g_signal_connect_object (_tmp55_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp56_ = self->priv->imap_password;
	_tmp57_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp58_ = _tmp57_;
	g_signal_connect_object ((GtkEntry*) _tmp58_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp59_ = self->priv->smtp_hostname;
	_tmp60_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp61_ = _tmp60_;
	g_signal_connect_object (_tmp61_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp62_ = self->priv->smtp_hostname;
	_tmp63_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp64_ = _tmp63_;
	g_signal_connect_object ((GtkEntry*) _tmp64_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp65_ = self->priv->smtp_tls;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_widget_get_type (), GtkWidget));
	_tmp66_ = self->priv->smtp_auth;
	_tmp67_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp68_ = _tmp67_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST ((AccountsOutgoingAuthComboBox*) _tmp68_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _accounts_editor_add_pane_on_smtp_auth_changed_gtk_combo_box_changed, self, 0);
	_tmp69_ = self->priv->smtp_login;
	_tmp70_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp71_ = _tmp70_;
	g_signal_connect_object (_tmp71_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp72_ = self->priv->smtp_login;
	_tmp73_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp74_ = _tmp73_;
	g_signal_connect_object ((GtkEntry*) _tmp74_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp75_ = self->priv->smtp_password;
	_tmp76_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp77_ = _tmp76_;
	g_signal_connect_object (_tmp77_, "state-changed", (GCallback) _accounts_editor_add_pane_on_validated_components_validator_state_changed, self, 0);
	_tmp78_ = self->priv->smtp_password;
	_tmp79_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp80_ = _tmp79_;
	g_signal_connect_object ((GtkEntry*) _tmp80_, "activate", (GCallback) _accounts_editor_add_pane_on_activated_gtk_entry_activate, self, 0);
	_tmp81_ = self->priv->receiving_list;
	_tmp82_ = self->priv->imap_hostname;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, gtk_widget_get_type (), GtkWidget));
	_tmp83_ = self->priv->receiving_list;
	_tmp84_ = self->priv->imap_tls;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp83_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp84_, gtk_widget_get_type (), GtkWidget));
	_tmp85_ = self->priv->receiving_list;
	_tmp86_ = self->priv->imap_login;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp86_, gtk_widget_get_type (), GtkWidget));
	_tmp87_ = self->priv->receiving_list;
	_tmp88_ = self->priv->imap_password;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp87_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, gtk_widget_get_type (), GtkWidget));
	_tmp89_ = self->priv->sending_list;
	_tmp90_ = self->priv->smtp_hostname;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp89_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp90_, gtk_widget_get_type (), GtkWidget));
	_tmp91_ = self->priv->sending_list;
	_tmp92_ = self->priv->smtp_tls;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp91_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp92_, gtk_widget_get_type (), GtkWidget));
	_tmp93_ = self->priv->sending_list;
	_tmp94_ = self->priv->smtp_auth;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp94_, gtk_widget_get_type (), GtkWidget));
	return self;
}

AccountsEditorAddPane*
accounts_editor_add_pane_new (AccountsEditor* editor)
{
	return accounts_editor_add_pane_construct (ACCOUNTS_TYPE_EDITOR_ADD_PANE, editor);
}

static GtkHeaderBar*
accounts_editor_add_pane_real_get_header (AccountsEditorPane* base)
{
	AccountsEditorAddPane * self;
	GtkHeaderBar* _tmp0_;
	GtkHeaderBar* _tmp1_;
	GtkHeaderBar* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	_tmp0_ = self->priv->header;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

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

static void
accounts_editor_add_pane_validate_account (AccountsEditorAddPane* self,
                                           GCancellable* cancellable,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	AccountsEditorAddPaneValidateAccountData* _data_;
	AccountsEditorAddPane* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	g_return_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	_data_ = g_slice_new0 (AccountsEditorAddPaneValidateAccountData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_editor_add_pane_validate_account_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	accounts_editor_add_pane_validate_account_co (_data_);
}

static void
accounts_editor_add_pane_validate_account_finish (AccountsEditorAddPane* self,
                                                  GAsyncResult* _res_)
{
	AccountsEditorAddPaneValidateAccountData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

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

static void
accounts_editor_add_pane_validate_account_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	AccountsEditorAddPaneValidateAccountData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	accounts_editor_add_pane_validate_account_co (_data_);
}

static void
_accounts_editor_add_pane_on_untrusted_host_geary_account_information_untrusted_host (GearyAccountInformation* _sender,
                                                                                      GearyServiceInformation* service,
                                                                                      GearyEndpoint* endpoint,
                                                                                      GTlsConnection* cx,
                                                                                      gpointer self)
{
	accounts_editor_add_pane_on_untrusted_host ((AccountsEditorAddPane*) self, _sender, service, endpoint, cx);
}

static gboolean
accounts_editor_add_pane_validate_account_co (AccountsEditorAddPaneValidateAccountData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	accounts_editor_pane_set_is_operation_running (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), TRUE);
	_data_->is_valid = FALSE;
	_data_->message = NULL;
	_data_->to_focus = NULL;
	_data_->_tmp0_ = _data_->self->priv->accounts;
	_data_->_tmp1_ = _data_->self->priv->real_name;
	_data_->_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = gtk_entry_get_text ((GtkEntry*) _data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = string_strip (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = _data_->self->priv->email;
	_data_->_tmp9_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp8_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = gtk_entry_get_text ((GtkEntry*) _data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = string_strip (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = geary_rf_c822_mailbox_address_new (_data_->_tmp7_, _data_->_tmp14_);
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_state_ = 1;
	accounts_manager_new_orphan_account (_data_->_tmp0_, _data_->self->priv->provider, _data_->_tmp16_, _data_->cancellable, accounts_editor_add_pane_validate_account_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp17_ = accounts_manager_new_orphan_account_finish (_data_->_tmp0_, _data_->_res_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_g_object_unref0 (_data_->_tmp16_);
	_g_free0 (_data_->_tmp14_);
	_g_free0 (_data_->_tmp7_);
	_data_->account = _data_->_tmp18_;
	_data_->_tmp19_ = _data_->account;
	_data_->_tmp20_ = accounts_editor_add_pane_new_imap_service (_data_->self);
	_data_->_tmp21_ = _data_->_tmp20_;
	geary_account_information_set_incoming (_data_->_tmp19_, _data_->_tmp21_);
	_g_object_unref0 (_data_->_tmp21_);
	_data_->_tmp22_ = _data_->account;
	_data_->_tmp23_ = accounts_editor_add_pane_new_smtp_service (_data_->self);
	_data_->_tmp24_ = _data_->_tmp23_;
	geary_account_information_set_outgoing (_data_->_tmp22_, _data_->_tmp24_);
	_g_object_unref0 (_data_->_tmp24_);
	_data_->_tmp25_ = _data_->account;
	g_signal_connect_object (_data_->_tmp25_, "untrusted-host", (GCallback) _accounts_editor_add_pane_on_untrusted_host_geary_account_information_untrusted_host, _data_->self, 0);
	if (_data_->self->priv->provider == GEARY_SERVICE_PROVIDER_OTHER) {
		_data_->_tmp27_ = _data_->self->priv->imap_hostname;
		_data_->_tmp26_ = gtk_widget_get_visible (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp27_, gtk_widget_get_type (), GtkWidget));
	} else {
		_data_->_tmp26_ = FALSE;
	}
	if (_data_->_tmp26_) {
		_data_->imap_valid = FALSE;
		_data_->smtp_valid = FALSE;
		{
			_data_->_tmp28_ = _data_->self->priv->engine;
			_data_->_tmp29_ = _data_->account;
			_data_->_tmp30_ = _data_->account;
			_data_->_tmp31_ = geary_account_information_get_incoming (_data_->_tmp30_);
			_data_->_tmp32_ = _data_->_tmp31_;
			_data_->_state_ = 2;
			geary_engine_validate_imap (_data_->_tmp28_, _data_->_tmp29_, _data_->_tmp32_, _data_->cancellable, accounts_editor_add_pane_validate_account_ready, _data_);
			return FALSE;
			_state_2:
			geary_engine_validate_imap_finish (_data_->_tmp28_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				if (g_error_matches (_data_->_inner_error0_, GEARY_IMAP_ERROR, GEARY_IMAP_ERROR_UNAUTHENTICATED)) {
					goto __catch0_geary_imap_error_unauthenticated;
				}
				if (g_error_matches (_data_->_inner_error0_, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE)) {
					goto __catch0_g_tls_error_bad_certificate;
				}
				if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
					goto __catch0_g_io_error_cancelled;
				}
				goto __catch0_g_error;
			}
			_data_->imap_valid = TRUE;
		}
		goto __finally0;
		__catch0_geary_imap_error_unauthenticated:
		{
			_data_->err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp33_ = _data_->err;
			_data_->_tmp34_ = _data_->_tmp33_->message;
			g_debug ("accounts-editor-add-pane.vala:164: Error authenticating IMAP service: " \
"%s", _data_->_tmp34_);
			_data_->_tmp35_ = _data_->self->priv->imap_login;
			_data_->_tmp36_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp35_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
			_data_->_tmp37_ = _data_->_tmp36_;
			_data_->_tmp38_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _data_->_tmp37_, gtk_widget_get_type (), GtkWidget));
			_g_object_unref0 (_data_->to_focus);
			_data_->to_focus = _data_->_tmp38_;
			_data_->_tmp39_ = g_strdup (_ ("Check your receiving login and password"));
			_g_free0 (_data_->message);
			_data_->message = _data_->_tmp39_;
			_g_error_free0 (_data_->err);
		}
		goto __finally0;
		__catch0_g_tls_error_bad_certificate:
		{
			_data_->_vala1_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp40_ = _data_->_vala1_err;
			_data_->_tmp41_ = _data_->_tmp40_->message;
			g_debug ("accounts-editor-add-pane.vala:169: Error validating IMAP certificate: " \
"%s", _data_->_tmp41_);
			_g_error_free0 (_data_->_vala1_err);
		}
		goto __finally0;
		__catch0_g_io_error_cancelled:
		{
			_data_->_vala2_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp42_ = _data_->_vala2_err;
			_data_->_tmp43_ = _data_->_tmp42_->message;
			g_debug ("accounts-editor-add-pane.vala:174: IMAP validation was cancelled: %s", _data_->_tmp43_);
			_g_error_free0 (_data_->_vala2_err);
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->_vala3_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp44_ = _data_->_vala3_err;
			_data_->_tmp45_ = geary_error_context_new (_data_->_tmp44_);
			_data_->context = _data_->_tmp45_;
			_data_->_tmp46_ = _data_->context;
			_data_->_tmp47_ = geary_error_context_format_full_error (_data_->_tmp46_);
			_data_->_tmp48_ = _data_->_tmp47_;
			g_debug ("accounts-editor-add-pane.vala:177: Error validating IMAP service: %s", _data_->_tmp48_);
			_g_free0 (_data_->_tmp48_);
			_data_->_tmp49_ = _data_->self->priv->imap_tls;
			gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp49_, gtk_widget_get_type (), GtkWidget));
			_data_->_tmp50_ = _data_->self->priv->imap_hostname;
			_data_->_tmp51_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp50_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
			_data_->_tmp52_ = _data_->_tmp51_;
			_data_->_tmp53_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _data_->_tmp52_, gtk_widget_get_type (), GtkWidget));
			_g_object_unref0 (_data_->to_focus);
			_data_->to_focus = _data_->_tmp53_;
			_data_->_tmp54_ = g_strdup (_ ("Check your receiving server details"));
			_g_free0 (_data_->message);
			_data_->message = _data_->_tmp54_;
			_g_object_unref0 (_data_->context);
			_g_error_free0 (_data_->_vala3_err);
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->account);
			_g_object_unref0 (_data_->to_focus);
			_g_free0 (_data_->message);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		if (_data_->imap_valid) {
			g_debug ("accounts-editor-add-pane.vala:186: Validating SMTP...");
			{
				_data_->_tmp55_ = _data_->self->priv->engine;
				_data_->_tmp56_ = _data_->account;
				_data_->_tmp57_ = _data_->account;
				_data_->_tmp58_ = geary_account_information_get_outgoing (_data_->_tmp57_);
				_data_->_tmp59_ = _data_->_tmp58_;
				_data_->_tmp60_ = _data_->account;
				_data_->_tmp61_ = geary_account_information_get_incoming (_data_->_tmp60_);
				_data_->_tmp62_ = _data_->_tmp61_;
				_data_->_tmp63_ = geary_service_information_get_credentials (_data_->_tmp62_);
				_data_->_tmp64_ = _data_->_tmp63_;
				_data_->_state_ = 3;
				geary_engine_validate_smtp (_data_->_tmp55_, _data_->_tmp56_, _data_->_tmp59_, _data_->_tmp64_, _data_->cancellable, accounts_editor_add_pane_validate_account_ready, _data_);
				return FALSE;
				_state_3:
				geary_engine_validate_smtp_finish (_data_->_tmp55_, _data_->_res_, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					if (g_error_matches (_data_->_inner_error0_, GEARY_SMTP_ERROR, GEARY_SMTP_ERROR_AUTHENTICATION_FAILED)) {
						goto __catch1_geary_smtp_error_authentication_failed;
					}
					if (g_error_matches (_data_->_inner_error0_, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE)) {
						goto __catch1_g_tls_error_bad_certificate;
					}
					if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
						goto __catch1_g_io_error_cancelled;
					}
					goto __catch1_g_error;
				}
				_data_->smtp_valid = TRUE;
			}
			goto __finally1;
			__catch1_geary_smtp_error_authentication_failed:
			{
				_data_->_vala4_err = _data_->_inner_error0_;
				_data_->_inner_error0_ = NULL;
				_data_->_tmp65_ = _data_->_vala4_err;
				_data_->_tmp66_ = _data_->_tmp65_->message;
				g_debug ("accounts-editor-add-pane.vala:196: Error authenticating SMTP service: " \
"%s", _data_->_tmp66_);
				_data_->_tmp67_ = _data_->self->priv->smtp_auth;
				_data_->_tmp68_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp67_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
				_data_->_tmp69_ = _data_->_tmp68_;
				accounts_outgoing_auth_combo_box_set_source ((AccountsOutgoingAuthComboBox*) _data_->_tmp69_, GEARY_CREDENTIALS_REQUIREMENT_CUSTOM);
				_data_->_tmp70_ = _data_->self->priv->smtp_login;
				_data_->_tmp71_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp70_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
				_data_->_tmp72_ = _data_->_tmp71_;
				_data_->_tmp73_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _data_->_tmp72_, gtk_widget_get_type (), GtkWidget));
				_g_object_unref0 (_data_->to_focus);
				_data_->to_focus = _data_->_tmp73_;
				_data_->_tmp74_ = g_strdup (_ ("Check your sending login and password"));
				_g_free0 (_data_->message);
				_data_->message = _data_->_tmp74_;
				_g_error_free0 (_data_->_vala4_err);
			}
			goto __finally1;
			__catch1_g_tls_error_bad_certificate:
			{
				g_clear_error (&_data_->_inner_error0_);
			}
			goto __finally1;
			__catch1_g_io_error_cancelled:
			{
				_data_->_vala5_err = _data_->_inner_error0_;
				_data_->_inner_error0_ = NULL;
				_data_->_tmp75_ = _data_->_vala5_err;
				_data_->_tmp76_ = _data_->_tmp75_->message;
				g_debug ("accounts-editor-add-pane.vala:210: SMTP validation was cancelled: %s", _data_->_tmp76_);
				_g_error_free0 (_data_->_vala5_err);
			}
			goto __finally1;
			__catch1_g_error:
			{
				_data_->_vala6_err = _data_->_inner_error0_;
				_data_->_inner_error0_ = NULL;
				_data_->_tmp77_ = _data_->_vala6_err;
				_data_->_tmp78_ = geary_error_context_new (_data_->_tmp77_);
				_data_->_vala1_context = _data_->_tmp78_;
				_data_->_tmp79_ = _data_->_vala1_context;
				_data_->_tmp80_ = geary_error_context_format_full_error (_data_->_tmp79_);
				_data_->_tmp81_ = _data_->_tmp80_;
				g_debug ("accounts-editor-add-pane.vala:213: Error validating SMTP service: %s", _data_->_tmp81_);
				_g_free0 (_data_->_tmp81_);
				_data_->_tmp82_ = _data_->self->priv->smtp_tls;
				gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp82_, gtk_widget_get_type (), GtkWidget));
				_data_->_tmp83_ = _data_->self->priv->smtp_hostname;
				_data_->_tmp84_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp83_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
				_data_->_tmp85_ = _data_->_tmp84_;
				_data_->_tmp86_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _data_->_tmp85_, gtk_widget_get_type (), GtkWidget));
				_g_object_unref0 (_data_->to_focus);
				_data_->to_focus = _data_->_tmp86_;
				_data_->_tmp87_ = g_strdup (_ ("Check your sending server details"));
				_g_free0 (_data_->message);
				_data_->message = _data_->_tmp87_;
				_g_object_unref0 (_data_->_vala1_context);
				_g_error_free0 (_data_->_vala6_err);
			}
			__finally1:
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->account);
				_g_object_unref0 (_data_->to_focus);
				_g_free0 (_data_->message);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
				g_clear_error (&_data_->_inner_error0_);
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
		if (_data_->imap_valid) {
			_data_->_tmp88_ = _data_->smtp_valid;
		} else {
			_data_->_tmp88_ = FALSE;
		}
		_data_->is_valid = _data_->_tmp88_;
	} else {
		{
			_data_->_tmp89_ = _data_->self->priv->engine;
			_data_->_tmp90_ = _data_->account;
			_data_->_tmp91_ = _data_->account;
			_data_->_tmp92_ = geary_account_information_get_incoming (_data_->_tmp91_);
			_data_->_tmp93_ = _data_->_tmp92_;
			_data_->_state_ = 4;
			geary_engine_validate_imap (_data_->_tmp89_, _data_->_tmp90_, _data_->_tmp93_, _data_->cancellable, accounts_editor_add_pane_validate_account_ready, _data_);
			return FALSE;
			_state_4:
			geary_engine_validate_imap_finish (_data_->_tmp89_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				if (g_error_matches (_data_->_inner_error0_, GEARY_IMAP_ERROR, GEARY_IMAP_ERROR_UNAUTHENTICATED)) {
					goto __catch2_geary_imap_error_unauthenticated;
				}
				if (g_error_matches (_data_->_inner_error0_, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE)) {
					goto __catch2_g_tls_error_bad_certificate;
				}
				goto __catch2_g_error;
			}
			_data_->is_valid = TRUE;
		}
		goto __finally2;
		__catch2_geary_imap_error_unauthenticated:
		{
			_data_->_vala7_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp94_ = _data_->_vala7_err;
			_data_->_tmp95_ = _data_->_tmp94_->message;
			g_debug ("accounts-editor-add-pane.vala:230: Error authenticating provider: %s", _data_->_tmp95_);
			_data_->_tmp96_ = _data_->self->priv->email;
			_data_->_tmp97_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp96_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
			_data_->_tmp98_ = _data_->_tmp97_;
			_data_->_tmp99_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _data_->_tmp98_, gtk_widget_get_type (), GtkWidget));
			_g_object_unref0 (_data_->to_focus);
			_data_->to_focus = _data_->_tmp99_;
			_data_->_tmp100_ = g_strdup (_ ("Check your email address and password"));
			_g_free0 (_data_->message);
			_data_->message = _data_->_tmp100_;
			_g_error_free0 (_data_->_vala7_err);
		}
		goto __finally2;
		__catch2_g_tls_error_bad_certificate:
		{
			_data_->_vala8_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp101_ = _data_->_vala8_err;
			_data_->_tmp102_ = _data_->_tmp101_->message;
			g_debug ("accounts-editor-add-pane.vala:237: Error validating SMTP certificate: " \
"%s", _data_->_tmp102_);
			_g_error_free0 (_data_->_vala8_err);
		}
		goto __finally2;
		__catch2_g_error:
		{
			_data_->_vala9_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp103_ = _data_->_vala9_err;
			_data_->_tmp104_ = geary_error_context_new (_data_->_tmp103_);
			_data_->_vala2_context = _data_->_tmp104_;
			_data_->_tmp105_ = _data_->_vala2_context;
			_data_->_tmp106_ = geary_error_context_format_full_error (_data_->_tmp105_);
			_data_->_tmp107_ = _data_->_tmp106_;
			g_debug ("accounts-editor-add-pane.vala:240: Error validating SMTP service: %s", _data_->_tmp107_);
			_g_free0 (_data_->_tmp107_);
			_data_->is_valid = FALSE;
			_data_->_tmp108_ = g_strdup (_ ("Could not connect, check your network"));
			_g_free0 (_data_->message);
			_data_->message = _data_->_tmp108_;
			_g_object_unref0 (_data_->_vala2_context);
			_g_error_free0 (_data_->_vala9_err);
		}
		__finally2:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->account);
			_g_object_unref0 (_data_->to_focus);
			_g_free0 (_data_->message);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	if (_data_->is_valid) {
		{
			_data_->_tmp109_ = _data_->self->priv->accounts;
			_data_->_tmp110_ = _data_->account;
			_data_->_state_ = 5;
			accounts_manager_create_account (_data_->_tmp109_, _data_->_tmp110_, _data_->cancellable, accounts_editor_add_pane_validate_account_ready, _data_);
			return FALSE;
			_state_5:
			accounts_manager_create_account_finish (_data_->_tmp109_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch3_g_error;
			}
			_data_->_tmp111_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
			_data_->_tmp112_ = _data_->_tmp111_;
			accounts_editor_pop (_data_->_tmp112_);
		}
		goto __finally3;
		__catch3_g_error:
		{
			_data_->_vala10_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp113_ = _data_->_vala10_err;
			_data_->_tmp114_ = _data_->_tmp113_->message;
			g_debug ("accounts-editor-add-pane.vala:253: Failed to create new local account:" \
" %s", _data_->_tmp114_);
			_data_->is_valid = FALSE;
			_data_->_tmp115_ = g_strdup (_ ("An unexpected problem occurred"));
			_g_free0 (_data_->message);
			_data_->message = _data_->_tmp115_;
			_g_error_free0 (_data_->_vala10_err);
		}
		__finally3:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->account);
			_g_object_unref0 (_data_->to_focus);
			_g_free0 (_data_->message);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->_tmp116_ = _data_->account;
	g_signal_parse_name ("untrusted-host", GEARY_TYPE_ACCOUNT_INFORMATION, &_data_->_tmp117_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_data_->_tmp116_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _data_->_tmp117_, 0, NULL, (GCallback) _accounts_editor_add_pane_on_untrusted_host_geary_account_information_untrusted_host, _data_->self);
	accounts_editor_pane_set_is_operation_running (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), FALSE);
	if (!_data_->is_valid) {
		_data_->_tmp118_ = _data_->to_focus;
		if (_data_->_tmp118_ != NULL) {
			_data_->_tmp119_ = _data_->to_focus;
			gtk_widget_grab_focus (_data_->_tmp119_);
		}
		_data_->_tmp120_ = _data_->message;
		if (_data_->_tmp120_ != NULL) {
			_data_->_tmp121_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
			_data_->_tmp122_ = _data_->_tmp121_;
			_data_->_tmp123_ = _data_->message;
			_data_->_tmp124_ = g_strdup_printf (_ ("Account not created: %s"), _data_->_tmp123_);
			_data_->_tmp125_ = _data_->_tmp124_;
			_data_->_tmp126_ = components_in_app_notification_new (_data_->_tmp125_, COMPONENTS_IN_APP_NOTIFICATION_DEFAULT_DURATION);
			g_object_ref_sink (_data_->_tmp126_);
			_data_->_tmp127_ = _data_->_tmp126_;
			accounts_editor_add_notification (_data_->_tmp122_, _data_->_tmp127_);
			_g_object_unref0 (_data_->_tmp127_);
			_g_free0 (_data_->_tmp125_);
		}
	}
	_g_object_unref0 (_data_->account);
	_g_object_unref0 (_data_->to_focus);
	_g_free0 (_data_->message);
	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 GearyServiceInformation*
accounts_editor_add_pane_new_imap_service (AccountsEditorAddPane* self)
{
	GearyServiceInformation* service = NULL;
	GearyServiceInformation* _tmp0_;
	GearyServiceInformation* _tmp1_;
	AccountsLoginRow* _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	AccountsPasswordRow* _tmp8_;
	gconstpointer _tmp9_;
	gconstpointer _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GearyCredentials* _tmp14_;
	GearyCredentials* _tmp15_;
	ComponentsNetworkAddressValidator* host = NULL;
	AccountsHostnameRow* _tmp16_;
	ComponentsValidator* _tmp17_;
	ComponentsValidator* _tmp18_;
	ComponentsNetworkAddressValidator* _tmp19_;
	GNetworkAddress* address = NULL;
	ComponentsNetworkAddressValidator* _tmp20_;
	GNetworkAddress* _tmp21_;
	GNetworkAddress* _tmp22_;
	GNetworkAddress* _tmp23_;
	GearyServiceInformation* _tmp24_;
	GNetworkAddress* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	GearyServiceInformation* _tmp28_;
	GNetworkAddress* _tmp29_;
	guint _tmp30_;
	guint _tmp31_;
	GearyServiceInformation* _tmp32_;
	AccountsTransportSecurityRow* _tmp33_;
	gconstpointer _tmp34_;
	gconstpointer _tmp35_;
	GearyTlsNegotiationMethod _tmp36_;
	GearyTlsNegotiationMethod _tmp37_;
	GearyServiceInformation* _tmp38_;
	guint16 _tmp39_;
	guint16 _tmp40_;
	GearyServiceInformation* result;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self), NULL);
	_tmp0_ = geary_service_information_new (GEARY_PROTOCOL_IMAP, self->priv->provider);
	service = _tmp0_;
	_tmp1_ = service;
	_tmp2_ = self->priv->imap_login;
	_tmp3_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp4_ = _tmp3_;
	_tmp5_ = gtk_entry_get_text ((GtkEntry*) _tmp4_);
	_tmp6_ = string_strip (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->imap_password;
	_tmp9_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp10_ = _tmp9_;
	_tmp11_ = gtk_entry_get_text ((GtkEntry*) _tmp10_);
	_tmp12_ = string_strip (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = geary_credentials_new (GEARY_CREDENTIALS_METHOD_PASSWORD, _tmp7_, _tmp13_);
	_tmp15_ = _tmp14_;
	geary_service_information_set_credentials (_tmp1_, _tmp15_);
	_g_object_unref0 (_tmp15_);
	_g_free0 (_tmp13_);
	_g_free0 (_tmp7_);
	_tmp16_ = self->priv->imap_hostname;
	_tmp17_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp18_ = _tmp17_;
	_tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, COMPONENTS_TYPE_NETWORK_ADDRESS_VALIDATOR, ComponentsNetworkAddressValidator));
	host = _tmp19_;
	_tmp20_ = host;
	_tmp21_ = components_network_address_validator_get_validated_address (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = _g_object_ref0 (_tmp22_);
	address = _tmp23_;
	_tmp24_ = service;
	_tmp25_ = address;
	_tmp26_ = g_network_address_get_hostname (_tmp25_);
	_tmp27_ = _tmp26_;
	geary_service_information_set_host (_tmp24_, _tmp27_);
	_tmp28_ = service;
	_tmp29_ = address;
	_tmp30_ = g_network_address_get_port (_tmp29_);
	_tmp31_ = _tmp30_;
	geary_service_information_set_port (_tmp28_, (guint16) _tmp31_);
	_tmp32_ = service;
	_tmp33_ = self->priv->imap_tls;
	_tmp34_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp35_ = _tmp34_;
	_tmp36_ = accounts_tls_combo_box_get_method ((AccountsTlsComboBox*) _tmp35_);
	_tmp37_ = _tmp36_;
	geary_service_information_set_transport_security (_tmp32_, _tmp37_);
	_tmp38_ = service;
	_tmp39_ = geary_service_information_get_port (_tmp38_);
	_tmp40_ = _tmp39_;
	if (((gint) _tmp40_) == 0) {
		GearyServiceInformation* _tmp41_;
		GearyServiceInformation* _tmp42_;
		_tmp41_ = service;
		_tmp42_ = service;
		geary_service_information_set_port (_tmp41_, geary_service_information_get_default_port (_tmp42_));
	}
	result = service;
	_g_object_unref0 (address);
	_g_object_unref0 (host);
	return result;
}

static GearyServiceInformation*
accounts_editor_add_pane_new_smtp_service (AccountsEditorAddPane* self)
{
	GearyServiceInformation* service = NULL;
	GearyServiceInformation* _tmp0_;
	GearyServiceInformation* _tmp1_;
	AccountsOutgoingAuthRow* _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	GearyCredentialsRequirement _tmp5_;
	GearyCredentialsRequirement _tmp6_;
	GearyServiceInformation* _tmp7_;
	GearyCredentialsRequirement _tmp8_;
	GearyCredentialsRequirement _tmp9_;
	ComponentsNetworkAddressValidator* host = NULL;
	AccountsHostnameRow* _tmp25_;
	ComponentsValidator* _tmp26_;
	ComponentsValidator* _tmp27_;
	ComponentsNetworkAddressValidator* _tmp28_;
	GNetworkAddress* address = NULL;
	ComponentsNetworkAddressValidator* _tmp29_;
	GNetworkAddress* _tmp30_;
	GNetworkAddress* _tmp31_;
	GNetworkAddress* _tmp32_;
	GearyServiceInformation* _tmp33_;
	GNetworkAddress* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	GearyServiceInformation* _tmp37_;
	GNetworkAddress* _tmp38_;
	guint _tmp39_;
	guint _tmp40_;
	GearyServiceInformation* _tmp41_;
	AccountsTransportSecurityRow* _tmp42_;
	gconstpointer _tmp43_;
	gconstpointer _tmp44_;
	GearyTlsNegotiationMethod _tmp45_;
	GearyTlsNegotiationMethod _tmp46_;
	GearyServiceInformation* _tmp47_;
	guint16 _tmp48_;
	guint16 _tmp49_;
	GearyServiceInformation* result;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self), NULL);
	_tmp0_ = geary_service_information_new (GEARY_PROTOCOL_SMTP, self->priv->provider);
	service = _tmp0_;
	_tmp1_ = service;
	_tmp2_ = self->priv->smtp_auth;
	_tmp3_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp4_ = _tmp3_;
	_tmp5_ = accounts_outgoing_auth_combo_box_get_source ((AccountsOutgoingAuthComboBox*) _tmp4_);
	_tmp6_ = _tmp5_;
	geary_service_information_set_credentials_requirement (_tmp1_, _tmp6_);
	_tmp7_ = service;
	_tmp8_ = geary_service_information_get_credentials_requirement (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ == GEARY_CREDENTIALS_REQUIREMENT_CUSTOM) {
		GearyServiceInformation* _tmp10_;
		AccountsLoginRow* _tmp11_;
		gconstpointer _tmp12_;
		gconstpointer _tmp13_;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		AccountsPasswordRow* _tmp17_;
		gconstpointer _tmp18_;
		gconstpointer _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		GearyCredentials* _tmp23_;
		GearyCredentials* _tmp24_;
		_tmp10_ = service;
		_tmp11_ = self->priv->smtp_login;
		_tmp12_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp13_ = _tmp12_;
		_tmp14_ = gtk_entry_get_text ((GtkEntry*) _tmp13_);
		_tmp15_ = string_strip (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = self->priv->smtp_password;
		_tmp18_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp19_ = _tmp18_;
		_tmp20_ = gtk_entry_get_text ((GtkEntry*) _tmp19_);
		_tmp21_ = string_strip (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = geary_credentials_new (GEARY_CREDENTIALS_METHOD_PASSWORD, _tmp16_, _tmp22_);
		_tmp24_ = _tmp23_;
		geary_service_information_set_credentials (_tmp10_, _tmp24_);
		_g_object_unref0 (_tmp24_);
		_g_free0 (_tmp22_);
		_g_free0 (_tmp16_);
	}
	_tmp25_ = self->priv->smtp_hostname;
	_tmp26_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp27_ = _tmp26_;
	_tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, COMPONENTS_TYPE_NETWORK_ADDRESS_VALIDATOR, ComponentsNetworkAddressValidator));
	host = _tmp28_;
	_tmp29_ = host;
	_tmp30_ = components_network_address_validator_get_validated_address (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = _g_object_ref0 (_tmp31_);
	address = _tmp32_;
	_tmp33_ = service;
	_tmp34_ = address;
	_tmp35_ = g_network_address_get_hostname (_tmp34_);
	_tmp36_ = _tmp35_;
	geary_service_information_set_host (_tmp33_, _tmp36_);
	_tmp37_ = service;
	_tmp38_ = address;
	_tmp39_ = g_network_address_get_port (_tmp38_);
	_tmp40_ = _tmp39_;
	geary_service_information_set_port (_tmp37_, (guint16) _tmp40_);
	_tmp41_ = service;
	_tmp42_ = self->priv->smtp_tls;
	_tmp43_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp44_ = _tmp43_;
	_tmp45_ = accounts_tls_combo_box_get_method ((AccountsTlsComboBox*) _tmp44_);
	_tmp46_ = _tmp45_;
	geary_service_information_set_transport_security (_tmp41_, _tmp46_);
	_tmp47_ = service;
	_tmp48_ = geary_service_information_get_port (_tmp47_);
	_tmp49_ = _tmp48_;
	if (((gint) _tmp49_) == 0) {
		GearyServiceInformation* _tmp50_;
		GearyServiceInformation* _tmp51_;
		_tmp50_ = service;
		_tmp51_ = service;
		geary_service_information_set_port (_tmp50_, geary_service_information_get_default_port (_tmp51_));
	}
	result = service;
	_g_object_unref0 (address);
	_g_object_unref0 (host);
	return result;
}

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

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

static void
____lambda73_ (Block41Data* _data41_,
               GtkWidget* child)
{
	AccountsEditorAddPane* self;
	AccountsAddPaneRow* validatable = NULL;
	AccountsAddPaneRow* _tmp0_;
	gboolean _tmp1_ = FALSE;
	AccountsAddPaneRow* _tmp2_;
	self = _data41_->self;
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (child, gtk_widget_get_type ()));
	_tmp0_ = _g_object_ref0 (ACCOUNTS_IS_ADD_PANE_ROW (child) ? ((AccountsAddPaneRow*) child) : NULL);
	validatable = _tmp0_;
	_tmp2_ = validatable;
	if (_tmp2_ != NULL) {
		AccountsAddPaneRow* _tmp3_;
		ComponentsValidator* _tmp4_;
		ComponentsValidator* _tmp5_;
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp3_ = validatable;
		_tmp4_ = accounts_add_pane_row_get_validator (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = components_validator_get_is_valid (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = !_tmp7_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_data41_->controls_valid = FALSE;
	}
	_g_object_unref0 (validatable);
}

static void
_____lambda73__gtk_callback (GtkWidget* widget,
                             gpointer self)
{
	____lambda73_ (self, widget);
}

static void
accounts_editor_add_pane_check_validation (AccountsEditorAddPane* self)
{
	Block41Data* _data41_;
	gboolean server_settings_visible = FALSE;
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	GtkListBox** list_boxes = NULL;
	gint list_boxes_length1 = 0;
	gint _list_boxes_size_ = 0;
	GtkListBox** _tmp12_;
	gint _tmp12__length1;
	GtkButton* _tmp15_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_data41_ = g_slice_new0 (Block41Data);
	_data41_->_ref_count_ = 1;
	_data41_->self = g_object_ref (self);
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	server_settings_visible = g_strcmp0 (_tmp1_, "server_settings") == 0;
	_data41_->controls_valid = TRUE;
	if (server_settings_visible) {
		GtkListBox* _tmp2_;
		GtkListBox* _tmp3_;
		GtkListBox* _tmp4_;
		GtkListBox* _tmp5_;
		GtkListBox* _tmp6_;
		GtkListBox* _tmp7_;
		GtkListBox** _tmp8_;
		_tmp2_ = self->priv->details_list;
		_tmp3_ = _g_object_ref0 (_tmp2_);
		_tmp4_ = self->priv->receiving_list;
		_tmp5_ = _g_object_ref0 (_tmp4_);
		_tmp6_ = self->priv->sending_list;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		_tmp8_ = g_new0 (GtkListBox*, 3 + 1);
		_tmp8_[0] = _tmp3_;
		_tmp8_[1] = _tmp5_;
		_tmp8_[2] = _tmp7_;
		list_boxes = (_vala_array_free (list_boxes, list_boxes_length1, (GDestroyNotify) g_object_unref), NULL);
		list_boxes = _tmp8_;
		list_boxes_length1 = 3;
		_list_boxes_size_ = list_boxes_length1;
	} else {
		GtkListBox* _tmp9_;
		GtkListBox* _tmp10_;
		GtkListBox** _tmp11_;
		_tmp9_ = self->priv->details_list;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_tmp11_ = g_new0 (GtkListBox*, 1 + 1);
		_tmp11_[0] = _tmp10_;
		list_boxes = (_vala_array_free (list_boxes, list_boxes_length1, (GDestroyNotify) g_object_unref), NULL);
		list_boxes = _tmp11_;
		list_boxes_length1 = 1;
		_list_boxes_size_ = list_boxes_length1;
	}
	_tmp12_ = list_boxes;
	_tmp12__length1 = list_boxes_length1;
	{
		GtkListBox** list_box_collection = NULL;
		gint list_box_collection_length1 = 0;
		gint _list_box_collection_size_ = 0;
		gint list_box_it = 0;
		list_box_collection = _tmp12_;
		list_box_collection_length1 = _tmp12__length1;
		for (list_box_it = 0; list_box_it < list_box_collection_length1; list_box_it = list_box_it + 1) {
			GtkListBox* _tmp13_;
			GtkListBox* list_box = NULL;
			_tmp13_ = _g_object_ref0 (list_box_collection[list_box_it]);
			list_box = _tmp13_;
			{
				GtkListBox* _tmp14_;
				_tmp14_ = list_box;
				gtk_container_foreach (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_container_get_type (), GtkContainer), _____lambda73__gtk_callback, _data41_);
				_g_object_unref0 (list_box);
			}
		}
	}
	_tmp15_ = self->priv->action_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget), _data41_->controls_valid);
	self->priv->controls_valid = _data41_->controls_valid;
	list_boxes = (_vala_array_free (list_boxes, list_boxes_length1, (GDestroyNotify) g_object_unref), NULL);
	block41_data_unref (_data41_);
	_data41_ = NULL;
}

static void
accounts_editor_add_pane_update_operation_ui (AccountsEditorAddPane* self,
                                              gboolean is_running)
{
	GtkSpinner* _tmp0_;
	GtkSpinner* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_tmp0_ = self->priv->action_spinner;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), is_running);
	_tmp1_ = self->priv->action_spinner;
	g_object_set (_tmp1_, "active", is_running, NULL);
	_tmp2_ = self->priv->action_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), !is_running);
	_tmp3_ = self->priv->back_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), !is_running);
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), !is_running);
}

static void
accounts_editor_add_pane_switch_to_user_settings (AccountsEditorAddPane* self)
{
	GtkStack* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkStyleContext* _tmp4_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_tmp0_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp0_, "user_settings");
	_tmp1_ = self->priv->action_button;
	gtk_button_set_label (_tmp1_, _ ("_Next"));
	_tmp2_ = self->priv->action_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE);
	_tmp3_ = self->priv->action_button;
	_tmp4_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_remove_class (_tmp4_, "suggested-action");
}

static void
accounts_editor_add_pane_switch_to_server_settings (AccountsEditorAddPane* self)
{
	GtkStack* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkStyleContext* _tmp4_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_tmp0_ = self->priv->stack;
	gtk_stack_set_visible_child_name (_tmp0_, "server_settings");
	_tmp1_ = self->priv->action_button;
	gtk_button_set_label (_tmp1_, _ ("_Create"));
	_tmp2_ = self->priv->action_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), FALSE);
	_tmp3_ = self->priv->action_button;
	_tmp4_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp4_, "suggested-action");
}

static void
accounts_editor_add_pane_set_server_settings_from_autoconfig (AccountsEditorAddPane* self,
                                                              AccountsAutoConfig* auto_config,
                                                              GAsyncResult* res,
                                                              GError** error)
{
	AccountsAutoConfigValues* auto_config_values = NULL;
	AccountsAutoConfigValues* _tmp0_;
	GtkEntry* imap_hostname_entry = NULL;
	AccountsHostnameRow* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	GtkEntry* _tmp4_;
	GtkEntry* smtp_hostname_entry = NULL;
	AccountsHostnameRow* _tmp5_;
	gconstpointer _tmp6_;
	gconstpointer _tmp7_;
	GtkEntry* _tmp8_;
	AccountsTlsComboBox* imap_tls_combo_box = NULL;
	AccountsTransportSecurityRow* _tmp9_;
	gconstpointer _tmp10_;
	gconstpointer _tmp11_;
	AccountsTlsComboBox* _tmp12_;
	AccountsTlsComboBox* smtp_tls_combo_box = NULL;
	AccountsTransportSecurityRow* _tmp13_;
	gconstpointer _tmp14_;
	gconstpointer _tmp15_;
	AccountsTlsComboBox* _tmp16_;
	GtkEntry* _tmp17_;
	AccountsAutoConfigValues* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	AccountsAutoConfigValues* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	GtkEntry* _tmp28_;
	AccountsAutoConfigValues* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	AccountsAutoConfigValues* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	AccountsTlsComboBox* _tmp39_;
	AccountsAutoConfigValues* _tmp40_;
	GearyTlsNegotiationMethod _tmp41_;
	GearyTlsNegotiationMethod _tmp42_;
	AccountsTlsComboBox* _tmp43_;
	AccountsAutoConfigValues* _tmp44_;
	GearyTlsNegotiationMethod _tmp45_;
	GearyTlsNegotiationMethod _tmp46_;
	AccountsHostnameRow* _tmp47_;
	AccountsHostnameRow* _tmp48_;
	AccountsTransportSecurityRow* _tmp49_;
	AccountsTransportSecurityRow* _tmp50_;
	AccountsAutoConfigValues* _tmp51_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	const gchar* _tmp54_;
	GQuark _tmp56_ = 0U;
	static GQuark _tmp55_label0 = 0;
	static GQuark _tmp55_label1 = 0;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	g_return_if_fail (ACCOUNTS_IS_AUTO_CONFIG (auto_config));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (res, g_async_result_get_type ()));
	_tmp0_ = accounts_auto_config_get_config_finish (auto_config, res, &_inner_error0_);
	auto_config_values = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if (_inner_error0_->domain == ACCOUNTS_AUTO_CONFIG_ERROR) {
			g_propagate_error (error, _inner_error0_);
			return;
		} else {
			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;
		}
	}
	_tmp1_ = self->priv->imap_hostname;
	_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 ((GtkEntry*) _tmp3_);
	imap_hostname_entry = _tmp4_;
	_tmp5_ = self->priv->smtp_hostname;
	_tmp6_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp7_ = _tmp6_;
	_tmp8_ = _g_object_ref0 ((GtkEntry*) _tmp7_);
	smtp_hostname_entry = _tmp8_;
	_tmp9_ = self->priv->imap_tls;
	_tmp10_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp11_ = _tmp10_;
	_tmp12_ = _g_object_ref0 ((AccountsTlsComboBox*) _tmp11_);
	imap_tls_combo_box = _tmp12_;
	_tmp13_ = self->priv->smtp_tls;
	_tmp14_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp15_ = _tmp14_;
	_tmp16_ = _g_object_ref0 ((AccountsTlsComboBox*) _tmp15_);
	smtp_tls_combo_box = _tmp16_;
	_tmp17_ = imap_hostname_entry;
	_tmp18_ = auto_config_values;
	_tmp19_ = accounts_auto_config_values_get_imap_server (_tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = g_strconcat (_tmp20_, ":", NULL);
	_tmp22_ = _tmp21_;
	_tmp23_ = auto_config_values;
	_tmp24_ = accounts_auto_config_values_get_imap_port (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = g_strconcat (_tmp22_, _tmp25_, NULL);
	_tmp27_ = _tmp26_;
	gtk_entry_set_text (_tmp17_, _tmp27_);
	_g_free0 (_tmp27_);
	_g_free0 (_tmp22_);
	_tmp28_ = smtp_hostname_entry;
	_tmp29_ = auto_config_values;
	_tmp30_ = accounts_auto_config_values_get_smtp_server (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = g_strconcat (_tmp31_, ":", NULL);
	_tmp33_ = _tmp32_;
	_tmp34_ = auto_config_values;
	_tmp35_ = accounts_auto_config_values_get_smtp_port (_tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = g_strconcat (_tmp33_, _tmp36_, NULL);
	_tmp38_ = _tmp37_;
	gtk_entry_set_text (_tmp28_, _tmp38_);
	_g_free0 (_tmp38_);
	_g_free0 (_tmp33_);
	_tmp39_ = imap_tls_combo_box;
	_tmp40_ = auto_config_values;
	_tmp41_ = accounts_auto_config_values_get_imap_tls_method (_tmp40_);
	_tmp42_ = _tmp41_;
	accounts_tls_combo_box_set_method (_tmp39_, _tmp42_);
	_tmp43_ = smtp_tls_combo_box;
	_tmp44_ = auto_config_values;
	_tmp45_ = accounts_auto_config_values_get_smtp_tls_method (_tmp44_);
	_tmp46_ = _tmp45_;
	accounts_tls_combo_box_set_method (_tmp43_, _tmp46_);
	_tmp47_ = self->priv->imap_hostname;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_widget_get_type (), GtkWidget));
	_tmp48_ = self->priv->smtp_hostname;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, gtk_widget_get_type (), GtkWidget));
	_tmp49_ = self->priv->imap_tls;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_widget_get_type (), GtkWidget));
	_tmp50_ = self->priv->smtp_tls;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, gtk_widget_get_type (), GtkWidget));
	_tmp51_ = auto_config_values;
	_tmp52_ = accounts_auto_config_values_get_id (_tmp51_);
	_tmp53_ = _tmp52_;
	_tmp54_ = _tmp53_;
	_tmp56_ = (NULL == _tmp54_) ? 0 : g_quark_from_string (_tmp54_);
	if (_tmp56_ == ((0 != _tmp55_label0) ? _tmp55_label0 : (_tmp55_label0 = g_quark_from_static_string ("googlemail.com")))) {
		switch (0) {
			default:
			{
				self->priv->provider = GEARY_SERVICE_PROVIDER_GMAIL;
				break;
			}
		}
	} else if (_tmp56_ == ((0 != _tmp55_label1) ? _tmp55_label1 : (_tmp55_label1 = g_quark_from_static_string ("hotmail.com")))) {
		switch (0) {
			default:
			{
				self->priv->provider = GEARY_SERVICE_PROVIDER_OUTLOOK;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				self->priv->provider = GEARY_SERVICE_PROVIDER_OTHER;
				break;
			}
		}
	}
	_g_object_unref0 (smtp_tls_combo_box);
	_g_object_unref0 (imap_tls_combo_box);
	_g_object_unref0 (smtp_hostname_entry);
	_g_object_unref0 (imap_hostname_entry);
	_accounts_auto_config_values_unref0 (auto_config_values);
}

static void
accounts_editor_add_pane_set_server_settings_from_hostname (AccountsEditorAddPane* self,
                                                            const gchar* hostname)
{
	GtkEntry* imap_hostname_entry = NULL;
	AccountsHostnameRow* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GtkEntry* _tmp3_;
	GtkEntry* smtp_hostname_entry = NULL;
	AccountsHostnameRow* _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	GtkEntry* _tmp7_;
	gchar* smtp_hostname = NULL;
	gchar* _tmp8_;
	gchar* imap_hostname = NULL;
	gchar* _tmp9_;
	gchar* last_imap_hostname = NULL;
	gchar* _tmp10_;
	gchar* last_smtp_hostname = NULL;
	gchar* _tmp11_;
	AccountsHostnameRow* _tmp12_;
	AccountsHostnameRow* _tmp13_;
	const gchar* _tmp14_;
	GtkEntry* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	GtkEntry* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp31_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	g_return_if_fail (hostname != NULL);
	_tmp0_ = self->priv->imap_hostname;
	_tmp1_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 ((GtkEntry*) _tmp2_);
	imap_hostname_entry = _tmp3_;
	_tmp4_ = self->priv->smtp_hostname;
	_tmp5_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp6_ = _tmp5_;
	_tmp7_ = _g_object_ref0 ((GtkEntry*) _tmp6_);
	smtp_hostname_entry = _tmp7_;
	_tmp8_ = g_strconcat ("smtp.", hostname, NULL);
	smtp_hostname = _tmp8_;
	_tmp9_ = g_strconcat ("imap.", hostname, NULL);
	imap_hostname = _tmp9_;
	_tmp10_ = g_strdup ("");
	last_imap_hostname = _tmp10_;
	_tmp11_ = g_strdup ("");
	last_smtp_hostname = _tmp11_;
	_tmp12_ = self->priv->imap_hostname;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget));
	_tmp13_ = self->priv->smtp_hostname;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
	_tmp14_ = self->priv->last_valid_hostname;
	if (g_strcmp0 (_tmp14_, "") != 0) {
		const gchar* _tmp15_;
		gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp15_ = self->priv->last_valid_hostname;
		_tmp16_ = g_strconcat ("imap.", _tmp15_, NULL);
		_g_free0 (last_imap_hostname);
		last_imap_hostname = _tmp16_;
		_tmp17_ = self->priv->last_valid_hostname;
		_tmp18_ = g_strconcat ("smtp.", _tmp17_, NULL);
		_g_free0 (last_smtp_hostname);
		last_smtp_hostname = _tmp18_;
	}
	_tmp19_ = imap_hostname_entry;
	_tmp20_ = gtk_entry_get_text (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = last_imap_hostname;
	if (g_strcmp0 (_tmp21_, _tmp22_) == 0) {
		GtkEntry* _tmp23_;
		const gchar* _tmp24_;
		_tmp23_ = imap_hostname_entry;
		_tmp24_ = imap_hostname;
		gtk_entry_set_text (_tmp23_, _tmp24_);
	}
	_tmp25_ = smtp_hostname_entry;
	_tmp26_ = gtk_entry_get_text (_tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = last_smtp_hostname;
	if (g_strcmp0 (_tmp27_, _tmp28_) == 0) {
		GtkEntry* _tmp29_;
		const gchar* _tmp30_;
		_tmp29_ = smtp_hostname_entry;
		_tmp30_ = smtp_hostname;
		gtk_entry_set_text (_tmp29_, _tmp30_);
	}
	_tmp31_ = g_strdup (hostname);
	_g_free0 (self->priv->last_valid_hostname);
	self->priv->last_valid_hostname = _tmp31_;
	_g_free0 (last_smtp_hostname);
	_g_free0 (last_imap_hostname);
	_g_free0 (imap_hostname);
	_g_free0 (smtp_hostname);
	_g_object_unref0 (smtp_hostname_entry);
	_g_object_unref0 (imap_hostname_entry);
}

static void
__lambda76_ (AccountsEditorAddPane* self,
             GObject* obj,
             GAsyncResult* res)
{
	gboolean add_local = FALSE;
	GError* _inner_error0_ = NULL;
	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 ()));
	add_local = FALSE;
	{
		AccountsManager* _tmp0_;
		_tmp0_ = self->priv->accounts;
		accounts_manager_add_goa_account_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (g_error_matches (_inner_error0_, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
				goto __catch0_g_io_error_not_supported;
			}
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_io_error_not_supported:
	{
		g_clear_error (&_inner_error0_);
		add_local = TRUE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GEnumValue* _tmp1_;
		GError* _tmp2_;
		const gchar* _tmp3_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = g_enum_get_value (g_type_class_ref (GEARY_TYPE_SERVICE_PROVIDER), self->priv->provider);
		_tmp2_ = err;
		_tmp3_ = _tmp2_->message;
		g_debug ("accounts-editor-add-pane.vala:453: Failed to add %s via GOA: %s", (_tmp1_ != NULL) ? _tmp1_->value_name : NULL, _tmp3_);
		add_local = TRUE;
		_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;
	}
	if (add_local) {
		accounts_editor_add_pane_switch_to_server_settings (self);
	} else {
		AccountsEditor* _tmp4_;
		AccountsEditor* _tmp5_;
		_tmp4_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp5_ = _tmp4_;
		accounts_editor_pop (_tmp5_);
	}
}

static void
___lambda76__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda76_ ((AccountsEditorAddPane*) self, source_object, res);
	g_object_unref (self);
}

static void
accounts_editor_add_pane_add_goa_account (AccountsEditorAddPane* self)
{
	AccountsManager* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_tmp0_ = self->priv->accounts;
	_tmp1_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp2_ = _tmp1_;
	accounts_manager_add_goa_account (_tmp0_, self->priv->provider, _tmp2_, ___lambda76__gasync_ready_callback, g_object_ref (self));
}

static void
accounts_editor_add_pane_on_validated (AccountsEditorAddPane* self,
                                       ComponentsValidatorTrigger reason)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	accounts_editor_add_pane_check_validation (self);
	if (self->priv->controls_valid) {
		_tmp0_ = reason == COMPONENTS_VALIDATOR_TRIGGER_ACTIVATED;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkButton* _tmp1_;
		_tmp1_ = self->priv->action_button;
		gtk_button_clicked (_tmp1_);
	}
}

static void
accounts_editor_add_pane_on_activated (AccountsEditorAddPane* self)
{
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	if (self->priv->controls_valid) {
		GtkButton* _tmp0_;
		_tmp0_ = self->priv->action_button;
		gtk_button_clicked (_tmp0_);
	}
}

static Block42Data*
block42_data_ref (Block42Data* _data42_)
{
	g_atomic_int_inc (&_data42_->_ref_count_);
	return _data42_;
}

static void
block42_data_unref (void * _userdata_)
{
	Block42Data* _data42_;
	_data42_ = (Block42Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data42_->_ref_count_)) {
		AccountsEditorAddPane* self;
		self = _data42_->self;
		_accounts_auto_config_unref0 (_data42_->auto_config);
		_g_free0 (_data42_->hostname);
		_g_object_unref0 (self);
		g_slice_free (Block42Data, _data42_);
	}
}

static void
__lambda74_ (Block42Data* _data42_,
             GObject* obj,
             GAsyncResult* res)
{
	AccountsEditorAddPane* self;
	GtkSpinner* _tmp4_;
	GtkSpinner* _tmp5_;
	GError* _inner_error0_ = NULL;
	self = _data42_->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 ()));
	{
		AccountsAutoConfig* _tmp0_;
		_tmp0_ = _data42_->auto_config;
		accounts_editor_add_pane_set_server_settings_from_autoconfig (self, _tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == ACCOUNTS_AUTO_CONFIG_ERROR) {
				goto __catch0_accounts_auto_config_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
	}
	goto __finally0;
	__catch0_accounts_auto_config_error:
	{
		GError* err = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = err;
		_tmp2_ = _tmp1_->message;
		g_debug ("accounts-editor-add-pane.vala:512: Error getting auto configuration: %" \
"s", _tmp2_);
		_tmp3_ = _data42_->hostname;
		accounts_editor_add_pane_set_server_settings_from_hostname (self, _tmp3_);
		_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;
	}
	_tmp4_ = self->priv->action_spinner;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), FALSE);
	_tmp5_ = self->priv->action_spinner;
	g_object_set (_tmp5_, "active", FALSE, NULL);
}

static void
___lambda74__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda74_ (self, source_object, res);
	block42_data_unref (self);
}

static void
accounts_editor_add_pane_on_email_changed (AccountsEditorAddPane* self)
{
	Block42Data* _data42_;
	GtkEntry* imap_login_entry = NULL;
	AccountsLoginRow* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GtkEntry* _tmp3_;
	GtkEntry* smtp_login_entry = NULL;
	AccountsLoginRow* _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	GtkEntry* _tmp7_;
	GCancellable* _tmp8_;
	AccountsEmailRow* _tmp9_;
	ComponentsValidator* _tmp10_;
	ComponentsValidator* _tmp11_;
	ComponentsValidatorValidity _tmp12_;
	ComponentsValidatorValidity _tmp13_;
	gchar* email = NULL;
	AccountsEmailRow* _tmp14_;
	gconstpointer _tmp15_;
	gconstpointer _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar** _tmp21_;
	gchar** _tmp22_;
	gchar** _tmp23_;
	gint _tmp23__length1;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GtkEntry* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	GtkEntry* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	GtkSpinner* _tmp41_;
	GtkSpinner* _tmp42_;
	GCancellable* _tmp43_;
	GCancellable* _tmp44_;
	AccountsAutoConfig* _tmp45_;
	AccountsAutoConfig* _tmp46_;
	const gchar* _tmp47_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_data42_ = g_slice_new0 (Block42Data);
	_data42_->_ref_count_ = 1;
	_data42_->self = g_object_ref (self);
	_tmp0_ = self->priv->imap_login;
	_tmp1_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = _g_object_ref0 ((GtkEntry*) _tmp2_);
	imap_login_entry = _tmp3_;
	_tmp4_ = self->priv->smtp_login;
	_tmp5_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp6_ = _tmp5_;
	_tmp7_ = _g_object_ref0 ((GtkEntry*) _tmp6_);
	smtp_login_entry = _tmp7_;
	_tmp8_ = self->priv->auto_config_cancellable;
	g_cancellable_cancel (_tmp8_);
	_tmp9_ = self->priv->email;
	_tmp10_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
	_tmp11_ = _tmp10_;
	_tmp12_ = components_validator_get_state (_tmp11_);
	_tmp13_ = _tmp12_;
	if (_tmp13_ != COMPONENTS_VALIDATOR_VALIDITY_VALID) {
		_g_object_unref0 (smtp_login_entry);
		_g_object_unref0 (imap_login_entry);
		block42_data_unref (_data42_);
		_data42_ = NULL;
		return;
	}
	_tmp14_ = self->priv->email;
	_tmp15_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp16_ = _tmp15_;
	_tmp17_ = gtk_entry_get_text ((GtkEntry*) _tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = g_strdup (_tmp18_);
	email = _tmp19_;
	_tmp20_ = email;
	_tmp22_ = _tmp21_ = g_strsplit (_tmp20_, "@", 0);
	_tmp23_ = _tmp22_;
	_tmp23__length1 = _vala_array_length (_tmp21_);
	_tmp24_ = _tmp23_[1];
	_tmp25_ = g_strdup (_tmp24_);
	_tmp26_ = _tmp25_;
	_tmp23_ = (_vala_array_free (_tmp23_, _tmp23__length1, (GDestroyNotify) g_free), NULL);
	_data42_->hostname = _tmp26_;
	_tmp27_ = imap_login_entry;
	_tmp28_ = gtk_entry_get_text (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = self->priv->last_valid_email;
	if (g_strcmp0 (_tmp29_, _tmp30_) == 0) {
		GtkEntry* _tmp31_;
		const gchar* _tmp32_;
		_tmp31_ = imap_login_entry;
		_tmp32_ = email;
		gtk_entry_set_text (_tmp31_, _tmp32_);
	}
	_tmp33_ = smtp_login_entry;
	_tmp34_ = gtk_entry_get_text (_tmp33_);
	_tmp35_ = _tmp34_;
	_tmp36_ = self->priv->last_valid_email;
	if (g_strcmp0 (_tmp35_, _tmp36_) == 0) {
		GtkEntry* _tmp37_;
		const gchar* _tmp38_;
		_tmp37_ = smtp_login_entry;
		_tmp38_ = email;
		gtk_entry_set_text (_tmp37_, _tmp38_);
	}
	_tmp39_ = email;
	_tmp40_ = g_strdup (_tmp39_);
	_g_free0 (self->priv->last_valid_email);
	self->priv->last_valid_email = _tmp40_;
	_tmp41_ = self->priv->action_spinner;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, gtk_widget_get_type (), GtkWidget), TRUE);
	_tmp42_ = self->priv->action_spinner;
	g_object_set (_tmp42_, "active", TRUE, NULL);
	_tmp43_ = g_cancellable_new ();
	_g_object_unref0 (self->priv->auto_config_cancellable);
	self->priv->auto_config_cancellable = _tmp43_;
	_tmp44_ = self->priv->auto_config_cancellable;
	_tmp45_ = accounts_auto_config_new (_tmp44_);
	_data42_->auto_config = _tmp45_;
	_tmp46_ = _data42_->auto_config;
	_tmp47_ = _data42_->hostname;
	accounts_auto_config_get_config (_tmp46_, _tmp47_, ___lambda74__gasync_ready_callback, block42_data_ref (_data42_));
	_g_free0 (email);
	_g_object_unref0 (smtp_login_entry);
	_g_object_unref0 (imap_login_entry);
	block42_data_unref (_data42_);
	_data42_ = NULL;
}

static void
accounts_editor_add_pane_on_smtp_auth_changed (AccountsEditorAddPane* self)
{
	AccountsOutgoingAuthRow* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GearyCredentialsRequirement _tmp3_;
	GearyCredentialsRequirement _tmp4_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_tmp0_ = self->priv->smtp_auth;
	_tmp1_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = accounts_outgoing_auth_combo_box_get_source ((AccountsOutgoingAuthComboBox*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == GEARY_CREDENTIALS_REQUIREMENT_CUSTOM) {
		GtkListBox* _tmp5_;
		AccountsLoginRow* _tmp6_;
		GtkListBox* _tmp7_;
		AccountsPasswordRow* _tmp8_;
		_tmp5_ = self->priv->sending_list;
		_tmp6_ = self->priv->smtp_login;
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
		_tmp7_ = self->priv->sending_list;
		_tmp8_ = self->priv->smtp_password;
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
	} else {
		AccountsLoginRow* _tmp9_;
		GtkContainer* _tmp10_;
		GtkContainer* _tmp11_;
		_tmp9_ = self->priv->smtp_login;
		_tmp10_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
		_tmp11_ = _tmp10_;
		if (_tmp11_ != NULL) {
			GtkListBox* _tmp12_;
			AccountsLoginRow* _tmp13_;
			GtkListBox* _tmp14_;
			AccountsPasswordRow* _tmp15_;
			_tmp12_ = self->priv->sending_list;
			_tmp13_ = self->priv->smtp_login;
			gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
			_tmp14_ = self->priv->sending_list;
			_tmp15_ = self->priv->smtp_password;
			gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget));
		}
	}
	accounts_editor_add_pane_check_validation (self);
}

static void
__lambda75_ (AccountsEditorAddPane* self,
             GObject* obj,
             GAsyncResult* res)
{
	GCancellable* _tmp2_;
	GCancellable* _tmp3_;
	GError* _inner_error0_ = NULL;
	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 ()));
	{
		AccountsEditor* _tmp0_;
		AccountsEditor* _tmp1_;
		_tmp0_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp1_ = _tmp0_;
		accounts_editor_prompt_pin_certificate_finish (_tmp1_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == APPLICATION_CERTIFICATE_MANAGER_ERROR) {
				goto __catch0_application_certificate_manager_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
	}
	goto __finally0;
	__catch0_application_certificate_manager_error:
	{
		g_clear_error (&_inner_error0_);
		return;
	}
	__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;
	}
	_tmp2_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp3_ = _tmp2_;
	accounts_editor_add_pane_validate_account (self, _tmp3_, NULL, NULL);
}

static void
___lambda75__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda75_ ((AccountsEditorAddPane*) self, source_object, res);
	g_object_unref (self);
}

static void
accounts_editor_add_pane_on_untrusted_host (AccountsEditorAddPane* self,
                                            GearyAccountInformation* account,
                                            GearyServiceInformation* service,
                                            GearyEndpoint* endpoint,
                                            GTlsConnection* cx)
{
	AccountsEditor* _tmp0_;
	AccountsEditor* _tmp1_;
	GCancellable* _tmp2_;
	GCancellable* _tmp3_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (service, GEARY_TYPE_SERVICE_INFORMATION));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (endpoint, GEARY_TYPE_ENDPOINT));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (cx, g_tls_connection_get_type ()));
	_tmp0_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp3_ = _tmp2_;
	accounts_editor_prompt_pin_certificate (_tmp1_, account, service, endpoint, _tmp3_, ___lambda75__gasync_ready_callback, g_object_ref (self));
}

static void
accounts_editor_add_pane_on_action_button_clicked (AccountsEditorAddPane* self)
{
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	if (g_strcmp0 (_tmp1_, "user_settings") == 0) {
		switch (self->priv->provider) {
			case GEARY_SERVICE_PROVIDER_GMAIL:
			case GEARY_SERVICE_PROVIDER_OUTLOOK:
			{
				accounts_editor_add_pane_add_goa_account (self);
				break;
			}
			case GEARY_SERVICE_PROVIDER_OTHER:
			{
				accounts_editor_add_pane_switch_to_server_settings (self);
				break;
			}
			default:
			break;
		}
	} else {
		GCancellable* _tmp2_;
		GCancellable* _tmp3_;
		_tmp2_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp3_ = _tmp2_;
		accounts_editor_add_pane_validate_account (self, _tmp3_, NULL, NULL);
	}
}

static void
_accounts_editor_add_pane_on_action_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	accounts_editor_add_pane_on_action_button_clicked ((AccountsEditorAddPane*) self);
}

static void
accounts_editor_add_pane_on_back_button_clicked (AccountsEditorAddPane* self)
{
	GtkStack* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self));
	_tmp0_ = self->priv->stack;
	_tmp1_ = gtk_stack_get_visible_child_name (_tmp0_);
	if (g_strcmp0 (_tmp1_, "user_settings") == 0) {
		AccountsEditor* _tmp2_;
		AccountsEditor* _tmp3_;
		_tmp2_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp3_ = _tmp2_;
		accounts_editor_pop (_tmp3_);
	} else {
		accounts_editor_add_pane_switch_to_user_settings (self);
	}
}

static void
_accounts_editor_add_pane_on_back_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	accounts_editor_add_pane_on_back_button_clicked ((AccountsEditorAddPane*) self);
}

static gboolean
accounts_editor_add_pane_on_list_keynav_failed (AccountsEditorAddPane* self,
                                                GtkWidget* widget,
                                                GtkDirectionType direction)
{
	gboolean ret = FALSE;
	GtkContainer* next = NULL;
	GtkContainer* _tmp12_;
	gboolean result;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_ADD_PANE (self), FALSE);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (widget, gtk_widget_get_type ()), FALSE);
	ret = GDK_EVENT_PROPAGATE;
	next = NULL;
	if (direction == GTK_DIR_DOWN) {
		GtkListBox* _tmp0_;
		_tmp0_ = self->priv->details_list;
		if (widget == G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget)) {
			GtkListBox* _tmp1_;
			GtkContainer* _tmp2_;
			g_debug ("accounts-editor-add-pane.vala:584: Have details!");
			_tmp1_ = self->priv->receiving_list;
			_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_container_get_type (), GtkContainer));
			_g_object_unref0 (next);
			next = _tmp2_;
		} else {
			GtkListBox* _tmp3_;
			_tmp3_ = self->priv->receiving_list;
			if (widget == G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)) {
				GtkListBox* _tmp4_;
				GtkContainer* _tmp5_;
				_tmp4_ = self->priv->sending_list;
				_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_container_get_type (), GtkContainer));
				_g_object_unref0 (next);
				next = _tmp5_;
			}
		}
	} else {
		if (direction == GTK_DIR_UP) {
			GtkListBox* _tmp6_;
			_tmp6_ = self->priv->sending_list;
			if (widget == G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget)) {
				GtkListBox* _tmp7_;
				GtkContainer* _tmp8_;
				_tmp7_ = self->priv->receiving_list;
				_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_container_get_type (), GtkContainer));
				_g_object_unref0 (next);
				next = _tmp8_;
			} else {
				GtkListBox* _tmp9_;
				_tmp9_ = self->priv->receiving_list;
				if (widget == G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget)) {
					GtkListBox* _tmp10_;
					GtkContainer* _tmp11_;
					_tmp10_ = self->priv->details_list;
					_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_container_get_type (), GtkContainer));
					_g_object_unref0 (next);
					next = _tmp11_;
				}
			}
		}
	}
	_tmp12_ = next;
	if (_tmp12_ != NULL) {
		GtkContainer* _tmp13_;
		_tmp13_ = next;
		gtk_widget_child_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget), direction);
		ret = GDK_EVENT_STOP;
	}
	result = ret;
	_g_object_unref0 (next);
	return result;
}

static gboolean
_accounts_editor_add_pane_on_list_keynav_failed_gtk_widget_keynav_failed (GtkWidget* _sender,
                                                                          GtkDirectionType direction,
                                                                          gpointer self)
{
	gboolean result;
	result = accounts_editor_add_pane_on_list_keynav_failed ((AccountsEditorAddPane*) self, _sender, direction);
	return result;
}

static void
accounts_editor_add_pane_class_init (AccountsEditorAddPaneClass * klass,
                                     gpointer klass_data)
{
	accounts_editor_add_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsEditorAddPane_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_editor_add_pane_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_editor_add_pane_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_editor_add_pane_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_ADD_PANE_INITIAL_WIDGET_PROPERTY, accounts_editor_add_pane_properties[ACCOUNTS_EDITOR_ADD_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_ADD_PANE_IS_OPERATION_RUNNING_PROPERTY, accounts_editor_add_pane_properties[ACCOUNTS_EDITOR_ADD_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_ADD_PANE_OP_CANCELLABLE_PROPERTY, accounts_editor_add_pane_properties[ACCOUNTS_EDITOR_ADD_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_ADD_PANE_EDITOR_PROPERTY, accounts_editor_add_pane_properties[ACCOUNTS_EDITOR_ADD_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_add_pane.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, header));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pane_adjustment", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, pane_adjustment));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "details_list", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, details_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "receiving_list", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, receiving_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sending_list", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, sending_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "action_button", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, action_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_button", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, back_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "action_spinner", FALSE, AccountsEditorAddPane_private_offset + G_STRUCT_OFFSET (AccountsEditorAddPanePrivate, action_spinner));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_action_button_clicked", G_CALLBACK(_accounts_editor_add_pane_on_action_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_back_button_clicked", G_CALLBACK(_accounts_editor_add_pane_on_back_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_list_keynav_failed", G_CALLBACK(_accounts_editor_add_pane_on_list_keynav_failed_gtk_widget_keynav_failed));
}

static void
accounts_editor_add_pane_accounts_editor_pane_interface_init (AccountsEditorPaneIface * iface,
                                                              gpointer iface_data)
{
	accounts_editor_add_pane_accounts_editor_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_header = (GtkHeaderBar* (*) (AccountsEditorPane*)) accounts_editor_add_pane_real_get_header;
	iface->get_initial_widget = accounts_editor_add_pane_real_get_initial_widget;
	iface->get_is_operation_running = accounts_editor_add_pane_real_get_is_operation_running;
	iface->set_is_operation_running = accounts_editor_add_pane_real_set_is_operation_running;
	iface->get_op_cancellable = accounts_editor_add_pane_real_get_op_cancellable;
	iface->set_op_cancellable = accounts_editor_add_pane_real_set_op_cancellable;
	iface->get_editor = accounts_editor_add_pane_real_get_editor;
	iface->set_editor = accounts_editor_add_pane_real_set_editor;
}

static void
accounts_editor_add_pane_instance_init (AccountsEditorAddPane * self,
                                        gpointer klass)
{
	GCancellable* _tmp0_;
	AccountsEmailRow* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GCancellable* _tmp4_;
	AccountsHostnameRow* _tmp5_;
	AccountsTransportSecurityRow* _tmp6_;
	AccountsLoginRow* _tmp7_;
	AccountsPasswordRow* _tmp8_;
	AccountsHostnameRow* _tmp9_;
	AccountsTransportSecurityRow* _tmp10_;
	AccountsOutgoingAuthRow* _tmp11_;
	AccountsLoginRow* _tmp12_;
	AccountsPasswordRow* _tmp13_;
	self->priv = accounts_editor_add_pane_get_instance_private (self);
	_tmp0_ = g_cancellable_new ();
	self->priv->_op_cancellable = _tmp0_;
	_tmp1_ = accounts_email_row_new ();
	g_object_ref_sink (_tmp1_);
	self->priv->email = _tmp1_;
	_tmp2_ = g_strdup ("");
	self->priv->last_valid_email = _tmp2_;
	_tmp3_ = g_strdup ("");
	self->priv->last_valid_hostname = _tmp3_;
	_tmp4_ = g_cancellable_new ();
	self->priv->auto_config_cancellable = _tmp4_;
	_tmp5_ = accounts_hostname_row_new (GEARY_PROTOCOL_IMAP);
	g_object_ref_sink (_tmp5_);
	self->priv->imap_hostname = _tmp5_;
	_tmp6_ = accounts_transport_security_row_new ();
	g_object_ref_sink (_tmp6_);
	self->priv->imap_tls = _tmp6_;
	_tmp7_ = accounts_login_row_new ();
	g_object_ref_sink (_tmp7_);
	self->priv->imap_login = _tmp7_;
	_tmp8_ = accounts_password_row_new ();
	g_object_ref_sink (_tmp8_);
	self->priv->imap_password = _tmp8_;
	_tmp9_ = accounts_hostname_row_new (GEARY_PROTOCOL_SMTP);
	g_object_ref_sink (_tmp9_);
	self->priv->smtp_hostname = _tmp9_;
	_tmp10_ = accounts_transport_security_row_new ();
	g_object_ref_sink (_tmp10_);
	self->priv->smtp_tls = _tmp10_;
	_tmp11_ = accounts_outgoing_auth_row_new ();
	g_object_ref_sink (_tmp11_);
	self->priv->smtp_auth = _tmp11_;
	_tmp12_ = accounts_login_row_new ();
	g_object_ref_sink (_tmp12_);
	self->priv->smtp_login = _tmp12_;
	_tmp13_ = accounts_password_row_new ();
	g_object_ref_sink (_tmp13_);
	self->priv->smtp_password = _tmp13_;
	self->priv->controls_valid = FALSE;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
accounts_editor_add_pane_finalize (GObject * obj)
{
	AccountsEditorAddPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	_g_object_unref0 (self->priv->_op_cancellable);
	_g_object_unref0 (self->priv->accounts);
	_g_object_unref0 (self->priv->engine);
	_g_object_unref0 (self->priv->real_name);
	_g_object_unref0 (self->priv->email);
	_g_free0 (self->priv->last_valid_email);
	_g_free0 (self->priv->last_valid_hostname);
	_g_object_unref0 (self->priv->auto_config_cancellable);
	_g_object_unref0 (self->priv->imap_hostname);
	_g_object_unref0 (self->priv->imap_tls);
	_g_object_unref0 (self->priv->imap_login);
	_g_object_unref0 (self->priv->imap_password);
	_g_object_unref0 (self->priv->smtp_hostname);
	_g_object_unref0 (self->priv->smtp_tls);
	_g_object_unref0 (self->priv->smtp_auth);
	_g_object_unref0 (self->priv->smtp_login);
	_g_object_unref0 (self->priv->smtp_password);
	G_OBJECT_CLASS (accounts_editor_add_pane_parent_class)->finalize (obj);
}

/**
 * An account editor pane for adding a new account.
 */
static GType
accounts_editor_add_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsEditorAddPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_editor_add_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsEditorAddPane), 0, (GInstanceInitFunc) accounts_editor_add_pane_instance_init, NULL };
	static const GInterfaceInfo accounts_editor_pane_info = { (GInterfaceInitFunc) accounts_editor_add_pane_accounts_editor_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType accounts_editor_add_pane_type_id;
	accounts_editor_add_pane_type_id = g_type_register_static (gtk_grid_get_type (), "AccountsEditorAddPane", &g_define_type_info, 0);
	g_type_add_interface_static (accounts_editor_add_pane_type_id, ACCOUNTS_TYPE_EDITOR_PANE, &accounts_editor_pane_info);
	AccountsEditorAddPane_private_offset = g_type_add_instance_private (accounts_editor_add_pane_type_id, sizeof (AccountsEditorAddPanePrivate));
	return accounts_editor_add_pane_type_id;
}

GType
accounts_editor_add_pane_get_type (void)
{
	static volatile gsize accounts_editor_add_pane_type_id__once = 0;
	if (g_once_init_enter (&accounts_editor_add_pane_type_id__once)) {
		GType accounts_editor_add_pane_type_id;
		accounts_editor_add_pane_type_id = accounts_editor_add_pane_get_type_once ();
		g_once_init_leave (&accounts_editor_add_pane_type_id__once, accounts_editor_add_pane_type_id);
	}
	return accounts_editor_add_pane_type_id__once;
}

static void
_vala_accounts_editor_add_pane_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	AccountsEditorAddPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	switch (property_id) {
		case ACCOUNTS_EDITOR_ADD_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_ADD_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_ADD_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_ADD_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_add_pane_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	AccountsEditorAddPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_ADD_PANE, AccountsEditorAddPane);
	switch (property_id) {
		case ACCOUNTS_EDITOR_ADD_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_ADD_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_ADD_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_add_pane_row_get_instance_private (AccountsAddPaneRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsAddPaneRow_private_offset);
}

ComponentsValidator*
accounts_add_pane_row_get_validator (AccountsAddPaneRow* self)
{
	ComponentsValidator* result;
	ComponentsValidator* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_ADD_PANE_ROW (self), NULL);
	_tmp0_ = self->priv->_validator;
	result = _tmp0_;
	return result;
}

void
accounts_add_pane_row_set_validator (AccountsAddPaneRow* self,
                                     ComponentsValidator* value)
{
	ComponentsValidator* old_value;
	g_return_if_fail (ACCOUNTS_IS_ADD_PANE_ROW (self));
	old_value = accounts_add_pane_row_get_validator (self);
	if (old_value != value) {
		ComponentsValidator* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_validator);
		self->priv->_validator = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_add_pane_row_properties[ACCOUNTS_ADD_PANE_ROW_VALIDATOR_PROPERTY]);
	}
}

AccountsAddPaneRow*
accounts_add_pane_row_construct (GType object_type,
                                 GType value_type,
                                 GBoxedCopyFunc value_dup_func,
                                 GDestroyNotify value_destroy_func,
                                 const gchar* label,
                                 gconstpointer value)
{
	AccountsAddPaneRow * self = NULL;
	g_return_val_if_fail (label != NULL, NULL);
	self = (AccountsAddPaneRow*) accounts_labelled_editor_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_ADD_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, value_type, (GBoxedCopyFunc) value_dup_func, (GDestroyNotify) value_destroy_func, label, value);
	self->priv->value_type = value_type;
	self->priv->value_dup_func = value_dup_func;
	self->priv->value_destroy_func = value_destroy_func;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	return self;
}

static void
accounts_add_pane_row_class_init (AccountsAddPaneRowClass * klass,
                                  gpointer klass_data)
{
	accounts_add_pane_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsAddPaneRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_add_pane_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_add_pane_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_add_pane_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ADD_PANE_ROW_VALUE_TYPE, g_param_spec_gtype ("value-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ADD_PANE_ROW_VALUE_DUP_FUNC, g_param_spec_pointer ("value-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ADD_PANE_ROW_VALUE_DESTROY_FUNC, g_param_spec_pointer ("value-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ADD_PANE_ROW_VALIDATOR_PROPERTY, accounts_add_pane_row_properties[ACCOUNTS_ADD_PANE_ROW_VALIDATOR_PROPERTY] = g_param_spec_object ("validator", "validator", "validator", COMPONENTS_TYPE_VALIDATOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
accounts_add_pane_row_instance_init (AccountsAddPaneRow * self,
                                     gpointer klass)
{
	self->priv = accounts_add_pane_row_get_instance_private (self);
}

static void
accounts_add_pane_row_finalize (GObject * obj)
{
	AccountsAddPaneRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow);
	_g_object_unref0 (self->priv->_validator);
	G_OBJECT_CLASS (accounts_add_pane_row_parent_class)->finalize (obj);
}

static GType
accounts_add_pane_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsAddPaneRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_add_pane_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsAddPaneRow), 0, (GInstanceInitFunc) accounts_add_pane_row_instance_init, NULL };
	GType accounts_add_pane_row_type_id;
	accounts_add_pane_row_type_id = g_type_register_static (ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, "AccountsAddPaneRow", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	AccountsAddPaneRow_private_offset = g_type_add_instance_private (accounts_add_pane_row_type_id, sizeof (AccountsAddPaneRowPrivate));
	return accounts_add_pane_row_type_id;
}

GType
accounts_add_pane_row_get_type (void)
{
	static volatile gsize accounts_add_pane_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_add_pane_row_type_id__once)) {
		GType accounts_add_pane_row_type_id;
		accounts_add_pane_row_type_id = accounts_add_pane_row_get_type_once ();
		g_once_init_leave (&accounts_add_pane_row_type_id__once, accounts_add_pane_row_type_id);
	}
	return accounts_add_pane_row_type_id__once;
}

static void
_vala_accounts_add_pane_row_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	AccountsAddPaneRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow);
	switch (property_id) {
		case ACCOUNTS_ADD_PANE_ROW_VALIDATOR_PROPERTY:
		g_value_set_object (value, accounts_add_pane_row_get_validator (self));
		break;
		case ACCOUNTS_ADD_PANE_ROW_VALUE_TYPE:
		g_value_set_gtype (value, self->priv->value_type);
		break;
		case ACCOUNTS_ADD_PANE_ROW_VALUE_DUP_FUNC:
		g_value_set_pointer (value, self->priv->value_dup_func);
		break;
		case ACCOUNTS_ADD_PANE_ROW_VALUE_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->value_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_add_pane_row_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	AccountsAddPaneRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow);
	switch (property_id) {
		case ACCOUNTS_ADD_PANE_ROW_VALIDATOR_PROPERTY:
		accounts_add_pane_row_set_validator (self, g_value_get_object (value));
		break;
		case ACCOUNTS_ADD_PANE_ROW_VALUE_TYPE:
		self->priv->value_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_ADD_PANE_ROW_VALUE_DUP_FUNC:
		self->priv->value_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_ADD_PANE_ROW_VALUE_DESTROY_FUNC:
		self->priv->value_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_entry_row_get_instance_private (AccountsEntryRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsEntryRow_private_offset);
}

AccountsEntryRow*
accounts_entry_row_construct (GType object_type,
                              const gchar* label,
                              const gchar* initial_value,
                              const gchar* placeholder)
{
	AccountsEntryRow * self = NULL;
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	const gchar* _tmp2_ = NULL;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	const gchar* _tmp5_ = NULL;
	gconstpointer _tmp6_;
	gconstpointer _tmp7_;
	gconstpointer _tmp8_;
	gconstpointer _tmp9_;
	gconstpointer _tmp10_;
	gconstpointer _tmp11_;
	ComponentsEntryUndo* _tmp12_;
	g_return_val_if_fail (label != NULL, NULL);
	_tmp0_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	self = (AccountsEntryRow*) accounts_add_pane_row_construct (object_type, gtk_entry_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, label, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = initial_value;
	if (_tmp2_ == NULL) {
		_tmp2_ = "";
	}
	_tmp3_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp4_ = _tmp3_;
	gtk_entry_set_text ((GtkEntry*) _tmp4_, _tmp2_);
	_tmp5_ = placeholder;
	if (_tmp5_ == NULL) {
		_tmp5_ = "";
	}
	_tmp6_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp7_ = _tmp6_;
	gtk_entry_set_placeholder_text ((GtkEntry*) _tmp7_, _tmp5_);
	_tmp8_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp9_ = _tmp8_;
	gtk_entry_set_width_chars ((GtkEntry*) _tmp9_, 16);
	_tmp10_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp11_ = _tmp10_;
	_tmp12_ = components_entry_undo_new ((GtkEntry*) _tmp11_);
	_g_object_unref0 (self->priv->undo);
	self->priv->undo = _tmp12_;
	return self;
}

static gboolean
accounts_entry_row_real_focus (GtkWidget* base,
                               GtkDirectionType direction)
{
	AccountsEntryRow * self;
	gboolean ret = FALSE;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_ENTRY_ROW, AccountsEntryRow);
	ret = GDK_EVENT_PROPAGATE;
	switch (direction) {
		case GTK_DIR_TAB_FORWARD:
		case GTK_DIR_TAB_BACKWARD:
		{
			gconstpointer _tmp0_;
			gconstpointer _tmp1_;
			_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
			_tmp1_ = _tmp0_;
			ret = gtk_widget_child_focus (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _tmp1_, gtk_widget_get_type (), GtkWidget), direction);
			break;
		}
		default:
		{
			ret = GTK_WIDGET_CLASS (accounts_entry_row_parent_class)->focus (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow), gtk_widget_get_type (), GtkWidget), direction);
			break;
		}
	}
	result = ret;
	return result;
}

static void
accounts_entry_row_class_init (AccountsEntryRowClass * klass,
                               gpointer klass_data)
{
	accounts_entry_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsEntryRow_private_offset);
	((GtkWidgetClass *) klass)->focus = (gboolean (*) (GtkWidget*, GtkDirectionType)) accounts_entry_row_real_focus;
	G_OBJECT_CLASS (klass)->finalize = accounts_entry_row_finalize;
}

static void
accounts_entry_row_instance_init (AccountsEntryRow * self,
                                  gpointer klass)
{
	self->priv = accounts_entry_row_get_instance_private (self);
}

static void
accounts_entry_row_finalize (GObject * obj)
{
	AccountsEntryRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_ENTRY_ROW, AccountsEntryRow);
	_g_object_unref0 (self->priv->undo);
	G_OBJECT_CLASS (accounts_entry_row_parent_class)->finalize (obj);
}

static GType
accounts_entry_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsEntryRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_entry_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsEntryRow), 0, (GInstanceInitFunc) accounts_entry_row_instance_init, NULL };
	GType accounts_entry_row_type_id;
	accounts_entry_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ADD_PANE_ROW, "AccountsEntryRow", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	AccountsEntryRow_private_offset = g_type_add_instance_private (accounts_entry_row_type_id, sizeof (AccountsEntryRowPrivate));
	return accounts_entry_row_type_id;
}

GType
accounts_entry_row_get_type (void)
{
	static volatile gsize accounts_entry_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_entry_row_type_id__once)) {
		GType accounts_entry_row_type_id;
		accounts_entry_row_type_id = accounts_entry_row_get_type_once ();
		g_once_init_leave (&accounts_entry_row_type_id__once, accounts_entry_row_type_id);
	}
	return accounts_entry_row_type_id__once;
}

AccountsNameRow*
accounts_name_row_construct (GType object_type,
                             const gchar* default_name)
{
	AccountsNameRow * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	ComponentsValidator* _tmp4_;
	ComponentsValidator* _tmp5_;
	gconstpointer _tmp6_;
	gconstpointer _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	g_return_val_if_fail (default_name != NULL, NULL);
	_tmp0_ = string_strip (default_name);
	_tmp1_ = _tmp0_;
	self = (AccountsNameRow*) accounts_entry_row_construct (object_type, _ ("Your name"), _tmp1_, NULL);
	_g_free0 (_tmp1_);
	_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = components_validator_new ((GtkEntry*) _tmp3_);
	_tmp5_ = _tmp4_;
	accounts_add_pane_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow), _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp7_ = _tmp6_;
	_tmp8_ = gtk_entry_get_text ((GtkEntry*) _tmp7_);
	_tmp9_ = _tmp8_;
	if (g_strcmp0 (_tmp9_, "") != 0) {
		ComponentsValidator* _tmp10_;
		ComponentsValidator* _tmp11_;
		_tmp10_ = accounts_add_pane_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow));
		_tmp11_ = _tmp10_;
		components_validator_validate (_tmp11_);
	}
	return self;
}

AccountsNameRow*
accounts_name_row_new (const gchar* default_name)
{
	return accounts_name_row_construct (ACCOUNTS_TYPE_NAME_ROW, default_name);
}

static void
accounts_name_row_class_init (AccountsNameRowClass * klass,
                              gpointer klass_data)
{
	accounts_name_row_parent_class = g_type_class_peek_parent (klass);
}

static void
accounts_name_row_instance_init (AccountsNameRow * self,
                                 gpointer klass)
{
}

static GType
accounts_name_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsNameRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_name_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsNameRow), 0, (GInstanceInitFunc) accounts_name_row_instance_init, NULL };
	GType accounts_name_row_type_id;
	accounts_name_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ENTRY_ROW, "AccountsNameRow", &g_define_type_info, 0);
	return accounts_name_row_type_id;
}

GType
accounts_name_row_get_type (void)
{
	static volatile gsize accounts_name_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_name_row_type_id__once)) {
		GType accounts_name_row_type_id;
		accounts_name_row_type_id = accounts_name_row_get_type_once ();
		g_once_init_leave (&accounts_name_row_type_id__once, accounts_name_row_type_id);
	}
	return accounts_name_row_type_id__once;
}

AccountsEmailRow*
accounts_email_row_construct (GType object_type)
{
	AccountsEmailRow * self = NULL;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	ComponentsEmailValidator* _tmp4_;
	ComponentsEmailValidator* _tmp5_;
	self = (AccountsEmailRow*) accounts_entry_row_construct (object_type, _ ("Email address"), NULL, _ ("person@example.com"));
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	gtk_entry_set_input_purpose ((GtkEntry*) _tmp1_, GTK_INPUT_PURPOSE_EMAIL);
	_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = components_email_validator_new ((GtkEntry*) _tmp3_);
	_tmp5_ = _tmp4_;
	accounts_add_pane_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, COMPONENTS_TYPE_VALIDATOR, ComponentsValidator));
	_g_object_unref0 (_tmp5_);
	return self;
}

AccountsEmailRow*
accounts_email_row_new (void)
{
	return accounts_email_row_construct (ACCOUNTS_TYPE_EMAIL_ROW);
}

static void
accounts_email_row_class_init (AccountsEmailRowClass * klass,
                               gpointer klass_data)
{
	accounts_email_row_parent_class = g_type_class_peek_parent (klass);
}

static void
accounts_email_row_instance_init (AccountsEmailRow * self,
                                  gpointer klass)
{
}

static GType
accounts_email_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsEmailRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_email_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsEmailRow), 0, (GInstanceInitFunc) accounts_email_row_instance_init, NULL };
	GType accounts_email_row_type_id;
	accounts_email_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ENTRY_ROW, "AccountsEmailRow", &g_define_type_info, 0);
	return accounts_email_row_type_id;
}

GType
accounts_email_row_get_type (void)
{
	static volatile gsize accounts_email_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_email_row_type_id__once)) {
		GType accounts_email_row_type_id;
		accounts_email_row_type_id = accounts_email_row_get_type_once ();
		g_once_init_leave (&accounts_email_row_type_id__once, accounts_email_row_type_id);
	}
	return accounts_email_row_type_id__once;
}

AccountsLoginRow*
accounts_login_row_construct (GType object_type)
{
	AccountsLoginRow * self = NULL;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	ComponentsValidator* _tmp4_;
	ComponentsValidator* _tmp5_;
	self = (AccountsLoginRow*) accounts_entry_row_construct (object_type, _ ("Login name"), NULL, NULL);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	gtk_entry_set_input_purpose ((GtkEntry*) _tmp1_, GTK_INPUT_PURPOSE_EMAIL);
	_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = components_validator_new ((GtkEntry*) _tmp3_);
	_tmp5_ = _tmp4_;
	accounts_add_pane_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow), _tmp5_);
	_g_object_unref0 (_tmp5_);
	return self;
}

AccountsLoginRow*
accounts_login_row_new (void)
{
	return accounts_login_row_construct (ACCOUNTS_TYPE_LOGIN_ROW);
}

static void
accounts_login_row_class_init (AccountsLoginRowClass * klass,
                               gpointer klass_data)
{
	accounts_login_row_parent_class = g_type_class_peek_parent (klass);
}

static void
accounts_login_row_instance_init (AccountsLoginRow * self,
                                  gpointer klass)
{
}

static GType
accounts_login_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsLoginRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_login_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsLoginRow), 0, (GInstanceInitFunc) accounts_login_row_instance_init, NULL };
	GType accounts_login_row_type_id;
	accounts_login_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ENTRY_ROW, "AccountsLoginRow", &g_define_type_info, 0);
	return accounts_login_row_type_id;
}

GType
accounts_login_row_get_type (void)
{
	static volatile gsize accounts_login_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_login_row_type_id__once)) {
		GType accounts_login_row_type_id;
		accounts_login_row_type_id = accounts_login_row_get_type_once ();
		g_once_init_leave (&accounts_login_row_type_id__once, accounts_login_row_type_id);
	}
	return accounts_login_row_type_id__once;
}

AccountsPasswordRow*
accounts_password_row_construct (GType object_type)
{
	AccountsPasswordRow * self = NULL;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	ComponentsValidator* _tmp6_;
	ComponentsValidator* _tmp7_;
	self = (AccountsPasswordRow*) accounts_entry_row_construct (object_type, _ ("Password"), NULL, NULL);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	gtk_entry_set_visibility ((GtkEntry*) _tmp1_, FALSE);
	_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp3_ = _tmp2_;
	gtk_entry_set_input_purpose ((GtkEntry*) _tmp3_, GTK_INPUT_PURPOSE_PASSWORD);
	_tmp4_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp5_ = _tmp4_;
	_tmp6_ = components_validator_new ((GtkEntry*) _tmp5_);
	_tmp7_ = _tmp6_;
	accounts_add_pane_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow), _tmp7_);
	_g_object_unref0 (_tmp7_);
	return self;
}

AccountsPasswordRow*
accounts_password_row_new (void)
{
	return accounts_password_row_construct (ACCOUNTS_TYPE_PASSWORD_ROW);
}

static void
accounts_password_row_class_init (AccountsPasswordRowClass * klass,
                                  gpointer klass_data)
{
	accounts_password_row_parent_class = g_type_class_peek_parent (klass);
}

static void
accounts_password_row_instance_init (AccountsPasswordRow * self,
                                     gpointer klass)
{
}

static GType
accounts_password_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsPasswordRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_password_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsPasswordRow), 0, (GInstanceInitFunc) accounts_password_row_instance_init, NULL };
	GType accounts_password_row_type_id;
	accounts_password_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ENTRY_ROW, "AccountsPasswordRow", &g_define_type_info, 0);
	return accounts_password_row_type_id;
}

GType
accounts_password_row_get_type (void)
{
	static volatile gsize accounts_password_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_password_row_type_id__once)) {
		GType accounts_password_row_type_id;
		accounts_password_row_type_id = accounts_password_row_get_type_once ();
		g_once_init_leave (&accounts_password_row_type_id__once, accounts_password_row_type_id);
	}
	return accounts_password_row_type_id__once;
}

static inline gpointer
accounts_hostname_row_get_instance_private (AccountsHostnameRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsHostnameRow_private_offset);
}

AccountsHostnameRow*
accounts_hostname_row_construct (GType object_type,
                                 GearyProtocol type)
{
	AccountsHostnameRow * self = NULL;
	gchar* label = NULL;
	gchar* _tmp0_;
	gchar* placeholder = NULL;
	gchar* _tmp1_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gconstpointer _tmp8_;
	gconstpointer _tmp9_;
	ComponentsNetworkAddressValidator* _tmp10_;
	ComponentsNetworkAddressValidator* _tmp11_;
	_tmp0_ = g_strdup ("");
	label = _tmp0_;
	_tmp1_ = g_strdup ("");
	placeholder = _tmp1_;
	switch (type) {
		case GEARY_PROTOCOL_IMAP:
		{
			gchar* _tmp2_;
			gchar* _tmp3_;
			_tmp2_ = g_strdup (_ ("IMAP server"));
			_g_free0 (label);
			label = _tmp2_;
			_tmp3_ = g_strdup (_ ("imap.example.com"));
			_g_free0 (placeholder);
			placeholder = _tmp3_;
			break;
		}
		case GEARY_PROTOCOL_SMTP:
		{
			gchar* _tmp4_;
			gchar* _tmp5_;
			_tmp4_ = g_strdup (_ ("SMTP server"));
			_g_free0 (label);
			label = _tmp4_;
			_tmp5_ = g_strdup (_ ("smtp.example.com"));
			_g_free0 (placeholder);
			placeholder = _tmp5_;
			break;
		}
		default:
		break;
	}
	_tmp6_ = label;
	_tmp7_ = placeholder;
	self = (AccountsHostnameRow*) accounts_entry_row_construct (object_type, _tmp6_, NULL, _tmp7_);
	self->priv->type = type;
	_tmp8_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp9_ = _tmp8_;
	_tmp10_ = components_network_address_validator_new ((GtkEntry*) _tmp9_, (guint16) 0);
	_tmp11_ = _tmp10_;
	accounts_add_pane_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ADD_PANE_ROW, AccountsAddPaneRow), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, COMPONENTS_TYPE_VALIDATOR, ComponentsValidator));
	_g_object_unref0 (_tmp11_);
	_g_free0 (placeholder);
	_g_free0 (label);
	return self;
}

AccountsHostnameRow*
accounts_hostname_row_new (GearyProtocol type)
{
	return accounts_hostname_row_construct (ACCOUNTS_TYPE_HOSTNAME_ROW, type);
}

static void
accounts_hostname_row_class_init (AccountsHostnameRowClass * klass,
                                  gpointer klass_data)
{
	accounts_hostname_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsHostnameRow_private_offset);
	G_OBJECT_CLASS (klass)->finalize = accounts_hostname_row_finalize;
}

static void
accounts_hostname_row_instance_init (AccountsHostnameRow * self,
                                     gpointer klass)
{
	self->priv = accounts_hostname_row_get_instance_private (self);
}

static void
accounts_hostname_row_finalize (GObject * obj)
{
	AccountsHostnameRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_HOSTNAME_ROW, AccountsHostnameRow);
	G_OBJECT_CLASS (accounts_hostname_row_parent_class)->finalize (obj);
}

static GType
accounts_hostname_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsHostnameRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_hostname_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsHostnameRow), 0, (GInstanceInitFunc) accounts_hostname_row_instance_init, NULL };
	GType accounts_hostname_row_type_id;
	accounts_hostname_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ENTRY_ROW, "AccountsHostnameRow", &g_define_type_info, 0);
	AccountsHostnameRow_private_offset = g_type_add_instance_private (accounts_hostname_row_type_id, sizeof (AccountsHostnameRowPrivate));
	return accounts_hostname_row_type_id;
}

GType
accounts_hostname_row_get_type (void)
{
	static volatile gsize accounts_hostname_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_hostname_row_type_id__once)) {
		GType accounts_hostname_row_type_id;
		accounts_hostname_row_type_id = accounts_hostname_row_get_type_once ();
		g_once_init_leave (&accounts_hostname_row_type_id__once, accounts_hostname_row_type_id);
	}
	return accounts_hostname_row_type_id__once;
}

AccountsTransportSecurityRow*
accounts_transport_security_row_construct (GType object_type)
{
	AccountsTransportSecurityRow * self = NULL;
	AccountsTlsComboBox* value = NULL;
	AccountsTlsComboBox* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	_tmp0_ = accounts_tls_combo_box_new ();
	g_object_ref_sink (_tmp0_);
	value = _tmp0_;
	_tmp1_ = accounts_tls_combo_box_get_label (value);
	_tmp2_ = _tmp1_;
	self = (AccountsTransportSecurityRow*) accounts_labelled_editor_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_ADD_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, ACCOUNTS_TYPE_TLS_COMBO_BOX, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_, value);
	_tmp3_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp4_ = _tmp3_;
	accounts_tls_combo_box_set_method ((AccountsTlsComboBox*) _tmp4_, GEARY_TLS_NEGOTIATION_METHOD_TRANSPORT);
	_g_object_unref0 (value);
	return self;
}

AccountsTransportSecurityRow*
accounts_transport_security_row_new (void)
{
	return accounts_transport_security_row_construct (ACCOUNTS_TYPE_TRANSPORT_SECURITY_ROW);
}

static void
accounts_transport_security_row_class_init (AccountsTransportSecurityRowClass * klass,
                                            gpointer klass_data)
{
	accounts_transport_security_row_parent_class = g_type_class_peek_parent (klass);
}

static void
accounts_transport_security_row_instance_init (AccountsTransportSecurityRow * self,
                                               gpointer klass)
{
}

static GType
accounts_transport_security_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsTransportSecurityRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_transport_security_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsTransportSecurityRow), 0, (GInstanceInitFunc) accounts_transport_security_row_instance_init, NULL };
	GType accounts_transport_security_row_type_id;
	accounts_transport_security_row_type_id = g_type_register_static (ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, "AccountsTransportSecurityRow", &g_define_type_info, 0);
	return accounts_transport_security_row_type_id;
}

GType
accounts_transport_security_row_get_type (void)
{
	static volatile gsize accounts_transport_security_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_transport_security_row_type_id__once)) {
		GType accounts_transport_security_row_type_id;
		accounts_transport_security_row_type_id = accounts_transport_security_row_get_type_once ();
		g_once_init_leave (&accounts_transport_security_row_type_id__once, accounts_transport_security_row_type_id);
	}
	return accounts_transport_security_row_type_id__once;
}

AccountsOutgoingAuthRow*
accounts_outgoing_auth_row_construct (GType object_type)
{
	AccountsOutgoingAuthRow * self = NULL;
	AccountsOutgoingAuthComboBox* value = NULL;
	AccountsOutgoingAuthComboBox* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	_tmp0_ = accounts_outgoing_auth_combo_box_new ();
	g_object_ref_sink (_tmp0_);
	value = _tmp0_;
	_tmp1_ = accounts_outgoing_auth_combo_box_get_label (value);
	_tmp2_ = _tmp1_;
	self = (AccountsOutgoingAuthRow*) accounts_labelled_editor_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_ADD_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_, value);
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_tmp3_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp4_ = _tmp3_;
	accounts_outgoing_auth_combo_box_set_source ((AccountsOutgoingAuthComboBox*) _tmp4_, GEARY_CREDENTIALS_REQUIREMENT_USE_INCOMING);
	_g_object_unref0 (value);
	return self;
}

AccountsOutgoingAuthRow*
accounts_outgoing_auth_row_new (void)
{
	return accounts_outgoing_auth_row_construct (ACCOUNTS_TYPE_OUTGOING_AUTH_ROW);
}

static void
accounts_outgoing_auth_row_class_init (AccountsOutgoingAuthRowClass * klass,
                                       gpointer klass_data)
{
	accounts_outgoing_auth_row_parent_class = g_type_class_peek_parent (klass);
}

static void
accounts_outgoing_auth_row_instance_init (AccountsOutgoingAuthRow * self,
                                          gpointer klass)
{
}

static GType
accounts_outgoing_auth_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsOutgoingAuthRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_outgoing_auth_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsOutgoingAuthRow), 0, (GInstanceInitFunc) accounts_outgoing_auth_row_instance_init, NULL };
	GType accounts_outgoing_auth_row_type_id;
	accounts_outgoing_auth_row_type_id = g_type_register_static (ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, "AccountsOutgoingAuthRow", &g_define_type_info, 0);
	return accounts_outgoing_auth_row_type_id;
}

GType
accounts_outgoing_auth_row_get_type (void)
{
	static volatile gsize accounts_outgoing_auth_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_outgoing_auth_row_type_id__once)) {
		GType accounts_outgoing_auth_row_type_id;
		accounts_outgoing_auth_row_type_id = accounts_outgoing_auth_row_get_type_once ();
		g_once_init_leave (&accounts_outgoing_auth_row_type_id__once, accounts_outgoing_auth_row_type_id);
	}
	return accounts_outgoing_auth_row_type_id__once;
}

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

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

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

