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

/*
 * Copyright 2016 Software Freedom Conservancy Inc.
 * 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 <gee.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_ACCOUNT_PANE (accounts_account_pane_get_type ())
#define ACCOUNTS_ACCOUNT_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane))
#define ACCOUNTS_IS_ACCOUNT_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_ACCOUNT_PANE))
#define ACCOUNTS_ACCOUNT_PANE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPaneIface))

typedef struct _AccountsAccountPane AccountsAccountPane;
typedef struct _AccountsAccountPaneIface AccountsAccountPaneIface;

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

typedef struct _AccountsCommandPane AccountsCommandPane;
typedef struct _AccountsCommandPaneIface AccountsCommandPaneIface;

#define ACCOUNTS_TYPE_EDITOR_SERVERS_PANE (accounts_editor_servers_pane_get_type ())
#define ACCOUNTS_EDITOR_SERVERS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane))
#define ACCOUNTS_EDITOR_SERVERS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPaneClass))
#define ACCOUNTS_IS_EDITOR_SERVERS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EDITOR_SERVERS_PANE))
#define ACCOUNTS_IS_EDITOR_SERVERS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_EDITOR_SERVERS_PANE))
#define ACCOUNTS_EDITOR_SERVERS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPaneClass))

typedef struct _AccountsEditorServersPane AccountsEditorServersPane;
typedef struct _AccountsEditorServersPaneClass AccountsEditorServersPaneClass;
typedef struct _AccountsEditorServersPanePrivate AccountsEditorServersPanePrivate;

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

typedef struct _AccountsEditorRow AccountsEditorRow;
typedef struct _AccountsEditorRowClass AccountsEditorRowClass;

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

typedef struct _AccountsLabelledEditorRow AccountsLabelledEditorRow;
typedef struct _AccountsLabelledEditorRowClass AccountsLabelledEditorRowClass;

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

typedef struct _AccountsAccountRow AccountsAccountRow;
typedef struct _AccountsAccountRowClass AccountsAccountRowClass;

#define ACCOUNTS_TYPE_SAVE_DRAFTS_ROW (accounts_save_drafts_row_get_type ())
#define ACCOUNTS_SAVE_DRAFTS_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, AccountsSaveDraftsRow))
#define ACCOUNTS_SAVE_DRAFTS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, AccountsSaveDraftsRowClass))
#define ACCOUNTS_IS_SAVE_DRAFTS_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SAVE_DRAFTS_ROW))
#define ACCOUNTS_IS_SAVE_DRAFTS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SAVE_DRAFTS_ROW))
#define ACCOUNTS_SAVE_DRAFTS_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, AccountsSaveDraftsRowClass))

typedef struct _AccountsSaveDraftsRow AccountsSaveDraftsRow;
typedef struct _AccountsSaveDraftsRowClass AccountsSaveDraftsRowClass;

#define ACCOUNTS_TYPE_SAVE_SENT_ROW (accounts_save_sent_row_get_type ())
#define ACCOUNTS_SAVE_SENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SAVE_SENT_ROW, AccountsSaveSentRow))
#define ACCOUNTS_SAVE_SENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SAVE_SENT_ROW, AccountsSaveSentRowClass))
#define ACCOUNTS_IS_SAVE_SENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SAVE_SENT_ROW))
#define ACCOUNTS_IS_SAVE_SENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SAVE_SENT_ROW))
#define ACCOUNTS_SAVE_SENT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SAVE_SENT_ROW, AccountsSaveSentRowClass))

typedef struct _AccountsSaveSentRow AccountsSaveSentRow;
typedef struct _AccountsSaveSentRowClass AccountsSaveSentRowClass;

#define ACCOUNTS_TYPE_SERVICE_ROW (accounts_service_row_get_type ())
#define ACCOUNTS_SERVICE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow))
#define ACCOUNTS_SERVICE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRowClass))
#define ACCOUNTS_IS_SERVICE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SERVICE_ROW))
#define ACCOUNTS_IS_SERVICE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SERVICE_ROW))
#define ACCOUNTS_SERVICE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRowClass))

typedef struct _AccountsServiceRow AccountsServiceRow;
typedef struct _AccountsServiceRowClass AccountsServiceRowClass;

#define ACCOUNTS_TYPE_SERVICE_LOGIN_ROW (accounts_service_login_row_get_type ())
#define ACCOUNTS_SERVICE_LOGIN_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow))
#define ACCOUNTS_SERVICE_LOGIN_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRowClass))
#define ACCOUNTS_IS_SERVICE_LOGIN_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SERVICE_LOGIN_ROW))
#define ACCOUNTS_IS_SERVICE_LOGIN_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SERVICE_LOGIN_ROW))
#define ACCOUNTS_SERVICE_LOGIN_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRowClass))

typedef struct _AccountsServiceLoginRow AccountsServiceLoginRow;
typedef struct _AccountsServiceLoginRowClass AccountsServiceLoginRowClass;

#define ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW (accounts_service_password_row_get_type ())
#define ACCOUNTS_SERVICE_PASSWORD_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow))
#define ACCOUNTS_SERVICE_PASSWORD_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRowClass))
#define ACCOUNTS_IS_SERVICE_PASSWORD_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW))
#define ACCOUNTS_IS_SERVICE_PASSWORD_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW))
#define ACCOUNTS_SERVICE_PASSWORD_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRowClass))

typedef struct _AccountsServicePasswordRow AccountsServicePasswordRow;
typedef struct _AccountsServicePasswordRowClass AccountsServicePasswordRowClass;

#define ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW (accounts_service_outgoing_auth_row_get_type ())
#define ACCOUNTS_SERVICE_OUTGOING_AUTH_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW, AccountsServiceOutgoingAuthRow))
#define ACCOUNTS_SERVICE_OUTGOING_AUTH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW, AccountsServiceOutgoingAuthRowClass))
#define ACCOUNTS_IS_SERVICE_OUTGOING_AUTH_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW))
#define ACCOUNTS_IS_SERVICE_OUTGOING_AUTH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW))
#define ACCOUNTS_SERVICE_OUTGOING_AUTH_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW, AccountsServiceOutgoingAuthRowClass))

typedef struct _AccountsServiceOutgoingAuthRow AccountsServiceOutgoingAuthRow;
typedef struct _AccountsServiceOutgoingAuthRowClass AccountsServiceOutgoingAuthRowClass;
enum  {
	ACCOUNTS_EDITOR_SERVERS_PANE_0_PROPERTY,
	ACCOUNTS_EDITOR_SERVERS_PANE_EDITOR_PROPERTY,
	ACCOUNTS_EDITOR_SERVERS_PANE_ACCOUNT_PROPERTY,
	ACCOUNTS_EDITOR_SERVERS_PANE_COMMANDS_PROPERTY,
	ACCOUNTS_EDITOR_SERVERS_PANE_INITIAL_WIDGET_PROPERTY,
	ACCOUNTS_EDITOR_SERVERS_PANE_IS_OPERATION_RUNNING_PROPERTY,
	ACCOUNTS_EDITOR_SERVERS_PANE_OP_CANCELLABLE_PROPERTY,
	ACCOUNTS_EDITOR_SERVERS_PANE_NUM_PROPERTIES
};
static GParamSpec* accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW (accounts_account_provider_row_get_type ())
#define ACCOUNTS_ACCOUNT_PROVIDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW, AccountsAccountProviderRow))
#define ACCOUNTS_ACCOUNT_PROVIDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW, AccountsAccountProviderRowClass))
#define ACCOUNTS_IS_ACCOUNT_PROVIDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW))
#define ACCOUNTS_IS_ACCOUNT_PROVIDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW))
#define ACCOUNTS_ACCOUNT_PROVIDER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW, AccountsAccountProviderRowClass))

typedef struct _AccountsAccountProviderRow AccountsAccountProviderRow;
typedef struct _AccountsAccountProviderRowClass AccountsAccountProviderRowClass;

#define ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW (accounts_service_provider_row_get_type ())
#define ACCOUNTS_SERVICE_PROVIDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW, AccountsServiceProviderRow))
#define ACCOUNTS_SERVICE_PROVIDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW, AccountsServiceProviderRowClass))
#define ACCOUNTS_IS_SERVICE_PROVIDER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW))
#define ACCOUNTS_IS_SERVICE_PROVIDER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW))
#define ACCOUNTS_SERVICE_PROVIDER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW, AccountsServiceProviderRowClass))

typedef struct _AccountsServiceProviderRow AccountsServiceProviderRow;
typedef struct _AccountsServiceProviderRowClass AccountsServiceProviderRowClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define ACCOUNTS_TYPE_SERVICE_HOST_ROW (accounts_service_host_row_get_type ())
#define ACCOUNTS_SERVICE_HOST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow))
#define ACCOUNTS_SERVICE_HOST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRowClass))
#define ACCOUNTS_IS_SERVICE_HOST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SERVICE_HOST_ROW))
#define ACCOUNTS_IS_SERVICE_HOST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SERVICE_HOST_ROW))
#define ACCOUNTS_SERVICE_HOST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRowClass))

typedef struct _AccountsServiceHostRow AccountsServiceHostRow;
typedef struct _AccountsServiceHostRowClass AccountsServiceHostRowClass;

#define ACCOUNTS_TYPE_SERVICE_SECURITY_ROW (accounts_service_security_row_get_type ())
#define ACCOUNTS_SERVICE_SECURITY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_SERVICE_SECURITY_ROW, AccountsServiceSecurityRow))
#define ACCOUNTS_SERVICE_SECURITY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_SERVICE_SECURITY_ROW, AccountsServiceSecurityRowClass))
#define ACCOUNTS_IS_SERVICE_SECURITY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_SERVICE_SECURITY_ROW))
#define ACCOUNTS_IS_SERVICE_SECURITY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_SERVICE_SECURITY_ROW))
#define ACCOUNTS_SERVICE_SECURITY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_SERVICE_SECURITY_ROW, AccountsServiceSecurityRowClass))

typedef struct _AccountsServiceSecurityRow AccountsServiceSecurityRow;
typedef struct _AccountsServiceSecurityRowClass AccountsServiceSecurityRowClass;

#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;
typedef struct _AccountsEditorServersPaneSaveData AccountsEditorServersPaneSaveData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _AccountsEditorServersPaneValidateData AccountsEditorServersPaneValidateData;
typedef struct _AccountsEditorServersPaneUpdateServiceData AccountsEditorServersPaneUpdateServiceData;

#define ACCOUNTS_TYPE_VALIDATING_ROW (accounts_validating_row_get_type ())
#define ACCOUNTS_VALIDATING_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow))
#define ACCOUNTS_IS_VALIDATING_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_VALIDATING_ROW))
#define ACCOUNTS_VALIDATING_ROW_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRowIface))

typedef struct _AccountsValidatingRow AccountsValidatingRow;
typedef struct _AccountsValidatingRowIface AccountsValidatingRowIface;
typedef struct _AccountsEditorRowPrivate AccountsEditorRowPrivate;
typedef struct _AccountsLabelledEditorRowPrivate AccountsLabelledEditorRowPrivate;
typedef struct _AccountsAccountRowPrivate AccountsAccountRowPrivate;
typedef struct _AccountsAccountProviderRowPrivate AccountsAccountProviderRowPrivate;
enum  {
	ACCOUNTS_ACCOUNT_PROVIDER_ROW_0_PROPERTY,
	ACCOUNTS_ACCOUNT_PROVIDER_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_account_provider_row_properties[ACCOUNTS_ACCOUNT_PROVIDER_ROW_NUM_PROPERTIES];
typedef struct _AccountsSaveDraftsRowPrivate AccountsSaveDraftsRowPrivate;
enum  {
	ACCOUNTS_SAVE_DRAFTS_ROW_0_PROPERTY,
	ACCOUNTS_SAVE_DRAFTS_ROW_VALUE_CHANGED_PROPERTY,
	ACCOUNTS_SAVE_DRAFTS_ROW_INITIAL_VALUE_PROPERTY,
	ACCOUNTS_SAVE_DRAFTS_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_save_drafts_row_properties[ACCOUNTS_SAVE_DRAFTS_ROW_NUM_PROPERTIES];
typedef struct _AccountsSaveSentRowPrivate AccountsSaveSentRowPrivate;
enum  {
	ACCOUNTS_SAVE_SENT_ROW_0_PROPERTY,
	ACCOUNTS_SAVE_SENT_ROW_VALUE_CHANGED_PROPERTY,
	ACCOUNTS_SAVE_SENT_ROW_INITIAL_VALUE_PROPERTY,
	ACCOUNTS_SAVE_SENT_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_save_sent_row_properties[ACCOUNTS_SAVE_SENT_ROW_NUM_PROPERTIES];
typedef struct _AccountsServiceRowPrivate AccountsServiceRowPrivate;
typedef struct _AccountsServiceHostRowPrivate AccountsServiceHostRowPrivate;
enum  {
	ACCOUNTS_SERVICE_HOST_ROW_0_PROPERTY,
	ACCOUNTS_SERVICE_HOST_ROW_VALIDATOR_PROPERTY,
	ACCOUNTS_SERVICE_HOST_ROW_HAS_CHANGED_PROPERTY,
	ACCOUNTS_SERVICE_HOST_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_service_host_row_properties[ACCOUNTS_SERVICE_HOST_ROW_NUM_PROPERTIES];
typedef struct _AccountsServiceSecurityRowPrivate AccountsServiceSecurityRowPrivate;
enum  {
	ACCOUNTS_SERVICE_SECURITY_ROW_0_PROPERTY,
	ACCOUNTS_SERVICE_SECURITY_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_service_security_row_properties[ACCOUNTS_SERVICE_SECURITY_ROW_NUM_PROPERTIES];

#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 _AccountsServiceLoginRowPrivate AccountsServiceLoginRowPrivate;
enum  {
	ACCOUNTS_SERVICE_LOGIN_ROW_0_PROPERTY,
	ACCOUNTS_SERVICE_LOGIN_ROW_VALIDATOR_PROPERTY,
	ACCOUNTS_SERVICE_LOGIN_ROW_HAS_CHANGED_PROPERTY,
	ACCOUNTS_SERVICE_LOGIN_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_service_login_row_properties[ACCOUNTS_SERVICE_LOGIN_ROW_NUM_PROPERTIES];
typedef struct _AccountsServicePasswordRowPrivate AccountsServicePasswordRowPrivate;
enum  {
	ACCOUNTS_SERVICE_PASSWORD_ROW_0_PROPERTY,
	ACCOUNTS_SERVICE_PASSWORD_ROW_VALIDATOR_PROPERTY,
	ACCOUNTS_SERVICE_PASSWORD_ROW_HAS_CHANGED_PROPERTY,
	ACCOUNTS_SERVICE_PASSWORD_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_service_password_row_properties[ACCOUNTS_SERVICE_PASSWORD_ROW_NUM_PROPERTIES];
typedef struct _AccountsServiceOutgoingAuthRowPrivate AccountsServiceOutgoingAuthRowPrivate;
enum  {
	ACCOUNTS_SERVICE_OUTGOING_AUTH_ROW_0_PROPERTY,
	ACCOUNTS_SERVICE_OUTGOING_AUTH_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_service_outgoing_auth_row_properties[ACCOUNTS_SERVICE_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 _AccountsAccountPaneIface {
	GTypeInterface parent_iface;
	GearyAccountInformation* (*get_account) (AccountsAccountPane* self);
	void (*set_account) (AccountsAccountPane* self, GearyAccountInformation* value);
};

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

struct _AccountsEditorServersPane {
	GtkGrid parent_instance;
	AccountsEditorServersPanePrivate * priv;
};

struct _AccountsEditorServersPaneClass {
	GtkGridClass parent_class;
};

struct _AccountsEditorServersPanePrivate {
	AccountsEditor* _editor;
	GearyAccountInformation* _account;
	ApplicationCommandStack* _commands;
	GCancellable* _op_cancellable;
	GearyEngine* engine;
	GearyServiceInformation* incoming_mutable;
	GearyServiceInformation* outgoing_mutable;
	GeeList* validators;
	GtkHeaderBar* header;
	GtkGrid* pane_content;
	GtkAdjustment* pane_adjustment;
	GtkListBox* details_list;
	GtkListBox* receiving_list;
	GtkListBox* sending_list;
	GtkButton* apply_button;
	GtkSpinner* apply_spinner;
	AccountsSaveDraftsRow* save_drafts;
	AccountsSaveSentRow* save_sent;
	AccountsServiceLoginRow* incoming_login;
	AccountsServicePasswordRow* incoming_password;
	AccountsServiceOutgoingAuthRow* outgoing_auth;
	AccountsServiceLoginRow* outgoing_login;
	AccountsServicePasswordRow* outgoing_password;
};

struct _AccountsEditorServersPaneSaveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsEditorServersPane* self;
	GCancellable* cancellable;
	gboolean is_valid;
	gboolean has_changed;
	gboolean _tmp0_;
	GearyAccountInformation* _tmp1_;
	GearyAccountInformation* _tmp2_;
	GearyServiceProvider _tmp3_;
	GearyServiceProvider _tmp4_;
	AccountsEditor* _tmp5_;
	AccountsEditor* _tmp6_;
	AccountsManager* _tmp7_;
	AccountsManager* _tmp8_;
	GearyAccountInformation* _tmp9_;
	GearyAccountInformation* _tmp10_;
	GearyAccountInformation* _tmp11_;
	GearyAccountInformation* _tmp12_;
	GearyServiceInformation* _tmp13_;
	GearyServiceInformation* _tmp14_;
	GearyServiceInformation* _tmp15_;
	GearyAccountInformation* _tmp16_;
	GearyAccountInformation* _tmp17_;
	GearyServiceInformation* _tmp18_;
	GearyServiceInformation* _tmp19_;
	GearyServiceInformation* _tmp20_;
	AccountsSaveDraftsRow* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	AccountsSaveSentRow* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	GearyAccountInformation* _tmp27_;
	GearyAccountInformation* _tmp28_;
	AccountsEditor* _tmp29_;
	AccountsEditor* _tmp30_;
	GtkButton* _tmp31_;
	GearyAccountInformation* _tmp32_;
	GearyAccountInformation* _tmp33_;
	AccountsSaveDraftsRow* _tmp34_;
	gboolean _tmp35_;
	gboolean _tmp36_;
	GearyAccountInformation* _tmp37_;
	GearyAccountInformation* _tmp38_;
	AccountsSaveSentRow* _tmp39_;
	gboolean _tmp40_;
	gboolean _tmp41_;
};

struct _AccountsEditorServersPaneValidateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsEditorServersPane* self;
	GCancellable* cancellable;
	gboolean result;
	GearyAccountInformation* local_account;
	GearyAccountInformation* _tmp0_;
	GearyAccountInformation* _tmp1_;
	GearyAccountInformation* _tmp2_;
	GearyAccountInformation* _tmp3_;
	gchar* message;
	gboolean imap_valid;
	GearyEngine* _tmp4_;
	GearyAccountInformation* _tmp5_;
	GearyServiceInformation* _tmp6_;
	GError* err;
	GError* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	GError* _vala1_err;
	GError* _tmp10_;
	const gchar* _tmp11_;
	GError* _vala2_err;
	GError* _tmp12_;
	const gchar* _tmp13_;
	GError* _vala3_err;
	GearyErrorContext* context;
	GError* _tmp14_;
	GearyErrorContext* _tmp15_;
	GearyErrorContext* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gboolean smtp_valid;
	GearyEngine* _tmp20_;
	GearyAccountInformation* _tmp21_;
	GearyServiceInformation* _tmp22_;
	GearyServiceInformation* _tmp23_;
	GearyCredentials* _tmp24_;
	GearyCredentials* _tmp25_;
	GError* _vala4_err;
	GError* _tmp26_;
	const gchar* _tmp27_;
	AccountsServiceOutgoingAuthRow* _tmp28_;
	gconstpointer _tmp29_;
	gconstpointer _tmp30_;
	gchar* _tmp31_;
	GError* _vala5_err;
	GError* _tmp32_;
	const gchar* _tmp33_;
	GError* _vala6_err;
	GError* _tmp34_;
	const gchar* _tmp35_;
	GError* _vala7_err;
	GearyErrorContext* _vala1_context;
	GError* _tmp36_;
	GearyErrorContext* _tmp37_;
	GearyErrorContext* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	GearyAccountInformation* _tmp42_;
	guint _tmp43_;
	gboolean _tmp44_;
	gboolean is_valid;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gboolean _tmp47_;
	const gchar* _tmp48_;
	AccountsEditor* _tmp49_;
	AccountsEditor* _tmp50_;
	const gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* _tmp53_;
	ComponentsInAppNotification* _tmp54_;
	ComponentsInAppNotification* _tmp55_;
	GError* _inner_error0_;
};

struct _AccountsEditorServersPaneUpdateServiceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	AccountsEditorServersPane* self;
	GearyServiceInformation* existing;
	GearyServiceInformation* copy;
	GCancellable* cancellable;
	gboolean result;
	gboolean has_changed;
	AccountsEditor* _tmp0_;
	AccountsEditor* _tmp1_;
	AccountsManager* _tmp2_;
	AccountsManager* _tmp3_;
	GearyAccountInformation* _tmp4_;
	GearyAccountInformation* _tmp5_;
	GError* err;
	GearyAccountInformation* _tmp6_;
	GearyAccountInformation* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GearyProtocol _tmp10_;
	GearyProtocol _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GError* _tmp14_;
	const gchar* _tmp15_;
	GearyEngine* _tmp16_;
	GearyAccountInformation* _tmp17_;
	GearyAccountInformation* _tmp18_;
	GError* _vala1_err;
	GearyAccountInformation* _tmp19_;
	GearyAccountInformation* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	GearyProtocol _tmp23_;
	GearyProtocol _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GError* _tmp27_;
	const gchar* _tmp28_;
	GError* _inner_error0_;
};

struct _AccountsValidatingRowIface {
	GTypeInterface parent_iface;
	ComponentsValidator* (*get_validator) (AccountsValidatingRow* self);
	void (*set_validator) (AccountsValidatingRow* self, ComponentsValidator* value);
	gboolean (*get_has_changed) (AccountsValidatingRow* self);
	void (*commit) (AccountsValidatingRow* self);
};

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

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

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

struct _AccountsLabelledEditorRowClass {
	AccountsEditorRowClass parent_class;
};

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

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

struct _AccountsAccountProviderRow {
	AccountsAccountRow parent_instance;
	AccountsAccountProviderRowPrivate * priv;
};

struct _AccountsAccountProviderRowClass {
	AccountsAccountRowClass parent_class;
};

struct _AccountsAccountProviderRowPrivate {
	AccountsManager* accounts;
};

struct _AccountsSaveDraftsRow {
	AccountsAccountRow parent_instance;
	AccountsSaveDraftsRowPrivate * priv;
};

struct _AccountsSaveDraftsRowClass {
	AccountsAccountRowClass parent_class;
};

struct _AccountsSaveDraftsRowPrivate {
	gboolean _initial_value;
	ApplicationCommandStack* commands;
	GCancellable* cancellable;
};

struct _AccountsSaveSentRow {
	AccountsAccountRow parent_instance;
	AccountsSaveSentRowPrivate * priv;
};

struct _AccountsSaveSentRowClass {
	AccountsAccountRowClass parent_class;
};

struct _AccountsSaveSentRowPrivate {
	gboolean _initial_value;
	ApplicationCommandStack* commands;
	GCancellable* cancellable;
};

struct _AccountsServiceRow {
	AccountsAccountRow parent_instance;
	AccountsServiceRowPrivate * priv;
};

struct _AccountsServiceRowClass {
	AccountsAccountRowClass parent_class;
	gboolean (*get_is_value_editable) (AccountsServiceRow* self);
};

struct _AccountsServiceHostRow {
	AccountsServiceRow parent_instance;
	AccountsServiceHostRowPrivate * priv;
};

struct _AccountsServiceHostRowClass {
	AccountsServiceRowClass parent_class;
};

struct _AccountsServiceHostRowPrivate {
	ComponentsValidator* _validator;
	ComponentsEntryUndo* value_undo;
	ApplicationCommandStack* commands;
	GCancellable* cancellable;
};

struct _AccountsServiceSecurityRow {
	AccountsServiceRow parent_instance;
	AccountsServiceSecurityRowPrivate * priv;
};

struct _AccountsServiceSecurityRowClass {
	AccountsServiceRowClass parent_class;
};

struct _AccountsServiceSecurityRowPrivate {
	ApplicationCommandStack* commands;
	GCancellable* cancellable;
};

struct _AccountsServiceLoginRow {
	AccountsServiceRow parent_instance;
	AccountsServiceLoginRowPrivate * priv;
};

struct _AccountsServiceLoginRowClass {
	AccountsServiceRowClass parent_class;
};

struct _AccountsServiceLoginRowPrivate {
	ComponentsValidator* _validator;
	ComponentsEntryUndo* value_undo;
	ApplicationCommandStack* commands;
	GCancellable* cancellable;
	AccountsServicePasswordRow* password_row;
};

struct _AccountsServicePasswordRow {
	AccountsServiceRow parent_instance;
	AccountsServicePasswordRowPrivate * priv;
};

struct _AccountsServicePasswordRowClass {
	AccountsServiceRowClass parent_class;
};

struct _AccountsServicePasswordRowPrivate {
	ComponentsValidator* _validator;
	ComponentsEntryUndo* value_undo;
	ApplicationCommandStack* commands;
	GCancellable* cancellable;
};

struct _AccountsServiceOutgoingAuthRow {
	AccountsServiceRow parent_instance;
	AccountsServiceOutgoingAuthRowPrivate * priv;
};

struct _AccountsServiceOutgoingAuthRowClass {
	AccountsServiceRowClass parent_class;
};

struct _AccountsServiceOutgoingAuthRowPrivate {
	ApplicationCommandStack* commands;
	GCancellable* cancellable;
	GearyServiceInformation* imap_service;
};

static gint AccountsEditorServersPane_private_offset;
static gpointer accounts_editor_servers_pane_parent_class = NULL;
static AccountsEditorPaneIface * accounts_editor_servers_pane_accounts_editor_pane_parent_iface = NULL;
static AccountsAccountPaneIface * accounts_editor_servers_pane_accounts_account_pane_parent_iface = NULL;
static AccountsCommandPaneIface * accounts_editor_servers_pane_accounts_command_pane_parent_iface = NULL;
static gint AccountsAccountProviderRow_private_offset;
static gpointer accounts_account_provider_row_parent_class = NULL;
static gint AccountsSaveDraftsRow_private_offset;
static gpointer accounts_save_drafts_row_parent_class = NULL;
static gint AccountsSaveSentRow_private_offset;
static gpointer accounts_save_sent_row_parent_class = NULL;
static gint AccountsServiceHostRow_private_offset;
static gpointer accounts_service_host_row_parent_class = NULL;
static AccountsValidatingRowIface * accounts_service_host_row_accounts_validating_row_parent_iface = NULL;
static gint AccountsServiceSecurityRow_private_offset;
static gpointer accounts_service_security_row_parent_class = NULL;
static gint AccountsServiceLoginRow_private_offset;
static gpointer accounts_service_login_row_parent_class = NULL;
static AccountsValidatingRowIface * accounts_service_login_row_accounts_validating_row_parent_iface = NULL;
static gint AccountsServicePasswordRow_private_offset;
static gpointer accounts_service_password_row_parent_class = NULL;
static AccountsValidatingRowIface * accounts_service_password_row_accounts_validating_row_parent_iface = NULL;
static gint AccountsServiceOutgoingAuthRow_private_offset;
static gpointer accounts_service_outgoing_auth_row_parent_class = NULL;

VALA_EXTERN GType accounts_editor_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_account_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_command_pane_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_editor_servers_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_account_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_save_drafts_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_save_sent_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_service_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_service_login_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_service_password_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_service_outgoing_auth_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void accounts_account_pane_disconnect_account_signals (AccountsAccountPane* self);
VALA_EXTERN void accounts_command_pane_disconnect_command_signals (AccountsCommandPane* self);
static void accounts_editor_servers_pane_update_operation_ui (AccountsEditorServersPane* self,
                                                       gboolean is_running);
VALA_EXTERN AccountsEditorServersPane* accounts_editor_servers_pane_new (AccountsEditor* editor,
                                                             GearyAccountInformation* account);
VALA_EXTERN AccountsEditorServersPane* accounts_editor_servers_pane_construct (GType object_type,
                                                                   AccountsEditor* editor,
                                                                   GearyAccountInformation* account);
VALA_EXTERN void accounts_editor_pane_set_editor (AccountsEditorPane* self,
                                      AccountsEditor* value);
VALA_EXTERN void accounts_account_pane_set_account (AccountsAccountPane* self,
                                        GearyAccountInformation* value);
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 GearyAccountInformation* accounts_account_pane_get_account (AccountsAccountPane* self);
VALA_EXTERN AccountsManager* accounts_editor_get_accounts (AccountsEditor* self);
VALA_EXTERN AccountsAccountProviderRow* accounts_account_provider_row_new (AccountsManager* accounts,
                                                               GearyAccountInformation* account);
VALA_EXTERN AccountsAccountProviderRow* accounts_account_provider_row_construct (GType object_type,
                                                                     AccountsManager* accounts,
                                                                     GearyAccountInformation* account);
VALA_EXTERN GType accounts_account_provider_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType accounts_service_provider_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN AccountsServiceProviderRow* accounts_service_provider_row_new (GType panetype_type,
                                                               GBoxedCopyFunc panetype_dup_func,
                                                               GDestroyNotify panetype_destroy_func,
                                                               GearyServiceProvider provider,
                                                               const gchar* other_type_label);
VALA_EXTERN AccountsServiceProviderRow* accounts_service_provider_row_construct (GType object_type,
                                                                     GType panetype_type,
                                                                     GBoxedCopyFunc panetype_dup_func,
                                                                     GDestroyNotify panetype_destroy_func,
                                                                     GearyServiceProvider provider,
                                                                     const gchar* other_type_label);
VALA_EXTERN void accounts_labelled_editor_row_set_dim_label (AccountsLabelledEditorRow* self,
                                                 gboolean is_dim);
static void accounts_editor_servers_pane_add_row (AccountsEditorServersPane* self,
                                           GtkListBox* list,
                                           AccountsEditorRow* row);
VALA_EXTERN ApplicationCommandStack* accounts_command_pane_get_commands (AccountsCommandPane* self);
VALA_EXTERN GCancellable* accounts_editor_pane_get_op_cancellable (AccountsEditorPane* self);
VALA_EXTERN AccountsSaveDraftsRow* accounts_save_drafts_row_new (GearyAccountInformation* account,
                                                     ApplicationCommandStack* commands,
                                                     GCancellable* cancellable);
VALA_EXTERN AccountsSaveDraftsRow* accounts_save_drafts_row_construct (GType object_type,
                                                           GearyAccountInformation* account,
                                                           ApplicationCommandStack* commands,
                                                           GCancellable* cancellable);
VALA_EXTERN AccountsSaveSentRow* accounts_save_sent_row_new (GearyAccountInformation* account,
                                                 ApplicationCommandStack* commands,
                                                 GCancellable* cancellable);
VALA_EXTERN AccountsSaveSentRow* accounts_save_sent_row_construct (GType object_type,
                                                       GearyAccountInformation* account,
                                                       ApplicationCommandStack* commands,
                                                       GCancellable* cancellable);
VALA_EXTERN AccountsServiceHostRow* accounts_service_host_row_new (GearyAccountInformation* account,
                                                       GearyServiceInformation* service,
                                                       ApplicationCommandStack* commands,
                                                       GCancellable* cancellable);
VALA_EXTERN AccountsServiceHostRow* accounts_service_host_row_construct (GType object_type,
                                                             GearyAccountInformation* account,
                                                             GearyServiceInformation* service,
                                                             ApplicationCommandStack* commands,
                                                             GCancellable* cancellable);
VALA_EXTERN GType accounts_service_host_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN AccountsServiceSecurityRow* accounts_service_security_row_new (GearyAccountInformation* account,
                                                               GearyServiceInformation* service,
                                                               ApplicationCommandStack* commands,
                                                               GCancellable* cancellable);
VALA_EXTERN AccountsServiceSecurityRow* accounts_service_security_row_construct (GType object_type,
                                                                     GearyAccountInformation* account,
                                                                     GearyServiceInformation* service,
                                                                     ApplicationCommandStack* commands,
                                                                     GCancellable* cancellable);
VALA_EXTERN GType accounts_service_security_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN AccountsServicePasswordRow* accounts_service_password_row_new (GearyAccountInformation* account,
                                                               GearyServiceInformation* service,
                                                               ApplicationCommandStack* commands,
                                                               GCancellable* cancellable);
VALA_EXTERN AccountsServicePasswordRow* accounts_service_password_row_construct (GType object_type,
                                                                     GearyAccountInformation* account,
                                                                     GearyServiceInformation* service,
                                                                     ApplicationCommandStack* commands,
                                                                     GCancellable* cancellable);
VALA_EXTERN AccountsServiceLoginRow* accounts_service_login_row_new (GearyAccountInformation* account,
                                                         GearyServiceInformation* service,
                                                         ApplicationCommandStack* commands,
                                                         GCancellable* cancellable,
                                                         AccountsServicePasswordRow* password_row);
VALA_EXTERN AccountsServiceLoginRow* accounts_service_login_row_construct (GType object_type,
                                                               GearyAccountInformation* account,
                                                               GearyServiceInformation* service,
                                                               ApplicationCommandStack* commands,
                                                               GCancellable* cancellable,
                                                               AccountsServicePasswordRow* password_row);
VALA_EXTERN AccountsServiceOutgoingAuthRow* accounts_service_outgoing_auth_row_new (GearyAccountInformation* account,
                                                                        GearyServiceInformation* smtp_service,
                                                                        GearyServiceInformation* imap_service,
                                                                        ApplicationCommandStack* commands,
                                                                        GCancellable* cancellable);
VALA_EXTERN AccountsServiceOutgoingAuthRow* accounts_service_outgoing_auth_row_construct (GType object_type,
                                                                              GearyAccountInformation* account,
                                                                              GearyServiceInformation* smtp_service,
                                                                              GearyServiceInformation* imap_service,
                                                                              ApplicationCommandStack* commands,
                                                                              GCancellable* cancellable);
VALA_EXTERN gconstpointer accounts_labelled_editor_row_get_value (AccountsLabelledEditorRow* self);
VALA_EXTERN GType accounts_outgoing_auth_combo_box_get_type (void) G_GNUC_CONST ;
static void accounts_editor_servers_pane_on_outgoing_auth_changed (AccountsEditorServersPane* self);
static void _accounts_editor_servers_pane_on_outgoing_auth_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                   gpointer self);
VALA_EXTERN void accounts_account_pane_connect_account_signals (AccountsAccountPane* self);
VALA_EXTERN void accounts_command_pane_connect_command_signals (AccountsCommandPane* self);
static void accounts_editor_servers_pane_update_outgoing_auth (AccountsEditorServersPane* self);
static GtkHeaderBar* accounts_editor_servers_pane_real_get_header (AccountsEditorPane* base);
static void accounts_editor_servers_pane_real_command_executed (AccountsCommandPane* base);
VALA_EXTERN AccountsEditor* accounts_editor_pane_get_editor (AccountsEditorPane* self);
VALA_EXTERN void accounts_editor_update_command_actions (AccountsEditor* self);
static gboolean accounts_editor_servers_pane_is_valid (AccountsEditorServersPane* self);
static gboolean __lambda66_ (AccountsEditorServersPane* self,
                      ComponentsValidator* v);
static gboolean ___lambda66__gee_predicate (gconstpointer g,
                                     gpointer self);
static void accounts_editor_servers_pane_save_data_free (gpointer _data);
static void accounts_editor_servers_pane_save (AccountsEditorServersPane* self,
                                        GCancellable* cancellable,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static void accounts_editor_servers_pane_save_finish (AccountsEditorServersPane* self,
                                               GAsyncResult* _res_);
static gboolean accounts_editor_servers_pane_save_co (AccountsEditorServersPaneSaveData* _data_);
VALA_EXTERN void accounts_editor_pane_set_is_operation_running (AccountsEditorPane* self,
                                                    gboolean value);
static void accounts_editor_servers_pane_validate (AccountsEditorServersPane* self,
                                            GCancellable* cancellable,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gboolean accounts_editor_servers_pane_validate_finish (AccountsEditorServersPane* self,
                                                       GAsyncResult* _res_);
static void accounts_editor_servers_pane_save_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static void accounts_editor_servers_pane_update_service (AccountsEditorServersPane* self,
                                                  GearyServiceInformation* existing,
                                                  GearyServiceInformation* copy,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static gboolean accounts_editor_servers_pane_update_service_finish (AccountsEditorServersPane* self,
                                                             GAsyncResult* _res_);
VALA_EXTERN gboolean accounts_save_drafts_row_get_value_changed (AccountsSaveDraftsRow* self);
VALA_EXTERN gboolean accounts_save_sent_row_get_value_changed (AccountsSaveSentRow* self);
VALA_EXTERN void accounts_editor_pop (AccountsEditor* self);
VALA_EXTERN gboolean accounts_save_drafts_row_get_initial_value (AccountsSaveDraftsRow* self);
VALA_EXTERN gboolean accounts_save_sent_row_get_initial_value (AccountsSaveSentRow* self);
static void accounts_editor_servers_pane_validate_data_free (gpointer _data);
static gboolean accounts_editor_servers_pane_validate_co (AccountsEditorServersPaneValidateData* _data_);
static void accounts_editor_servers_pane_on_untrusted_host (AccountsEditorServersPane* self,
                                                     GearyAccountInformation* account,
                                                     GearyServiceInformation* service,
                                                     GearyEndpoint* endpoint,
                                                     GTlsConnection* cx);
static void _accounts_editor_servers_pane_on_untrusted_host_geary_account_information_untrusted_host (GearyAccountInformation* _sender,
                                                                                               GearyServiceInformation* service,
                                                                                               GearyEndpoint* endpoint,
                                                                                               GTlsConnection* cx,
                                                                                               gpointer self);
static void accounts_editor_servers_pane_validate_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
VALA_EXTERN void accounts_outgoing_auth_combo_box_set_source (AccountsOutgoingAuthComboBox* self,
                                                  GearyCredentialsRequirement value);
VALA_EXTERN void accounts_editor_add_notification (AccountsEditor* self,
                                       ComponentsInAppNotification* notification);
static void accounts_editor_servers_pane_update_service_data_free (gpointer _data);
static gboolean accounts_editor_servers_pane_update_service_co (AccountsEditorServersPaneUpdateServiceData* _data_);
static void accounts_editor_servers_pane_update_service_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
VALA_EXTERN GType accounts_validating_row_get_type (void) G_GNUC_CONST ;
static void accounts_editor_servers_pane_on_validator_changed (AccountsEditorServersPane* self);
static void _accounts_editor_servers_pane_on_validator_changed_accounts_validating_row_changed (AccountsValidatingRow* _sender,
                                                                                         gpointer self);
VALA_EXTERN ComponentsValidator* accounts_validating_row_get_validator (AccountsValidatingRow* self);
static void accounts_editor_servers_pane_on_validator_activated (AccountsEditorServersPane* self);
static void _accounts_editor_servers_pane_on_validator_activated_components_validator_activated (ComponentsValidator* _sender,
                                                                                          gpointer self);
VALA_EXTERN GearyCredentialsRequirement accounts_outgoing_auth_combo_box_get_source (AccountsOutgoingAuthComboBox* 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 __lambda69_ (AccountsEditorServersPane* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda69__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void accounts_editor_servers_pane_on_cancel_button_clicked (AccountsEditorServersPane* self);
VALA_EXTERN gboolean accounts_editor_pane_get_is_operation_running (AccountsEditorPane* self);
VALA_EXTERN void accounts_editor_pane_cancel_operation (AccountsEditorPane* self);
static void _accounts_editor_servers_pane_on_cancel_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self);
static void accounts_editor_servers_pane_on_apply_button_clicked (AccountsEditorServersPane* self);
static void _accounts_editor_servers_pane_on_apply_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self);
static gboolean accounts_editor_servers_pane_on_list_keynav_failed (AccountsEditorServersPane* self,
                                                             GtkWidget* widget,
                                                             GtkDirectionType direction);
static gboolean _accounts_editor_servers_pane_on_list_keynav_failed_gtk_widget_keynav_failed (GtkWidget* _sender,
                                                                                       GtkDirectionType direction,
                                                                                       gpointer self);
static void accounts_editor_servers_pane_on_activate (AccountsEditorServersPane* self,
                                               GtkListBoxRow* row);
VALA_EXTERN void accounts_editor_row_activated (AccountsEditorRow* self,
                                    gconstpointer pane);
static void _accounts_editor_servers_pane_on_activate_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                           GtkListBoxRow* row,
                                                                           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 void accounts_editor_pane_set_op_cancellable (AccountsEditorPane* self,
                                              GCancellable* value);
VALA_EXTERN void accounts_command_pane_command_executed (AccountsCommandPane* self);
VALA_EXTERN void accounts_command_pane_set_commands (AccountsCommandPane* self,
                                         ApplicationCommandStack* value);
static void accounts_editor_servers_pane_finalize (GObject * obj);
static GType accounts_editor_servers_pane_get_type_once (void);
static void _vala_accounts_editor_servers_pane_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_accounts_editor_servers_pane_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec);
VALA_EXTERN void accounts_account_row_update (AccountsAccountRow* self);
VALA_EXTERN AccountsAccountRow* accounts_account_row_construct (GType object_type,
                                                    GType panetype_type,
                                                    GBoxedCopyFunc panetype_dup_func,
                                                    GDestroyNotify panetype_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GearyAccountInformation* account,
                                                    const gchar* label,
                                                    gconstpointer value);
static void accounts_account_provider_row_real_update (AccountsAccountRow* base);
VALA_EXTERN GearyAccountInformation* accounts_account_row_get_account (AccountsAccountRow* self);
static void accounts_account_provider_row_real_activated (AccountsEditorRow* base,
                                                   AccountsEditorServersPane* pane);
static void ___lambda65_ (AccountsAccountProviderRow* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda65__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void accounts_account_provider_row_finalize (GObject * obj);
static GType accounts_account_provider_row_get_type_once (void);
static void accounts_save_drafts_row_set_initial_value (AccountsSaveDraftsRow* self,
                                                 gboolean value);
static void accounts_save_drafts_row_on_account_changed (AccountsSaveDraftsRow* self);
static void _accounts_save_drafts_row_on_account_changed_g_object_notify (GObject* _sender,
                                                                   GParamSpec* pspec,
                                                                   gpointer self);
static void accounts_save_drafts_row_on_activate (AccountsSaveDraftsRow* self);
static void _accounts_save_drafts_row_on_activate_g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self);
static void accounts_save_drafts_row_real_update (AccountsAccountRow* base);
static void accounts_save_drafts_row_finalize (GObject * obj);
static GType accounts_save_drafts_row_get_type_once (void);
static void _vala_accounts_save_drafts_row_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_accounts_save_drafts_row_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);
static void accounts_save_sent_row_set_initial_value (AccountsSaveSentRow* self,
                                               gboolean value);
static void accounts_save_sent_row_on_account_changed (AccountsSaveSentRow* self);
static void _accounts_save_sent_row_on_account_changed_g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self);
static void accounts_save_sent_row_on_activate (AccountsSaveSentRow* self);
static void _accounts_save_sent_row_on_activate_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self);
static void accounts_save_sent_row_real_update (AccountsAccountRow* base);
static void accounts_save_sent_row_finalize (GObject * obj);
static GType accounts_save_sent_row_get_type_once (void);
static void _vala_accounts_save_sent_row_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_accounts_save_sent_row_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static gchar* accounts_service_host_row_get_entry_text (AccountsServiceHostRow* self);
VALA_EXTERN AccountsServiceRow* accounts_service_row_construct (GType object_type,
                                                    GType panetype_type,
                                                    GBoxedCopyFunc panetype_dup_func,
                                                    GDestroyNotify panetype_destroy_func,
                                                    GType v_type,
                                                    GBoxedCopyFunc v_dup_func,
                                                    GDestroyNotify v_destroy_func,
                                                    GearyAccountInformation* account,
                                                    GearyServiceInformation* service,
                                                    const gchar* label,
                                                    gconstpointer value);
VALA_EXTERN void accounts_validating_row_set_validator (AccountsValidatingRow* self,
                                            ComponentsValidator* value);
VALA_EXTERN void accounts_validating_row_setup_validator (AccountsValidatingRow* self);
static void accounts_service_host_row_real_update (AccountsAccountRow* base);
static void accounts_service_host_row_real_commit (AccountsValidatingRow* base);
VALA_EXTERN GearyServiceInformation* accounts_service_row_get_service (AccountsServiceRow* self);
VALA_EXTERN void accounts_validating_row_commit (AccountsValidatingRow* self);
VALA_EXTERN gboolean accounts_validating_row_get_has_changed (AccountsValidatingRow* self);
static void accounts_service_host_row_finalize (GObject * obj);
static GType accounts_service_host_row_get_type_once (void);
static void _vala_accounts_service_host_row_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec);
static void _vala_accounts_service_host_row_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec);
VALA_EXTERN GType accounts_tls_combo_box_get_type (void) G_GNUC_CONST ;
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 void accounts_service_security_row_on_value_changed (AccountsServiceSecurityRow* self);
static void _accounts_service_security_row_on_value_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                            gpointer self);
static void accounts_service_security_row_real_update (AccountsAccountRow* base);
VALA_EXTERN void accounts_tls_combo_box_set_method (AccountsTlsComboBox* self,
                                        GearyTlsNegotiationMethod value);
VALA_EXTERN GearyTlsNegotiationMethod accounts_tls_combo_box_get_method (AccountsTlsComboBox* self);
static void accounts_service_security_row_finalize (GObject * obj);
static GType accounts_service_security_row_get_type_once (void);
static gchar* accounts_service_login_row_get_entry_text (AccountsServiceLoginRow* self);
static void accounts_service_login_row_real_update (AccountsAccountRow* base);
static void accounts_service_login_row_real_commit (AccountsValidatingRow* base);
static void accounts_service_login_row_finalize (GObject * obj);
static GType accounts_service_login_row_get_type_once (void);
static void _vala_accounts_service_login_row_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_accounts_service_login_row_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static gchar* accounts_service_password_row_get_entry_text (AccountsServicePasswordRow* self);
static void accounts_service_password_row_real_update (AccountsAccountRow* base);
static void accounts_service_password_row_real_commit (AccountsValidatingRow* base);
static void accounts_service_password_row_finalize (GObject * obj);
static GType accounts_service_password_row_get_type_once (void);
static void _vala_accounts_service_password_row_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_accounts_service_password_row_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
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 void accounts_service_outgoing_auth_row_on_value_changed (AccountsServiceOutgoingAuthRow* self);
static void _accounts_service_outgoing_auth_row_on_value_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                 gpointer self);
static void accounts_service_outgoing_auth_row_real_update (AccountsAccountRow* base);
static void _vala_array_add10 (ApplicationCommand** * array,
                        gint* length,
                        gint* size,
                        ApplicationCommand* value);
static void accounts_service_outgoing_auth_row_finalize (GObject * obj);
static GType accounts_service_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 inline gpointer
accounts_editor_servers_pane_get_instance_private (AccountsEditorServersPane* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsEditorServersPane_private_offset);
}

static AccountsEditor*
accounts_editor_servers_pane_real_get_editor (AccountsEditorPane* base)
{
	AccountsEditor* result;
	AccountsEditorServersPane* self;
	AccountsEditor* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	_tmp0_ = self->priv->_editor;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_servers_pane_real_set_editor (AccountsEditorPane* base,
                                              AccountsEditor* value)
{
	AccountsEditorServersPane* self;
	AccountsEditor* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	old_value = accounts_editor_servers_pane_real_get_editor (base);
	if (old_value != value) {
		self->priv->_editor = value;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_EDITOR_PROPERTY]);
	}
}

static GearyAccountInformation*
accounts_editor_servers_pane_real_get_account (AccountsAccountPane* base)
{
	GearyAccountInformation* result;
	AccountsEditorServersPane* self;
	GearyAccountInformation* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	_tmp0_ = self->priv->_account;
	result = _tmp0_;
	return result;
}

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

static void
accounts_editor_servers_pane_real_set_account (AccountsAccountPane* base,
                                               GearyAccountInformation* value)
{
	AccountsEditorServersPane* self;
	GearyAccountInformation* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	old_value = accounts_editor_servers_pane_real_get_account (base);
	if (old_value != value) {
		GearyAccountInformation* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_account);
		self->priv->_account = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_ACCOUNT_PROPERTY]);
	}
}

static ApplicationCommandStack*
accounts_editor_servers_pane_real_get_commands (AccountsCommandPane* base)
{
	ApplicationCommandStack* result;
	AccountsEditorServersPane* self;
	ApplicationCommandStack* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	_tmp0_ = self->priv->_commands;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_servers_pane_real_set_commands (AccountsCommandPane* base,
                                                ApplicationCommandStack* value)
{
	AccountsEditorServersPane* self;
	ApplicationCommandStack* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	old_value = accounts_editor_servers_pane_real_get_commands (base);
	if (old_value != value) {
		ApplicationCommandStack* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_commands);
		self->priv->_commands = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_COMMANDS_PROPERTY]);
	}
}

static GtkWidget*
accounts_editor_servers_pane_real_get_initial_widget (AccountsEditorPane* base)
{
	GtkWidget* result;
	AccountsEditorServersPane* self;
	GtkListBox* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	_tmp0_ = self->priv->details_list;
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget);
	return result;
}

static gboolean
accounts_editor_servers_pane_real_get_is_operation_running (AccountsEditorPane* base)
{
	gboolean result;
	AccountsEditorServersPane* self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	_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_servers_pane_real_set_is_operation_running (AccountsEditorPane* base,
                                                            gboolean value)
{
	AccountsEditorServersPane* self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	accounts_editor_servers_pane_update_operation_ui (self, value);
	g_object_notify_by_pspec ((GObject *) self, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_IS_OPERATION_RUNNING_PROPERTY]);
}

static GCancellable*
accounts_editor_servers_pane_real_get_op_cancellable (AccountsEditorPane* base)
{
	GCancellable* result;
	AccountsEditorServersPane* self;
	GCancellable* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	_tmp0_ = self->priv->_op_cancellable;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_servers_pane_real_set_op_cancellable (AccountsEditorPane* base,
                                                      GCancellable* value)
{
	AccountsEditorServersPane* self;
	GCancellable* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	old_value = accounts_editor_servers_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_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_OP_CANCELLABLE_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_servers_pane_on_outgoing_auth_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                              gpointer self)
{
	accounts_editor_servers_pane_on_outgoing_auth_changed ((AccountsEditorServersPane*) self);
}

AccountsEditorServersPane*
accounts_editor_servers_pane_construct (GType object_type,
                                        AccountsEditor* editor,
                                        GearyAccountInformation* account)
{
	AccountsEditorServersPane * self = NULL;
	ApplicationClient* _tmp0_;
	ApplicationClient* _tmp1_;
	GearyEngine* _tmp2_;
	GearyEngine* _tmp3_;
	GearyEngine* _tmp4_;
	GearyServiceInformation* _tmp5_;
	GearyServiceInformation* _tmp6_;
	GearyServiceInformation* _tmp7_;
	GearyServiceInformation* _tmp8_;
	GearyServiceInformation* _tmp9_;
	GearyServiceInformation* _tmp10_;
	GtkGrid* _tmp11_;
	GtkAdjustment* _tmp12_;
	GtkListBox* _tmp13_;
	GearyAccountInformation* _tmp14_;
	GearyAccountInformation* _tmp15_;
	GearyCredentialsMediator* _tmp16_;
	GearyCredentialsMediator* _tmp17_;
	AccountsServiceProviderRow* service_provider = NULL;
	GearyAccountInformation* _tmp25_;
	GearyAccountInformation* _tmp26_;
	GearyServiceProvider _tmp27_;
	GearyServiceProvider _tmp28_;
	GearyAccountInformation* _tmp29_;
	GearyAccountInformation* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	AccountsServiceProviderRow* _tmp34_;
	AccountsServiceProviderRow* _tmp35_;
	AccountsServiceProviderRow* _tmp36_;
	AccountsServiceProviderRow* _tmp37_;
	GtkListBox* _tmp38_;
	AccountsServiceProviderRow* _tmp39_;
	GearyAccountInformation* _tmp40_;
	GearyAccountInformation* _tmp41_;
	ApplicationCommandStack* _tmp42_;
	ApplicationCommandStack* _tmp43_;
	GCancellable* _tmp44_;
	GCancellable* _tmp45_;
	AccountsSaveDraftsRow* _tmp46_;
	GtkListBox* _tmp47_;
	AccountsSaveDraftsRow* _tmp48_;
	GearyAccountInformation* _tmp49_;
	GearyAccountInformation* _tmp50_;
	ApplicationCommandStack* _tmp51_;
	ApplicationCommandStack* _tmp52_;
	GCancellable* _tmp53_;
	GCancellable* _tmp54_;
	AccountsSaveSentRow* _tmp55_;
	GearyServiceProvider _tmp56_;
	GearyServiceProvider _tmp57_;
	GtkListBox* _tmp60_;
	GtkListBox* _tmp61_;
	GearyServiceInformation* _tmp62_;
	ApplicationCommandStack* _tmp63_;
	ApplicationCommandStack* _tmp64_;
	GCancellable* _tmp65_;
	GCancellable* _tmp66_;
	AccountsServiceHostRow* _tmp67_;
	AccountsServiceHostRow* _tmp68_;
	GtkListBox* _tmp69_;
	GearyServiceInformation* _tmp70_;
	ApplicationCommandStack* _tmp71_;
	ApplicationCommandStack* _tmp72_;
	GCancellable* _tmp73_;
	GCancellable* _tmp74_;
	AccountsServiceSecurityRow* _tmp75_;
	AccountsServiceSecurityRow* _tmp76_;
	GearyServiceInformation* _tmp77_;
	ApplicationCommandStack* _tmp78_;
	ApplicationCommandStack* _tmp79_;
	GCancellable* _tmp80_;
	GCancellable* _tmp81_;
	AccountsServicePasswordRow* _tmp82_;
	GearyServiceInformation* _tmp83_;
	ApplicationCommandStack* _tmp84_;
	ApplicationCommandStack* _tmp85_;
	GCancellable* _tmp86_;
	GCancellable* _tmp87_;
	AccountsServicePasswordRow* _tmp88_;
	AccountsServiceLoginRow* _tmp89_;
	GtkListBox* _tmp90_;
	AccountsServiceLoginRow* _tmp91_;
	GtkListBox* _tmp92_;
	AccountsServicePasswordRow* _tmp93_;
	GtkListBox* _tmp94_;
	GtkListBox* _tmp95_;
	GearyServiceInformation* _tmp96_;
	ApplicationCommandStack* _tmp97_;
	ApplicationCommandStack* _tmp98_;
	GCancellable* _tmp99_;
	GCancellable* _tmp100_;
	AccountsServiceHostRow* _tmp101_;
	AccountsServiceHostRow* _tmp102_;
	GtkListBox* _tmp103_;
	GearyServiceInformation* _tmp104_;
	ApplicationCommandStack* _tmp105_;
	ApplicationCommandStack* _tmp106_;
	GCancellable* _tmp107_;
	GCancellable* _tmp108_;
	AccountsServiceSecurityRow* _tmp109_;
	AccountsServiceSecurityRow* _tmp110_;
	GearyServiceInformation* _tmp111_;
	GearyServiceInformation* _tmp112_;
	ApplicationCommandStack* _tmp113_;
	ApplicationCommandStack* _tmp114_;
	GCancellable* _tmp115_;
	GCancellable* _tmp116_;
	AccountsServiceOutgoingAuthRow* _tmp117_;
	AccountsServiceOutgoingAuthRow* _tmp118_;
	gconstpointer _tmp119_;
	gconstpointer _tmp120_;
	GtkListBox* _tmp121_;
	AccountsServiceOutgoingAuthRow* _tmp122_;
	GearyServiceInformation* _tmp123_;
	ApplicationCommandStack* _tmp124_;
	ApplicationCommandStack* _tmp125_;
	GCancellable* _tmp126_;
	GCancellable* _tmp127_;
	AccountsServicePasswordRow* _tmp128_;
	GearyServiceInformation* _tmp129_;
	ApplicationCommandStack* _tmp130_;
	ApplicationCommandStack* _tmp131_;
	GCancellable* _tmp132_;
	GCancellable* _tmp133_;
	AccountsServicePasswordRow* _tmp134_;
	AccountsServiceLoginRow* _tmp135_;
	GtkListBox* _tmp136_;
	AccountsServiceLoginRow* _tmp137_;
	GtkListBox* _tmp138_;
	AccountsServicePasswordRow* _tmp139_;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR (editor), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	self = (AccountsEditorServersPane*) g_object_new (object_type, NULL);
	accounts_editor_pane_set_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane), editor);
	accounts_account_pane_set_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane), account);
	_tmp0_ = accounts_editor_get_application (editor);
	_tmp1_ = _tmp0_;
	_tmp2_ = application_client_get_engine (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (self->priv->engine);
	self->priv->engine = _tmp4_;
	_tmp5_ = geary_account_information_get_incoming (account);
	_tmp6_ = _tmp5_;
	_tmp7_ = geary_service_information_new_copy (_tmp6_);
	_g_object_unref0 (self->priv->incoming_mutable);
	self->priv->incoming_mutable = _tmp7_;
	_tmp8_ = geary_account_information_get_outgoing (account);
	_tmp9_ = _tmp8_;
	_tmp10_ = geary_service_information_new_copy (_tmp9_);
	_g_object_unref0 (self->priv->outgoing_mutable);
	self->priv->outgoing_mutable = _tmp10_;
	_tmp11_ = self->priv->pane_content;
	_tmp12_ = self->priv->pane_adjustment;
	gtk_container_set_focus_vadjustment (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_container_get_type (), GtkContainer), _tmp12_);
	_tmp13_ = self->priv->details_list;
	gtk_list_box_set_header_func (_tmp13_, _accounts_editor_seperator_headers_gtk_list_box_update_header_func, NULL, NULL);
	_tmp14_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	_tmp15_ = _tmp14_;
	_tmp16_ = geary_account_information_get_mediator (_tmp15_);
	_tmp17_ = _tmp16_;
	if (IS_GOA_MEDIATOR (_tmp17_)) {
		GtkListBox* _tmp18_;
		AccountsManager* _tmp19_;
		AccountsManager* _tmp20_;
		GearyAccountInformation* _tmp21_;
		GearyAccountInformation* _tmp22_;
		AccountsAccountProviderRow* _tmp23_;
		AccountsAccountProviderRow* _tmp24_;
		_tmp18_ = self->priv->details_list;
		_tmp19_ = accounts_editor_get_accounts (editor);
		_tmp20_ = _tmp19_;
		_tmp21_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
		_tmp22_ = _tmp21_;
		_tmp23_ = accounts_account_provider_row_new (_tmp20_, _tmp22_);
		g_object_ref_sink (_tmp23_);
		_tmp24_ = _tmp23_;
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (_tmp24_);
	}
	_tmp25_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	_tmp26_ = _tmp25_;
	_tmp27_ = geary_account_information_get_service_provider (_tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	_tmp30_ = _tmp29_;
	_tmp31_ = geary_account_information_get_service_label (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = _tmp32_;
	_tmp34_ = accounts_service_provider_row_new (ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp28_, _tmp33_);
	g_object_ref_sink (_tmp34_);
	_tmp35_ = _tmp34_;
	_g_free0 (_tmp33_);
	service_provider = _tmp35_;
	_tmp36_ = service_provider;
	accounts_labelled_editor_row_set_dim_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow), TRUE);
	_tmp37_ = service_provider;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_tmp38_ = self->priv->details_list;
	_tmp39_ = service_provider;
	accounts_editor_servers_pane_add_row (self, _tmp38_, G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp40_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	_tmp41_ = _tmp40_;
	_tmp42_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp43_ = _tmp42_;
	_tmp44_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp45_ = _tmp44_;
	_tmp46_ = accounts_save_drafts_row_new (_tmp41_, _tmp43_, _tmp45_);
	g_object_ref_sink (_tmp46_);
	_g_object_unref0 (self->priv->save_drafts);
	self->priv->save_drafts = _tmp46_;
	_tmp47_ = self->priv->details_list;
	_tmp48_ = self->priv->save_drafts;
	accounts_editor_servers_pane_add_row (self, _tmp47_, G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp49_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	_tmp50_ = _tmp49_;
	_tmp51_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp52_ = _tmp51_;
	_tmp53_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp54_ = _tmp53_;
	_tmp55_ = accounts_save_sent_row_new (_tmp50_, _tmp52_, _tmp54_);
	g_object_ref_sink (_tmp55_);
	_g_object_unref0 (self->priv->save_sent);
	self->priv->save_sent = _tmp55_;
	_tmp56_ = geary_account_information_get_service_provider (account);
	_tmp57_ = _tmp56_;
	switch (_tmp57_) {
		case GEARY_SERVICE_PROVIDER_OTHER:
		{
			GtkListBox* _tmp58_;
			AccountsSaveSentRow* _tmp59_;
			_tmp58_ = self->priv->details_list;
			_tmp59_ = self->priv->save_sent;
			accounts_editor_servers_pane_add_row (self, _tmp58_, G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
			break;
		}
		default:
		{
			break;
		}
	}
	_tmp60_ = self->priv->receiving_list;
	gtk_list_box_set_header_func (_tmp60_, _accounts_editor_seperator_headers_gtk_list_box_update_header_func, NULL, NULL);
	_tmp61_ = self->priv->receiving_list;
	_tmp62_ = self->priv->incoming_mutable;
	_tmp63_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp64_ = _tmp63_;
	_tmp65_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp66_ = _tmp65_;
	_tmp67_ = accounts_service_host_row_new (account, _tmp62_, _tmp64_, _tmp66_);
	g_object_ref_sink (_tmp67_);
	_tmp68_ = _tmp67_;
	accounts_editor_servers_pane_add_row (self, _tmp61_, G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_g_object_unref0 (_tmp68_);
	_tmp69_ = self->priv->receiving_list;
	_tmp70_ = self->priv->incoming_mutable;
	_tmp71_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp72_ = _tmp71_;
	_tmp73_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp74_ = _tmp73_;
	_tmp75_ = accounts_service_security_row_new (account, _tmp70_, _tmp72_, _tmp74_);
	g_object_ref_sink (_tmp75_);
	_tmp76_ = _tmp75_;
	accounts_editor_servers_pane_add_row (self, _tmp69_, G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_g_object_unref0 (_tmp76_);
	_tmp77_ = self->priv->incoming_mutable;
	_tmp78_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp79_ = _tmp78_;
	_tmp80_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp81_ = _tmp80_;
	_tmp82_ = accounts_service_password_row_new (account, _tmp77_, _tmp79_, _tmp81_);
	g_object_ref_sink (_tmp82_);
	_g_object_unref0 (self->priv->incoming_password);
	self->priv->incoming_password = _tmp82_;
	_tmp83_ = self->priv->incoming_mutable;
	_tmp84_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp85_ = _tmp84_;
	_tmp86_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp87_ = _tmp86_;
	_tmp88_ = self->priv->incoming_password;
	_tmp89_ = accounts_service_login_row_new (account, _tmp83_, _tmp85_, _tmp87_, _tmp88_);
	g_object_ref_sink (_tmp89_);
	_g_object_unref0 (self->priv->incoming_login);
	self->priv->incoming_login = _tmp89_;
	_tmp90_ = self->priv->receiving_list;
	_tmp91_ = self->priv->incoming_login;
	accounts_editor_servers_pane_add_row (self, _tmp90_, G_TYPE_CHECK_INSTANCE_CAST (_tmp91_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp92_ = self->priv->receiving_list;
	_tmp93_ = self->priv->incoming_password;
	accounts_editor_servers_pane_add_row (self, _tmp92_, G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp94_ = self->priv->sending_list;
	gtk_list_box_set_header_func (_tmp94_, _accounts_editor_seperator_headers_gtk_list_box_update_header_func, NULL, NULL);
	_tmp95_ = self->priv->sending_list;
	_tmp96_ = self->priv->outgoing_mutable;
	_tmp97_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp98_ = _tmp97_;
	_tmp99_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp100_ = _tmp99_;
	_tmp101_ = accounts_service_host_row_new (account, _tmp96_, _tmp98_, _tmp100_);
	g_object_ref_sink (_tmp101_);
	_tmp102_ = _tmp101_;
	accounts_editor_servers_pane_add_row (self, _tmp95_, G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_g_object_unref0 (_tmp102_);
	_tmp103_ = self->priv->sending_list;
	_tmp104_ = self->priv->outgoing_mutable;
	_tmp105_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp106_ = _tmp105_;
	_tmp107_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp108_ = _tmp107_;
	_tmp109_ = accounts_service_security_row_new (account, _tmp104_, _tmp106_, _tmp108_);
	g_object_ref_sink (_tmp109_);
	_tmp110_ = _tmp109_;
	accounts_editor_servers_pane_add_row (self, _tmp103_, G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_g_object_unref0 (_tmp110_);
	_tmp111_ = self->priv->outgoing_mutable;
	_tmp112_ = self->priv->incoming_mutable;
	_tmp113_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp114_ = _tmp113_;
	_tmp115_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp116_ = _tmp115_;
	_tmp117_ = accounts_service_outgoing_auth_row_new (account, _tmp111_, _tmp112_, _tmp114_, _tmp116_);
	g_object_ref_sink (_tmp117_);
	_g_object_unref0 (self->priv->outgoing_auth);
	self->priv->outgoing_auth = _tmp117_;
	_tmp118_ = self->priv->outgoing_auth;
	_tmp119_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp118_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp120_ = _tmp119_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST ((AccountsOutgoingAuthComboBox*) _tmp120_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _accounts_editor_servers_pane_on_outgoing_auth_changed_gtk_combo_box_changed, self, 0);
	_tmp121_ = self->priv->sending_list;
	_tmp122_ = self->priv->outgoing_auth;
	accounts_editor_servers_pane_add_row (self, _tmp121_, G_TYPE_CHECK_INSTANCE_CAST (_tmp122_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp123_ = self->priv->outgoing_mutable;
	_tmp124_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp125_ = _tmp124_;
	_tmp126_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp127_ = _tmp126_;
	_tmp128_ = accounts_service_password_row_new (account, _tmp123_, _tmp125_, _tmp127_);
	g_object_ref_sink (_tmp128_);
	_g_object_unref0 (self->priv->outgoing_password);
	self->priv->outgoing_password = _tmp128_;
	_tmp129_ = self->priv->outgoing_mutable;
	_tmp130_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp131_ = _tmp130_;
	_tmp132_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp133_ = _tmp132_;
	_tmp134_ = self->priv->outgoing_password;
	_tmp135_ = accounts_service_login_row_new (account, _tmp129_, _tmp131_, _tmp133_, _tmp134_);
	g_object_ref_sink (_tmp135_);
	_g_object_unref0 (self->priv->outgoing_login);
	self->priv->outgoing_login = _tmp135_;
	_tmp136_ = self->priv->sending_list;
	_tmp137_ = self->priv->outgoing_login;
	accounts_editor_servers_pane_add_row (self, _tmp136_, G_TYPE_CHECK_INSTANCE_CAST (_tmp137_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp138_ = self->priv->sending_list;
	_tmp139_ = self->priv->outgoing_password;
	accounts_editor_servers_pane_add_row (self, _tmp138_, G_TYPE_CHECK_INSTANCE_CAST (_tmp139_, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	accounts_account_pane_connect_account_signals (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	accounts_command_pane_connect_command_signals (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	accounts_editor_servers_pane_update_outgoing_auth (self);
	_g_object_unref0 (service_provider);
	return self;
}

AccountsEditorServersPane*
accounts_editor_servers_pane_new (AccountsEditor* editor,
                                  GearyAccountInformation* account)
{
	return accounts_editor_servers_pane_construct (ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, editor, account);
}

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

/** {@inheritDoc} */
static void
accounts_editor_servers_pane_real_command_executed (AccountsCommandPane* base)
{
	AccountsEditorServersPane * self;
	AccountsEditor* _tmp0_;
	AccountsEditor* _tmp1_;
	GtkButton* _tmp2_;
	ApplicationCommandStack* _tmp3_;
	ApplicationCommandStack* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	_tmp0_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp1_ = _tmp0_;
	accounts_editor_update_command_actions (_tmp1_);
	_tmp2_ = self->priv->apply_button;
	_tmp3_ = accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_tmp4_ = _tmp3_;
	_tmp5_ = application_command_stack_get_can_undo (_tmp4_);
	_tmp6_ = _tmp5_;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), _tmp6_);
}

static gboolean
__lambda66_ (AccountsEditorServersPane* self,
             ComponentsValidator* v)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (COMPONENTS_IS_VALIDATOR (v), FALSE);
	_tmp0_ = components_validator_get_is_valid (v);
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

static gboolean
___lambda66__gee_predicate (gconstpointer g,
                            gpointer self)
{
	gboolean result;
	result = __lambda66_ ((AccountsEditorServersPane*) self, (ComponentsValidator*) g);
	return result;
}

static gboolean
accounts_editor_servers_pane_is_valid (AccountsEditorServersPane* self)
{
	GeeList* _tmp0_;
	GearyIterable* _tmp1_;
	GearyIterable* _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self), FALSE);
	_tmp0_ = self->priv->validators;
	_tmp1_ = geary_traverse (COMPONENTS_TYPE_VALIDATOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
	_tmp2_ = _tmp1_;
	_tmp3_ = geary_iterable_all (_tmp2_, ___lambda66__gee_predicate, g_object_ref (self), g_object_unref);
	_g_object_unref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

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

static void
accounts_editor_servers_pane_save (AccountsEditorServersPane* self,
                                   GCancellable* cancellable,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	AccountsEditorServersPaneSaveData* _data_;
	AccountsEditorServersPane* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	g_return_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	_data_ = g_slice_new0 (AccountsEditorServersPaneSaveData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_editor_servers_pane_save_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_servers_pane_save_co (_data_);
}

static void
accounts_editor_servers_pane_save_finish (AccountsEditorServersPane* self,
                                          GAsyncResult* _res_)
{
	AccountsEditorServersPaneSaveData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

static void
accounts_editor_servers_pane_save_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	AccountsEditorServersPaneSaveData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	accounts_editor_servers_pane_save_co (_data_);
}

static gboolean
accounts_editor_servers_pane_save_co (AccountsEditorServersPaneSaveData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		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 = TRUE;
	_data_->has_changed = FALSE;
	_data_->_tmp1_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = geary_account_information_get_service_provider (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	if (_data_->_tmp4_ == GEARY_SERVICE_PROVIDER_OTHER) {
		_data_->_tmp5_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp7_ = accounts_editor_get_accounts (_data_->_tmp6_);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp9_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp0_ = !accounts_manager_is_goa_account (_data_->_tmp8_, _data_->_tmp10_);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->_state_ = 1;
		accounts_editor_servers_pane_validate (_data_->self, _data_->cancellable, accounts_editor_servers_pane_save_ready, _data_);
		return FALSE;
		_state_1:
		_data_->is_valid = accounts_editor_servers_pane_validate_finish (_data_->self, _data_->_res_);
		if (_data_->is_valid) {
			_data_->_tmp11_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
			_data_->_tmp12_ = _data_->_tmp11_;
			_data_->_tmp13_ = geary_account_information_get_incoming (_data_->_tmp12_);
			_data_->_tmp14_ = _data_->_tmp13_;
			_data_->_tmp15_ = _data_->self->priv->incoming_mutable;
			_data_->_state_ = 2;
			accounts_editor_servers_pane_update_service (_data_->self, _data_->_tmp14_, _data_->_tmp15_, _data_->cancellable, accounts_editor_servers_pane_save_ready, _data_);
			return FALSE;
			_state_2:
			_data_->has_changed |= accounts_editor_servers_pane_update_service_finish (_data_->self, _data_->_res_);
			_data_->_tmp16_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
			_data_->_tmp17_ = _data_->_tmp16_;
			_data_->_tmp18_ = geary_account_information_get_outgoing (_data_->_tmp17_);
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_tmp20_ = _data_->self->priv->outgoing_mutable;
			_data_->_state_ = 3;
			accounts_editor_servers_pane_update_service (_data_->self, _data_->_tmp19_, _data_->_tmp20_, _data_->cancellable, accounts_editor_servers_pane_save_ready, _data_);
			return FALSE;
			_state_3:
			_data_->has_changed |= accounts_editor_servers_pane_update_service_finish (_data_->self, _data_->_res_);
		}
	}
	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_->_tmp21_ = _data_->self->priv->save_drafts;
		_data_->_tmp22_ = accounts_save_drafts_row_get_value_changed (_data_->_tmp21_);
		_data_->_tmp23_ = _data_->_tmp22_;
		if (_data_->_tmp23_) {
			_data_->has_changed = TRUE;
		}
		_data_->_tmp24_ = _data_->self->priv->save_sent;
		_data_->_tmp25_ = accounts_save_sent_row_get_value_changed (_data_->_tmp24_);
		_data_->_tmp26_ = _data_->_tmp25_;
		if (_data_->_tmp26_) {
			_data_->has_changed = TRUE;
		}
		if (_data_->has_changed) {
			_data_->_tmp27_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
			_data_->_tmp28_ = _data_->_tmp27_;
			g_signal_emit_by_name (_data_->_tmp28_, "changed");
		}
		_data_->_tmp29_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_data_->_tmp30_ = _data_->_tmp29_;
		accounts_editor_pop (_data_->_tmp30_);
	} else {
		_data_->_tmp31_ = _data_->self->priv->apply_button;
		gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp31_, gtk_widget_get_type (), GtkWidget), TRUE);
		_data_->_tmp32_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
		_data_->_tmp33_ = _data_->_tmp32_;
		_data_->_tmp34_ = _data_->self->priv->save_drafts;
		_data_->_tmp35_ = accounts_save_drafts_row_get_initial_value (_data_->_tmp34_);
		_data_->_tmp36_ = _data_->_tmp35_;
		geary_account_information_set_save_drafts (_data_->_tmp33_, _data_->_tmp36_);
		_data_->_tmp37_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
		_data_->_tmp38_ = _data_->_tmp37_;
		_data_->_tmp39_ = _data_->self->priv->save_sent;
		_data_->_tmp40_ = accounts_save_sent_row_get_initial_value (_data_->_tmp39_);
		_data_->_tmp41_ = _data_->_tmp40_;
		geary_account_information_set_save_sent (_data_->_tmp38_, _data_->_tmp41_);
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
accounts_editor_servers_pane_validate (AccountsEditorServersPane* self,
                                       GCancellable* cancellable,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	AccountsEditorServersPaneValidateData* _data_;
	AccountsEditorServersPane* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	g_return_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	_data_ = g_slice_new0 (AccountsEditorServersPaneValidateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_editor_servers_pane_validate_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_servers_pane_validate_co (_data_);
}

static gboolean
accounts_editor_servers_pane_validate_finish (AccountsEditorServersPane* self,
                                              GAsyncResult* _res_)
{
	gboolean result;
	AccountsEditorServersPaneValidateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		gboolean _tmp0_ = FALSE;
		return _tmp0_;
	}
	result = _data_->result;
	return result;
}

static void
_accounts_editor_servers_pane_on_untrusted_host_geary_account_information_untrusted_host (GearyAccountInformation* _sender,
                                                                                          GearyServiceInformation* service,
                                                                                          GearyEndpoint* endpoint,
                                                                                          GTlsConnection* cx,
                                                                                          gpointer self)
{
	accounts_editor_servers_pane_on_untrusted_host ((AccountsEditorServersPane*) self, _sender, service, endpoint, cx);
}

static void
accounts_editor_servers_pane_validate_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	AccountsEditorServersPaneValidateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	accounts_editor_servers_pane_validate_co (_data_);
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

static gboolean
accounts_editor_servers_pane_validate_co (AccountsEditorServersPaneValidateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = geary_account_information_new_copy (_data_->_tmp1_);
	_data_->local_account = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->local_account;
	g_signal_connect_object (_data_->_tmp3_, "untrusted-host", (GCallback) _accounts_editor_servers_pane_on_untrusted_host_geary_account_information_untrusted_host, _data_->self, 0);
	_data_->message = NULL;
	_data_->imap_valid = FALSE;
	{
		_data_->_tmp4_ = _data_->self->priv->engine;
		_data_->_tmp5_ = _data_->local_account;
		_data_->_tmp6_ = _data_->self->priv->incoming_mutable;
		_data_->_state_ = 1;
		geary_engine_validate_imap (_data_->_tmp4_, _data_->_tmp5_, _data_->_tmp6_, _data_->cancellable, accounts_editor_servers_pane_validate_ready, _data_);
		return FALSE;
		_state_1:
		geary_engine_validate_imap_finish (_data_->_tmp4_, _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_->_tmp7_ = _data_->err;
		_data_->_tmp8_ = _data_->_tmp7_->message;
		g_debug ("accounts-editor-servers-pane.vala:310: Error authenticating IMAP servi" \
"ce: %s", _data_->_tmp8_);
		_data_->_tmp9_ = g_strdup (_ ("Check your receiving login and password"));
		_g_free0 (_data_->message);
		_data_->message = _data_->_tmp9_;
		_g_error_free0 (_data_->err);
	}
	goto __finally0;
	__catch0_g_tls_error_bad_certificate:
	{
		_data_->_vala1_err = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp10_ = _data_->_vala1_err;
		_data_->_tmp11_ = _data_->_tmp10_->message;
		g_debug ("accounts-editor-servers-pane.vala:316: Error validating IMAP certifica" \
"te: %s", _data_->_tmp11_);
		_g_error_free0 (_data_->_vala1_err);
	}
	goto __finally0;
	__catch0_g_io_error_cancelled:
	{
		_data_->_vala2_err = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp12_ = _data_->_vala2_err;
		_data_->_tmp13_ = _data_->_tmp12_->message;
		g_debug ("accounts-editor-servers-pane.vala:319: IMAP validation was cancelled: " \
"%s", _data_->_tmp13_);
		_g_error_free0 (_data_->_vala2_err);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_vala3_err = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp14_ = _data_->_vala3_err;
		_data_->_tmp15_ = geary_error_context_new (_data_->_tmp14_);
		_data_->context = _data_->_tmp15_;
		_data_->_tmp16_ = _data_->context;
		_data_->_tmp17_ = geary_error_context_format_full_error (_data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		g_debug ("accounts-editor-servers-pane.vala:322: Error validating IMAP service: " \
"%s", _data_->_tmp18_);
		_g_free0 (_data_->_tmp18_);
		_data_->_tmp19_ = g_strdup (_ ("Check your receiving server details"));
		_g_free0 (_data_->message);
		_data_->message = _data_->_tmp19_;
		_g_object_unref0 (_data_->context);
		_g_error_free0 (_data_->_vala3_err);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->message);
		_g_object_unref0 (_data_->local_account);
		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_->smtp_valid = FALSE;
	if (_data_->imap_valid) {
		g_debug ("accounts-editor-servers-pane.vala:330: Validating SMTP...");
		{
			_data_->_tmp20_ = _data_->self->priv->engine;
			_data_->_tmp21_ = _data_->local_account;
			_data_->_tmp22_ = _data_->self->priv->outgoing_mutable;
			_data_->_tmp23_ = _data_->self->priv->incoming_mutable;
			_data_->_tmp24_ = geary_service_information_get_credentials (_data_->_tmp23_);
			_data_->_tmp25_ = _data_->_tmp24_;
			_data_->_state_ = 2;
			geary_engine_validate_smtp (_data_->_tmp20_, _data_->_tmp21_, _data_->_tmp22_, _data_->_tmp25_, _data_->cancellable, accounts_editor_servers_pane_validate_ready, _data_);
			return FALSE;
			_state_2:
			geary_engine_validate_smtp_finish (_data_->_tmp20_, _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_->_tmp26_ = _data_->_vala4_err;
			_data_->_tmp27_ = _data_->_tmp26_->message;
			g_debug ("accounts-editor-servers-pane.vala:340: Error authenticating SMTP servi" \
"ce: %s", _data_->_tmp27_);
			_data_->_tmp28_ = _data_->self->priv->outgoing_auth;
			_data_->_tmp29_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp28_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
			_data_->_tmp30_ = _data_->_tmp29_;
			accounts_outgoing_auth_combo_box_set_source ((AccountsOutgoingAuthComboBox*) _data_->_tmp30_, GEARY_CREDENTIALS_REQUIREMENT_CUSTOM);
			_data_->_tmp31_ = g_strdup (_ ("Check your sending login and password"));
			_g_free0 (_data_->message);
			_data_->message = _data_->_tmp31_;
			_g_error_free0 (_data_->_vala4_err);
		}
		goto __finally1;
		__catch1_g_tls_error_bad_certificate:
		{
			_data_->_vala5_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp32_ = _data_->_vala5_err;
			_data_->_tmp33_ = _data_->_tmp32_->message;
			g_debug ("accounts-editor-servers-pane.vala:350: Error validating SMTP certifica" \
"te: %s", _data_->_tmp33_);
			_g_error_free0 (_data_->_vala5_err);
		}
		goto __finally1;
		__catch1_g_io_error_cancelled:
		{
			_data_->_vala6_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp34_ = _data_->_vala6_err;
			_data_->_tmp35_ = _data_->_tmp34_->message;
			g_debug ("accounts-editor-servers-pane.vala:353: SMTP validation was cancelled: " \
"%s", _data_->_tmp35_);
			_g_error_free0 (_data_->_vala6_err);
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->_vala7_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp36_ = _data_->_vala7_err;
			_data_->_tmp37_ = geary_error_context_new (_data_->_tmp36_);
			_data_->_vala1_context = _data_->_tmp37_;
			_data_->_tmp38_ = _data_->_vala1_context;
			_data_->_tmp39_ = geary_error_context_format_full_error (_data_->_tmp38_);
			_data_->_tmp40_ = _data_->_tmp39_;
			g_debug ("accounts-editor-servers-pane.vala:356: Error validating SMTP service: " \
"%s", _data_->_tmp40_);
			_g_free0 (_data_->_tmp40_);
			_data_->_tmp41_ = g_strdup (_ ("Check your sending server details"));
			_g_free0 (_data_->message);
			_data_->message = _data_->_tmp41_;
			_g_object_unref0 (_data_->_vala1_context);
			_g_error_free0 (_data_->_vala7_err);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->message);
			_g_object_unref0 (_data_->local_account);
			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_->_tmp42_ = _data_->local_account;
	g_signal_parse_name ("untrusted-host", GEARY_TYPE_ACCOUNT_INFORMATION, &_data_->_tmp43_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_data_->_tmp42_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _data_->_tmp43_, 0, NULL, (GCallback) _accounts_editor_servers_pane_on_untrusted_host_geary_account_information_untrusted_host, _data_->self);
	if (_data_->imap_valid) {
		_data_->_tmp44_ = _data_->smtp_valid;
	} else {
		_data_->_tmp44_ = FALSE;
	}
	_data_->is_valid = _data_->_tmp44_;
	_data_->_tmp45_ = bool_to_string (_data_->is_valid);
	_data_->_tmp46_ = _data_->_tmp45_;
	g_debug ("accounts-editor-servers-pane.vala:366: Validation complete, is valid: " \
"%s", _data_->_tmp46_);
	_g_free0 (_data_->_tmp46_);
	if (!_data_->is_valid) {
		_data_->_tmp48_ = _data_->message;
		_data_->_tmp47_ = _data_->_tmp48_ != NULL;
	} else {
		_data_->_tmp47_ = FALSE;
	}
	if (_data_->_tmp47_) {
		_data_->_tmp49_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_data_->_tmp50_ = _data_->_tmp49_;
		_data_->_tmp51_ = _data_->message;
		_data_->_tmp52_ = g_strdup_printf (_ ("Account not updated: %s"), _data_->_tmp51_);
		_data_->_tmp53_ = _data_->_tmp52_;
		_data_->_tmp54_ = components_in_app_notification_new (_data_->_tmp53_, COMPONENTS_IN_APP_NOTIFICATION_DEFAULT_DURATION);
		g_object_ref_sink (_data_->_tmp54_);
		_data_->_tmp55_ = _data_->_tmp54_;
		accounts_editor_add_notification (_data_->_tmp50_, _data_->_tmp55_);
		_g_object_unref0 (_data_->_tmp55_);
		_g_free0 (_data_->_tmp53_);
	}
	_data_->result = _data_->is_valid;
	_g_free0 (_data_->message);
	_g_object_unref0 (_data_->local_account);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
accounts_editor_servers_pane_update_service_data_free (gpointer _data)
{
	AccountsEditorServersPaneUpdateServiceData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->existing);
	_g_object_unref0 (_data_->copy);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (AccountsEditorServersPaneUpdateServiceData, _data_);
}

static void
accounts_editor_servers_pane_update_service (AccountsEditorServersPane* self,
                                             GearyServiceInformation* existing,
                                             GearyServiceInformation* copy,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	AccountsEditorServersPaneUpdateServiceData* _data_;
	AccountsEditorServersPane* _tmp0_;
	GearyServiceInformation* _tmp1_;
	GearyServiceInformation* _tmp2_;
	GCancellable* _tmp3_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (existing, GEARY_TYPE_SERVICE_INFORMATION));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (copy, GEARY_TYPE_SERVICE_INFORMATION));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()));
	_data_ = g_slice_new0 (AccountsEditorServersPaneUpdateServiceData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, accounts_editor_servers_pane_update_service_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (existing);
	_g_object_unref0 (_data_->existing);
	_data_->existing = _tmp1_;
	_tmp2_ = _g_object_ref0 (copy);
	_g_object_unref0 (_data_->copy);
	_data_->copy = _tmp2_;
	_tmp3_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp3_;
	accounts_editor_servers_pane_update_service_co (_data_);
}

static gboolean
accounts_editor_servers_pane_update_service_finish (AccountsEditorServersPane* self,
                                                    GAsyncResult* _res_)
{
	gboolean result;
	AccountsEditorServersPaneUpdateServiceData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		gboolean _tmp0_ = FALSE;
		return _tmp0_;
	}
	result = _data_->result;
	return result;
}

static void
accounts_editor_servers_pane_update_service_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	AccountsEditorServersPaneUpdateServiceData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	accounts_editor_servers_pane_update_service_co (_data_);
}

static gboolean
accounts_editor_servers_pane_update_service_co (AccountsEditorServersPaneUpdateServiceData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->has_changed = !geary_service_information_equal_to (_data_->existing, _data_->copy);
	if (_data_->has_changed) {
		{
			_data_->_tmp0_ = accounts_editor_pane_get_editor (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
			_data_->_tmp1_ = _data_->_tmp0_;
			_data_->_tmp2_ = accounts_editor_get_accounts (_data_->_tmp1_);
			_data_->_tmp3_ = _data_->_tmp2_;
			_data_->_tmp4_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
			_data_->_tmp5_ = _data_->_tmp4_;
			_data_->_state_ = 1;
			accounts_manager_update_local_credentials (_data_->_tmp3_, _data_->_tmp5_, _data_->existing, _data_->copy, _data_->cancellable, accounts_editor_servers_pane_update_service_ready, _data_);
			return FALSE;
			_state_1:
			accounts_manager_update_local_credentials_finish (_data_->_tmp3_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp6_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
			_data_->_tmp7_ = _data_->_tmp6_;
			_data_->_tmp8_ = geary_account_information_get_id (_data_->_tmp7_);
			_data_->_tmp9_ = _data_->_tmp8_;
			_data_->_tmp10_ = geary_service_information_get_protocol (_data_->existing);
			_data_->_tmp11_ = _data_->_tmp10_;
			_data_->_tmp12_ = geary_protocol_to_value (_data_->_tmp11_);
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_tmp14_ = _data_->err;
			_data_->_tmp15_ = _data_->_tmp14_->message;
			g_warning ("accounts-editor-servers-pane.vala:391: Could not update %s %s credenti" \
"als: %s", _data_->_tmp9_, _data_->_tmp13_, _data_->_tmp15_);
			_g_free0 (_data_->_tmp13_);
			_g_error_free0 (_data_->err);
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		{
			_data_->_tmp16_ = _data_->self->priv->engine;
			_data_->_tmp17_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
			_data_->_tmp18_ = _data_->_tmp17_;
			_data_->_state_ = 2;
			geary_engine_update_account_service (_data_->_tmp16_, _data_->_tmp18_, _data_->copy, _data_->cancellable, accounts_editor_servers_pane_update_service_ready, _data_);
			return FALSE;
			_state_2:
			geary_engine_update_account_service_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->_vala1_err = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp19_ = accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (_data_->self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
			_data_->_tmp20_ = _data_->_tmp19_;
			_data_->_tmp21_ = geary_account_information_get_id (_data_->_tmp20_);
			_data_->_tmp22_ = _data_->_tmp21_;
			_data_->_tmp23_ = geary_service_information_get_protocol (_data_->existing);
			_data_->_tmp24_ = _data_->_tmp23_;
			_data_->_tmp25_ = geary_protocol_to_value (_data_->_tmp24_);
			_data_->_tmp26_ = _data_->_tmp25_;
			_data_->_tmp27_ = _data_->_vala1_err;
			_data_->_tmp28_ = _data_->_tmp27_->message;
			g_warning ("accounts-editor-servers-pane.vala:404: Could not update %s %s service:" \
" %s", _data_->_tmp22_, _data_->_tmp26_, _data_->_tmp28_);
			_g_free0 (_data_->_tmp26_);
			_g_error_free0 (_data_->_vala1_err);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->result = _data_->has_changed;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_accounts_editor_servers_pane_on_validator_changed_accounts_validating_row_changed (AccountsValidatingRow* _sender,
                                                                                    gpointer self)
{
	accounts_editor_servers_pane_on_validator_changed ((AccountsEditorServersPane*) self);
}

static void
_accounts_editor_servers_pane_on_validator_activated_components_validator_activated (ComponentsValidator* _sender,
                                                                                     gpointer self)
{
	accounts_editor_servers_pane_on_validator_activated ((AccountsEditorServersPane*) self);
}

static void
accounts_editor_servers_pane_add_row (AccountsEditorServersPane* self,
                                      GtkListBox* list,
                                      AccountsEditorRow* row)
{
	AccountsValidatingRow* validating = NULL;
	AccountsValidatingRow* _tmp0_;
	AccountsValidatingRow* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (list, gtk_list_box_get_type ()));
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (row));
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (list, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (row, gtk_widget_get_type (), GtkWidget));
	_tmp0_ = _g_object_ref0 (ACCOUNTS_IS_VALIDATING_ROW (row) ? ((AccountsValidatingRow*) row) : NULL);
	validating = _tmp0_;
	_tmp1_ = validating;
	if (_tmp1_ != NULL) {
		AccountsValidatingRow* _tmp2_;
		AccountsValidatingRow* _tmp3_;
		ComponentsValidator* _tmp4_;
		ComponentsValidator* _tmp5_;
		GeeList* _tmp6_;
		AccountsValidatingRow* _tmp7_;
		ComponentsValidator* _tmp8_;
		ComponentsValidator* _tmp9_;
		_tmp2_ = validating;
		g_signal_connect_object (_tmp2_, "changed", (GCallback) _accounts_editor_servers_pane_on_validator_changed_accounts_validating_row_changed, self, 0);
		_tmp3_ = validating;
		_tmp4_ = accounts_validating_row_get_validator (_tmp3_);
		_tmp5_ = _tmp4_;
		g_signal_connect_object (_tmp5_, "activated", (GCallback) _accounts_editor_servers_pane_on_validator_activated_components_validator_activated, self, G_CONNECT_AFTER);
		_tmp6_ = self->priv->validators;
		_tmp7_ = validating;
		_tmp8_ = accounts_validating_row_get_validator (_tmp7_);
		_tmp9_ = _tmp8_;
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection), _tmp9_);
	}
	_g_object_unref0 (validating);
}

static void
accounts_editor_servers_pane_update_outgoing_auth (AccountsEditorServersPane* self)
{
	AccountsServiceLoginRow* _tmp0_;
	AccountsServiceOutgoingAuthRow* _tmp1_;
	gconstpointer _tmp2_;
	gconstpointer _tmp3_;
	GearyCredentialsRequirement _tmp4_;
	GearyCredentialsRequirement _tmp5_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	_tmp0_ = self->priv->outgoing_login;
	_tmp1_ = self->priv->outgoing_auth;
	_tmp2_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = accounts_outgoing_auth_combo_box_get_source ((AccountsOutgoingAuthComboBox*) _tmp3_);
	_tmp5_ = _tmp4_;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), _tmp5_ == GEARY_CREDENTIALS_REQUIREMENT_CUSTOM);
}

static void
accounts_editor_servers_pane_update_operation_ui (AccountsEditorServersPane* self,
                                                  gboolean is_running)
{
	GtkSpinner* _tmp0_;
	GtkSpinner* _tmp1_;
	GtkButton* _tmp2_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	_tmp0_ = self->priv->apply_spinner;
	gtk_widget_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), is_running);
	_tmp1_ = self->priv->apply_spinner;
	g_object_set (_tmp1_, "active", is_running, NULL);
	_tmp2_ = self->priv->apply_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, 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_servers_pane_on_validator_changed (AccountsEditorServersPane* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	_tmp0_ = self->priv->apply_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), accounts_editor_servers_pane_is_valid (self));
}

static void
accounts_editor_servers_pane_on_validator_activated (AccountsEditorServersPane* self)
{
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	if (accounts_editor_servers_pane_is_valid (self)) {
		GtkButton* _tmp0_;
		_tmp0_ = self->priv->apply_button;
		gtk_button_clicked (_tmp0_);
	}
}

static void
__lambda69_ (AccountsEditorServersPane* self,
             GObject* obj,
             GAsyncResult* res)
{
	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;
	}
	accounts_editor_servers_pane_save (self, NULL, NULL, NULL);
}

static void
___lambda69__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda69_ ((AccountsEditorServersPane*) self, source_object, res);
	g_object_unref (self);
}

static void
accounts_editor_servers_pane_on_untrusted_host (AccountsEditorServersPane* self,
                                                GearyAccountInformation* account,
                                                GearyServiceInformation* service,
                                                GearyEndpoint* endpoint,
                                                GTlsConnection* cx)
{
	AccountsEditor* _tmp0_;
	AccountsEditor* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_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_;
	accounts_editor_prompt_pin_certificate (_tmp1_, account, service, endpoint, NULL, ___lambda69__gasync_ready_callback, g_object_ref (self));
}

static void
accounts_editor_servers_pane_on_cancel_button_clicked (AccountsEditorServersPane* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	_tmp0_ = accounts_editor_pane_get_is_operation_running (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		accounts_editor_pane_cancel_operation (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	} else {
		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_);
	}
}

static void
_accounts_editor_servers_pane_on_cancel_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self)
{
	accounts_editor_servers_pane_on_cancel_button_clicked ((AccountsEditorServersPane*) self);
}

static void
accounts_editor_servers_pane_on_apply_button_clicked (AccountsEditorServersPane* self)
{
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	_tmp0_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
	_tmp1_ = _tmp0_;
	accounts_editor_servers_pane_save (self, _tmp1_, NULL, NULL);
}

static void
_accounts_editor_servers_pane_on_apply_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self)
{
	accounts_editor_servers_pane_on_apply_button_clicked ((AccountsEditorServersPane*) self);
}

static gboolean
accounts_editor_servers_pane_on_list_keynav_failed (AccountsEditorServersPane* self,
                                                    GtkWidget* widget,
                                                    GtkDirectionType direction)
{
	gboolean ret = FALSE;
	GtkContainer* next = NULL;
	GtkContainer* _tmp12_;
	gboolean result;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_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_;
			_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_servers_pane_on_list_keynav_failed_gtk_widget_keynav_failed (GtkWidget* _sender,
                                                                              GtkDirectionType direction,
                                                                              gpointer self)
{
	gboolean result;
	result = accounts_editor_servers_pane_on_list_keynav_failed ((AccountsEditorServersPane*) self, _sender, direction);
	return result;
}

static void
accounts_editor_servers_pane_on_outgoing_auth_changed (AccountsEditorServersPane* self)
{
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	accounts_editor_servers_pane_update_outgoing_auth (self);
}

static void
accounts_editor_servers_pane_on_activate (AccountsEditorServersPane* self,
                                          GtkListBoxRow* row)
{
	AccountsEditorRow* server_row = NULL;
	AccountsEditorRow* _tmp0_;
	AccountsEditorRow* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (row, gtk_list_box_row_get_type ()));
	_tmp0_ = _g_object_ref0 (ACCOUNTS_IS_EDITOR_ROW (row) ? ((AccountsEditorRow*) row) : NULL);
	server_row = _tmp0_;
	_tmp1_ = server_row;
	if (_tmp1_ != NULL) {
		AccountsEditorRow* _tmp2_;
		_tmp2_ = server_row;
		accounts_editor_row_activated (_tmp2_, self);
	}
	_g_object_unref0 (server_row);
}

static void
_accounts_editor_servers_pane_on_activate_gtk_list_box_row_activated (GtkListBox* _sender,
                                                                      GtkListBoxRow* row,
                                                                      gpointer self)
{
	accounts_editor_servers_pane_on_activate ((AccountsEditorServersPane*) self, row);
}

static void
accounts_editor_servers_pane_class_init (AccountsEditorServersPaneClass * klass,
                                         gpointer klass_data)
{
	accounts_editor_servers_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsEditorServersPane_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_editor_servers_pane_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_editor_servers_pane_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_editor_servers_pane_finalize;
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_SERVERS_PANE_EDITOR_PROPERTY, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_EDITOR_PROPERTY] = g_param_spec_object ("editor", "editor", "editor", ACCOUNTS_TYPE_EDITOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_SERVERS_PANE_ACCOUNT_PROPERTY, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_ACCOUNT_PROPERTY] = g_param_spec_object ("account", "account", "account", GEARY_TYPE_ACCOUNT_INFORMATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_SERVERS_PANE_COMMANDS_PROPERTY, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_PANE_COMMANDS_PROPERTY] = g_param_spec_object ("commands", "commands", "commands", APPLICATION_TYPE_COMMAND_STACK, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** {@inheritDoc} */
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_SERVERS_PANE_INITIAL_WIDGET_PROPERTY, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_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_SERVERS_PANE_IS_OPERATION_RUNNING_PROPERTY, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_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_SERVERS_PANE_OP_CANCELLABLE_PROPERTY, accounts_editor_servers_pane_properties[ACCOUNTS_EDITOR_SERVERS_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));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Geary/accounts_editor_servers_pane.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, header));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pane_content", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, pane_content));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pane_adjustment", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, pane_adjustment));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "details_list", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, details_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "receiving_list", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, receiving_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "sending_list", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, sending_list));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "apply_button", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, apply_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "apply_spinner", FALSE, AccountsEditorServersPane_private_offset + G_STRUCT_OFFSET (AccountsEditorServersPanePrivate, apply_spinner));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_cancel_button_clicked", G_CALLBACK(_accounts_editor_servers_pane_on_cancel_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_apply_button_clicked", G_CALLBACK(_accounts_editor_servers_pane_on_apply_button_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_list_keynav_failed", G_CALLBACK(_accounts_editor_servers_pane_on_list_keynav_failed_gtk_widget_keynav_failed));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_activate", G_CALLBACK(_accounts_editor_servers_pane_on_activate_gtk_list_box_row_activated));
}

static void
accounts_editor_servers_pane_accounts_editor_pane_interface_init (AccountsEditorPaneIface * iface,
                                                                  gpointer iface_data)
{
	accounts_editor_servers_pane_accounts_editor_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_header = (GtkHeaderBar* (*) (AccountsEditorPane*)) accounts_editor_servers_pane_real_get_header;
	iface->get_editor = accounts_editor_servers_pane_real_get_editor;
	iface->set_editor = accounts_editor_servers_pane_real_set_editor;
	iface->get_initial_widget = accounts_editor_servers_pane_real_get_initial_widget;
	iface->get_is_operation_running = accounts_editor_servers_pane_real_get_is_operation_running;
	iface->set_is_operation_running = accounts_editor_servers_pane_real_set_is_operation_running;
	iface->get_op_cancellable = accounts_editor_servers_pane_real_get_op_cancellable;
	iface->set_op_cancellable = accounts_editor_servers_pane_real_set_op_cancellable;
}

static void
accounts_editor_servers_pane_accounts_account_pane_interface_init (AccountsAccountPaneIface * iface,
                                                                   gpointer iface_data)
{
	accounts_editor_servers_pane_accounts_account_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_account = accounts_editor_servers_pane_real_get_account;
	iface->set_account = accounts_editor_servers_pane_real_set_account;
}

static void
accounts_editor_servers_pane_accounts_command_pane_interface_init (AccountsCommandPaneIface * iface,
                                                                   gpointer iface_data)
{
	accounts_editor_servers_pane_accounts_command_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->command_executed = (void (*) (AccountsCommandPane*)) accounts_editor_servers_pane_real_command_executed;
	iface->get_commands = accounts_editor_servers_pane_real_get_commands;
	iface->set_commands = accounts_editor_servers_pane_real_set_commands;
}

static void
accounts_editor_servers_pane_instance_init (AccountsEditorServersPane * self,
                                            gpointer klass)
{
	ApplicationCommandStack* _tmp0_;
	GCancellable* _tmp1_;
	GeeLinkedList* _tmp2_;
	self->priv = accounts_editor_servers_pane_get_instance_private (self);
	_tmp0_ = application_command_stack_new ();
	self->priv->_commands = _tmp0_;
	_tmp1_ = g_cancellable_new ();
	self->priv->_op_cancellable = _tmp1_;
	_tmp2_ = gee_linked_list_new (COMPONENTS_TYPE_VALIDATOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->validators = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_LIST, GeeList);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
accounts_editor_servers_pane_finalize (GObject * obj)
{
	AccountsEditorServersPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	accounts_account_pane_disconnect_account_signals (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane));
	accounts_command_pane_disconnect_command_signals (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane));
	_g_object_unref0 (self->priv->_account);
	_g_object_unref0 (self->priv->_commands);
	_g_object_unref0 (self->priv->_op_cancellable);
	_g_object_unref0 (self->priv->engine);
	_g_object_unref0 (self->priv->incoming_mutable);
	_g_object_unref0 (self->priv->outgoing_mutable);
	_g_object_unref0 (self->priv->validators);
	_g_object_unref0 (self->priv->save_drafts);
	_g_object_unref0 (self->priv->save_sent);
	_g_object_unref0 (self->priv->incoming_login);
	_g_object_unref0 (self->priv->incoming_password);
	_g_object_unref0 (self->priv->outgoing_auth);
	_g_object_unref0 (self->priv->outgoing_login);
	_g_object_unref0 (self->priv->outgoing_password);
	G_OBJECT_CLASS (accounts_editor_servers_pane_parent_class)->finalize (obj);
}

/**
 * An account editor pane for editing server details for an account.
 */
static GType
accounts_editor_servers_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsEditorServersPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_editor_servers_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsEditorServersPane), 0, (GInstanceInitFunc) accounts_editor_servers_pane_instance_init, NULL };
	static const GInterfaceInfo accounts_editor_pane_info = { (GInterfaceInitFunc) accounts_editor_servers_pane_accounts_editor_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo accounts_account_pane_info = { (GInterfaceInitFunc) accounts_editor_servers_pane_accounts_account_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo accounts_command_pane_info = { (GInterfaceInitFunc) accounts_editor_servers_pane_accounts_command_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType accounts_editor_servers_pane_type_id;
	accounts_editor_servers_pane_type_id = g_type_register_static (gtk_grid_get_type (), "AccountsEditorServersPane", &g_define_type_info, 0);
	g_type_add_interface_static (accounts_editor_servers_pane_type_id, ACCOUNTS_TYPE_EDITOR_PANE, &accounts_editor_pane_info);
	g_type_add_interface_static (accounts_editor_servers_pane_type_id, ACCOUNTS_TYPE_ACCOUNT_PANE, &accounts_account_pane_info);
	g_type_add_interface_static (accounts_editor_servers_pane_type_id, ACCOUNTS_TYPE_COMMAND_PANE, &accounts_command_pane_info);
	AccountsEditorServersPane_private_offset = g_type_add_instance_private (accounts_editor_servers_pane_type_id, sizeof (AccountsEditorServersPanePrivate));
	return accounts_editor_servers_pane_type_id;
}

GType
accounts_editor_servers_pane_get_type (void)
{
	static volatile gsize accounts_editor_servers_pane_type_id__once = 0;
	if (g_once_init_enter (&accounts_editor_servers_pane_type_id__once)) {
		GType accounts_editor_servers_pane_type_id;
		accounts_editor_servers_pane_type_id = accounts_editor_servers_pane_get_type_once ();
		g_once_init_leave (&accounts_editor_servers_pane_type_id__once, accounts_editor_servers_pane_type_id);
	}
	return accounts_editor_servers_pane_type_id__once;
}

static void
_vala_accounts_editor_servers_pane_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	AccountsEditorServersPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	switch (property_id) {
		case ACCOUNTS_EDITOR_SERVERS_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;
		case ACCOUNTS_EDITOR_SERVERS_PANE_ACCOUNT_PROPERTY:
		g_value_set_object (value, accounts_account_pane_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane)));
		break;
		case ACCOUNTS_EDITOR_SERVERS_PANE_COMMANDS_PROPERTY:
		g_value_set_object (value, accounts_command_pane_get_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane)));
		break;
		case ACCOUNTS_EDITOR_SERVERS_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_SERVERS_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_SERVERS_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;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_editor_servers_pane_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	AccountsEditorServersPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, AccountsEditorServersPane);
	switch (property_id) {
		case ACCOUNTS_EDITOR_SERVERS_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;
		case ACCOUNTS_EDITOR_SERVERS_PANE_ACCOUNT_PROPERTY:
		accounts_account_pane_set_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_PANE, AccountsAccountPane), g_value_get_object (value));
		break;
		case ACCOUNTS_EDITOR_SERVERS_PANE_COMMANDS_PROPERTY:
		accounts_command_pane_set_commands (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_COMMAND_PANE, AccountsCommandPane), g_value_get_object (value));
		break;
		case ACCOUNTS_EDITOR_SERVERS_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_SERVERS_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;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_account_provider_row_get_instance_private (AccountsAccountProviderRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsAccountProviderRow_private_offset);
}

AccountsAccountProviderRow*
accounts_account_provider_row_construct (GType object_type,
                                         AccountsManager* accounts,
                                         GearyAccountInformation* account)
{
	AccountsAccountProviderRow * self = NULL;
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	AccountsManager* _tmp2_;
	g_return_val_if_fail (ACCOUNTS_IS_MANAGER (accounts), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	self = (AccountsAccountProviderRow*) accounts_account_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_label_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, _ ("Account source"), _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = _g_object_ref0 (accounts);
	_g_object_unref0 (self->priv->accounts);
	self->priv->accounts = _tmp2_;
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	return self;
}

AccountsAccountProviderRow*
accounts_account_provider_row_new (AccountsManager* accounts,
                                   GearyAccountInformation* account)
{
	return accounts_account_provider_row_construct (ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW, accounts, account);
}

static void
accounts_account_provider_row_real_update (AccountsAccountRow* base)
{
	AccountsAccountProviderRow * self;
	gchar* source = NULL;
	gboolean enabled = FALSE;
	GearyAccountInformation* _tmp0_;
	GearyAccountInformation* _tmp1_;
	GearyCredentialsMediator* _tmp2_;
	GearyCredentialsMediator* _tmp3_;
	gconstpointer _tmp6_;
	gconstpointer _tmp7_;
	const gchar* _tmp8_;
	GtkStyleContext* style = NULL;
	gconstpointer _tmp9_;
	gconstpointer _tmp10_;
	GtkStyleContext* _tmp11_;
	GtkStyleContext* _tmp12_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW, AccountsAccountProviderRow);
	source = NULL;
	enabled = FALSE;
	_tmp0_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = geary_account_information_get_mediator (_tmp1_);
	_tmp3_ = _tmp2_;
	if (IS_GOA_MEDIATOR (_tmp3_)) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup (_ ("GNOME Online Accounts"));
		_g_free0 (source);
		source = _tmp4_;
		enabled = TRUE;
	} else {
		gchar* _tmp5_;
		_tmp5_ = g_strdup (_ ("Geary"));
		_g_free0 (source);
		source = _tmp5_;
	}
	_tmp6_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp7_ = _tmp6_;
	_tmp8_ = source;
	gtk_label_set_text ((GtkLabel*) _tmp7_, _tmp8_);
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), enabled);
	_tmp9_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp10_ = _tmp9_;
	_tmp11_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST ((GtkLabel*) _tmp10_, gtk_widget_get_type (), GtkWidget));
	_tmp12_ = _g_object_ref0 (_tmp11_);
	style = _tmp12_;
	if (enabled) {
		GtkStyleContext* _tmp13_;
		_tmp13_ = style;
		gtk_style_context_remove_class (_tmp13_, GTK_STYLE_CLASS_DIM_LABEL);
	} else {
		GtkStyleContext* _tmp14_;
		_tmp14_ = style;
		gtk_style_context_add_class (_tmp14_, GTK_STYLE_CLASS_DIM_LABEL);
	}
	_g_object_unref0 (style);
	_g_free0 (source);
}

static void
___lambda65_ (AccountsAccountProviderRow* self,
              GObject* obj,
              GAsyncResult* res)
{
	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 ()));
	{
		AccountsManager* _tmp0_;
		_tmp0_ = self->priv->accounts;
		accounts_manager_show_goa_account_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		GearyAccountInformation* _tmp1_;
		GearyAccountInformation* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		GError* _tmp5_;
		const gchar* _tmp6_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp2_ = _tmp1_;
		_tmp3_ = geary_account_information_get_id (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = err;
		_tmp6_ = _tmp5_->message;
		g_debug ("accounts-editor-servers-pane.vala:573: Failed to show GOA account \"%s" \
"\": %s", _tmp4_, _tmp6_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda65__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda65_ ((AccountsAccountProviderRow*) self, source_object, res);
	g_object_unref (self);
}

static void
accounts_account_provider_row_real_activated (AccountsEditorRow* base,
                                              AccountsEditorServersPane* pane)
{
	AccountsAccountProviderRow * self;
	AccountsManager* _tmp0_;
	GearyAccountInformation* _tmp1_;
	GearyAccountInformation* _tmp2_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW, AccountsAccountProviderRow);
	g_return_if_fail (ACCOUNTS_IS_EDITOR_SERVERS_PANE (pane));
	_tmp0_ = self->priv->accounts;
	_tmp1_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp2_ = _tmp1_;
	if (accounts_manager_is_goa_account (_tmp0_, _tmp2_)) {
		AccountsManager* _tmp3_;
		GearyAccountInformation* _tmp4_;
		GearyAccountInformation* _tmp5_;
		GCancellable* _tmp6_;
		GCancellable* _tmp7_;
		_tmp3_ = self->priv->accounts;
		_tmp4_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp5_ = _tmp4_;
		_tmp6_ = accounts_editor_pane_get_op_cancellable (G_TYPE_CHECK_INSTANCE_CAST (pane, ACCOUNTS_TYPE_EDITOR_PANE, AccountsEditorPane));
		_tmp7_ = _tmp6_;
		accounts_manager_show_goa_account (_tmp3_, _tmp5_, _tmp7_, ____lambda65__gasync_ready_callback, g_object_ref (self));
	}
}

static void
accounts_account_provider_row_class_init (AccountsAccountProviderRowClass * klass,
                                          gpointer klass_data)
{
	accounts_account_provider_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsAccountProviderRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_account_provider_row_real_update;
	((AccountsEditorRowClass *) klass)->activated = (void (*) (AccountsEditorRow*, gconstpointer)) accounts_account_provider_row_real_activated;
	G_OBJECT_CLASS (klass)->finalize = accounts_account_provider_row_finalize;
}

static void
accounts_account_provider_row_instance_init (AccountsAccountProviderRow * self,
                                             gpointer klass)
{
	self->priv = accounts_account_provider_row_get_instance_private (self);
}

static void
accounts_account_provider_row_finalize (GObject * obj)
{
	AccountsAccountProviderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_ACCOUNT_PROVIDER_ROW, AccountsAccountProviderRow);
	_g_object_unref0 (self->priv->accounts);
	G_OBJECT_CLASS (accounts_account_provider_row_parent_class)->finalize (obj);
}

static GType
accounts_account_provider_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsAccountProviderRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_account_provider_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsAccountProviderRow), 0, (GInstanceInitFunc) accounts_account_provider_row_instance_init, NULL };
	GType accounts_account_provider_row_type_id;
	accounts_account_provider_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ACCOUNT_ROW, "AccountsAccountProviderRow", &g_define_type_info, 0);
	AccountsAccountProviderRow_private_offset = g_type_add_instance_private (accounts_account_provider_row_type_id, sizeof (AccountsAccountProviderRowPrivate));
	return accounts_account_provider_row_type_id;
}

GType
accounts_account_provider_row_get_type (void)
{
	static volatile gsize accounts_account_provider_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_account_provider_row_type_id__once)) {
		GType accounts_account_provider_row_type_id;
		accounts_account_provider_row_type_id = accounts_account_provider_row_get_type_once ();
		g_once_init_leave (&accounts_account_provider_row_type_id__once, accounts_account_provider_row_type_id);
	}
	return accounts_account_provider_row_type_id__once;
}

static inline gpointer
accounts_save_drafts_row_get_instance_private (AccountsSaveDraftsRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsSaveDraftsRow_private_offset);
}

gboolean
accounts_save_drafts_row_get_value_changed (AccountsSaveDraftsRow* self)
{
	gboolean result;
	gboolean _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_val_if_fail (ACCOUNTS_IS_SAVE_DRAFTS_ROW (self), FALSE);
	_tmp0_ = self->priv->_initial_value;
	_tmp1_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_switch_get_state ((GtkSwitch*) _tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp0_ != _tmp4_;
	return result;
}

gboolean
accounts_save_drafts_row_get_initial_value (AccountsSaveDraftsRow* self)
{
	gboolean result;
	g_return_val_if_fail (ACCOUNTS_IS_SAVE_DRAFTS_ROW (self), FALSE);
	result = self->priv->_initial_value;
	return result;
}

static void
accounts_save_drafts_row_set_initial_value (AccountsSaveDraftsRow* self,
                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (ACCOUNTS_IS_SAVE_DRAFTS_ROW (self));
	old_value = accounts_save_drafts_row_get_initial_value (self);
	if (old_value != value) {
		self->priv->_initial_value = value;
		g_object_notify_by_pspec ((GObject *) self, accounts_save_drafts_row_properties[ACCOUNTS_SAVE_DRAFTS_ROW_INITIAL_VALUE_PROPERTY]);
	}
}

static void
_accounts_save_drafts_row_on_account_changed_g_object_notify (GObject* _sender,
                                                              GParamSpec* pspec,
                                                              gpointer self)
{
	accounts_save_drafts_row_on_account_changed ((AccountsSaveDraftsRow*) self);
}

static void
_accounts_save_drafts_row_on_activate_g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self)
{
	accounts_save_drafts_row_on_activate ((AccountsSaveDraftsRow*) self);
}

AccountsSaveDraftsRow*
accounts_save_drafts_row_construct (GType object_type,
                                    GearyAccountInformation* account,
                                    ApplicationCommandStack* commands,
                                    GCancellable* cancellable)
{
	AccountsSaveDraftsRow * self = NULL;
	GtkSwitch* value = NULL;
	GtkSwitch* _tmp0_;
	ApplicationCommandStack* _tmp1_;
	GCancellable* _tmp2_;
	GearyAccountInformation* _tmp3_;
	GearyAccountInformation* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	GearyAccountInformation* _tmp7_;
	GearyAccountInformation* _tmp8_;
	gconstpointer _tmp9_;
	gconstpointer _tmp10_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (APPLICATION_IS_COMMAND_STACK (commands), NULL);
	g_return_val_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()), NULL);
	_tmp0_ = (GtkSwitch*) gtk_switch_new ();
	g_object_ref_sink (_tmp0_);
	value = _tmp0_;
	self = (AccountsSaveDraftsRow*) accounts_account_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_switch_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, _ ("Save draft email on server"), value);
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp1_ = _g_object_ref0 (commands);
	_g_object_unref0 (self->priv->commands);
	self->priv->commands = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp2_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_tmp3_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp4_ = _tmp3_;
	_tmp5_ = geary_account_information_get_save_drafts (_tmp4_);
	_tmp6_ = _tmp5_;
	accounts_save_drafts_row_set_initial_value (self, _tmp6_);
	_tmp7_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp8_ = _tmp7_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G_TYPE_OBJECT, GObject), "notify::save-drafts", (GCallback) _accounts_save_drafts_row_on_account_changed_g_object_notify, self, 0);
	_tmp9_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp10_ = _tmp9_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST ((GtkSwitch*) _tmp10_, G_TYPE_OBJECT, GObject), "notify::active", (GCallback) _accounts_save_drafts_row_on_activate_g_object_notify, self, 0);
	_g_object_unref0 (value);
	return self;
}

AccountsSaveDraftsRow*
accounts_save_drafts_row_new (GearyAccountInformation* account,
                              ApplicationCommandStack* commands,
                              GCancellable* cancellable)
{
	return accounts_save_drafts_row_construct (ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, account, commands, cancellable);
}

static void
accounts_save_drafts_row_real_update (AccountsAccountRow* base)
{
	AccountsSaveDraftsRow * self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	GearyAccountInformation* _tmp2_;
	GearyAccountInformation* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, AccountsSaveDraftsRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = geary_account_information_get_save_drafts (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_switch_set_state ((GtkSwitch*) _tmp1_, _tmp5_);
}

static void
accounts_save_drafts_row_on_activate (AccountsSaveDraftsRow* self)
{
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GearyAccountInformation* _tmp4_;
	GearyAccountInformation* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	g_return_if_fail (ACCOUNTS_IS_SAVE_DRAFTS_ROW (self));
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = gtk_switch_get_state ((GtkSwitch*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp5_ = _tmp4_;
	_tmp6_ = geary_account_information_get_save_drafts (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp3_ != _tmp7_) {
		ApplicationCommandStack* _tmp8_;
		GearyAccountInformation* _tmp9_;
		GearyAccountInformation* _tmp10_;
		gconstpointer _tmp11_;
		gconstpointer _tmp12_;
		gboolean _tmp13_;
		gboolean _tmp14_;
		ApplicationPropertyCommand* _tmp15_;
		ApplicationPropertyCommand* _tmp16_;
		GCancellable* _tmp17_;
		_tmp8_ = self->priv->commands;
		_tmp9_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp10_ = _tmp9_;
		_tmp11_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp12_ = _tmp11_;
		_tmp13_ = gtk_switch_get_state ((GtkSwitch*) _tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = application_property_command_new (G_TYPE_BOOLEAN, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G_TYPE_OBJECT, GObject), "save_drafts", (gpointer) ((gintptr) _tmp14_), NULL, NULL, NULL, NULL);
		_tmp16_ = _tmp15_;
		_tmp17_ = self->priv->cancellable;
		application_command_stack_execute (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp17_, NULL, NULL);
		_g_object_unref0 (_tmp16_);
	}
}

static void
accounts_save_drafts_row_on_account_changed (AccountsSaveDraftsRow* self)
{
	g_return_if_fail (ACCOUNTS_IS_SAVE_DRAFTS_ROW (self));
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
}

static void
accounts_save_drafts_row_class_init (AccountsSaveDraftsRowClass * klass,
                                     gpointer klass_data)
{
	accounts_save_drafts_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsSaveDraftsRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_save_drafts_row_real_update;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_save_drafts_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_save_drafts_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_save_drafts_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SAVE_DRAFTS_ROW_VALUE_CHANGED_PROPERTY, accounts_save_drafts_row_properties[ACCOUNTS_SAVE_DRAFTS_ROW_VALUE_CHANGED_PROPERTY] = g_param_spec_boolean ("value-changed", "value-changed", "value-changed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SAVE_DRAFTS_ROW_INITIAL_VALUE_PROPERTY, accounts_save_drafts_row_properties[ACCOUNTS_SAVE_DRAFTS_ROW_INITIAL_VALUE_PROPERTY] = g_param_spec_boolean ("initial-value", "initial-value", "initial-value", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_save_drafts_row_instance_init (AccountsSaveDraftsRow * self,
                                        gpointer klass)
{
	self->priv = accounts_save_drafts_row_get_instance_private (self);
}

static void
accounts_save_drafts_row_finalize (GObject * obj)
{
	AccountsSaveDraftsRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, AccountsSaveDraftsRow);
	_g_object_unref0 (self->priv->commands);
	_g_object_unref0 (self->priv->cancellable);
	G_OBJECT_CLASS (accounts_save_drafts_row_parent_class)->finalize (obj);
}

static GType
accounts_save_drafts_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsSaveDraftsRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_save_drafts_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsSaveDraftsRow), 0, (GInstanceInitFunc) accounts_save_drafts_row_instance_init, NULL };
	GType accounts_save_drafts_row_type_id;
	accounts_save_drafts_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ACCOUNT_ROW, "AccountsSaveDraftsRow", &g_define_type_info, 0);
	AccountsSaveDraftsRow_private_offset = g_type_add_instance_private (accounts_save_drafts_row_type_id, sizeof (AccountsSaveDraftsRowPrivate));
	return accounts_save_drafts_row_type_id;
}

GType
accounts_save_drafts_row_get_type (void)
{
	static volatile gsize accounts_save_drafts_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_save_drafts_row_type_id__once)) {
		GType accounts_save_drafts_row_type_id;
		accounts_save_drafts_row_type_id = accounts_save_drafts_row_get_type_once ();
		g_once_init_leave (&accounts_save_drafts_row_type_id__once, accounts_save_drafts_row_type_id);
	}
	return accounts_save_drafts_row_type_id__once;
}

static void
_vala_accounts_save_drafts_row_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	AccountsSaveDraftsRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, AccountsSaveDraftsRow);
	switch (property_id) {
		case ACCOUNTS_SAVE_DRAFTS_ROW_VALUE_CHANGED_PROPERTY:
		g_value_set_boolean (value, accounts_save_drafts_row_get_value_changed (self));
		break;
		case ACCOUNTS_SAVE_DRAFTS_ROW_INITIAL_VALUE_PROPERTY:
		g_value_set_boolean (value, accounts_save_drafts_row_get_initial_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_save_drafts_row_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	AccountsSaveDraftsRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SAVE_DRAFTS_ROW, AccountsSaveDraftsRow);
	switch (property_id) {
		case ACCOUNTS_SAVE_DRAFTS_ROW_INITIAL_VALUE_PROPERTY:
		accounts_save_drafts_row_set_initial_value (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_save_sent_row_get_instance_private (AccountsSaveSentRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsSaveSentRow_private_offset);
}

gboolean
accounts_save_sent_row_get_value_changed (AccountsSaveSentRow* self)
{
	gboolean result;
	gboolean _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_val_if_fail (ACCOUNTS_IS_SAVE_SENT_ROW (self), FALSE);
	_tmp0_ = self->priv->_initial_value;
	_tmp1_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = gtk_switch_get_state ((GtkSwitch*) _tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp0_ != _tmp4_;
	return result;
}

gboolean
accounts_save_sent_row_get_initial_value (AccountsSaveSentRow* self)
{
	gboolean result;
	g_return_val_if_fail (ACCOUNTS_IS_SAVE_SENT_ROW (self), FALSE);
	result = self->priv->_initial_value;
	return result;
}

static void
accounts_save_sent_row_set_initial_value (AccountsSaveSentRow* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (ACCOUNTS_IS_SAVE_SENT_ROW (self));
	old_value = accounts_save_sent_row_get_initial_value (self);
	if (old_value != value) {
		self->priv->_initial_value = value;
		g_object_notify_by_pspec ((GObject *) self, accounts_save_sent_row_properties[ACCOUNTS_SAVE_SENT_ROW_INITIAL_VALUE_PROPERTY]);
	}
}

static void
_accounts_save_sent_row_on_account_changed_g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self)
{
	accounts_save_sent_row_on_account_changed ((AccountsSaveSentRow*) self);
}

static void
_accounts_save_sent_row_on_activate_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self)
{
	accounts_save_sent_row_on_activate ((AccountsSaveSentRow*) self);
}

AccountsSaveSentRow*
accounts_save_sent_row_construct (GType object_type,
                                  GearyAccountInformation* account,
                                  ApplicationCommandStack* commands,
                                  GCancellable* cancellable)
{
	AccountsSaveSentRow * self = NULL;
	GtkSwitch* value = NULL;
	GtkSwitch* _tmp0_;
	ApplicationCommandStack* _tmp1_;
	GCancellable* _tmp2_;
	GearyAccountInformation* _tmp3_;
	GearyAccountInformation* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	GearyAccountInformation* _tmp7_;
	GearyAccountInformation* _tmp8_;
	gconstpointer _tmp9_;
	gconstpointer _tmp10_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (APPLICATION_IS_COMMAND_STACK (commands), NULL);
	g_return_val_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()), NULL);
	_tmp0_ = (GtkSwitch*) gtk_switch_new ();
	g_object_ref_sink (_tmp0_);
	value = _tmp0_;
	self = (AccountsSaveSentRow*) accounts_account_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_switch_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, _ ("Save sent email on server"), value);
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp1_ = _g_object_ref0 (commands);
	_g_object_unref0 (self->priv->commands);
	self->priv->commands = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp2_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_tmp3_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp4_ = _tmp3_;
	_tmp5_ = geary_account_information_get_save_sent (_tmp4_);
	_tmp6_ = _tmp5_;
	accounts_save_sent_row_set_initial_value (self, _tmp6_);
	_tmp7_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp8_ = _tmp7_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G_TYPE_OBJECT, GObject), "notify::save-sent", (GCallback) _accounts_save_sent_row_on_account_changed_g_object_notify, self, 0);
	_tmp9_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp10_ = _tmp9_;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST ((GtkSwitch*) _tmp10_, G_TYPE_OBJECT, GObject), "notify::active", (GCallback) _accounts_save_sent_row_on_activate_g_object_notify, self, 0);
	_g_object_unref0 (value);
	return self;
}

AccountsSaveSentRow*
accounts_save_sent_row_new (GearyAccountInformation* account,
                            ApplicationCommandStack* commands,
                            GCancellable* cancellable)
{
	return accounts_save_sent_row_construct (ACCOUNTS_TYPE_SAVE_SENT_ROW, account, commands, cancellable);
}

static void
accounts_save_sent_row_real_update (AccountsAccountRow* base)
{
	AccountsSaveSentRow * self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	GearyAccountInformation* _tmp2_;
	GearyAccountInformation* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SAVE_SENT_ROW, AccountsSaveSentRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = geary_account_information_get_save_sent (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_switch_set_state ((GtkSwitch*) _tmp1_, _tmp5_);
}

static void
accounts_save_sent_row_on_activate (AccountsSaveSentRow* self)
{
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GearyAccountInformation* _tmp4_;
	GearyAccountInformation* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	g_return_if_fail (ACCOUNTS_IS_SAVE_SENT_ROW (self));
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = gtk_switch_get_state ((GtkSwitch*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp5_ = _tmp4_;
	_tmp6_ = geary_account_information_get_save_sent (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp3_ != _tmp7_) {
		ApplicationCommandStack* _tmp8_;
		GearyAccountInformation* _tmp9_;
		GearyAccountInformation* _tmp10_;
		gconstpointer _tmp11_;
		gconstpointer _tmp12_;
		gboolean _tmp13_;
		gboolean _tmp14_;
		ApplicationPropertyCommand* _tmp15_;
		ApplicationPropertyCommand* _tmp16_;
		GCancellable* _tmp17_;
		_tmp8_ = self->priv->commands;
		_tmp9_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
		_tmp10_ = _tmp9_;
		_tmp11_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp12_ = _tmp11_;
		_tmp13_ = gtk_switch_get_state ((GtkSwitch*) _tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = application_property_command_new (G_TYPE_BOOLEAN, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, G_TYPE_OBJECT, GObject), "save_sent", (gpointer) ((gintptr) _tmp14_), NULL, NULL, NULL, NULL);
		_tmp16_ = _tmp15_;
		_tmp17_ = self->priv->cancellable;
		application_command_stack_execute (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp17_, NULL, NULL);
		_g_object_unref0 (_tmp16_);
	}
}

static void
accounts_save_sent_row_on_account_changed (AccountsSaveSentRow* self)
{
	g_return_if_fail (ACCOUNTS_IS_SAVE_SENT_ROW (self));
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
}

static void
accounts_save_sent_row_class_init (AccountsSaveSentRowClass * klass,
                                   gpointer klass_data)
{
	accounts_save_sent_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsSaveSentRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_save_sent_row_real_update;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_save_sent_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_save_sent_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_save_sent_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SAVE_SENT_ROW_VALUE_CHANGED_PROPERTY, accounts_save_sent_row_properties[ACCOUNTS_SAVE_SENT_ROW_VALUE_CHANGED_PROPERTY] = g_param_spec_boolean ("value-changed", "value-changed", "value-changed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SAVE_SENT_ROW_INITIAL_VALUE_PROPERTY, accounts_save_sent_row_properties[ACCOUNTS_SAVE_SENT_ROW_INITIAL_VALUE_PROPERTY] = g_param_spec_boolean ("initial-value", "initial-value", "initial-value", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_save_sent_row_instance_init (AccountsSaveSentRow * self,
                                      gpointer klass)
{
	self->priv = accounts_save_sent_row_get_instance_private (self);
}

static void
accounts_save_sent_row_finalize (GObject * obj)
{
	AccountsSaveSentRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SAVE_SENT_ROW, AccountsSaveSentRow);
	_g_object_unref0 (self->priv->commands);
	_g_object_unref0 (self->priv->cancellable);
	G_OBJECT_CLASS (accounts_save_sent_row_parent_class)->finalize (obj);
}

static GType
accounts_save_sent_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsSaveSentRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_save_sent_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsSaveSentRow), 0, (GInstanceInitFunc) accounts_save_sent_row_instance_init, NULL };
	GType accounts_save_sent_row_type_id;
	accounts_save_sent_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ACCOUNT_ROW, "AccountsSaveSentRow", &g_define_type_info, 0);
	AccountsSaveSentRow_private_offset = g_type_add_instance_private (accounts_save_sent_row_type_id, sizeof (AccountsSaveSentRowPrivate));
	return accounts_save_sent_row_type_id;
}

GType
accounts_save_sent_row_get_type (void)
{
	static volatile gsize accounts_save_sent_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_save_sent_row_type_id__once)) {
		GType accounts_save_sent_row_type_id;
		accounts_save_sent_row_type_id = accounts_save_sent_row_get_type_once ();
		g_once_init_leave (&accounts_save_sent_row_type_id__once, accounts_save_sent_row_type_id);
	}
	return accounts_save_sent_row_type_id__once;
}

static void
_vala_accounts_save_sent_row_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	AccountsSaveSentRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SAVE_SENT_ROW, AccountsSaveSentRow);
	switch (property_id) {
		case ACCOUNTS_SAVE_SENT_ROW_VALUE_CHANGED_PROPERTY:
		g_value_set_boolean (value, accounts_save_sent_row_get_value_changed (self));
		break;
		case ACCOUNTS_SAVE_SENT_ROW_INITIAL_VALUE_PROPERTY:
		g_value_set_boolean (value, accounts_save_sent_row_get_initial_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_save_sent_row_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	AccountsSaveSentRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SAVE_SENT_ROW, AccountsSaveSentRow);
	switch (property_id) {
		case ACCOUNTS_SAVE_SENT_ROW_INITIAL_VALUE_PROPERTY:
		accounts_save_sent_row_set_initial_value (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_service_host_row_get_instance_private (AccountsServiceHostRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsServiceHostRow_private_offset);
}

static ComponentsValidator*
accounts_service_host_row_real_get_validator (AccountsValidatingRow* base)
{
	ComponentsValidator* result;
	AccountsServiceHostRow* self;
	ComponentsValidator* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	_tmp0_ = self->priv->_validator;
	result = _tmp0_;
	return result;
}

static void
accounts_service_host_row_real_set_validator (AccountsValidatingRow* base,
                                              ComponentsValidator* value)
{
	AccountsServiceHostRow* self;
	ComponentsValidator* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	old_value = accounts_service_host_row_real_get_validator (base);
	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_service_host_row_properties[ACCOUNTS_SERVICE_HOST_ROW_VALIDATOR_PROPERTY]);
	}
}

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

static gboolean
accounts_service_host_row_real_get_has_changed (AccountsValidatingRow* base)
{
	gboolean result;
	AccountsServiceHostRow* self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gboolean _tmp8_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = gtk_entry_get_text ((GtkEntry*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_strip (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = accounts_service_host_row_get_entry_text (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strcmp0 (_tmp5_, _tmp7_) != 0;
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	result = _tmp8_;
	return result;
}

AccountsServiceHostRow*
accounts_service_host_row_construct (GType object_type,
                                     GearyAccountInformation* account,
                                     GearyServiceInformation* service,
                                     ApplicationCommandStack* commands,
                                     GCancellable* cancellable)
{
	AccountsServiceHostRow * self = NULL;
	gchar* label = NULL;
	gchar* _tmp0_;
	GearyProtocol _tmp1_;
	GearyProtocol _tmp2_;
	const gchar* _tmp5_;
	GtkEntry* _tmp6_;
	GtkEntry* _tmp7_;
	ApplicationCommandStack* _tmp8_;
	GCancellable* _tmp9_;
	gconstpointer _tmp10_;
	gconstpointer _tmp11_;
	ComponentsNetworkAddressValidator* _tmp12_;
	ComponentsNetworkAddressValidator* _tmp13_;
	gconstpointer _tmp14_;
	gconstpointer _tmp15_;
	ComponentsEntryUndo* _tmp16_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (service, GEARY_TYPE_SERVICE_INFORMATION), NULL);
	g_return_val_if_fail (APPLICATION_IS_COMMAND_STACK (commands), NULL);
	g_return_val_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()), NULL);
	_tmp0_ = g_strdup ("");
	label = _tmp0_;
	_tmp1_ = geary_service_information_get_protocol (service);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case GEARY_PROTOCOL_IMAP:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup (_ ("IMAP server"));
			_g_free0 (label);
			label = _tmp3_;
			break;
		}
		case GEARY_PROTOCOL_SMTP:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup (_ ("SMTP server"));
			_g_free0 (label);
			label = _tmp4_;
			break;
		}
		default:
		break;
	}
	_tmp5_ = label;
	_tmp6_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	self = (AccountsServiceHostRow*) accounts_service_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_entry_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, service, _tmp5_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = _g_object_ref0 (commands);
	_g_object_unref0 (self->priv->commands);
	self->priv->commands = _tmp8_;
	_tmp9_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp9_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_tmp10_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp11_ = _tmp10_;
	_tmp12_ = components_network_address_validator_new ((GtkEntry*) _tmp11_, (guint16) 0);
	_tmp13_ = _tmp12_;
	accounts_validating_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow), G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, COMPONENTS_TYPE_VALIDATOR, ComponentsValidator));
	_g_object_unref0 (_tmp13_);
	accounts_validating_row_setup_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow));
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp14_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp15_ = _tmp14_;
	_tmp16_ = components_entry_undo_new ((GtkEntry*) _tmp15_);
	_g_object_unref0 (self->priv->value_undo);
	self->priv->value_undo = _tmp16_;
	_g_free0 (label);
	return self;
}

AccountsServiceHostRow*
accounts_service_host_row_new (GearyAccountInformation* account,
                               GearyServiceInformation* service,
                               ApplicationCommandStack* commands,
                               GCancellable* cancellable)
{
	return accounts_service_host_row_construct (ACCOUNTS_TYPE_SERVICE_HOST_ROW, account, service, commands, cancellable);
}

static void
accounts_service_host_row_real_update (AccountsAccountRow* base)
{
	AccountsServiceHostRow * self;
	gchar* value = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gconstpointer _tmp3_;
	gconstpointer _tmp4_;
	const gchar* _tmp5_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	_tmp0_ = accounts_service_host_row_get_entry_text (self);
	value = _tmp0_;
	_tmp1_ = value;
	if (geary_string_is_empty (_tmp1_)) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (_ ("None"));
		_g_free0 (value);
		value = _tmp2_;
	}
	_tmp3_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp4_ = _tmp3_;
	_tmp5_ = value;
	gtk_entry_set_text ((GtkEntry*) _tmp4_, _tmp5_);
	_g_free0 (value);
}

static void
accounts_service_host_row_real_commit (AccountsValidatingRow* base)
{
	AccountsServiceHostRow * self;
	GNetworkAddress* address = NULL;
	ComponentsValidator* _tmp0_;
	ComponentsValidator* _tmp1_;
	GNetworkAddress* _tmp2_;
	GNetworkAddress* _tmp3_;
	GNetworkAddress* _tmp4_;
	GNetworkAddress* _tmp5_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	_tmp0_ = accounts_validating_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = components_network_address_validator_get_validated_address (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, COMPONENTS_TYPE_NETWORK_ADDRESS_VALIDATOR, ComponentsNetworkAddressValidator));
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	address = _tmp4_;
	_tmp5_ = address;
	if (_tmp5_ != NULL) {
		guint16 _tmp6_ = 0U;
		GNetworkAddress* _tmp7_;
		guint _tmp8_;
		guint _tmp9_;
		guint16 port = 0U;
		ApplicationCommandStack* _tmp15_;
		GearyServiceInformation* _tmp16_;
		GearyServiceInformation* _tmp17_;
		GNetworkAddress* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		ApplicationPropertyCommand* _tmp21_;
		GearyServiceInformation* _tmp22_;
		GearyServiceInformation* _tmp23_;
		ApplicationPropertyCommand* _tmp24_;
		ApplicationCommand** _tmp25_;
		ApplicationCommand** _tmp26_;
		gint _tmp26__length1;
		ApplicationCommandSequence* _tmp27_;
		ApplicationCommandSequence* _tmp28_;
		GCancellable* _tmp29_;
		_tmp7_ = address;
		_tmp8_ = g_network_address_get_port (_tmp7_);
		_tmp9_ = _tmp8_;
		if (_tmp9_ != ((guint) 0)) {
			GNetworkAddress* _tmp10_;
			guint _tmp11_;
			guint _tmp12_;
			_tmp10_ = address;
			_tmp11_ = g_network_address_get_port (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp6_ = (guint16) _tmp12_;
		} else {
			GearyServiceInformation* _tmp13_;
			GearyServiceInformation* _tmp14_;
			_tmp13_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
			_tmp14_ = _tmp13_;
			_tmp6_ = geary_service_information_get_default_port (_tmp14_);
		}
		port = _tmp6_;
		_tmp15_ = self->priv->commands;
		_tmp16_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp17_ = _tmp16_;
		_tmp18_ = address;
		_tmp19_ = g_network_address_get_hostname (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = application_property_command_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, G_TYPE_OBJECT, GObject), "host", _tmp20_, NULL, NULL, NULL, NULL);
		_tmp22_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp23_ = _tmp22_;
		_tmp24_ = application_property_command_new (G_TYPE_UINT, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, G_TYPE_OBJECT, GObject), "port", (gpointer) ((guintptr) port), NULL, NULL, NULL, NULL);
		_tmp25_ = g_new0 (ApplicationCommand*, 2 + 1);
		_tmp25_[0] = G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
		_tmp25_[1] = G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
		_tmp26_ = _tmp25_;
		_tmp26__length1 = 2;
		_tmp27_ = application_command_sequence_new (_tmp26_, 2);
		_tmp28_ = _tmp27_;
		_tmp29_ = self->priv->cancellable;
		application_command_stack_execute (_tmp15_, G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp29_, NULL, NULL);
		_g_object_unref0 (_tmp28_);
		_tmp26_ = (_vala_array_free (_tmp26_, _tmp26__length1, (GDestroyNotify) g_object_unref), NULL);
	}
	_g_object_unref0 (address);
}

static gchar*
accounts_service_host_row_get_entry_text (AccountsServiceHostRow* self)
{
	const gchar* _tmp0_ = NULL;
	GearyServiceInformation* _tmp1_;
	GearyServiceInformation* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* value = NULL;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* result;
	g_return_val_if_fail (ACCOUNTS_IS_SERVICE_HOST_ROW (self), NULL);
	_tmp1_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = geary_service_information_get_host (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp0_ = _tmp4_;
	if (_tmp0_ == NULL) {
		_tmp0_ = "";
	}
	_tmp5_ = g_strdup (_tmp0_);
	value = _tmp5_;
	_tmp6_ = value;
	if (!geary_string_is_empty (_tmp6_)) {
		guint16 port = 0U;
		GearyServiceInformation* _tmp7_;
		GearyServiceInformation* _tmp8_;
		guint16 _tmp9_;
		guint16 _tmp10_;
		GearyServiceInformation* _tmp11_;
		GearyServiceInformation* _tmp12_;
		_tmp7_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp8_ = _tmp7_;
		_tmp9_ = geary_service_information_get_port (_tmp8_);
		_tmp10_ = _tmp9_;
		port = _tmp10_;
		_tmp11_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp12_ = _tmp11_;
		if (port != geary_service_information_get_default_port (_tmp12_)) {
			const gchar* _tmp13_;
			GearyServiceInformation* _tmp14_;
			GearyServiceInformation* _tmp15_;
			guint16 _tmp16_;
			guint16 _tmp17_;
			gchar* _tmp18_;
			_tmp13_ = value;
			_tmp14_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
			_tmp15_ = _tmp14_;
			_tmp16_ = geary_service_information_get_port (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = g_strdup_printf ("%s:%d", _tmp13_, (gint) _tmp17_);
			_g_free0 (value);
			value = _tmp18_;
		}
	}
	result = value;
	return result;
}

static void
accounts_service_host_row_class_init (AccountsServiceHostRowClass * klass,
                                      gpointer klass_data)
{
	accounts_service_host_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsServiceHostRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_service_host_row_real_update;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_service_host_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_service_host_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_service_host_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_HOST_ROW_VALIDATOR_PROPERTY, accounts_service_host_row_properties[ACCOUNTS_SERVICE_HOST_ROW_VALIDATOR_PROPERTY] = g_param_spec_object ("validator", "validator", "validator", COMPONENTS_TYPE_VALIDATOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_HOST_ROW_HAS_CHANGED_PROPERTY, accounts_service_host_row_properties[ACCOUNTS_SERVICE_HOST_ROW_HAS_CHANGED_PROPERTY] = g_param_spec_boolean ("has-changed", "has-changed", "has-changed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_service_host_row_accounts_validating_row_interface_init (AccountsValidatingRowIface * iface,
                                                                  gpointer iface_data)
{
	accounts_service_host_row_accounts_validating_row_parent_iface = g_type_interface_peek_parent (iface);
	iface->commit = (void (*) (AccountsValidatingRow*)) accounts_service_host_row_real_commit;
	iface->get_validator = accounts_service_host_row_real_get_validator;
	iface->set_validator = accounts_service_host_row_real_set_validator;
	iface->get_has_changed = accounts_service_host_row_real_get_has_changed;
}

static void
accounts_service_host_row_instance_init (AccountsServiceHostRow * self,
                                         gpointer klass)
{
	self->priv = accounts_service_host_row_get_instance_private (self);
}

static void
accounts_service_host_row_finalize (GObject * obj)
{
	AccountsServiceHostRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	_g_object_unref0 (self->priv->_validator);
	_g_object_unref0 (self->priv->value_undo);
	_g_object_unref0 (self->priv->commands);
	_g_object_unref0 (self->priv->cancellable);
	G_OBJECT_CLASS (accounts_service_host_row_parent_class)->finalize (obj);
}

static GType
accounts_service_host_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsServiceHostRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_service_host_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsServiceHostRow), 0, (GInstanceInitFunc) accounts_service_host_row_instance_init, NULL };
	static const GInterfaceInfo accounts_validating_row_info = { (GInterfaceInitFunc) accounts_service_host_row_accounts_validating_row_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType accounts_service_host_row_type_id;
	accounts_service_host_row_type_id = g_type_register_static (ACCOUNTS_TYPE_SERVICE_ROW, "AccountsServiceHostRow", &g_define_type_info, 0);
	g_type_add_interface_static (accounts_service_host_row_type_id, ACCOUNTS_TYPE_VALIDATING_ROW, &accounts_validating_row_info);
	AccountsServiceHostRow_private_offset = g_type_add_instance_private (accounts_service_host_row_type_id, sizeof (AccountsServiceHostRowPrivate));
	return accounts_service_host_row_type_id;
}

GType
accounts_service_host_row_get_type (void)
{
	static volatile gsize accounts_service_host_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_service_host_row_type_id__once)) {
		GType accounts_service_host_row_type_id;
		accounts_service_host_row_type_id = accounts_service_host_row_get_type_once ();
		g_once_init_leave (&accounts_service_host_row_type_id__once, accounts_service_host_row_type_id);
	}
	return accounts_service_host_row_type_id__once;
}

static void
_vala_accounts_service_host_row_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec)
{
	AccountsServiceHostRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_HOST_ROW_VALIDATOR_PROPERTY:
		g_value_set_object (value, accounts_validating_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow)));
		break;
		case ACCOUNTS_SERVICE_HOST_ROW_HAS_CHANGED_PROPERTY:
		g_value_set_boolean (value, accounts_validating_row_get_has_changed (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow)));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_service_host_row_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec)
{
	AccountsServiceHostRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_HOST_ROW, AccountsServiceHostRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_HOST_ROW_VALIDATOR_PROPERTY:
		accounts_validating_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow), g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_service_security_row_get_instance_private (AccountsServiceSecurityRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsServiceSecurityRow_private_offset);
}

static void
_accounts_service_security_row_on_value_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                       gpointer self)
{
	accounts_service_security_row_on_value_changed ((AccountsServiceSecurityRow*) self);
}

AccountsServiceSecurityRow*
accounts_service_security_row_construct (GType object_type,
                                         GearyAccountInformation* account,
                                         GearyServiceInformation* service,
                                         ApplicationCommandStack* commands,
                                         GCancellable* cancellable)
{
	AccountsServiceSecurityRow * self = NULL;
	AccountsTlsComboBox* value = NULL;
	AccountsTlsComboBox* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ApplicationCommandStack* _tmp3_;
	GCancellable* _tmp4_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (service, GEARY_TYPE_SERVICE_INFORMATION), NULL);
	g_return_val_if_fail (APPLICATION_IS_COMMAND_STACK (commands), NULL);
	g_return_val_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()), NULL);
	_tmp0_ = accounts_tls_combo_box_new ();
	g_object_ref_sink (_tmp0_);
	value = _tmp0_;
	_tmp1_ = accounts_tls_combo_box_get_label (value);
	_tmp2_ = _tmp1_;
	self = (AccountsServiceSecurityRow*) accounts_service_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, ACCOUNTS_TYPE_TLS_COMBO_BOX, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, service, _tmp2_, value);
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp3_ = _g_object_ref0 (commands);
	_g_object_unref0 (self->priv->commands);
	self->priv->commands = _tmp3_;
	_tmp4_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp4_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (value, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _accounts_service_security_row_on_value_changed_gtk_combo_box_changed, self, 0);
	_g_object_unref0 (value);
	return self;
}

AccountsServiceSecurityRow*
accounts_service_security_row_new (GearyAccountInformation* account,
                                   GearyServiceInformation* service,
                                   ApplicationCommandStack* commands,
                                   GCancellable* cancellable)
{
	return accounts_service_security_row_construct (ACCOUNTS_TYPE_SERVICE_SECURITY_ROW, account, service, commands, cancellable);
}

static void
accounts_service_security_row_real_update (AccountsAccountRow* base)
{
	AccountsServiceSecurityRow * self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	GearyServiceInformation* _tmp2_;
	GearyServiceInformation* _tmp3_;
	GearyTlsNegotiationMethod _tmp4_;
	GearyTlsNegotiationMethod _tmp5_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_SECURITY_ROW, AccountsServiceSecurityRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = geary_service_information_get_transport_security (_tmp3_);
	_tmp5_ = _tmp4_;
	accounts_tls_combo_box_set_method ((AccountsTlsComboBox*) _tmp1_, _tmp5_);
}

static void
accounts_service_security_row_on_value_changed (AccountsServiceSecurityRow* self)
{
	GearyServiceInformation* _tmp0_;
	GearyServiceInformation* _tmp1_;
	GearyTlsNegotiationMethod _tmp2_;
	GearyTlsNegotiationMethod _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	GearyTlsNegotiationMethod _tmp6_;
	GearyTlsNegotiationMethod _tmp7_;
	g_return_if_fail (ACCOUNTS_IS_SERVICE_SECURITY_ROW (self));
	_tmp0_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = geary_service_information_get_transport_security (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp5_ = _tmp4_;
	_tmp6_ = accounts_tls_combo_box_get_method ((AccountsTlsComboBox*) _tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp3_ != _tmp7_) {
		ApplicationCommand* cmd = NULL;
		GearyServiceInformation* _tmp8_;
		GearyServiceInformation* _tmp9_;
		gconstpointer _tmp10_;
		gconstpointer _tmp11_;
		GearyTlsNegotiationMethod _tmp12_;
		GearyTlsNegotiationMethod _tmp13_;
		ApplicationPropertyCommand* _tmp14_;
		GearyServiceInformation* _tmp15_;
		GearyServiceInformation* _tmp16_;
		guint16 _tmp17_;
		guint16 _tmp18_;
		GearyServiceInformation* _tmp19_;
		GearyServiceInformation* _tmp20_;
		guint16 _tmp21_;
		guint16 _tmp22_;
		GearyServiceInformation* _tmp23_;
		GearyServiceInformation* _tmp24_;
		ApplicationCommandStack* _tmp42_;
		ApplicationCommand* _tmp43_;
		GCancellable* _tmp44_;
		_tmp8_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp9_ = _tmp8_;
		_tmp10_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp11_ = _tmp10_;
		_tmp12_ = accounts_tls_combo_box_get_method ((AccountsTlsComboBox*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = application_property_command_new (G_TYPE_UINT, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, G_TYPE_OBJECT, GObject), "transport-security", (gpointer) ((guintptr) _tmp13_), NULL, NULL, NULL, NULL);
		cmd = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
		_tmp15_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp16_ = _tmp15_;
		_tmp17_ = geary_service_information_get_port (_tmp16_);
		_tmp18_ = _tmp17_;
		g_debug ("accounts-editor-servers-pane.vala:825: Security port: %u", (guint) _tmp18_);
		_tmp19_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp20_ = _tmp19_;
		_tmp21_ = geary_service_information_get_port (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp24_ = _tmp23_;
		if (_tmp22_ == geary_service_information_get_default_port (_tmp24_)) {
			GearyServiceInformation* copy = NULL;
			GearyServiceInformation* _tmp25_;
			GearyServiceInformation* _tmp26_;
			GearyServiceInformation* _tmp27_;
			GearyServiceInformation* _tmp28_;
			gconstpointer _tmp29_;
			gconstpointer _tmp30_;
			GearyTlsNegotiationMethod _tmp31_;
			GearyTlsNegotiationMethod _tmp32_;
			ApplicationCommand* _tmp33_;
			ApplicationCommand* _tmp34_;
			GearyServiceInformation* _tmp35_;
			GearyServiceInformation* _tmp36_;
			GearyServiceInformation* _tmp37_;
			ApplicationPropertyCommand* _tmp38_;
			ApplicationCommand** _tmp39_;
			ApplicationCommand** _tmp40_;
			gint _tmp40__length1;
			ApplicationCommandSequence* _tmp41_;
			_tmp25_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
			_tmp26_ = _tmp25_;
			_tmp27_ = geary_service_information_new_copy (_tmp26_);
			copy = _tmp27_;
			_tmp28_ = copy;
			_tmp29_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
			_tmp30_ = _tmp29_;
			_tmp31_ = accounts_tls_combo_box_get_method ((AccountsTlsComboBox*) _tmp30_);
			_tmp32_ = _tmp31_;
			geary_service_information_set_transport_security (_tmp28_, _tmp32_);
			_tmp33_ = cmd;
			_tmp34_ = _g_object_ref0 (_tmp33_);
			_tmp35_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
			_tmp36_ = _tmp35_;
			_tmp37_ = copy;
			_tmp38_ = application_property_command_new (G_TYPE_UINT, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, G_TYPE_OBJECT, GObject), "port", (gpointer) ((guintptr) geary_service_information_get_default_port (_tmp37_)), NULL, NULL, NULL, NULL);
			_tmp39_ = g_new0 (ApplicationCommand*, 2 + 1);
			_tmp39_[0] = _tmp34_;
			_tmp39_[1] = G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
			_tmp40_ = _tmp39_;
			_tmp40__length1 = 2;
			_tmp41_ = application_command_sequence_new (_tmp40_, 2);
			_g_object_unref0 (cmd);
			cmd = G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
			_tmp40_ = (_vala_array_free (_tmp40_, _tmp40__length1, (GDestroyNotify) g_object_unref), NULL);
			_g_object_unref0 (copy);
		}
		_tmp42_ = self->priv->commands;
		_tmp43_ = cmd;
		_tmp44_ = self->priv->cancellable;
		application_command_stack_execute (_tmp42_, _tmp43_, _tmp44_, NULL, NULL);
		_g_object_unref0 (cmd);
	}
}

static void
accounts_service_security_row_class_init (AccountsServiceSecurityRowClass * klass,
                                          gpointer klass_data)
{
	accounts_service_security_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsServiceSecurityRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_service_security_row_real_update;
	G_OBJECT_CLASS (klass)->finalize = accounts_service_security_row_finalize;
}

static void
accounts_service_security_row_instance_init (AccountsServiceSecurityRow * self,
                                             gpointer klass)
{
	self->priv = accounts_service_security_row_get_instance_private (self);
}

static void
accounts_service_security_row_finalize (GObject * obj)
{
	AccountsServiceSecurityRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SERVICE_SECURITY_ROW, AccountsServiceSecurityRow);
	_g_object_unref0 (self->priv->commands);
	_g_object_unref0 (self->priv->cancellable);
	G_OBJECT_CLASS (accounts_service_security_row_parent_class)->finalize (obj);
}

static GType
accounts_service_security_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsServiceSecurityRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_service_security_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsServiceSecurityRow), 0, (GInstanceInitFunc) accounts_service_security_row_instance_init, NULL };
	GType accounts_service_security_row_type_id;
	accounts_service_security_row_type_id = g_type_register_static (ACCOUNTS_TYPE_SERVICE_ROW, "AccountsServiceSecurityRow", &g_define_type_info, 0);
	AccountsServiceSecurityRow_private_offset = g_type_add_instance_private (accounts_service_security_row_type_id, sizeof (AccountsServiceSecurityRowPrivate));
	return accounts_service_security_row_type_id;
}

GType
accounts_service_security_row_get_type (void)
{
	static volatile gsize accounts_service_security_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_service_security_row_type_id__once)) {
		GType accounts_service_security_row_type_id;
		accounts_service_security_row_type_id = accounts_service_security_row_get_type_once ();
		g_once_init_leave (&accounts_service_security_row_type_id__once, accounts_service_security_row_type_id);
	}
	return accounts_service_security_row_type_id__once;
}

static inline gpointer
accounts_service_login_row_get_instance_private (AccountsServiceLoginRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsServiceLoginRow_private_offset);
}

static ComponentsValidator*
accounts_service_login_row_real_get_validator (AccountsValidatingRow* base)
{
	ComponentsValidator* result;
	AccountsServiceLoginRow* self;
	ComponentsValidator* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	_tmp0_ = self->priv->_validator;
	result = _tmp0_;
	return result;
}

static void
accounts_service_login_row_real_set_validator (AccountsValidatingRow* base,
                                               ComponentsValidator* value)
{
	AccountsServiceLoginRow* self;
	ComponentsValidator* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	old_value = accounts_service_login_row_real_get_validator (base);
	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_service_login_row_properties[ACCOUNTS_SERVICE_LOGIN_ROW_VALIDATOR_PROPERTY]);
	}
}

static gboolean
accounts_service_login_row_real_get_has_changed (AccountsValidatingRow* base)
{
	gboolean result;
	AccountsServiceLoginRow* self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gboolean _tmp8_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = gtk_entry_get_text ((GtkEntry*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_strip (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = accounts_service_login_row_get_entry_text (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strcmp0 (_tmp5_, _tmp7_) != 0;
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	result = _tmp8_;
	return result;
}

AccountsServiceLoginRow*
accounts_service_login_row_construct (GType object_type,
                                      GearyAccountInformation* account,
                                      GearyServiceInformation* service,
                                      ApplicationCommandStack* commands,
                                      GCancellable* cancellable,
                                      AccountsServicePasswordRow* password_row)
{
	AccountsServiceLoginRow * self = NULL;
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	ApplicationCommandStack* _tmp2_;
	GCancellable* _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	ComponentsValidator* _tmp6_;
	ComponentsValidator* _tmp7_;
	AccountsServicePasswordRow* _tmp8_;
	gconstpointer _tmp9_;
	gconstpointer _tmp10_;
	ComponentsEntryUndo* _tmp11_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (service, GEARY_TYPE_SERVICE_INFORMATION), NULL);
	g_return_val_if_fail (APPLICATION_IS_COMMAND_STACK (commands), NULL);
	g_return_val_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()), NULL);
	g_return_val_if_fail ((password_row == NULL) || ACCOUNTS_IS_SERVICE_PASSWORD_ROW (password_row), NULL);
	_tmp0_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	self = (AccountsServiceLoginRow*) accounts_service_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_entry_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, service, _ ("Login name"), _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = _g_object_ref0 (commands);
	_g_object_unref0 (self->priv->commands);
	self->priv->commands = _tmp2_;
	_tmp3_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp3_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_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_validating_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow), _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = _g_object_ref0 (password_row);
	_g_object_unref0 (self->priv->password_row);
	self->priv->password_row = _tmp8_;
	if (password_row != NULL) {
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (password_row, gtk_widget_get_type (), GtkWidget));
	}
	accounts_validating_row_setup_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow));
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp9_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp10_ = _tmp9_;
	_tmp11_ = components_entry_undo_new ((GtkEntry*) _tmp10_);
	_g_object_unref0 (self->priv->value_undo);
	self->priv->value_undo = _tmp11_;
	return self;
}

AccountsServiceLoginRow*
accounts_service_login_row_new (GearyAccountInformation* account,
                                GearyServiceInformation* service,
                                ApplicationCommandStack* commands,
                                GCancellable* cancellable,
                                AccountsServicePasswordRow* password_row)
{
	return accounts_service_login_row_construct (ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, account, service, commands, cancellable, password_row);
}

static void
accounts_service_login_row_real_update (AccountsAccountRow* base)
{
	AccountsServiceLoginRow * self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_service_login_row_get_entry_text (self);
	_tmp3_ = _tmp2_;
	gtk_entry_set_text ((GtkEntry*) _tmp1_, _tmp3_);
	_g_free0 (_tmp3_);
}

static void
accounts_service_login_row_real_commit (AccountsValidatingRow* base)
{
	AccountsServiceLoginRow * self;
	GearyServiceInformation* _tmp0_;
	GearyServiceInformation* _tmp1_;
	GearyCredentials* _tmp2_;
	GearyCredentials* _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	_tmp0_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = geary_service_information_get_credentials (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		ApplicationCommand* cmd = NULL;
		GearyServiceInformation* _tmp4_;
		GearyServiceInformation* _tmp5_;
		GearyServiceInformation* _tmp6_;
		GearyServiceInformation* _tmp7_;
		GearyCredentials* _tmp8_;
		GearyCredentials* _tmp9_;
		GearyCredentialsMethod _tmp10_;
		GearyCredentialsMethod _tmp11_;
		gconstpointer _tmp12_;
		gconstpointer _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		GearyCredentials* _tmp16_;
		GearyCredentials* _tmp17_;
		ApplicationPropertyCommand* _tmp18_;
		ApplicationCommand* _tmp19_;
		AccountsServicePasswordRow* _tmp20_;
		ApplicationCommandStack* _tmp28_;
		ApplicationCommand* _tmp29_;
		GCancellable* _tmp30_;
		_tmp4_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp5_ = _tmp4_;
		_tmp6_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp7_ = _tmp6_;
		_tmp8_ = geary_service_information_get_credentials (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = geary_credentials_get_supported_method (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp13_ = _tmp12_;
		_tmp14_ = gtk_entry_get_text ((GtkEntry*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = geary_credentials_new (_tmp11_, _tmp15_, NULL);
		_tmp17_ = _tmp16_;
		_tmp18_ = application_property_command_new (GEARY_TYPE_CREDENTIALS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G_TYPE_OBJECT, GObject), "credentials", _tmp17_, NULL, NULL, NULL, NULL);
		_tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
		_g_object_unref0 (_tmp17_);
		cmd = _tmp19_;
		_tmp20_ = self->priv->password_row;
		if (_tmp20_ != NULL) {
			ApplicationCommand* _tmp21_;
			ApplicationCommand* _tmp22_;
			AccountsServicePasswordRow* _tmp23_;
			ApplicationPropertyCommand* _tmp24_;
			ApplicationCommand** _tmp25_;
			ApplicationCommand** _tmp26_;
			gint _tmp26__length1;
			ApplicationCommandSequence* _tmp27_;
			_tmp21_ = cmd;
			_tmp22_ = _g_object_ref0 (_tmp21_);
			_tmp23_ = self->priv->password_row;
			_tmp24_ = application_property_command_new (G_TYPE_BOOLEAN, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, G_TYPE_OBJECT, GObject), "visible", (gpointer) ((gintptr) TRUE), NULL, NULL, NULL, NULL);
			_tmp25_ = g_new0 (ApplicationCommand*, 2 + 1);
			_tmp25_[0] = _tmp22_;
			_tmp25_[1] = G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
			_tmp26_ = _tmp25_;
			_tmp26__length1 = 2;
			_tmp27_ = application_command_sequence_new (_tmp26_, 2);
			_g_object_unref0 (cmd);
			cmd = G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
			_tmp26_ = (_vala_array_free (_tmp26_, _tmp26__length1, (GDestroyNotify) g_object_unref), NULL);
		}
		_tmp28_ = self->priv->commands;
		_tmp29_ = cmd;
		_tmp30_ = self->priv->cancellable;
		application_command_stack_execute (_tmp28_, _tmp29_, _tmp30_, NULL, NULL);
		_g_object_unref0 (cmd);
	}
}

static gchar*
accounts_service_login_row_get_entry_text (AccountsServiceLoginRow* self)
{
	gchar* label = NULL;
	GearyServiceInformation* _tmp0_;
	GearyServiceInformation* _tmp1_;
	GearyCredentials* _tmp2_;
	GearyCredentials* _tmp3_;
	gchar* result;
	g_return_val_if_fail (ACCOUNTS_IS_SERVICE_LOGIN_ROW (self), NULL);
	label = NULL;
	_tmp0_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = geary_service_information_get_credentials (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		gchar* method = NULL;
		gchar* _tmp4_;
		GtkStyleContext* value_style = NULL;
		gconstpointer _tmp5_;
		gconstpointer _tmp6_;
		GtkStyleContext* _tmp7_;
		GtkStyleContext* _tmp8_;
		GearyServiceInformation* _tmp9_;
		GearyServiceInformation* _tmp10_;
		GearyCredentials* _tmp11_;
		GearyCredentials* _tmp12_;
		GearyCredentialsMethod _tmp13_;
		GearyCredentialsMethod _tmp14_;
		const gchar* _tmp18_ = NULL;
		GearyServiceInformation* _tmp19_;
		GearyServiceInformation* _tmp20_;
		GearyCredentials* _tmp21_;
		GearyCredentials* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		_tmp4_ = g_strdup ("%s");
		method = _tmp4_;
		_tmp5_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp6_ = _tmp5_;
		_tmp7_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST ((GtkEntry*) _tmp6_, gtk_widget_get_type (), GtkWidget));
		_tmp8_ = _g_object_ref0 (_tmp7_);
		value_style = _tmp8_;
		_tmp9_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp10_ = _tmp9_;
		_tmp11_ = geary_service_information_get_credentials (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = geary_credentials_get_supported_method (_tmp12_);
		_tmp14_ = _tmp13_;
		switch (_tmp14_) {
			case GEARY_CREDENTIALS_METHOD_PASSWORD:
			{
				GtkStyleContext* _tmp15_;
				_tmp15_ = value_style;
				gtk_style_context_remove_class (_tmp15_, GTK_STYLE_CLASS_DIM_LABEL);
				break;
			}
			case GEARY_CREDENTIALS_METHOD_OAUTH2:
			{
				gchar* _tmp16_;
				GtkStyleContext* _tmp17_;
				_tmp16_ = g_strdup (_ ("%s using OAuth2"));
				_g_free0 (method);
				method = _tmp16_;
				_tmp17_ = value_style;
				gtk_style_context_add_class (_tmp17_, GTK_STYLE_CLASS_DIM_LABEL);
				break;
			}
			default:
			break;
		}
		_tmp19_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp20_ = _tmp19_;
		_tmp21_ = geary_service_information_get_credentials (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = geary_credentials_get_user (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp18_ = _tmp24_;
		if (_tmp18_ == NULL) {
			_tmp18_ = "";
		}
		_tmp25_ = method;
		_tmp26_ = g_strdup_printf (_tmp25_, _tmp18_);
		_g_free0 (label);
		label = _tmp26_;
		_g_object_unref0 (value_style);
		_g_free0 (method);
	} else {
		gboolean _tmp27_ = FALSE;
		GearyServiceInformation* _tmp28_;
		GearyServiceInformation* _tmp29_;
		GearyProtocol _tmp30_;
		GearyProtocol _tmp31_;
		_tmp28_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp29_ = _tmp28_;
		_tmp30_ = geary_service_information_get_protocol (_tmp29_);
		_tmp31_ = _tmp30_;
		if (_tmp31_ == GEARY_PROTOCOL_SMTP) {
			GearyServiceInformation* _tmp32_;
			GearyServiceInformation* _tmp33_;
			GearyCredentialsRequirement _tmp34_;
			GearyCredentialsRequirement _tmp35_;
			_tmp32_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
			_tmp33_ = _tmp32_;
			_tmp34_ = geary_service_information_get_credentials_requirement (_tmp33_);
			_tmp35_ = _tmp34_;
			_tmp27_ = _tmp35_ == GEARY_CREDENTIALS_REQUIREMENT_USE_INCOMING;
		} else {
			_tmp27_ = FALSE;
		}
		if (_tmp27_) {
			gchar* _tmp36_;
			_tmp36_ = g_strdup (_ ("Use receiving server login"));
			_g_free0 (label);
			label = _tmp36_;
		} else {
			gchar* _tmp37_;
			_tmp37_ = g_strdup (_ ("None"));
			_g_free0 (label);
			label = _tmp37_;
		}
	}
	result = label;
	return result;
}

static void
accounts_service_login_row_class_init (AccountsServiceLoginRowClass * klass,
                                       gpointer klass_data)
{
	accounts_service_login_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsServiceLoginRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_service_login_row_real_update;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_service_login_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_service_login_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_service_login_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_LOGIN_ROW_VALIDATOR_PROPERTY, accounts_service_login_row_properties[ACCOUNTS_SERVICE_LOGIN_ROW_VALIDATOR_PROPERTY] = g_param_spec_object ("validator", "validator", "validator", COMPONENTS_TYPE_VALIDATOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_LOGIN_ROW_HAS_CHANGED_PROPERTY, accounts_service_login_row_properties[ACCOUNTS_SERVICE_LOGIN_ROW_HAS_CHANGED_PROPERTY] = g_param_spec_boolean ("has-changed", "has-changed", "has-changed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_service_login_row_accounts_validating_row_interface_init (AccountsValidatingRowIface * iface,
                                                                   gpointer iface_data)
{
	accounts_service_login_row_accounts_validating_row_parent_iface = g_type_interface_peek_parent (iface);
	iface->commit = (void (*) (AccountsValidatingRow*)) accounts_service_login_row_real_commit;
	iface->get_validator = accounts_service_login_row_real_get_validator;
	iface->set_validator = accounts_service_login_row_real_set_validator;
	iface->get_has_changed = accounts_service_login_row_real_get_has_changed;
}

static void
accounts_service_login_row_instance_init (AccountsServiceLoginRow * self,
                                          gpointer klass)
{
	self->priv = accounts_service_login_row_get_instance_private (self);
}

static void
accounts_service_login_row_finalize (GObject * obj)
{
	AccountsServiceLoginRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	_g_object_unref0 (self->priv->_validator);
	_g_object_unref0 (self->priv->value_undo);
	_g_object_unref0 (self->priv->commands);
	_g_object_unref0 (self->priv->cancellable);
	_g_object_unref0 (self->priv->password_row);
	G_OBJECT_CLASS (accounts_service_login_row_parent_class)->finalize (obj);
}

static GType
accounts_service_login_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsServiceLoginRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_service_login_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsServiceLoginRow), 0, (GInstanceInitFunc) accounts_service_login_row_instance_init, NULL };
	static const GInterfaceInfo accounts_validating_row_info = { (GInterfaceInitFunc) accounts_service_login_row_accounts_validating_row_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType accounts_service_login_row_type_id;
	accounts_service_login_row_type_id = g_type_register_static (ACCOUNTS_TYPE_SERVICE_ROW, "AccountsServiceLoginRow", &g_define_type_info, 0);
	g_type_add_interface_static (accounts_service_login_row_type_id, ACCOUNTS_TYPE_VALIDATING_ROW, &accounts_validating_row_info);
	AccountsServiceLoginRow_private_offset = g_type_add_instance_private (accounts_service_login_row_type_id, sizeof (AccountsServiceLoginRowPrivate));
	return accounts_service_login_row_type_id;
}

GType
accounts_service_login_row_get_type (void)
{
	static volatile gsize accounts_service_login_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_service_login_row_type_id__once)) {
		GType accounts_service_login_row_type_id;
		accounts_service_login_row_type_id = accounts_service_login_row_get_type_once ();
		g_once_init_leave (&accounts_service_login_row_type_id__once, accounts_service_login_row_type_id);
	}
	return accounts_service_login_row_type_id__once;
}

static void
_vala_accounts_service_login_row_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	AccountsServiceLoginRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_LOGIN_ROW_VALIDATOR_PROPERTY:
		g_value_set_object (value, accounts_validating_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow)));
		break;
		case ACCOUNTS_SERVICE_LOGIN_ROW_HAS_CHANGED_PROPERTY:
		g_value_set_boolean (value, accounts_validating_row_get_has_changed (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow)));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_service_login_row_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	AccountsServiceLoginRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_LOGIN_ROW, AccountsServiceLoginRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_LOGIN_ROW_VALIDATOR_PROPERTY:
		accounts_validating_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow), g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_service_password_row_get_instance_private (AccountsServicePasswordRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsServicePasswordRow_private_offset);
}

static ComponentsValidator*
accounts_service_password_row_real_get_validator (AccountsValidatingRow* base)
{
	ComponentsValidator* result;
	AccountsServicePasswordRow* self;
	ComponentsValidator* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	_tmp0_ = self->priv->_validator;
	result = _tmp0_;
	return result;
}

static void
accounts_service_password_row_real_set_validator (AccountsValidatingRow* base,
                                                  ComponentsValidator* value)
{
	AccountsServicePasswordRow* self;
	ComponentsValidator* old_value;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	old_value = accounts_service_password_row_real_get_validator (base);
	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_service_password_row_properties[ACCOUNTS_SERVICE_PASSWORD_ROW_VALIDATOR_PROPERTY]);
	}
}

static gboolean
accounts_service_password_row_real_get_has_changed (AccountsValidatingRow* base)
{
	gboolean result;
	AccountsServicePasswordRow* self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gboolean _tmp8_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = gtk_entry_get_text ((GtkEntry*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_strip (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = accounts_service_password_row_get_entry_text (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strcmp0 (_tmp5_, _tmp7_) != 0;
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	result = _tmp8_;
	return result;
}

AccountsServicePasswordRow*
accounts_service_password_row_construct (GType object_type,
                                         GearyAccountInformation* account,
                                         GearyServiceInformation* service,
                                         ApplicationCommandStack* commands,
                                         GCancellable* cancellable)
{
	AccountsServicePasswordRow * self = NULL;
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	ApplicationCommandStack* _tmp2_;
	GCancellable* _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	gconstpointer _tmp6_;
	gconstpointer _tmp7_;
	gconstpointer _tmp8_;
	gconstpointer _tmp9_;
	ComponentsValidator* _tmp10_;
	ComponentsValidator* _tmp11_;
	gconstpointer _tmp12_;
	gconstpointer _tmp13_;
	ComponentsEntryUndo* _tmp14_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (service, GEARY_TYPE_SERVICE_INFORMATION), NULL);
	g_return_val_if_fail (APPLICATION_IS_COMMAND_STACK (commands), NULL);
	g_return_val_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()), NULL);
	_tmp0_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	self = (AccountsServicePasswordRow*) accounts_service_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, gtk_entry_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, service, _ ("Password"), _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = _g_object_ref0 (commands);
	_g_object_unref0 (self->priv->commands);
	self->priv->commands = _tmp2_;
	_tmp3_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp3_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_tmp4_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp5_ = _tmp4_;
	gtk_entry_set_visibility ((GtkEntry*) _tmp5_, FALSE);
	_tmp6_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp7_ = _tmp6_;
	gtk_entry_set_input_purpose ((GtkEntry*) _tmp7_, GTK_INPUT_PURPOSE_PASSWORD);
	_tmp8_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp9_ = _tmp8_;
	_tmp10_ = components_validator_new ((GtkEntry*) _tmp9_);
	_tmp11_ = _tmp10_;
	accounts_validating_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow), _tmp11_);
	_g_object_unref0 (_tmp11_);
	accounts_validating_row_setup_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow));
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp12_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp13_ = _tmp12_;
	_tmp14_ = components_entry_undo_new ((GtkEntry*) _tmp13_);
	_g_object_unref0 (self->priv->value_undo);
	self->priv->value_undo = _tmp14_;
	return self;
}

AccountsServicePasswordRow*
accounts_service_password_row_new (GearyAccountInformation* account,
                                   GearyServiceInformation* service,
                                   ApplicationCommandStack* commands,
                                   GCancellable* cancellable)
{
	return accounts_service_password_row_construct (ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, account, service, commands, cancellable);
}

static void
accounts_service_password_row_real_update (AccountsAccountRow* base)
{
	AccountsServicePasswordRow * self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_service_password_row_get_entry_text (self);
	_tmp3_ = _tmp2_;
	gtk_entry_set_text ((GtkEntry*) _tmp1_, _tmp3_);
	_g_free0 (_tmp3_);
}

static void
accounts_service_password_row_real_commit (AccountsValidatingRow* base)
{
	AccountsServicePasswordRow * self;
	GearyServiceInformation* _tmp0_;
	GearyServiceInformation* _tmp1_;
	GearyCredentials* _tmp2_;
	GearyCredentials* _tmp3_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	_tmp0_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = geary_service_information_get_credentials (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		ApplicationCommandStack* _tmp4_;
		GearyServiceInformation* _tmp5_;
		GearyServiceInformation* _tmp6_;
		GearyServiceInformation* _tmp7_;
		GearyServiceInformation* _tmp8_;
		GearyCredentials* _tmp9_;
		GearyCredentials* _tmp10_;
		gconstpointer _tmp11_;
		gconstpointer _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		GearyCredentials* _tmp15_;
		GearyCredentials* _tmp16_;
		ApplicationPropertyCommand* _tmp17_;
		ApplicationPropertyCommand* _tmp18_;
		GCancellable* _tmp19_;
		_tmp4_ = self->priv->commands;
		_tmp5_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp6_ = _tmp5_;
		_tmp7_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp8_ = _tmp7_;
		_tmp9_ = geary_service_information_get_credentials (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp12_ = _tmp11_;
		_tmp13_ = gtk_entry_get_text ((GtkEntry*) _tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = geary_credentials_copy_with_token (_tmp10_, _tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = application_property_command_new (GEARY_TYPE_CREDENTIALS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, G_TYPE_OBJECT, GObject), "credentials", _tmp16_, NULL, NULL, NULL, NULL);
		_tmp18_ = _tmp17_;
		_tmp19_ = self->priv->cancellable;
		application_command_stack_execute (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp19_, NULL, NULL);
		_g_object_unref0 (_tmp18_);
		_g_object_unref0 (_tmp16_);
	}
}

static gchar*
accounts_service_password_row_get_entry_text (AccountsServicePasswordRow* self)
{
	const gchar* _tmp0_ = NULL;
	GearyServiceInformation* _tmp1_;
	GearyServiceInformation* _tmp2_;
	GearyCredentials* _tmp3_;
	GearyCredentials* _tmp4_;
	gchar* _tmp12_;
	gchar* result;
	g_return_val_if_fail (ACCOUNTS_IS_SERVICE_PASSWORD_ROW (self), NULL);
	_tmp1_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = geary_service_information_get_credentials (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != NULL) {
		const gchar* _tmp5_ = NULL;
		GearyServiceInformation* _tmp6_;
		GearyServiceInformation* _tmp7_;
		GearyCredentials* _tmp8_;
		GearyCredentials* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp6_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp7_ = _tmp6_;
		_tmp8_ = geary_service_information_get_credentials (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = geary_credentials_get_token (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp5_ = _tmp11_;
		if (_tmp5_ == NULL) {
			_tmp5_ = "";
		}
		_tmp0_ = _tmp5_;
	} else {
		_tmp0_ = "";
	}
	_tmp12_ = g_strdup (_tmp0_);
	result = _tmp12_;
	return result;
}

static void
accounts_service_password_row_class_init (AccountsServicePasswordRowClass * klass,
                                          gpointer klass_data)
{
	accounts_service_password_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsServicePasswordRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_service_password_row_real_update;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_service_password_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_service_password_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_service_password_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_PASSWORD_ROW_VALIDATOR_PROPERTY, accounts_service_password_row_properties[ACCOUNTS_SERVICE_PASSWORD_ROW_VALIDATOR_PROPERTY] = g_param_spec_object ("validator", "validator", "validator", COMPONENTS_TYPE_VALIDATOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_PASSWORD_ROW_HAS_CHANGED_PROPERTY, accounts_service_password_row_properties[ACCOUNTS_SERVICE_PASSWORD_ROW_HAS_CHANGED_PROPERTY] = g_param_spec_boolean ("has-changed", "has-changed", "has-changed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_service_password_row_accounts_validating_row_interface_init (AccountsValidatingRowIface * iface,
                                                                      gpointer iface_data)
{
	accounts_service_password_row_accounts_validating_row_parent_iface = g_type_interface_peek_parent (iface);
	iface->commit = (void (*) (AccountsValidatingRow*)) accounts_service_password_row_real_commit;
	iface->get_validator = accounts_service_password_row_real_get_validator;
	iface->set_validator = accounts_service_password_row_real_set_validator;
	iface->get_has_changed = accounts_service_password_row_real_get_has_changed;
}

static void
accounts_service_password_row_instance_init (AccountsServicePasswordRow * self,
                                             gpointer klass)
{
	self->priv = accounts_service_password_row_get_instance_private (self);
}

static void
accounts_service_password_row_finalize (GObject * obj)
{
	AccountsServicePasswordRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	_g_object_unref0 (self->priv->_validator);
	_g_object_unref0 (self->priv->value_undo);
	_g_object_unref0 (self->priv->commands);
	_g_object_unref0 (self->priv->cancellable);
	G_OBJECT_CLASS (accounts_service_password_row_parent_class)->finalize (obj);
}

static GType
accounts_service_password_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsServicePasswordRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_service_password_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsServicePasswordRow), 0, (GInstanceInitFunc) accounts_service_password_row_instance_init, NULL };
	static const GInterfaceInfo accounts_validating_row_info = { (GInterfaceInitFunc) accounts_service_password_row_accounts_validating_row_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType accounts_service_password_row_type_id;
	accounts_service_password_row_type_id = g_type_register_static (ACCOUNTS_TYPE_SERVICE_ROW, "AccountsServicePasswordRow", &g_define_type_info, 0);
	g_type_add_interface_static (accounts_service_password_row_type_id, ACCOUNTS_TYPE_VALIDATING_ROW, &accounts_validating_row_info);
	AccountsServicePasswordRow_private_offset = g_type_add_instance_private (accounts_service_password_row_type_id, sizeof (AccountsServicePasswordRowPrivate));
	return accounts_service_password_row_type_id;
}

GType
accounts_service_password_row_get_type (void)
{
	static volatile gsize accounts_service_password_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_service_password_row_type_id__once)) {
		GType accounts_service_password_row_type_id;
		accounts_service_password_row_type_id = accounts_service_password_row_get_type_once ();
		g_once_init_leave (&accounts_service_password_row_type_id__once, accounts_service_password_row_type_id);
	}
	return accounts_service_password_row_type_id__once;
}

static void
_vala_accounts_service_password_row_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	AccountsServicePasswordRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_PASSWORD_ROW_VALIDATOR_PROPERTY:
		g_value_set_object (value, accounts_validating_row_get_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow)));
		break;
		case ACCOUNTS_SERVICE_PASSWORD_ROW_HAS_CHANGED_PROPERTY:
		g_value_set_boolean (value, accounts_validating_row_get_has_changed (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow)));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_service_password_row_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	AccountsServicePasswordRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_PASSWORD_ROW, AccountsServicePasswordRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_PASSWORD_ROW_VALIDATOR_PROPERTY:
		accounts_validating_row_set_validator (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_VALIDATING_ROW, AccountsValidatingRow), g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_service_outgoing_auth_row_get_instance_private (AccountsServiceOutgoingAuthRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsServiceOutgoingAuthRow_private_offset);
}

static void
_accounts_service_outgoing_auth_row_on_value_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                            gpointer self)
{
	accounts_service_outgoing_auth_row_on_value_changed ((AccountsServiceOutgoingAuthRow*) self);
}

AccountsServiceOutgoingAuthRow*
accounts_service_outgoing_auth_row_construct (GType object_type,
                                              GearyAccountInformation* account,
                                              GearyServiceInformation* smtp_service,
                                              GearyServiceInformation* imap_service,
                                              ApplicationCommandStack* commands,
                                              GCancellable* cancellable)
{
	AccountsServiceOutgoingAuthRow * self = NULL;
	AccountsOutgoingAuthComboBox* value = NULL;
	AccountsOutgoingAuthComboBox* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ApplicationCommandStack* _tmp3_;
	GCancellable* _tmp4_;
	GearyServiceInformation* _tmp5_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (smtp_service, GEARY_TYPE_SERVICE_INFORMATION), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (imap_service, GEARY_TYPE_SERVICE_INFORMATION), NULL);
	g_return_val_if_fail (APPLICATION_IS_COMMAND_STACK (commands), NULL);
	g_return_val_if_fail ((cancellable == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (cancellable, g_cancellable_get_type ()), NULL);
	_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 = (AccountsServiceOutgoingAuthRow*) accounts_service_row_construct (object_type, ACCOUNTS_TYPE_EDITOR_SERVERS_PANE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, account, smtp_service, _tmp2_, value);
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp3_ = _g_object_ref0 (commands);
	_g_object_unref0 (self->priv->commands);
	self->priv->commands = _tmp3_;
	_tmp4_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (self->priv->cancellable);
	self->priv->cancellable = _tmp4_;
	_tmp5_ = _g_object_ref0 (imap_service);
	_g_object_unref0 (self->priv->imap_service);
	self->priv->imap_service = _tmp5_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (value, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _accounts_service_outgoing_auth_row_on_value_changed_gtk_combo_box_changed, self, 0);
	_g_object_unref0 (value);
	return self;
}

AccountsServiceOutgoingAuthRow*
accounts_service_outgoing_auth_row_new (GearyAccountInformation* account,
                                        GearyServiceInformation* smtp_service,
                                        GearyServiceInformation* imap_service,
                                        ApplicationCommandStack* commands,
                                        GCancellable* cancellable)
{
	return accounts_service_outgoing_auth_row_construct (ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW, account, smtp_service, imap_service, commands, cancellable);
}

static void
accounts_service_outgoing_auth_row_real_update (AccountsAccountRow* base)
{
	AccountsServiceOutgoingAuthRow * self;
	gconstpointer _tmp0_;
	gconstpointer _tmp1_;
	GearyServiceInformation* _tmp2_;
	GearyServiceInformation* _tmp3_;
	GearyCredentialsRequirement _tmp4_;
	GearyCredentialsRequirement _tmp5_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW, AccountsServiceOutgoingAuthRow);
	_tmp0_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp3_ = _tmp2_;
	_tmp4_ = geary_service_information_get_credentials_requirement (_tmp3_);
	_tmp5_ = _tmp4_;
	accounts_outgoing_auth_combo_box_set_source ((AccountsOutgoingAuthComboBox*) _tmp1_, _tmp5_);
}

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

static void
accounts_service_outgoing_auth_row_on_value_changed (AccountsServiceOutgoingAuthRow* self)
{
	GearyServiceInformation* _tmp0_;
	GearyServiceInformation* _tmp1_;
	GearyCredentialsRequirement _tmp2_;
	GearyCredentialsRequirement _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	GearyCredentialsRequirement _tmp6_;
	GearyCredentialsRequirement _tmp7_;
	g_return_if_fail (ACCOUNTS_IS_SERVICE_OUTGOING_AUTH_ROW (self));
	_tmp0_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = geary_service_information_get_credentials_requirement (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp5_ = _tmp4_;
	_tmp6_ = accounts_outgoing_auth_combo_box_get_source ((AccountsOutgoingAuthComboBox*) _tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp3_ != _tmp7_) {
		GearyCredentials* new_creds = NULL;
		gconstpointer _tmp8_;
		gconstpointer _tmp9_;
		GearyCredentialsRequirement _tmp10_;
		GearyCredentialsRequirement _tmp11_;
		ApplicationCommand** commands = NULL;
		GearyServiceInformation* _tmp13_;
		GearyServiceInformation* _tmp14_;
		GearyCredentials* _tmp15_;
		ApplicationPropertyCommand* _tmp16_;
		GearyServiceInformation* _tmp17_;
		GearyServiceInformation* _tmp18_;
		gconstpointer _tmp19_;
		gconstpointer _tmp20_;
		GearyCredentialsRequirement _tmp21_;
		GearyCredentialsRequirement _tmp22_;
		ApplicationPropertyCommand* _tmp23_;
		ApplicationCommand** _tmp24_;
		gint commands_length1;
		gint _commands_size_;
		GearyServiceInformation* _tmp25_;
		GearyServiceInformation* _tmp26_;
		guint16 _tmp27_;
		guint16 _tmp28_;
		GearyServiceInformation* _tmp29_;
		GearyServiceInformation* _tmp30_;
		ApplicationCommandStack* _tmp43_;
		ApplicationCommand** _tmp44_;
		gint _tmp44__length1;
		ApplicationCommandSequence* _tmp45_;
		ApplicationCommandSequence* _tmp46_;
		GCancellable* _tmp47_;
		new_creds = NULL;
		_tmp8_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp9_ = _tmp8_;
		_tmp10_ = accounts_outgoing_auth_combo_box_get_source ((AccountsOutgoingAuthComboBox*) _tmp9_);
		_tmp11_ = _tmp10_;
		if (_tmp11_ == GEARY_CREDENTIALS_REQUIREMENT_CUSTOM) {
			GearyCredentials* _tmp12_;
			_tmp12_ = geary_credentials_new (GEARY_CREDENTIALS_METHOD_PASSWORD, "", NULL);
			_g_object_unref0 (new_creds);
			new_creds = _tmp12_;
		}
		_tmp13_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp14_ = _tmp13_;
		_tmp15_ = new_creds;
		_tmp16_ = application_property_command_new (GEARY_TYPE_CREDENTIALS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, G_TYPE_OBJECT, GObject), "credentials", _tmp15_, NULL, NULL, NULL, NULL);
		_tmp17_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp18_ = _tmp17_;
		_tmp19_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
		_tmp20_ = _tmp19_;
		_tmp21_ = accounts_outgoing_auth_combo_box_get_source ((AccountsOutgoingAuthComboBox*) _tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = application_property_command_new (G_TYPE_UINT, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, G_TYPE_OBJECT, GObject), "credentials-requirement", (gpointer) ((guintptr) _tmp22_), NULL, NULL, NULL, NULL);
		_tmp24_ = g_new0 (ApplicationCommand*, 2 + 1);
		_tmp24_[0] = G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
		_tmp24_[1] = G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, APPLICATION_TYPE_COMMAND, ApplicationCommand);
		commands = _tmp24_;
		commands_length1 = 2;
		_commands_size_ = commands_length1;
		_tmp25_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp26_ = _tmp25_;
		_tmp27_ = geary_service_information_get_port (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
		_tmp30_ = _tmp29_;
		if (_tmp28_ == geary_service_information_get_default_port (_tmp30_)) {
			GearyServiceInformation* copy = NULL;
			GearyServiceInformation* _tmp31_;
			GearyServiceInformation* _tmp32_;
			GearyServiceInformation* _tmp33_;
			GearyServiceInformation* _tmp34_;
			gconstpointer _tmp35_;
			gconstpointer _tmp36_;
			GearyCredentialsRequirement _tmp37_;
			GearyCredentialsRequirement _tmp38_;
			GearyServiceInformation* _tmp39_;
			GearyServiceInformation* _tmp40_;
			GearyServiceInformation* _tmp41_;
			ApplicationPropertyCommand* _tmp42_;
			_tmp31_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
			_tmp32_ = _tmp31_;
			_tmp33_ = geary_service_information_new_copy (_tmp32_);
			copy = _tmp33_;
			_tmp34_ = copy;
			_tmp35_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
			_tmp36_ = _tmp35_;
			_tmp37_ = accounts_outgoing_auth_combo_box_get_source ((AccountsOutgoingAuthComboBox*) _tmp36_);
			_tmp38_ = _tmp37_;
			geary_service_information_set_credentials_requirement (_tmp34_, _tmp38_);
			_tmp39_ = accounts_service_row_get_service (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow));
			_tmp40_ = _tmp39_;
			_tmp41_ = copy;
			_tmp42_ = application_property_command_new (G_TYPE_UINT, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, G_TYPE_OBJECT, GObject), "port", (gpointer) ((guintptr) geary_service_information_get_default_port (_tmp41_)), NULL, NULL, NULL, NULL);
			_vala_array_add10 (&commands, &commands_length1, &_commands_size_, G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, APPLICATION_TYPE_COMMAND, ApplicationCommand));
			_g_object_unref0 (copy);
		}
		_tmp43_ = self->priv->commands;
		_tmp44_ = commands;
		_tmp44__length1 = commands_length1;
		_tmp45_ = application_command_sequence_new (_tmp44_, _tmp44__length1);
		_tmp46_ = _tmp45_;
		_tmp47_ = self->priv->cancellable;
		application_command_stack_execute (_tmp43_, G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, APPLICATION_TYPE_COMMAND, ApplicationCommand), _tmp47_, NULL, NULL);
		_g_object_unref0 (_tmp46_);
		commands = (_vala_array_free (commands, commands_length1, (GDestroyNotify) g_object_unref), NULL);
		_g_object_unref0 (new_creds);
	}
}

static void
accounts_service_outgoing_auth_row_class_init (AccountsServiceOutgoingAuthRowClass * klass,
                                               gpointer klass_data)
{
	accounts_service_outgoing_auth_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsServiceOutgoingAuthRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_service_outgoing_auth_row_real_update;
	G_OBJECT_CLASS (klass)->finalize = accounts_service_outgoing_auth_row_finalize;
}

static void
accounts_service_outgoing_auth_row_instance_init (AccountsServiceOutgoingAuthRow * self,
                                                  gpointer klass)
{
	self->priv = accounts_service_outgoing_auth_row_get_instance_private (self);
}

static void
accounts_service_outgoing_auth_row_finalize (GObject * obj)
{
	AccountsServiceOutgoingAuthRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SERVICE_OUTGOING_AUTH_ROW, AccountsServiceOutgoingAuthRow);
	_g_object_unref0 (self->priv->commands);
	_g_object_unref0 (self->priv->cancellable);
	_g_object_unref0 (self->priv->imap_service);
	G_OBJECT_CLASS (accounts_service_outgoing_auth_row_parent_class)->finalize (obj);
}

static GType
accounts_service_outgoing_auth_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsServiceOutgoingAuthRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_service_outgoing_auth_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsServiceOutgoingAuthRow), 0, (GInstanceInitFunc) accounts_service_outgoing_auth_row_instance_init, NULL };
	GType accounts_service_outgoing_auth_row_type_id;
	accounts_service_outgoing_auth_row_type_id = g_type_register_static (ACCOUNTS_TYPE_SERVICE_ROW, "AccountsServiceOutgoingAuthRow", &g_define_type_info, 0);
	AccountsServiceOutgoingAuthRow_private_offset = g_type_add_instance_private (accounts_service_outgoing_auth_row_type_id, sizeof (AccountsServiceOutgoingAuthRowPrivate));
	return accounts_service_outgoing_auth_row_type_id;
}

GType
accounts_service_outgoing_auth_row_get_type (void)
{
	static volatile gsize accounts_service_outgoing_auth_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_service_outgoing_auth_row_type_id__once)) {
		GType accounts_service_outgoing_auth_row_type_id;
		accounts_service_outgoing_auth_row_type_id = accounts_service_outgoing_auth_row_get_type_once ();
		g_once_init_leave (&accounts_service_outgoing_auth_row_type_id__once, accounts_service_outgoing_auth_row_type_id);
	}
	return accounts_service_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);
}

