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

/*
 * Copyright 2018 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 <glib.h>
#include <gdk/gdk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <cairo-gobject.h>
#include <float.h>
#include <math.h>
#include <pango/pango.h>
#include "geary-engine.h"
#include "geary-client-46.0.h"

#define ACCOUNTS_EDITOR_ROW_DND_ATOM "geary-editor-row"
#define ACCOUNTS_TLS_COMBO_BOX_INSECURE_ICON "channel-insecure-symbolic"
#define ACCOUNTS_TLS_COMBO_BOX_SECURE_ICON "channel-secure-symbolic"
#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_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;
typedef struct _AccountsEditorRowPrivate AccountsEditorRowPrivate;
enum  {
	ACCOUNTS_EDITOR_ROW_0_PROPERTY,
	ACCOUNTS_EDITOR_ROW_PANETYPE_TYPE,
	ACCOUNTS_EDITOR_ROW_PANETYPE_DUP_FUNC,
	ACCOUNTS_EDITOR_ROW_PANETYPE_DESTROY_FUNC,
	ACCOUNTS_EDITOR_ROW_LAYOUT_PROPERTY,
	ACCOUNTS_EDITOR_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_editor_row_properties[ACCOUNTS_EDITOR_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define ACCOUNTS_TYPE_ADD_ROW (accounts_add_row_get_type ())
#define ACCOUNTS_ADD_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_ADD_ROW, AccountsAddRow))
#define ACCOUNTS_ADD_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_ADD_ROW, AccountsAddRowClass))
#define ACCOUNTS_IS_ADD_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_ADD_ROW))
#define ACCOUNTS_IS_ADD_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_ADD_ROW))
#define ACCOUNTS_ADD_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_ADD_ROW, AccountsAddRowClass))

typedef struct _AccountsAddRow AccountsAddRow;
typedef struct _AccountsAddRowClass AccountsAddRowClass;
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	ACCOUNTS_EDITOR_ROW_MOVE_TO_SIGNAL,
	ACCOUNTS_EDITOR_ROW_DROPPED_SIGNAL,
	ACCOUNTS_EDITOR_ROW_NUM_SIGNALS
};
static guint accounts_editor_row_signals[ACCOUNTS_EDITOR_ROW_NUM_SIGNALS] = {0};

#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;
typedef struct _AccountsLabelledEditorRowPrivate AccountsLabelledEditorRowPrivate;
enum  {
	ACCOUNTS_LABELLED_EDITOR_ROW_0_PROPERTY,
	ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_TYPE,
	ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DUP_FUNC,
	ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DESTROY_FUNC,
	ACCOUNTS_LABELLED_EDITOR_ROW_V_TYPE,
	ACCOUNTS_LABELLED_EDITOR_ROW_V_DUP_FUNC,
	ACCOUNTS_LABELLED_EDITOR_ROW_V_DESTROY_FUNC,
	ACCOUNTS_LABELLED_EDITOR_ROW_LABEL_PROPERTY,
	ACCOUNTS_LABELLED_EDITOR_ROW_VALUE_PROPERTY,
	ACCOUNTS_LABELLED_EDITOR_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_labelled_editor_row_properties[ACCOUNTS_LABELLED_EDITOR_ROW_NUM_PROPERTIES];
typedef struct _AccountsAddRowPrivate AccountsAddRowPrivate;
enum  {
	ACCOUNTS_ADD_ROW_0_PROPERTY,
	ACCOUNTS_ADD_ROW_PANETYPE_TYPE,
	ACCOUNTS_ADD_ROW_PANETYPE_DUP_FUNC,
	ACCOUNTS_ADD_ROW_PANETYPE_DESTROY_FUNC,
	ACCOUNTS_ADD_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_add_row_properties[ACCOUNTS_ADD_ROW_NUM_PROPERTIES];

#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;
typedef struct _AccountsServiceProviderRowPrivate AccountsServiceProviderRowPrivate;
enum  {
	ACCOUNTS_SERVICE_PROVIDER_ROW_0_PROPERTY,
	ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_TYPE,
	ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DUP_FUNC,
	ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DESTROY_FUNC,
	ACCOUNTS_SERVICE_PROVIDER_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_service_provider_row_properties[ACCOUNTS_SERVICE_PROVIDER_ROW_NUM_PROPERTIES];

#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;
typedef struct _AccountsAccountRowPrivate AccountsAccountRowPrivate;
enum  {
	ACCOUNTS_ACCOUNT_ROW_0_PROPERTY,
	ACCOUNTS_ACCOUNT_ROW_PANETYPE_TYPE,
	ACCOUNTS_ACCOUNT_ROW_PANETYPE_DUP_FUNC,
	ACCOUNTS_ACCOUNT_ROW_PANETYPE_DESTROY_FUNC,
	ACCOUNTS_ACCOUNT_ROW_V_TYPE,
	ACCOUNTS_ACCOUNT_ROW_V_DUP_FUNC,
	ACCOUNTS_ACCOUNT_ROW_V_DESTROY_FUNC,
	ACCOUNTS_ACCOUNT_ROW_ACCOUNT_PROPERTY,
	ACCOUNTS_ACCOUNT_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_account_row_properties[ACCOUNTS_ACCOUNT_ROW_NUM_PROPERTIES];

#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;
typedef struct _AccountsServiceRowPrivate AccountsServiceRowPrivate;
enum  {
	ACCOUNTS_SERVICE_ROW_0_PROPERTY,
	ACCOUNTS_SERVICE_ROW_PANETYPE_TYPE,
	ACCOUNTS_SERVICE_ROW_PANETYPE_DUP_FUNC,
	ACCOUNTS_SERVICE_ROW_PANETYPE_DESTROY_FUNC,
	ACCOUNTS_SERVICE_ROW_V_TYPE,
	ACCOUNTS_SERVICE_ROW_V_DUP_FUNC,
	ACCOUNTS_SERVICE_ROW_V_DESTROY_FUNC,
	ACCOUNTS_SERVICE_ROW_SERVICE_PROPERTY,
	ACCOUNTS_SERVICE_ROW_IS_VALUE_EDITABLE_PROPERTY,
	ACCOUNTS_SERVICE_ROW_IS_GOA_ACCOUNT_PROPERTY,
	ACCOUNTS_SERVICE_ROW_NUM_PROPERTIES
};
static GParamSpec* accounts_service_row_properties[ACCOUNTS_SERVICE_ROW_NUM_PROPERTIES];

#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;
enum  {
	ACCOUNTS_VALIDATING_ROW_CHANGED_SIGNAL,
	ACCOUNTS_VALIDATING_ROW_COMMITTED_SIGNAL,
	ACCOUNTS_VALIDATING_ROW_NUM_SIGNALS
};
static guint accounts_validating_row_signals[ACCOUNTS_VALIDATING_ROW_NUM_SIGNALS] = {0};

#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 _AccountsTlsComboBoxPrivate AccountsTlsComboBoxPrivate;
enum  {
	ACCOUNTS_TLS_COMBO_BOX_0_PROPERTY,
	ACCOUNTS_TLS_COMBO_BOX_LABEL_PROPERTY,
	ACCOUNTS_TLS_COMBO_BOX_METHOD_PROPERTY,
	ACCOUNTS_TLS_COMBO_BOX_NUM_PROPERTIES
};
static GParamSpec* accounts_tls_combo_box_properties[ACCOUNTS_TLS_COMBO_BOX_NUM_PROPERTIES];

#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 _AccountsOutgoingAuthComboBoxPrivate AccountsOutgoingAuthComboBoxPrivate;
enum  {
	ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_0_PROPERTY,
	ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_LABEL_PROPERTY,
	ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_SOURCE_PROPERTY,
	ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_NUM_PROPERTIES
};
static GParamSpec* accounts_outgoing_auth_combo_box_properties[ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_NUM_PROPERTIES];

#define ACCOUNTS_TYPE_EDITOR_POPOVER (accounts_editor_popover_get_type ())
#define ACCOUNTS_EDITOR_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACCOUNTS_TYPE_EDITOR_POPOVER, AccountsEditorPopover))
#define ACCOUNTS_EDITOR_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ACCOUNTS_TYPE_EDITOR_POPOVER, AccountsEditorPopoverClass))
#define ACCOUNTS_IS_EDITOR_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACCOUNTS_TYPE_EDITOR_POPOVER))
#define ACCOUNTS_IS_EDITOR_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACCOUNTS_TYPE_EDITOR_POPOVER))
#define ACCOUNTS_EDITOR_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ACCOUNTS_TYPE_EDITOR_POPOVER, AccountsEditorPopoverClass))

typedef struct _AccountsEditorPopover AccountsEditorPopover;
typedef struct _AccountsEditorPopoverClass AccountsEditorPopoverClass;
typedef struct _AccountsEditorPopoverPrivate AccountsEditorPopoverPrivate;
enum  {
	ACCOUNTS_EDITOR_POPOVER_0_PROPERTY,
	ACCOUNTS_EDITOR_POPOVER_LAYOUT_PROPERTY,
	ACCOUNTS_EDITOR_POPOVER_NUM_PROPERTIES
};
static GParamSpec* accounts_editor_popover_properties[ACCOUNTS_EDITOR_POPOVER_NUM_PROPERTIES];

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

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

struct _AccountsEditorRowPrivate {
	GType panetype_type;
	GBoxedCopyFunc panetype_dup_func;
	GDestroyNotify panetype_destroy_func;
	GtkBox* _layout;
	GtkContainer* drag_handle;
	gboolean drag_picked_up;
	gboolean drag_entered;
};

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

struct _AccountsLabelledEditorRowClass {
	AccountsEditorRowClass parent_class;
};

struct _AccountsLabelledEditorRowPrivate {
	GType panetype_type;
	GBoxedCopyFunc panetype_dup_func;
	GDestroyNotify panetype_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GtkLabel* _label;
	gpointer _value;
};

struct _AccountsAddRow {
	AccountsEditorRow parent_instance;
	AccountsAddRowPrivate * priv;
};

struct _AccountsAddRowClass {
	AccountsEditorRowClass parent_class;
};

struct _AccountsAddRowPrivate {
	GType panetype_type;
	GBoxedCopyFunc panetype_dup_func;
	GDestroyNotify panetype_destroy_func;
};

struct _AccountsServiceProviderRow {
	AccountsLabelledEditorRow parent_instance;
	AccountsServiceProviderRowPrivate * priv;
};

struct _AccountsServiceProviderRowClass {
	AccountsLabelledEditorRowClass parent_class;
};

struct _AccountsServiceProviderRowPrivate {
	GType panetype_type;
	GBoxedCopyFunc panetype_dup_func;
	GDestroyNotify panetype_destroy_func;
};

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

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

struct _AccountsAccountRowPrivate {
	GType panetype_type;
	GBoxedCopyFunc panetype_dup_func;
	GDestroyNotify panetype_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GearyAccountInformation* _account;
};

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

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

struct _AccountsServiceRowPrivate {
	GType panetype_type;
	GBoxedCopyFunc panetype_dup_func;
	GDestroyNotify panetype_destroy_func;
	GType v_type;
	GBoxedCopyFunc v_dup_func;
	GDestroyNotify v_destroy_func;
	GearyServiceInformation* _service;
};

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 _AccountsTlsComboBox {
	GtkComboBox parent_instance;
	AccountsTlsComboBoxPrivate * priv;
};

struct _AccountsTlsComboBoxClass {
	GtkComboBoxClass parent_class;
};

struct _AccountsTlsComboBoxPrivate {
	gchar* _label;
};

struct _AccountsOutgoingAuthComboBox {
	GtkComboBox parent_instance;
	AccountsOutgoingAuthComboBoxPrivate * priv;
};

struct _AccountsOutgoingAuthComboBoxClass {
	GtkComboBoxClass parent_class;
};

struct _AccountsOutgoingAuthComboBoxPrivate {
	gchar* _label;
};

struct _AccountsEditorPopover {
	GtkPopover parent_instance;
	GtkWidget* popup_focus;
	AccountsEditorPopoverPrivate * priv;
};

struct _AccountsEditorPopoverClass {
	GtkPopoverClass parent_class;
};

struct _AccountsEditorPopoverPrivate {
	GtkGrid* _layout;
};

static gint AccountsEditorRow_private_offset;
static gpointer accounts_editor_row_parent_class = NULL;
static gint AccountsLabelledEditorRow_private_offset;
static gpointer accounts_labelled_editor_row_parent_class = NULL;
static gint AccountsAddRow_private_offset;
static gpointer accounts_add_row_parent_class = NULL;
static gint AccountsServiceProviderRow_private_offset;
static gpointer accounts_service_provider_row_parent_class = NULL;
static gint AccountsAccountRow_private_offset;
static gpointer accounts_account_row_parent_class = NULL;
static gint AccountsServiceRow_private_offset;
static gpointer accounts_service_row_parent_class = NULL;
static gint AccountsTlsComboBox_private_offset;
static gpointer accounts_tls_combo_box_parent_class = NULL;
static gint AccountsOutgoingAuthComboBox_private_offset;
static gpointer accounts_outgoing_auth_combo_box_parent_class = NULL;
static gint AccountsEditorPopover_private_offset;
static gpointer accounts_editor_popover_parent_class = NULL;

VALA_EXTERN GType accounts_editor_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void accounts_editor_row_activated (AccountsEditorRow* self,
                                    gconstpointer pane);
VALA_EXTERN GtkBox* accounts_editor_row_get_layout (AccountsEditorRow* self);
static void accounts_editor_row_set_layout (AccountsEditorRow* self,
                                     GtkBox* value);
VALA_EXTERN AccountsEditorRow* accounts_editor_row_new (GType panetype_type,
                                            GBoxedCopyFunc panetype_dup_func,
                                            GDestroyNotify panetype_destroy_func);
VALA_EXTERN AccountsEditorRow* accounts_editor_row_construct (GType object_type,
                                                  GType panetype_type,
                                                  GBoxedCopyFunc panetype_dup_func,
                                                  GDestroyNotify panetype_destroy_func);
static void __lambda53_ (AccountsEditorRow* self,
                  GtkAllocation* allocation);
static void ___lambda53__gtk_widget_size_allocate (GtkWidget* _sender,
                                            GtkAllocation* allocation,
                                            gpointer self);
static void accounts_editor_row_real_activated (AccountsEditorRow* self,
                                         gconstpointer pane);
static gboolean accounts_editor_row_real_key_press_event (GtkWidget* base,
                                                   GdkEventKey* event);
VALA_EXTERN GType accounts_add_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void accounts_editor_row_enable_drag (AccountsEditorRow* self);
static void accounts_editor_row_on_drag_begin (AccountsEditorRow* self,
                                        GdkDragContext* context);
static void _accounts_editor_row_on_drag_begin_gtk_widget_drag_begin (GtkWidget* _sender,
                                                               GdkDragContext* context,
                                                               gpointer self);
static void accounts_editor_row_on_drag_end (AccountsEditorRow* self,
                                      GdkDragContext* context);
static void _accounts_editor_row_on_drag_end_gtk_widget_drag_end (GtkWidget* _sender,
                                                           GdkDragContext* context,
                                                           gpointer self);
static void accounts_editor_row_on_drag_data_get (AccountsEditorRow* self,
                                           GdkDragContext* context,
                                           GtkSelectionData* selection_data,
                                           guint info,
                                           guint time_);
static void _accounts_editor_row_on_drag_data_get_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                                     GdkDragContext* context,
                                                                     GtkSelectionData* selection_data,
                                                                     guint info,
                                                                     guint time_,
                                                                     gpointer self);
static gboolean accounts_editor_row_on_drag_motion (AccountsEditorRow* self,
                                             GdkDragContext* context,
                                             gint x,
                                             gint y,
                                             guint time_);
static gboolean _accounts_editor_row_on_drag_motion_gtk_widget_drag_motion (GtkWidget* _sender,
                                                                     GdkDragContext* context,
                                                                     gint x,
                                                                     gint y,
                                                                     guint time_,
                                                                     gpointer self);
static void accounts_editor_row_on_drag_leave (AccountsEditorRow* self,
                                        GdkDragContext* context,
                                        guint time_);
static void _accounts_editor_row_on_drag_leave_gtk_widget_drag_leave (GtkWidget* _sender,
                                                               GdkDragContext* context,
                                                               guint time_,
                                                               gpointer self);
static void accounts_editor_row_on_drag_data_received (AccountsEditorRow* self,
                                                GdkDragContext* context,
                                                gint x,
                                                gint y,
                                                GtkSelectionData* selection_data,
                                                guint info,
                                                guint time_);
static void _accounts_editor_row_on_drag_data_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                                               GdkDragContext* context,
                                                                               gint x,
                                                                               gint y,
                                                                               GtkSelectionData* selection_data,
                                                                               guint info,
                                                                               guint time_,
                                                                               gpointer self);
static void accounts_editor_row_finalize (GObject * obj);
static GType accounts_editor_row_get_type_once (void);
static void _vala_accounts_editor_row_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_accounts_editor_row_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
VALA_EXTERN GType accounts_labelled_editor_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GtkLabel* accounts_labelled_editor_row_get_label (AccountsLabelledEditorRow* self);
static void accounts_labelled_editor_row_set_label (AccountsLabelledEditorRow* self,
                                             GtkLabel* value);
VALA_EXTERN gconstpointer accounts_labelled_editor_row_get_value (AccountsLabelledEditorRow* self);
static void accounts_labelled_editor_row_set_value (AccountsLabelledEditorRow* self,
                                             gconstpointer value);
VALA_EXTERN AccountsLabelledEditorRow* accounts_labelled_editor_row_new (GType panetype_type,
                                                             GBoxedCopyFunc panetype_dup_func,
                                                             GDestroyNotify panetype_destroy_func,
                                                             GType v_type,
                                                             GBoxedCopyFunc v_dup_func,
                                                             GDestroyNotify v_destroy_func,
                                                             const gchar* label,
                                                             gconstpointer value);
VALA_EXTERN AccountsLabelledEditorRow* accounts_labelled_editor_row_construct (GType object_type,
                                                                   GType panetype_type,
                                                                   GBoxedCopyFunc panetype_dup_func,
                                                                   GDestroyNotify panetype_destroy_func,
                                                                   GType v_type,
                                                                   GBoxedCopyFunc v_dup_func,
                                                                   GDestroyNotify v_destroy_func,
                                                                   const gchar* label,
                                                                   gconstpointer value);
VALA_EXTERN void accounts_labelled_editor_row_set_dim_label (AccountsLabelledEditorRow* self,
                                                 gboolean is_dim);
static void accounts_labelled_editor_row_finalize (GObject * obj);
static GType accounts_labelled_editor_row_get_type_once (void);
static void _vala_accounts_labelled_editor_row_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec);
static void _vala_accounts_labelled_editor_row_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec);
VALA_EXTERN AccountsAddRow* accounts_add_row_new (GType panetype_type,
                                      GBoxedCopyFunc panetype_dup_func,
                                      GDestroyNotify panetype_destroy_func);
VALA_EXTERN AccountsAddRow* accounts_add_row_construct (GType object_type,
                                            GType panetype_type,
                                            GBoxedCopyFunc panetype_dup_func,
                                            GDestroyNotify panetype_destroy_func);
static GType accounts_add_row_get_type_once (void);
static void _vala_accounts_add_row_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_accounts_add_row_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec);
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);
static GType accounts_service_provider_row_get_type_once (void);
static void _vala_accounts_service_provider_row_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_accounts_service_provider_row_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
VALA_EXTERN GType accounts_account_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void accounts_account_row_update (AccountsAccountRow* self);
VALA_EXTERN GearyAccountInformation* accounts_account_row_get_account (AccountsAccountRow* self);
static void accounts_account_row_on_account_changed (AccountsAccountRow* self);
static void _accounts_account_row_on_account_changed_geary_account_information_changed (GearyAccountInformation* _sender,
                                                                                 gpointer self);
static void accounts_account_row_set_account (AccountsAccountRow* self,
                                       GearyAccountInformation* value);
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_row_real_update (AccountsAccountRow* self);
static void accounts_account_row_finalize (GObject * obj);
static GType accounts_account_row_get_type_once (void);
static void _vala_accounts_account_row_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_accounts_account_row_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
VALA_EXTERN GType accounts_service_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean accounts_service_row_get_is_value_editable (AccountsServiceRow* self);
VALA_EXTERN GearyServiceInformation* accounts_service_row_get_service (AccountsServiceRow* self);
static void accounts_service_row_on_notify (AccountsServiceRow* self);
static void _accounts_service_row_on_notify_g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self);
static void accounts_service_row_set_service (AccountsServiceRow* self,
                                       GearyServiceInformation* value);
VALA_EXTERN gboolean accounts_service_row_get_is_goa_account (AccountsServiceRow* 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);
static void accounts_service_row_finalize (GObject * obj);
static GType accounts_service_row_get_type_once (void);
static void _vala_accounts_service_row_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_accounts_service_row_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
VALA_EXTERN GType accounts_validating_row_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ComponentsValidator* accounts_validating_row_get_validator (AccountsValidatingRow* self);
VALA_EXTERN void accounts_validating_row_set_validator (AccountsValidatingRow* self,
                                            ComponentsValidator* value);
VALA_EXTERN gboolean accounts_validating_row_get_has_changed (AccountsValidatingRow* self);
VALA_EXTERN void accounts_validating_row_setup_validator (AccountsValidatingRow* self);
static void accounts_validating_row_on_validator_changed (AccountsValidatingRow* self);
static void _accounts_validating_row_on_validator_changed_components_validator_changed (ComponentsValidator* _sender,
                                                                                 gpointer self);
static void accounts_validating_row_on_validator_check_commit (AccountsValidatingRow* self);
static void _accounts_validating_row_on_validator_check_commit_components_validator_activated (ComponentsValidator* _sender,
                                                                                        gpointer self);
static void _accounts_validating_row_on_validator_check_commit_components_validator_focus_lost (ComponentsValidator* _sender,
                                                                                         gpointer self);
VALA_EXTERN void accounts_validating_row_commit (AccountsValidatingRow* self);
static void accounts_validating_row_real_commit (AccountsValidatingRow* self);
static GType accounts_validating_row_get_type_once (void);
VALA_EXTERN GType accounts_tls_combo_box_get_type (void) G_GNUC_CONST ;
VALA_EXTERN const gchar* accounts_tls_combo_box_get_label (AccountsTlsComboBox* self);
static void accounts_tls_combo_box_set_label (AccountsTlsComboBox* self,
                                       const gchar* value);
VALA_EXTERN GearyTlsNegotiationMethod accounts_tls_combo_box_get_method (AccountsTlsComboBox* self);
VALA_EXTERN void accounts_tls_combo_box_set_method (AccountsTlsComboBox* self,
                                        GearyTlsNegotiationMethod value);
VALA_EXTERN AccountsTlsComboBox* accounts_tls_combo_box_new (void);
VALA_EXTERN AccountsTlsComboBox* accounts_tls_combo_box_construct (GType object_type);
static void accounts_tls_combo_box_finalize (GObject * obj);
static GType accounts_tls_combo_box_get_type_once (void);
static void _vala_accounts_tls_combo_box_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_accounts_tls_combo_box_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
VALA_EXTERN GType accounts_outgoing_auth_combo_box_get_type (void) G_GNUC_CONST ;
VALA_EXTERN const gchar* accounts_outgoing_auth_combo_box_get_label (AccountsOutgoingAuthComboBox* self);
static void accounts_outgoing_auth_combo_box_set_label (AccountsOutgoingAuthComboBox* self,
                                                 const gchar* value);
VALA_EXTERN GearyCredentialsRequirement accounts_outgoing_auth_combo_box_get_source (AccountsOutgoingAuthComboBox* self);
VALA_EXTERN void accounts_outgoing_auth_combo_box_set_source (AccountsOutgoingAuthComboBox* self,
                                                  GearyCredentialsRequirement value);
VALA_EXTERN AccountsOutgoingAuthComboBox* accounts_outgoing_auth_combo_box_new (void);
VALA_EXTERN AccountsOutgoingAuthComboBox* accounts_outgoing_auth_combo_box_construct (GType object_type);
static void accounts_outgoing_auth_combo_box_finalize (GObject * obj);
static GType accounts_outgoing_auth_combo_box_get_type_once (void);
static void _vala_accounts_outgoing_auth_combo_box_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static void _vala_accounts_outgoing_auth_combo_box_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec);
VALA_EXTERN GType accounts_editor_popover_get_type (void) G_GNUC_CONST ;
static void accounts_editor_popover_on_closed (AccountsEditorPopover* self);
static void _accounts_editor_popover_on_closed_gtk_popover_closed (GtkPopover* _sender,
                                                            gpointer self);
VALA_EXTERN GtkGrid* accounts_editor_popover_get_layout (AccountsEditorPopover* self);
static void accounts_editor_popover_set_layout (AccountsEditorPopover* self,
                                         GtkGrid* value);
VALA_EXTERN AccountsEditorPopover* accounts_editor_popover_new (void);
VALA_EXTERN AccountsEditorPopover* accounts_editor_popover_construct (GType object_type);
VALA_EXTERN void accounts_editor_popover_popup (AccountsEditorPopover* self);
VALA_EXTERN void accounts_editor_popover_add_labelled_row (AccountsEditorPopover* self,
                                               const gchar* label,
                                               GtkWidget* value);
static void accounts_editor_popover_finalize (GObject * obj);
static GType accounts_editor_popover_get_type_once (void);
static void _vala_accounts_editor_popover_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_accounts_editor_popover_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static const GtkTargetEntry ACCOUNTS_EDITOR_ROW_DRAG_ENTRIES[1] = {{ACCOUNTS_EDITOR_ROW_DND_ATOM, (guint) GTK_TARGET_SAME_APP, (guint) 0}};

static inline gpointer
accounts_editor_row_get_instance_private (AccountsEditorRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsEditorRow_private_offset);
}

GtkBox*
accounts_editor_row_get_layout (AccountsEditorRow* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_ROW (self), NULL);
	_tmp0_ = self->priv->_layout;
	result = _tmp0_;
	return result;
}

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

static void
accounts_editor_row_set_layout (AccountsEditorRow* self,
                                GtkBox* value)
{
	GtkBox* old_value;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	old_value = accounts_editor_row_get_layout (self);
	if (old_value != value) {
		GtkBox* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_layout);
		self->priv->_layout = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_row_properties[ACCOUNTS_EDITOR_ROW_LAYOUT_PROPERTY]);
	}
}

static void
__lambda53_ (AccountsEditorRow* self,
             GtkAllocation* allocation)
{
	GtkAllocation _tmp0_;
	g_return_if_fail (allocation != NULL);
	_tmp0_ = *allocation;
	if (_tmp0_.width < 500) {
		GtkBox* _tmp1_;
		GtkOrientation _tmp2_;
		GtkOrientation _tmp3_;
		_tmp1_ = self->priv->_layout;
		_tmp2_ = gtk_orientable_get_orientation (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_orientable_get_type (), GtkOrientable));
		_tmp3_ = _tmp2_;
		if (_tmp3_ == GTK_ORIENTATION_HORIZONTAL) {
			GtkBox* _tmp4_;
			_tmp4_ = self->priv->_layout;
			gtk_orientable_set_orientation (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_orientable_get_type (), GtkOrientable), GTK_ORIENTATION_VERTICAL);
		}
	} else {
		GtkBox* _tmp5_;
		GtkOrientation _tmp6_;
		GtkOrientation _tmp7_;
		_tmp5_ = self->priv->_layout;
		_tmp6_ = gtk_orientable_get_orientation (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_orientable_get_type (), GtkOrientable));
		_tmp7_ = _tmp6_;
		if (_tmp7_ == GTK_ORIENTATION_VERTICAL) {
			GtkBox* _tmp8_;
			_tmp8_ = self->priv->_layout;
			gtk_orientable_set_orientation (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_orientable_get_type (), GtkOrientable), GTK_ORIENTATION_HORIZONTAL);
		}
	}
}

static void
___lambda53__gtk_widget_size_allocate (GtkWidget* _sender,
                                       GtkAllocation* allocation,
                                       gpointer self)
{
	__lambda53_ ((AccountsEditorRow*) self, allocation);
}

AccountsEditorRow*
accounts_editor_row_construct (GType object_type,
                               GType panetype_type,
                               GBoxedCopyFunc panetype_dup_func,
                               GDestroyNotify panetype_destroy_func)
{
	AccountsEditorRow * self = NULL;
	GtkStyleContext* _tmp0_;
	GtkStyleContext* _tmp1_;
	GtkEventBox* drag_box = NULL;
	GtkEventBox* _tmp2_;
	GtkImage* _tmp3_;
	GtkImage* _tmp4_;
	GtkGrid* _tmp5_;
	GtkContainer* _tmp6_;
	GtkContainer* _tmp7_;
	GtkContainer* _tmp8_;
	GtkContainer* _tmp9_;
	GtkContainer* _tmp10_;
	GtkBox* box = NULL;
	GtkBox* _tmp11_;
	GtkContainer* _tmp12_;
	GtkBox* _tmp13_;
	GtkBox* _tmp14_;
	self = (AccountsEditorRow*) g_object_new (object_type, "panetype-type", panetype_type, "panetype-dup-func", panetype_dup_func, "panetype-destroy-func", panetype_destroy_func, NULL);
	self->priv->panetype_type = panetype_type;
	self->priv->panetype_dup_func = panetype_dup_func;
	self->priv->panetype_destroy_func = panetype_destroy_func;
	_tmp0_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp0_, "geary-settings");
	_tmp1_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp1_, "geary-labelled-row");
	_tmp2_ = (GtkEventBox*) gtk_event_box_new ();
	g_object_ref_sink (_tmp2_);
	drag_box = _tmp2_;
	_tmp3_ = (GtkImage*) gtk_image_new_from_icon_name ("list-drag-handle-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (drag_box, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (_tmp4_);
	_tmp5_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->drag_handle);
	self->priv->drag_handle = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_container_get_type (), GtkContainer);
	_tmp6_ = self->priv->drag_handle;
	gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
	_tmp7_ = self->priv->drag_handle;
	gtk_container_add (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (drag_box, gtk_widget_get_type (), GtkWidget));
	_tmp8_ = self->priv->drag_handle;
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
	_tmp9_ = self->priv->drag_handle;
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
	_tmp10_ = self->priv->drag_handle;
	gtk_widget_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget), _ ("Drag to move this item"));
	_tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp11_);
	box = _tmp11_;
	_tmp12_ = self->priv->drag_handle;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (box, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget));
	_tmp13_ = self->priv->_layout;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (box, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget));
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (box, gtk_widget_get_type (), GtkWidget));
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (box, gtk_widget_get_type (), GtkWidget));
	_tmp14_ = self->priv->_layout;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget));
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "size-allocate", (GCallback) ___lambda53__gtk_widget_size_allocate, self, 0);
	_g_object_unref0 (box);
	_g_object_unref0 (drag_box);
	return self;
}

AccountsEditorRow*
accounts_editor_row_new (GType panetype_type,
                         GBoxedCopyFunc panetype_dup_func,
                         GDestroyNotify panetype_destroy_func)
{
	return accounts_editor_row_construct (ACCOUNTS_TYPE_EDITOR_ROW, panetype_type, panetype_dup_func, panetype_destroy_func);
}

static void
accounts_editor_row_real_activated (AccountsEditorRow* self,
                                    gconstpointer pane)
{
}

void
accounts_editor_row_activated (AccountsEditorRow* self,
                               gconstpointer pane)
{
	AccountsEditorRowClass* _klass_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	_klass_ = ACCOUNTS_EDITOR_ROW_GET_CLASS (self);
	if (_klass_->activated) {
		_klass_->activated (self, pane);
	}
}

static gboolean
accounts_editor_row_real_key_press_event (GtkWidget* base,
                                          GdkEventKey* event)
{
	AccountsEditorRow * self;
	gboolean ret = FALSE;
	gboolean result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow);
	g_return_val_if_fail (event != NULL, FALSE);
	ret = GDK_EVENT_PROPAGATE;
	if (event->state == GDK_CONTROL_MASK) {
		gint index = 0;
		index = gtk_list_box_row_get_index (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow));
		if (event->keyval == GDK_KEY_Up) {
			index -= 1;
			if (index >= 0) {
				g_signal_emit (self, accounts_editor_row_signals[ACCOUNTS_EDITOR_ROW_MOVE_TO_SIGNAL], 0, index);
				ret = GDK_EVENT_STOP;
			}
		} else {
			if (event->keyval == GDK_KEY_Down) {
				GtkListBox* parent = NULL;
				GtkContainer* _tmp0_;
				GtkListBox* _tmp1_;
				gboolean _tmp2_ = FALSE;
				gboolean _tmp3_ = FALSE;
				GtkListBox* _tmp4_;
				index += 1;
				_tmp0_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
				_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_list_box_get_type ()) ? ((GtkListBox*) _tmp0_) : NULL);
				parent = _tmp1_;
				_tmp4_ = parent;
				if (_tmp4_ != NULL) {
					GtkListBox* _tmp5_;
					GList* _tmp6_;
					GList* _tmp7_;
					_tmp5_ = parent;
					_tmp6_ = gtk_container_get_children (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_container_get_type (), GtkContainer));
					_tmp7_ = _tmp6_;
					_tmp3_ = ((guint) index) < g_list_length (_tmp7_);
					(_tmp7_ == NULL) ? NULL : (_tmp7_ = (g_list_free (_tmp7_), NULL));
				} else {
					_tmp3_ = FALSE;
				}
				if (_tmp3_) {
					GtkListBox* _tmp8_;
					GtkListBoxRow* _tmp9_;
					_tmp8_ = parent;
					_tmp9_ = gtk_list_box_get_row_at_index (_tmp8_, index);
					_tmp2_ = !ACCOUNTS_IS_ADD_ROW (_tmp9_);
				} else {
					_tmp2_ = FALSE;
				}
				if (_tmp2_) {
					g_signal_emit (self, accounts_editor_row_signals[ACCOUNTS_EDITOR_ROW_MOVE_TO_SIGNAL], 0, index);
					ret = GDK_EVENT_STOP;
				}
				_g_object_unref0 (parent);
			}
		}
	}
	if (ret != GDK_EVENT_STOP) {
		ret = GTK_WIDGET_CLASS (accounts_editor_row_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), gtk_widget_get_type (), GtkWidget), event);
	}
	result = ret;
	return result;
}

/** Adds a drag handle to the row and enables drag signals. */
static void
_accounts_editor_row_on_drag_begin_gtk_widget_drag_begin (GtkWidget* _sender,
                                                          GdkDragContext* context,
                                                          gpointer self)
{
	accounts_editor_row_on_drag_begin ((AccountsEditorRow*) self, context);
}

static void
_accounts_editor_row_on_drag_end_gtk_widget_drag_end (GtkWidget* _sender,
                                                      GdkDragContext* context,
                                                      gpointer self)
{
	accounts_editor_row_on_drag_end ((AccountsEditorRow*) self, context);
}

static void
_accounts_editor_row_on_drag_data_get_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                                GdkDragContext* context,
                                                                GtkSelectionData* selection_data,
                                                                guint info,
                                                                guint time_,
                                                                gpointer self)
{
	accounts_editor_row_on_drag_data_get ((AccountsEditorRow*) self, context, selection_data, info, time_);
}

static gboolean
_accounts_editor_row_on_drag_motion_gtk_widget_drag_motion (GtkWidget* _sender,
                                                            GdkDragContext* context,
                                                            gint x,
                                                            gint y,
                                                            guint time_,
                                                            gpointer self)
{
	gboolean result;
	result = accounts_editor_row_on_drag_motion ((AccountsEditorRow*) self, context, x, y, time_);
	return result;
}

static void
_accounts_editor_row_on_drag_leave_gtk_widget_drag_leave (GtkWidget* _sender,
                                                          GdkDragContext* context,
                                                          guint time_,
                                                          gpointer self)
{
	accounts_editor_row_on_drag_leave ((AccountsEditorRow*) self, context, time_);
}

static void
_accounts_editor_row_on_drag_data_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                                          GdkDragContext* context,
                                                                          gint x,
                                                                          gint y,
                                                                          GtkSelectionData* selection_data,
                                                                          guint info,
                                                                          guint time_,
                                                                          gpointer self)
{
	accounts_editor_row_on_drag_data_received ((AccountsEditorRow*) self, context, x, y, selection_data, info, time_);
}

void
accounts_editor_row_enable_drag (AccountsEditorRow* self)
{
	GtkContainer* _tmp0_;
	GtkContainer* _tmp1_;
	GtkContainer* _tmp2_;
	GtkContainer* _tmp3_;
	GtkContainer* _tmp4_;
	GtkStyleContext* _tmp5_;
	GtkContainer* _tmp6_;
	GtkStyleContext* _tmp7_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	_tmp0_ = self->priv->drag_handle;
	gtk_drag_source_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), GDK_BUTTON1_MASK, ACCOUNTS_EDITOR_ROW_DRAG_ENTRIES, (gint) G_N_ELEMENTS (ACCOUNTS_EDITOR_ROW_DRAG_ENTRIES), GDK_ACTION_MOVE);
	gtk_drag_dest_set (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, ACCOUNTS_EDITOR_ROW_DRAG_ENTRIES, (gint) G_N_ELEMENTS (ACCOUNTS_EDITOR_ROW_DRAG_ENTRIES), GDK_ACTION_MOVE);
	_tmp1_ = self->priv->drag_handle;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), "drag-begin", (GCallback) _accounts_editor_row_on_drag_begin_gtk_widget_drag_begin, self, 0);
	_tmp2_ = self->priv->drag_handle;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), "drag-end", (GCallback) _accounts_editor_row_on_drag_end_gtk_widget_drag_end, self, 0);
	_tmp3_ = self->priv->drag_handle;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), "drag-data-get", (GCallback) _accounts_editor_row_on_drag_data_get_gtk_widget_drag_data_get, self, 0);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "drag-motion", (GCallback) _accounts_editor_row_on_drag_motion_gtk_widget_drag_motion, self, 0);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "drag-leave", (GCallback) _accounts_editor_row_on_drag_leave_gtk_widget_drag_leave, self, 0);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "drag-data-received", (GCallback) _accounts_editor_row_on_drag_data_received_gtk_widget_drag_data_received, self, 0);
	_tmp4_ = self->priv->drag_handle;
	_tmp5_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp5_, "geary-drag-handle");
	_tmp6_ = self->priv->drag_handle;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
	_tmp7_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp7_, "geary-draggable");
}

static void
accounts_editor_row_on_drag_begin (AccountsEditorRow* self,
                                   GdkDragContext* context)
{
	GtkAllocation alloc = {0};
	GtkAllocation _tmp0_ = {0};
	cairo_surface_t* surface = NULL;
	GtkAllocation _tmp1_;
	GtkAllocation _tmp2_;
	cairo_surface_t* _tmp3_;
	cairo_t* paint = NULL;
	cairo_t* _tmp4_;
	GtkStyleContext* style = NULL;
	GtkStyleContext* _tmp5_;
	GtkStyleContext* _tmp6_;
	gboolean _tmp7_ = FALSE;
	gint x = 0;
	gint y = 0;
	GtkContainer* _tmp8_;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (context, gdk_drag_context_get_type ()));
	memset (&alloc, 0, sizeof (GtkAllocation));
	gtk_widget_get_allocation (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), &_tmp0_);
	alloc = _tmp0_;
	_tmp1_ = alloc;
	_tmp2_ = alloc;
	_tmp3_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp1_.width, _tmp2_.height);
	surface = _tmp3_;
	_tmp4_ = cairo_create (surface);
	paint = _tmp4_;
	_tmp5_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp6_ = _g_object_ref0 (_tmp5_);
	style = _tmp6_;
	gtk_style_context_add_class (style, "geary-drag-icon");
	g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "draw", paint, &_tmp7_);
	gtk_style_context_remove_class (style, "geary-drag-icon");
	_tmp8_ = self->priv->drag_handle;
	gtk_widget_translate_coordinates (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), 0, 0, &_tmp9_, &_tmp10_);
	x = _tmp9_;
	y = _tmp10_;
	cairo_surface_set_device_offset (surface, (gdouble) (-x), (gdouble) (-y));
	gtk_drag_set_icon_surface (context, surface);
	gtk_style_context_add_class (style, "geary-drag-source");
	self->priv->drag_picked_up = TRUE;
	_g_object_unref0 (style);
	_cairo_destroy0 (paint);
	_cairo_surface_destroy0 (surface);
}

static void
accounts_editor_row_on_drag_end (AccountsEditorRow* self,
                                 GdkDragContext* context)
{
	GtkStyleContext* _tmp0_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (context, gdk_drag_context_get_type ()));
	_tmp0_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_remove_class (_tmp0_, "geary-drag-source");
	self->priv->drag_picked_up = FALSE;
}

static gboolean
accounts_editor_row_on_drag_motion (AccountsEditorRow* self,
                                    GdkDragContext* context,
                                    gint x,
                                    gint y,
                                    guint time_)
{
	gboolean result;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_ROW (self), FALSE);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (context, gdk_drag_context_get_type ()), FALSE);
	if (!self->priv->drag_entered) {
		self->priv->drag_entered = TRUE;
		if (!self->priv->drag_picked_up) {
			GtkListBox* parent = NULL;
			GtkContainer* _tmp0_;
			GtkListBox* _tmp1_;
			GtkListBox* _tmp2_;
			_tmp0_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
			_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_list_box_get_type ()) ? ((GtkListBox*) _tmp0_) : NULL);
			parent = _tmp1_;
			_tmp2_ = parent;
			if (_tmp2_ != NULL) {
				GtkListBox* _tmp3_;
				_tmp3_ = parent;
				gtk_list_box_drag_highlight_row (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow));
			}
			_g_object_unref0 (parent);
		}
	}
	result = TRUE;
	return result;
}

static void
accounts_editor_row_on_drag_leave (AccountsEditorRow* self,
                                   GdkDragContext* context,
                                   guint time_)
{
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (context, gdk_drag_context_get_type ()));
	if (!self->priv->drag_picked_up) {
		GtkListBox* parent = NULL;
		GtkContainer* _tmp0_;
		GtkListBox* _tmp1_;
		GtkListBox* _tmp2_;
		_tmp0_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
		_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_list_box_get_type ()) ? ((GtkListBox*) _tmp0_) : NULL);
		parent = _tmp1_;
		_tmp2_ = parent;
		if (_tmp2_ != NULL) {
			GtkListBox* _tmp3_;
			_tmp3_ = parent;
			gtk_list_box_drag_unhighlight_row (_tmp3_);
		}
		_g_object_unref0 (parent);
	}
	self->priv->drag_entered = FALSE;
}

static guint8*
string_get_data (const gchar* self,
                 gint* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res;
	_tmp2__length1 = res_length1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

static void
accounts_editor_row_on_drag_data_get (AccountsEditorRow* self,
                                      GdkDragContext* context,
                                      GtkSelectionData* selection_data,
                                      guint info,
                                      guint time_)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_ = 0;
	guint8* _tmp4_;
	gint _tmp4__length1;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (context, gdk_drag_context_get_type ()));
	g_return_if_fail (selection_data != NULL);
	_tmp0_ = g_strdup_printf ("%i", gtk_list_box_row_get_index (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow)));
	_tmp1_ = _tmp0_;
	_tmp2_ = string_get_data (_tmp1_, &_tmp3_);
	_tmp2__length1 = _tmp3_;
	_tmp4_ = _tmp2_;
	_tmp4__length1 = _tmp2__length1;
	gtk_selection_data_set (selection_data, gdk_atom_intern_static_string (ACCOUNTS_EDITOR_ROW_DND_ATOM), 8, _tmp4_, (gint) _tmp4__length1);
	_g_free0 (_tmp1_);
}

static void
accounts_editor_row_on_drag_data_received (AccountsEditorRow* self,
                                           GdkDragContext* context,
                                           gint x,
                                           gint y,
                                           GtkSelectionData* selection_data,
                                           guint info,
                                           guint time_)
{
	gint drag_index = 0;
	guint8* _tmp0_;
	GtkListBox* parent = NULL;
	GtkContainer* _tmp1_;
	GtkListBox* _tmp2_;
	GtkListBox* _tmp3_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_ROW (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (context, gdk_drag_context_get_type ()));
	g_return_if_fail (selection_data != NULL);
	_tmp0_ = gtk_selection_data_get_data (selection_data);
	drag_index = atoi ((const gchar*) _tmp0_);
	_tmp1_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_list_box_get_type ()) ? ((GtkListBox*) _tmp1_) : NULL);
	parent = _tmp2_;
	_tmp3_ = parent;
	if (_tmp3_ != NULL) {
		AccountsEditorRow* drag_row = NULL;
		GtkListBox* _tmp4_;
		GtkListBoxRow* _tmp5_;
		AccountsEditorRow* _tmp6_;
		gboolean _tmp7_ = FALSE;
		AccountsEditorRow* _tmp8_;
		_tmp4_ = parent;
		_tmp5_ = gtk_list_box_get_row_at_index (_tmp4_, drag_index);
		_tmp6_ = _g_object_ref0 (ACCOUNTS_IS_EDITOR_ROW (_tmp5_) ? ((AccountsEditorRow*) _tmp5_) : NULL);
		drag_row = _tmp6_;
		_tmp8_ = drag_row;
		if (_tmp8_ != NULL) {
			AccountsEditorRow* _tmp9_;
			_tmp9_ = drag_row;
			_tmp7_ = _tmp9_ != self;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			AccountsEditorRow* _tmp10_;
			_tmp10_ = drag_row;
			g_signal_emit (_tmp10_, accounts_editor_row_signals[ACCOUNTS_EDITOR_ROW_DROPPED_SIGNAL], 0, self);
		}
		_g_object_unref0 (drag_row);
	}
	_g_object_unref0 (parent);
}

static void
accounts_editor_row_class_init (AccountsEditorRowClass * klass,
                                gpointer klass_data)
{
	accounts_editor_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsEditorRow_private_offset);
	((AccountsEditorRowClass *) klass)->activated = (void (*) (AccountsEditorRow*, gconstpointer)) accounts_editor_row_real_activated;
	((GtkWidgetClass *) klass)->key_press_event = (gboolean (*) (GtkWidget*, GdkEventKey*)) accounts_editor_row_real_key_press_event;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_editor_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_editor_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_editor_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_ROW_PANETYPE_TYPE, g_param_spec_gtype ("panetype-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_ROW_PANETYPE_DUP_FUNC, g_param_spec_pointer ("panetype-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_ROW_PANETYPE_DESTROY_FUNC, g_param_spec_pointer ("panetype-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_ROW_LAYOUT_PROPERTY, accounts_editor_row_properties[ACCOUNTS_EDITOR_ROW_LAYOUT_PROPERTY] = g_param_spec_object ("layout", "layout", "layout", gtk_box_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	accounts_editor_row_signals[ACCOUNTS_EDITOR_ROW_MOVE_TO_SIGNAL] = g_signal_new ("move-to", ACCOUNTS_TYPE_EDITOR_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
	accounts_editor_row_signals[ACCOUNTS_EDITOR_ROW_DROPPED_SIGNAL] = g_signal_new ("dropped", ACCOUNTS_TYPE_EDITOR_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, ACCOUNTS_TYPE_EDITOR_ROW);
}

static void
accounts_editor_row_instance_init (AccountsEditorRow * self,
                                   gpointer klass)
{
	GtkBox* _tmp0_;
	self->priv = accounts_editor_row_get_instance_private (self);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp0_);
	self->priv->_layout = _tmp0_;
	self->priv->drag_picked_up = FALSE;
	self->priv->drag_entered = FALSE;
}

static void
accounts_editor_row_finalize (GObject * obj)
{
	AccountsEditorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow);
	_g_object_unref0 (self->priv->_layout);
	_g_object_unref0 (self->priv->drag_handle);
	G_OBJECT_CLASS (accounts_editor_row_parent_class)->finalize (obj);
}

static GType
accounts_editor_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsEditorRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_editor_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsEditorRow), 0, (GInstanceInitFunc) accounts_editor_row_instance_init, NULL };
	GType accounts_editor_row_type_id;
	accounts_editor_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "AccountsEditorRow", &g_define_type_info, 0);
	AccountsEditorRow_private_offset = g_type_add_instance_private (accounts_editor_row_type_id, sizeof (AccountsEditorRowPrivate));
	return accounts_editor_row_type_id;
}

GType
accounts_editor_row_get_type (void)
{
	static volatile gsize accounts_editor_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_editor_row_type_id__once)) {
		GType accounts_editor_row_type_id;
		accounts_editor_row_type_id = accounts_editor_row_get_type_once ();
		g_once_init_leave (&accounts_editor_row_type_id__once, accounts_editor_row_type_id);
	}
	return accounts_editor_row_type_id__once;
}

static void
_vala_accounts_editor_row_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	AccountsEditorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow);
	switch (property_id) {
		case ACCOUNTS_EDITOR_ROW_LAYOUT_PROPERTY:
		g_value_set_object (value, accounts_editor_row_get_layout (self));
		break;
		case ACCOUNTS_EDITOR_ROW_PANETYPE_TYPE:
		g_value_set_gtype (value, self->priv->panetype_type);
		break;
		case ACCOUNTS_EDITOR_ROW_PANETYPE_DUP_FUNC:
		g_value_set_pointer (value, self->priv->panetype_dup_func);
		break;
		case ACCOUNTS_EDITOR_ROW_PANETYPE_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->panetype_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_editor_row_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	AccountsEditorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow);
	switch (property_id) {
		case ACCOUNTS_EDITOR_ROW_LAYOUT_PROPERTY:
		accounts_editor_row_set_layout (self, g_value_get_object (value));
		break;
		case ACCOUNTS_EDITOR_ROW_PANETYPE_TYPE:
		self->priv->panetype_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_EDITOR_ROW_PANETYPE_DUP_FUNC:
		self->priv->panetype_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_EDITOR_ROW_PANETYPE_DESTROY_FUNC:
		self->priv->panetype_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_labelled_editor_row_get_instance_private (AccountsLabelledEditorRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsLabelledEditorRow_private_offset);
}

GtkLabel*
accounts_labelled_editor_row_get_label (AccountsLabelledEditorRow* self)
{
	GtkLabel* result;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_LABELLED_EDITOR_ROW (self), NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

static void
accounts_labelled_editor_row_set_label (AccountsLabelledEditorRow* self,
                                        GtkLabel* value)
{
	GtkLabel* old_value;
	g_return_if_fail (ACCOUNTS_IS_LABELLED_EDITOR_ROW (self));
	old_value = accounts_labelled_editor_row_get_label (self);
	if (old_value != value) {
		GtkLabel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_labelled_editor_row_properties[ACCOUNTS_LABELLED_EDITOR_ROW_LABEL_PROPERTY]);
	}
}

gconstpointer
accounts_labelled_editor_row_get_value (AccountsLabelledEditorRow* self)
{
	gconstpointer result;
	gconstpointer _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_LABELLED_EDITOR_ROW (self), NULL);
	_tmp0_ = self->priv->_value;
	result = _tmp0_;
	return result;
}

static void
accounts_labelled_editor_row_set_value (AccountsLabelledEditorRow* self,
                                        gconstpointer value)
{
	gpointer old_value;
	g_return_if_fail (ACCOUNTS_IS_LABELLED_EDITOR_ROW (self));
	old_value = accounts_labelled_editor_row_get_value (self);
	if (old_value != value) {
		gpointer _tmp0_;
		_tmp0_ = ((value != NULL) && (self->priv->v_dup_func != NULL)) ? self->priv->v_dup_func ((gpointer) value) : ((gpointer) value);
		((self->priv->_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (self->priv->_value = (self->priv->v_destroy_func (self->priv->_value), NULL));
		self->priv->_value = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_labelled_editor_row_properties[ACCOUNTS_LABELLED_EDITOR_ROW_VALUE_PROPERTY]);
	}
}

AccountsLabelledEditorRow*
accounts_labelled_editor_row_construct (GType object_type,
                                        GType panetype_type,
                                        GBoxedCopyFunc panetype_dup_func,
                                        GDestroyNotify panetype_destroy_func,
                                        GType v_type,
                                        GBoxedCopyFunc v_dup_func,
                                        GDestroyNotify v_destroy_func,
                                        const gchar* label,
                                        gconstpointer value)
{
	AccountsLabelledEditorRow * self = NULL;
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkLabel* _tmp9_;
	gboolean expand_label = FALSE;
	GtkWidget* widget = NULL;
	GtkWidget* _tmp10_;
	GtkWidget* _tmp11_;
	GtkLabel* _tmp25_;
	g_return_val_if_fail (label != NULL, NULL);
	self = (AccountsLabelledEditorRow*) accounts_editor_row_construct (object_type, panetype_type, (GBoxedCopyFunc) panetype_dup_func, (GDestroyNotify) panetype_destroy_func);
	self->priv->panetype_type = panetype_type;
	self->priv->panetype_dup_func = panetype_dup_func;
	self->priv->panetype_destroy_func = panetype_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	_tmp0_ = self->priv->_label;
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
	_tmp1_ = self->priv->_label;
	gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
	_tmp2_ = self->priv->_label;
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE);
	_tmp3_ = self->priv->_label;
	gtk_label_set_text (_tmp3_, label);
	_tmp4_ = self->priv->_label;
	gtk_label_set_line_wrap_mode (_tmp4_, PANGO_WRAP_WORD_CHAR);
	_tmp5_ = self->priv->_label;
	gtk_label_set_line_wrap (_tmp5_, TRUE);
	_tmp6_ = self->priv->_label;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
	_tmp7_ = accounts_editor_row_get_layout (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->_label;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
	expand_label = TRUE;
	accounts_labelled_editor_row_set_value (self, value);
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (value, gtk_widget_get_type ()) ? ((GtkWidget*) value) : NULL);
	widget = _tmp10_;
	_tmp11_ = widget;
	if (_tmp11_ != NULL) {
		GtkEntry* entry = NULL;
		GtkEntry* _tmp12_;
		GtkEntry* _tmp13_;
		GtkLabel* vlabel = NULL;
		GtkLabel* _tmp15_;
		GtkLabel* _tmp16_;
		GtkWidget* _tmp19_;
		GtkWidget* _tmp20_;
		GtkWidget* _tmp21_;
		GtkBox* _tmp22_;
		GtkBox* _tmp23_;
		GtkWidget* _tmp24_;
		_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (value, gtk_entry_get_type ()) ? ((GtkEntry*) value) : NULL);
		entry = _tmp12_;
		_tmp13_ = entry;
		if (_tmp13_ != NULL) {
			GtkEntry* _tmp14_;
			expand_label = FALSE;
			_tmp14_ = entry;
			gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget), TRUE);
		}
		_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (value, gtk_label_get_type ()) ? ((GtkLabel*) value) : NULL);
		vlabel = _tmp15_;
		_tmp16_ = vlabel;
		if (_tmp16_ != NULL) {
			GtkLabel* _tmp17_;
			GtkLabel* _tmp18_;
			_tmp17_ = vlabel;
			gtk_label_set_line_wrap_mode (_tmp17_, PANGO_WRAP_WORD_CHAR);
			_tmp18_ = vlabel;
			gtk_label_set_line_wrap (_tmp18_, TRUE);
		}
		_tmp19_ = widget;
		gtk_widget_set_halign (_tmp19_, GTK_ALIGN_START);
		_tmp20_ = widget;
		gtk_widget_set_valign (_tmp20_, GTK_ALIGN_CENTER);
		_tmp21_ = widget;
		gtk_widget_show (_tmp21_);
		_tmp22_ = accounts_editor_row_get_layout (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
		_tmp23_ = _tmp22_;
		_tmp24_ = widget;
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_container_get_type (), GtkContainer), _tmp24_);
		_g_object_unref0 (vlabel);
		_g_object_unref0 (entry);
	}
	_tmp25_ = self->priv->_label;
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget), expand_label);
	_g_object_unref0 (widget);
	return self;
}

AccountsLabelledEditorRow*
accounts_labelled_editor_row_new (GType panetype_type,
                                  GBoxedCopyFunc panetype_dup_func,
                                  GDestroyNotify panetype_destroy_func,
                                  GType v_type,
                                  GBoxedCopyFunc v_dup_func,
                                  GDestroyNotify v_destroy_func,
                                  const gchar* label,
                                  gconstpointer value)
{
	return accounts_labelled_editor_row_construct (ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, panetype_type, panetype_dup_func, panetype_destroy_func, v_type, v_dup_func, v_destroy_func, label, value);
}

void
accounts_labelled_editor_row_set_dim_label (AccountsLabelledEditorRow* self,
                                            gboolean is_dim)
{
	g_return_if_fail (ACCOUNTS_IS_LABELLED_EDITOR_ROW (self));
	if (is_dim) {
		GtkLabel* _tmp0_;
		GtkStyleContext* _tmp1_;
		_tmp0_ = self->priv->_label;
		_tmp1_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
		gtk_style_context_add_class (_tmp1_, GTK_STYLE_CLASS_DIM_LABEL);
	} else {
		GtkLabel* _tmp2_;
		GtkStyleContext* _tmp3_;
		_tmp2_ = self->priv->_label;
		_tmp3_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
		gtk_style_context_remove_class (_tmp3_, GTK_STYLE_CLASS_DIM_LABEL);
	}
}

static void
accounts_labelled_editor_row_class_init (AccountsLabelledEditorRowClass * klass,
                                         gpointer klass_data)
{
	accounts_labelled_editor_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsLabelledEditorRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_labelled_editor_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_labelled_editor_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_labelled_editor_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_TYPE, g_param_spec_gtype ("panetype-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DUP_FUNC, g_param_spec_pointer ("panetype-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DESTROY_FUNC, g_param_spec_pointer ("panetype-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_LABEL_PROPERTY, accounts_labelled_editor_row_properties[ACCOUNTS_LABELLED_EDITOR_ROW_LABEL_PROPERTY] = g_param_spec_object ("label", "label", "label", gtk_label_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_LABELLED_EDITOR_ROW_VALUE_PROPERTY, accounts_labelled_editor_row_properties[ACCOUNTS_LABELLED_EDITOR_ROW_VALUE_PROPERTY] = g_param_spec_pointer ("value", "value", "value", G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_labelled_editor_row_instance_init (AccountsLabelledEditorRow * self,
                                            gpointer klass)
{
	GtkLabel* _tmp0_;
	self->priv = accounts_labelled_editor_row_get_instance_private (self);
	_tmp0_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp0_);
	self->priv->_label = _tmp0_;
}

static void
accounts_labelled_editor_row_finalize (GObject * obj)
{
	AccountsLabelledEditorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow);
	_g_object_unref0 (self->priv->_label);
	((self->priv->_value == NULL) || (self->priv->v_destroy_func == NULL)) ? NULL : (self->priv->_value = (self->priv->v_destroy_func (self->priv->_value), NULL));
	G_OBJECT_CLASS (accounts_labelled_editor_row_parent_class)->finalize (obj);
}

static GType
accounts_labelled_editor_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsLabelledEditorRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_labelled_editor_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsLabelledEditorRow), 0, (GInstanceInitFunc) accounts_labelled_editor_row_instance_init, NULL };
	GType accounts_labelled_editor_row_type_id;
	accounts_labelled_editor_row_type_id = g_type_register_static (ACCOUNTS_TYPE_EDITOR_ROW, "AccountsLabelledEditorRow", &g_define_type_info, 0);
	AccountsLabelledEditorRow_private_offset = g_type_add_instance_private (accounts_labelled_editor_row_type_id, sizeof (AccountsLabelledEditorRowPrivate));
	return accounts_labelled_editor_row_type_id;
}

GType
accounts_labelled_editor_row_get_type (void)
{
	static volatile gsize accounts_labelled_editor_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_labelled_editor_row_type_id__once)) {
		GType accounts_labelled_editor_row_type_id;
		accounts_labelled_editor_row_type_id = accounts_labelled_editor_row_get_type_once ();
		g_once_init_leave (&accounts_labelled_editor_row_type_id__once, accounts_labelled_editor_row_type_id);
	}
	return accounts_labelled_editor_row_type_id__once;
}

static void
_vala_accounts_labelled_editor_row_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec)
{
	AccountsLabelledEditorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow);
	switch (property_id) {
		case ACCOUNTS_LABELLED_EDITOR_ROW_LABEL_PROPERTY:
		g_value_set_object (value, accounts_labelled_editor_row_get_label (self));
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_VALUE_PROPERTY:
		g_value_set_pointer (value, accounts_labelled_editor_row_get_value (self));
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_TYPE:
		g_value_set_gtype (value, self->priv->panetype_type);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DUP_FUNC:
		g_value_set_pointer (value, self->priv->panetype_dup_func);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->panetype_destroy_func);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_labelled_editor_row_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec)
{
	AccountsLabelledEditorRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow);
	switch (property_id) {
		case ACCOUNTS_LABELLED_EDITOR_ROW_LABEL_PROPERTY:
		accounts_labelled_editor_row_set_label (self, g_value_get_object (value));
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_VALUE_PROPERTY:
		accounts_labelled_editor_row_set_value (self, g_value_get_pointer (value));
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_TYPE:
		self->priv->panetype_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DUP_FUNC:
		self->priv->panetype_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_PANETYPE_DESTROY_FUNC:
		self->priv->panetype_destroy_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_LABELLED_EDITOR_ROW_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_add_row_get_instance_private (AccountsAddRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsAddRow_private_offset);
}

AccountsAddRow*
accounts_add_row_construct (GType object_type,
                            GType panetype_type,
                            GBoxedCopyFunc panetype_dup_func,
                            GDestroyNotify panetype_destroy_func)
{
	AccountsAddRow * self = NULL;
	GtkStyleContext* _tmp0_;
	GtkImage* add_icon = NULL;
	GtkImage* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	self = (AccountsAddRow*) accounts_editor_row_construct (object_type, panetype_type, (GBoxedCopyFunc) panetype_dup_func, (GDestroyNotify) panetype_destroy_func);
	self->priv->panetype_type = panetype_type;
	self->priv->panetype_dup_func = panetype_dup_func;
	self->priv->panetype_destroy_func = panetype_destroy_func;
	_tmp0_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp0_, "geary-add-row");
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("list-add-symbolic", (GtkIconSize) GTK_ICON_SIZE_BUTTON);
	g_object_ref_sink (_tmp1_);
	add_icon = _tmp1_;
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (add_icon, gtk_widget_get_type (), GtkWidget), TRUE);
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (add_icon, gtk_widget_get_type (), GtkWidget));
	_tmp2_ = accounts_editor_row_get_layout (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_EDITOR_ROW, AccountsEditorRow));
	_tmp3_ = _tmp2_;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (add_icon, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (add_icon);
	return self;
}

AccountsAddRow*
accounts_add_row_new (GType panetype_type,
                      GBoxedCopyFunc panetype_dup_func,
                      GDestroyNotify panetype_destroy_func)
{
	return accounts_add_row_construct (ACCOUNTS_TYPE_ADD_ROW, panetype_type, panetype_dup_func, panetype_destroy_func);
}

static void
accounts_add_row_class_init (AccountsAddRowClass * klass,
                             gpointer klass_data)
{
	accounts_add_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsAddRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_add_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_add_row_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ADD_ROW_PANETYPE_TYPE, g_param_spec_gtype ("panetype-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ADD_ROW_PANETYPE_DUP_FUNC, g_param_spec_pointer ("panetype-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ADD_ROW_PANETYPE_DESTROY_FUNC, g_param_spec_pointer ("panetype-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static void
accounts_add_row_instance_init (AccountsAddRow * self,
                                gpointer klass)
{
	self->priv = accounts_add_row_get_instance_private (self);
}

static GType
accounts_add_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsAddRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_add_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsAddRow), 0, (GInstanceInitFunc) accounts_add_row_instance_init, NULL };
	GType accounts_add_row_type_id;
	accounts_add_row_type_id = g_type_register_static (ACCOUNTS_TYPE_EDITOR_ROW, "AccountsAddRow", &g_define_type_info, 0);
	AccountsAddRow_private_offset = g_type_add_instance_private (accounts_add_row_type_id, sizeof (AccountsAddRowPrivate));
	return accounts_add_row_type_id;
}

GType
accounts_add_row_get_type (void)
{
	static volatile gsize accounts_add_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_add_row_type_id__once)) {
		GType accounts_add_row_type_id;
		accounts_add_row_type_id = accounts_add_row_get_type_once ();
		g_once_init_leave (&accounts_add_row_type_id__once, accounts_add_row_type_id);
	}
	return accounts_add_row_type_id__once;
}

static void
_vala_accounts_add_row_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	AccountsAddRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_ADD_ROW, AccountsAddRow);
	switch (property_id) {
		case ACCOUNTS_ADD_ROW_PANETYPE_TYPE:
		g_value_set_gtype (value, self->priv->panetype_type);
		break;
		case ACCOUNTS_ADD_ROW_PANETYPE_DUP_FUNC:
		g_value_set_pointer (value, self->priv->panetype_dup_func);
		break;
		case ACCOUNTS_ADD_ROW_PANETYPE_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->panetype_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_add_row_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	AccountsAddRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_ADD_ROW, AccountsAddRow);
	switch (property_id) {
		case ACCOUNTS_ADD_ROW_PANETYPE_TYPE:
		self->priv->panetype_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_ADD_ROW_PANETYPE_DUP_FUNC:
		self->priv->panetype_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_ADD_ROW_PANETYPE_DESTROY_FUNC:
		self->priv->panetype_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_service_provider_row_get_instance_private (AccountsServiceProviderRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsServiceProviderRow_private_offset);
}

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)
{
	AccountsServiceProviderRow * self = NULL;
	gchar* label = NULL;
	const gchar* _tmp3_;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	gconstpointer _tmp6_;
	gconstpointer _tmp7_;
	GtkStyleContext* _tmp8_;
	g_return_val_if_fail (other_type_label != NULL, NULL);
	label = NULL;
	switch (provider) {
		case GEARY_SERVICE_PROVIDER_GMAIL:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("Gmail"));
			_g_free0 (label);
			label = _tmp0_;
			break;
		}
		case GEARY_SERVICE_PROVIDER_OUTLOOK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("Outlook.com"));
			_g_free0 (label);
			label = _tmp1_;
			break;
		}
		case GEARY_SERVICE_PROVIDER_OTHER:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (other_type_label);
			_g_free0 (label);
			label = _tmp2_;
			break;
		}
		default:
		break;
	}
	_tmp3_ = label;
	_tmp4_ = (GtkLabel*) gtk_label_new (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	self = (AccountsServiceProviderRow*) accounts_labelled_editor_row_construct (object_type, panetype_type, (GBoxedCopyFunc) panetype_dup_func, (GDestroyNotify) panetype_destroy_func, gtk_label_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _ ("Service provider"), _tmp5_);
	self->priv->panetype_type = panetype_type;
	self->priv->panetype_dup_func = panetype_dup_func;
	self->priv->panetype_destroy_func = panetype_destroy_func;
	_g_object_unref0 (_tmp5_);
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), FALSE);
	_tmp6_ = accounts_labelled_editor_row_get_value (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow));
	_tmp7_ = _tmp6_;
	_tmp8_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST ((GtkLabel*) _tmp7_, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp8_, GTK_STYLE_CLASS_DIM_LABEL);
	_g_free0 (label);
	return self;
}

AccountsServiceProviderRow*
accounts_service_provider_row_new (GType panetype_type,
                                   GBoxedCopyFunc panetype_dup_func,
                                   GDestroyNotify panetype_destroy_func,
                                   GearyServiceProvider provider,
                                   const gchar* other_type_label)
{
	return accounts_service_provider_row_construct (ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW, panetype_type, panetype_dup_func, panetype_destroy_func, provider, other_type_label);
}

static void
accounts_service_provider_row_class_init (AccountsServiceProviderRowClass * klass,
                                          gpointer klass_data)
{
	accounts_service_provider_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsServiceProviderRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_service_provider_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_service_provider_row_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_TYPE, g_param_spec_gtype ("panetype-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DUP_FUNC, g_param_spec_pointer ("panetype-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DESTROY_FUNC, g_param_spec_pointer ("panetype-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static void
accounts_service_provider_row_instance_init (AccountsServiceProviderRow * self,
                                             gpointer klass)
{
	self->priv = accounts_service_provider_row_get_instance_private (self);
}

static GType
accounts_service_provider_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsServiceProviderRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_service_provider_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsServiceProviderRow), 0, (GInstanceInitFunc) accounts_service_provider_row_instance_init, NULL };
	GType accounts_service_provider_row_type_id;
	accounts_service_provider_row_type_id = g_type_register_static (ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, "AccountsServiceProviderRow", &g_define_type_info, 0);
	AccountsServiceProviderRow_private_offset = g_type_add_instance_private (accounts_service_provider_row_type_id, sizeof (AccountsServiceProviderRowPrivate));
	return accounts_service_provider_row_type_id;
}

GType
accounts_service_provider_row_get_type (void)
{
	static volatile gsize accounts_service_provider_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_service_provider_row_type_id__once)) {
		GType accounts_service_provider_row_type_id;
		accounts_service_provider_row_type_id = accounts_service_provider_row_get_type_once ();
		g_once_init_leave (&accounts_service_provider_row_type_id__once, accounts_service_provider_row_type_id);
	}
	return accounts_service_provider_row_type_id__once;
}

static void
_vala_accounts_service_provider_row_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	AccountsServiceProviderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW, AccountsServiceProviderRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_TYPE:
		g_value_set_gtype (value, self->priv->panetype_type);
		break;
		case ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DUP_FUNC:
		g_value_set_pointer (value, self->priv->panetype_dup_func);
		break;
		case ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->panetype_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_service_provider_row_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	AccountsServiceProviderRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_PROVIDER_ROW, AccountsServiceProviderRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_TYPE:
		self->priv->panetype_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DUP_FUNC:
		self->priv->panetype_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_SERVICE_PROVIDER_ROW_PANETYPE_DESTROY_FUNC:
		self->priv->panetype_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_account_row_get_instance_private (AccountsAccountRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsAccountRow_private_offset);
}

static void
_accounts_account_row_on_account_changed_geary_account_information_changed (GearyAccountInformation* _sender,
                                                                            gpointer self)
{
	accounts_account_row_on_account_changed ((AccountsAccountRow*) self);
}

GearyAccountInformation*
accounts_account_row_get_account (AccountsAccountRow* self)
{
	GearyAccountInformation* result;
	GearyAccountInformation* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_ACCOUNT_ROW (self), NULL);
	_tmp0_ = self->priv->_account;
	result = _tmp0_;
	return result;
}

static void
accounts_account_row_set_account (AccountsAccountRow* self,
                                  GearyAccountInformation* value)
{
	GearyAccountInformation* old_value;
	g_return_if_fail (ACCOUNTS_IS_ACCOUNT_ROW (self));
	old_value = accounts_account_row_get_account (self);
	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_account_row_properties[ACCOUNTS_ACCOUNT_ROW_ACCOUNT_PROPERTY]);
	}
}

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)
{
	AccountsAccountRow * self = NULL;
	GearyAccountInformation* _tmp0_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (account, GEARY_TYPE_ACCOUNT_INFORMATION), NULL);
	g_return_val_if_fail (label != NULL, NULL);
	self = (AccountsAccountRow*) accounts_labelled_editor_row_construct (object_type, panetype_type, (GBoxedCopyFunc) panetype_dup_func, (GDestroyNotify) panetype_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, label, value);
	self->priv->panetype_type = panetype_type;
	self->priv->panetype_dup_func = panetype_dup_func;
	self->priv->panetype_destroy_func = panetype_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	accounts_account_row_set_account (self, account);
	_tmp0_ = self->priv->_account;
	g_signal_connect_object (_tmp0_, "changed", (GCallback) _accounts_account_row_on_account_changed_geary_account_information_changed, self, 0);
	accounts_labelled_editor_row_set_dim_label (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, AccountsLabelledEditorRow), TRUE);
	return self;
}

static void
accounts_account_row_real_update (AccountsAccountRow* self)
{
	g_critical ("Type `%s' does not implement abstract method `accounts_account_row_update'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
accounts_account_row_update (AccountsAccountRow* self)
{
	AccountsAccountRowClass* _klass_;
	g_return_if_fail (ACCOUNTS_IS_ACCOUNT_ROW (self));
	_klass_ = ACCOUNTS_ACCOUNT_ROW_GET_CLASS (self);
	if (_klass_->update) {
		_klass_->update (self);
	}
}

static void
accounts_account_row_on_account_changed (AccountsAccountRow* self)
{
	g_return_if_fail (ACCOUNTS_IS_ACCOUNT_ROW (self));
	accounts_account_row_update (self);
}

static void
accounts_account_row_class_init (AccountsAccountRowClass * klass,
                                 gpointer klass_data)
{
	accounts_account_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsAccountRow_private_offset);
	((AccountsAccountRowClass *) klass)->update = (void (*) (AccountsAccountRow*)) accounts_account_row_real_update;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_account_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_account_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_account_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ACCOUNT_ROW_PANETYPE_TYPE, g_param_spec_gtype ("panetype-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ACCOUNT_ROW_PANETYPE_DUP_FUNC, g_param_spec_pointer ("panetype-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ACCOUNT_ROW_PANETYPE_DESTROY_FUNC, g_param_spec_pointer ("panetype-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ACCOUNT_ROW_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ACCOUNT_ROW_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ACCOUNT_ROW_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_ACCOUNT_ROW_ACCOUNT_PROPERTY, accounts_account_row_properties[ACCOUNTS_ACCOUNT_ROW_ACCOUNT_PROPERTY] = g_param_spec_object ("account", "account", "account", GEARY_TYPE_ACCOUNT_INFORMATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_account_row_instance_init (AccountsAccountRow * self,
                                    gpointer klass)
{
	self->priv = accounts_account_row_get_instance_private (self);
}

static void
accounts_account_row_finalize (GObject * obj)
{
	AccountsAccountRow * self;
	GearyAccountInformation* _tmp0_;
	guint _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow);
	_tmp0_ = self->priv->_account;
	g_signal_parse_name ("changed", GEARY_TYPE_ACCOUNT_INFORMATION, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _accounts_account_row_on_account_changed_geary_account_information_changed, self);
	_g_object_unref0 (self->priv->_account);
	G_OBJECT_CLASS (accounts_account_row_parent_class)->finalize (obj);
}

static GType
accounts_account_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsAccountRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_account_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsAccountRow), 0, (GInstanceInitFunc) accounts_account_row_instance_init, NULL };
	GType accounts_account_row_type_id;
	accounts_account_row_type_id = g_type_register_static (ACCOUNTS_TYPE_LABELLED_EDITOR_ROW, "AccountsAccountRow", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	AccountsAccountRow_private_offset = g_type_add_instance_private (accounts_account_row_type_id, sizeof (AccountsAccountRowPrivate));
	return accounts_account_row_type_id;
}

GType
accounts_account_row_get_type (void)
{
	static volatile gsize accounts_account_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_account_row_type_id__once)) {
		GType accounts_account_row_type_id;
		accounts_account_row_type_id = accounts_account_row_get_type_once ();
		g_once_init_leave (&accounts_account_row_type_id__once, accounts_account_row_type_id);
	}
	return accounts_account_row_type_id__once;
}

static void
_vala_accounts_account_row_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	AccountsAccountRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow);
	switch (property_id) {
		case ACCOUNTS_ACCOUNT_ROW_ACCOUNT_PROPERTY:
		g_value_set_object (value, accounts_account_row_get_account (self));
		break;
		case ACCOUNTS_ACCOUNT_ROW_PANETYPE_TYPE:
		g_value_set_gtype (value, self->priv->panetype_type);
		break;
		case ACCOUNTS_ACCOUNT_ROW_PANETYPE_DUP_FUNC:
		g_value_set_pointer (value, self->priv->panetype_dup_func);
		break;
		case ACCOUNTS_ACCOUNT_ROW_PANETYPE_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->panetype_destroy_func);
		break;
		case ACCOUNTS_ACCOUNT_ROW_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case ACCOUNTS_ACCOUNT_ROW_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case ACCOUNTS_ACCOUNT_ROW_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_account_row_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	AccountsAccountRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow);
	switch (property_id) {
		case ACCOUNTS_ACCOUNT_ROW_ACCOUNT_PROPERTY:
		accounts_account_row_set_account (self, g_value_get_object (value));
		break;
		case ACCOUNTS_ACCOUNT_ROW_PANETYPE_TYPE:
		self->priv->panetype_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_ACCOUNT_ROW_PANETYPE_DUP_FUNC:
		self->priv->panetype_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_ACCOUNT_ROW_PANETYPE_DESTROY_FUNC:
		self->priv->panetype_destroy_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_ACCOUNT_ROW_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_ACCOUNT_ROW_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_ACCOUNT_ROW_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_service_row_get_instance_private (AccountsServiceRow* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsServiceRow_private_offset);
}

static void
_accounts_service_row_on_notify_g_object_notify (GObject* _sender,
                                                 GParamSpec* pspec,
                                                 gpointer self)
{
	accounts_service_row_on_notify ((AccountsServiceRow*) self);
}

GearyServiceInformation*
accounts_service_row_get_service (AccountsServiceRow* self)
{
	GearyServiceInformation* result;
	GearyServiceInformation* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_SERVICE_ROW (self), NULL);
	_tmp0_ = self->priv->_service;
	result = _tmp0_;
	return result;
}

static void
accounts_service_row_set_service (AccountsServiceRow* self,
                                  GearyServiceInformation* value)
{
	GearyServiceInformation* old_value;
	g_return_if_fail (ACCOUNTS_IS_SERVICE_ROW (self));
	old_value = accounts_service_row_get_service (self);
	if (old_value != value) {
		GearyServiceInformation* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_service);
		self->priv->_service = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_service_row_properties[ACCOUNTS_SERVICE_ROW_SERVICE_PROPERTY]);
	}
}

gboolean
accounts_service_row_get_is_value_editable (AccountsServiceRow* self)
{
	AccountsServiceRowClass* _klass_;
	g_return_val_if_fail (ACCOUNTS_IS_SERVICE_ROW (self), FALSE);
	_klass_ = ACCOUNTS_SERVICE_ROW_GET_CLASS (self);
	if (_klass_->get_is_value_editable) {
		return _klass_->get_is_value_editable (self);
	}
	return FALSE;
}

static gboolean
accounts_service_row_real_get_is_value_editable (AccountsServiceRow* base)
{
	gboolean result;
	AccountsServiceRow* self;
	gboolean _tmp0_ = FALSE;
	GearyAccountInformation* _tmp1_;
	GearyAccountInformation* _tmp2_;
	GearyServiceProvider _tmp3_;
	GearyServiceProvider _tmp4_;
	self = base;
	_tmp1_ = accounts_account_row_get_account (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
	_tmp2_ = _tmp1_;
	_tmp3_ = geary_account_information_get_service_provider (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == GEARY_SERVICE_PROVIDER_OTHER) {
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp5_ = accounts_service_row_get_is_goa_account (self);
		_tmp6_ = _tmp5_;
		_tmp0_ = !_tmp6_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
accounts_service_row_get_is_goa_account (AccountsServiceRow* self)
{
	gboolean result;
	GearyAccountInformation* _tmp0_;
	GearyAccountInformation* _tmp1_;
	GearyCredentialsMediator* _tmp2_;
	GearyCredentialsMediator* _tmp3_;
	g_return_val_if_fail (ACCOUNTS_IS_SERVICE_ROW (self), 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_;
	result = IS_GOA_MEDIATOR (_tmp3_);
	return result;
}

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)
{
	AccountsServiceRow * self = NULL;
	GearyServiceInformation* _tmp0_;
	gboolean is_editable = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkWidget* widget = NULL;
	GtkWidget* _tmp3_;
	gboolean _tmp4_ = FALSE;
	GtkWidget* _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 (service, GEARY_TYPE_SERVICE_INFORMATION), NULL);
	g_return_val_if_fail (label != NULL, NULL);
	self = (AccountsServiceRow*) accounts_account_row_construct (object_type, panetype_type, (GBoxedCopyFunc) panetype_dup_func, (GDestroyNotify) panetype_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, (GDestroyNotify) v_destroy_func, account, label, value);
	self->priv->panetype_type = panetype_type;
	self->priv->panetype_dup_func = panetype_dup_func;
	self->priv->panetype_destroy_func = panetype_destroy_func;
	self->priv->v_type = v_type;
	self->priv->v_dup_func = v_dup_func;
	self->priv->v_destroy_func = v_destroy_func;
	accounts_service_row_set_service (self, service);
	_tmp0_ = self->priv->_service;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), "notify", (GCallback) _accounts_service_row_on_notify_g_object_notify, self, G_CONNECT_AFTER);
	_tmp1_ = accounts_service_row_get_is_value_editable (self);
	_tmp2_ = _tmp1_;
	is_editable = _tmp2_;
	gtk_list_box_row_set_activatable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_list_box_row_get_type (), GtkListBoxRow), is_editable);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (value, gtk_widget_get_type ()) ? ((GtkWidget*) value) : NULL);
	widget = _tmp3_;
	_tmp5_ = widget;
	if (_tmp5_ != NULL) {
		_tmp4_ = !is_editable;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		GtkWidget* _tmp6_;
		_tmp6_ = widget;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_label_get_type ())) {
			GtkWidget* _tmp7_;
			GtkStyleContext* _tmp8_;
			_tmp7_ = widget;
			_tmp8_ = gtk_widget_get_style_context (_tmp7_);
			gtk_style_context_add_class (_tmp8_, GTK_STYLE_CLASS_DIM_LABEL);
		} else {
			GtkWidget* _tmp9_;
			_tmp9_ = widget;
			gtk_widget_set_sensitive (_tmp9_, FALSE);
		}
	}
	_g_object_unref0 (widget);
	return self;
}

static void
accounts_service_row_on_notify (AccountsServiceRow* self)
{
	g_return_if_fail (ACCOUNTS_IS_SERVICE_ROW (self));
	accounts_account_row_update (G_TYPE_CHECK_INSTANCE_CAST (self, ACCOUNTS_TYPE_ACCOUNT_ROW, AccountsAccountRow));
}

static void
accounts_service_row_class_init (AccountsServiceRowClass * klass,
                                 gpointer klass_data)
{
	accounts_service_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsServiceRow_private_offset);
	ACCOUNTS_SERVICE_ROW_CLASS (klass)->get_is_value_editable = (gboolean (*) (AccountsServiceRow*)) accounts_service_row_real_get_is_value_editable;
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_service_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_service_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_service_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_PANETYPE_TYPE, g_param_spec_gtype ("panetype-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_PANETYPE_DUP_FUNC, g_param_spec_pointer ("panetype-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_PANETYPE_DESTROY_FUNC, g_param_spec_pointer ("panetype-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_V_TYPE, g_param_spec_gtype ("v-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_V_DUP_FUNC, g_param_spec_pointer ("v-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_V_DESTROY_FUNC, g_param_spec_pointer ("v-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_SERVICE_PROPERTY, accounts_service_row_properties[ACCOUNTS_SERVICE_ROW_SERVICE_PROPERTY] = g_param_spec_object ("service", "service", "service", GEARY_TYPE_SERVICE_INFORMATION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_IS_VALUE_EDITABLE_PROPERTY, accounts_service_row_properties[ACCOUNTS_SERVICE_ROW_IS_VALUE_EDITABLE_PROPERTY] = g_param_spec_boolean ("is-value-editable", "is-value-editable", "is-value-editable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_SERVICE_ROW_IS_GOA_ACCOUNT_PROPERTY, accounts_service_row_properties[ACCOUNTS_SERVICE_ROW_IS_GOA_ACCOUNT_PROPERTY] = g_param_spec_boolean ("is-goa-account", "is-goa-account", "is-goa-account", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_service_row_instance_init (AccountsServiceRow * self,
                                    gpointer klass)
{
	self->priv = accounts_service_row_get_instance_private (self);
}

static void
accounts_service_row_finalize (GObject * obj)
{
	AccountsServiceRow * self;
	GearyServiceInformation* _tmp0_;
	guint _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow);
	_tmp0_ = self->priv->_service;
	g_signal_parse_name ("notify", G_TYPE_OBJECT, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _accounts_service_row_on_notify_g_object_notify, self);
	_g_object_unref0 (self->priv->_service);
	G_OBJECT_CLASS (accounts_service_row_parent_class)->finalize (obj);
}

static GType
accounts_service_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsServiceRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_service_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsServiceRow), 0, (GInstanceInitFunc) accounts_service_row_instance_init, NULL };
	GType accounts_service_row_type_id;
	accounts_service_row_type_id = g_type_register_static (ACCOUNTS_TYPE_ACCOUNT_ROW, "AccountsServiceRow", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	AccountsServiceRow_private_offset = g_type_add_instance_private (accounts_service_row_type_id, sizeof (AccountsServiceRowPrivate));
	return accounts_service_row_type_id;
}

GType
accounts_service_row_get_type (void)
{
	static volatile gsize accounts_service_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_service_row_type_id__once)) {
		GType accounts_service_row_type_id;
		accounts_service_row_type_id = accounts_service_row_get_type_once ();
		g_once_init_leave (&accounts_service_row_type_id__once, accounts_service_row_type_id);
	}
	return accounts_service_row_type_id__once;
}

static void
_vala_accounts_service_row_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	AccountsServiceRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_ROW_SERVICE_PROPERTY:
		g_value_set_object (value, accounts_service_row_get_service (self));
		break;
		case ACCOUNTS_SERVICE_ROW_IS_VALUE_EDITABLE_PROPERTY:
		g_value_set_boolean (value, accounts_service_row_get_is_value_editable (self));
		break;
		case ACCOUNTS_SERVICE_ROW_IS_GOA_ACCOUNT_PROPERTY:
		g_value_set_boolean (value, accounts_service_row_get_is_goa_account (self));
		break;
		case ACCOUNTS_SERVICE_ROW_PANETYPE_TYPE:
		g_value_set_gtype (value, self->priv->panetype_type);
		break;
		case ACCOUNTS_SERVICE_ROW_PANETYPE_DUP_FUNC:
		g_value_set_pointer (value, self->priv->panetype_dup_func);
		break;
		case ACCOUNTS_SERVICE_ROW_PANETYPE_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->panetype_destroy_func);
		break;
		case ACCOUNTS_SERVICE_ROW_V_TYPE:
		g_value_set_gtype (value, self->priv->v_type);
		break;
		case ACCOUNTS_SERVICE_ROW_V_DUP_FUNC:
		g_value_set_pointer (value, self->priv->v_dup_func);
		break;
		case ACCOUNTS_SERVICE_ROW_V_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->v_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_service_row_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	AccountsServiceRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_SERVICE_ROW, AccountsServiceRow);
	switch (property_id) {
		case ACCOUNTS_SERVICE_ROW_SERVICE_PROPERTY:
		accounts_service_row_set_service (self, g_value_get_object (value));
		break;
		case ACCOUNTS_SERVICE_ROW_PANETYPE_TYPE:
		self->priv->panetype_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_SERVICE_ROW_PANETYPE_DUP_FUNC:
		self->priv->panetype_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_SERVICE_ROW_PANETYPE_DESTROY_FUNC:
		self->priv->panetype_destroy_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_SERVICE_ROW_V_TYPE:
		self->priv->v_type = g_value_get_gtype (value);
		break;
		case ACCOUNTS_SERVICE_ROW_V_DUP_FUNC:
		self->priv->v_dup_func = g_value_get_pointer (value);
		break;
		case ACCOUNTS_SERVICE_ROW_V_DESTROY_FUNC:
		self->priv->v_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

ComponentsValidator*
accounts_validating_row_get_validator (AccountsValidatingRow* self)
{
	AccountsValidatingRowIface* _iface_;
	g_return_val_if_fail (ACCOUNTS_IS_VALIDATING_ROW (self), NULL);
	_iface_ = ACCOUNTS_VALIDATING_ROW_GET_INTERFACE (self);
	if (_iface_->get_validator) {
		return _iface_->get_validator (self);
	}
	return NULL;
}

void
accounts_validating_row_set_validator (AccountsValidatingRow* self,
                                       ComponentsValidator* value)
{
	AccountsValidatingRowIface* _iface_;
	g_return_if_fail (ACCOUNTS_IS_VALIDATING_ROW (self));
	_iface_ = ACCOUNTS_VALIDATING_ROW_GET_INTERFACE (self);
	if (_iface_->set_validator) {
		_iface_->set_validator (self, value);
	}
}

gboolean
accounts_validating_row_get_has_changed (AccountsValidatingRow* self)
{
	AccountsValidatingRowIface* _iface_;
	g_return_val_if_fail (ACCOUNTS_IS_VALIDATING_ROW (self), FALSE);
	_iface_ = ACCOUNTS_VALIDATING_ROW_GET_INTERFACE (self);
	if (_iface_->get_has_changed) {
		return _iface_->get_has_changed (self);
	}
	return FALSE;
}

/**
     * Hooks up signals to the validator.
     *
     * Implementing classes should call this in their constructor
     * after having constructed a validator
     */
static void
_accounts_validating_row_on_validator_changed_components_validator_changed (ComponentsValidator* _sender,
                                                                            gpointer self)
{
	accounts_validating_row_on_validator_changed ((AccountsValidatingRow*) self);
}

static void
_accounts_validating_row_on_validator_check_commit_components_validator_activated (ComponentsValidator* _sender,
                                                                                   gpointer self)
{
	accounts_validating_row_on_validator_check_commit ((AccountsValidatingRow*) self);
}

static void
_accounts_validating_row_on_validator_check_commit_components_validator_focus_lost (ComponentsValidator* _sender,
                                                                                    gpointer self)
{
	accounts_validating_row_on_validator_check_commit ((AccountsValidatingRow*) self);
}

void
accounts_validating_row_setup_validator (AccountsValidatingRow* self)
{
	ComponentsValidator* _tmp0_;
	ComponentsValidator* _tmp1_;
	ComponentsValidator* _tmp2_;
	ComponentsValidator* _tmp3_;
	ComponentsValidator* _tmp4_;
	ComponentsValidator* _tmp5_;
	_tmp0_ = accounts_validating_row_get_validator (self);
	_tmp1_ = _tmp0_;
	g_signal_connect_object (_tmp1_, "changed", (GCallback) _accounts_validating_row_on_validator_changed_components_validator_changed, self, 0);
	_tmp2_ = accounts_validating_row_get_validator (self);
	_tmp3_ = _tmp2_;
	g_signal_connect_object (_tmp3_, "activated", (GCallback) _accounts_validating_row_on_validator_check_commit_components_validator_activated, self, 0);
	_tmp4_ = accounts_validating_row_get_validator (self);
	_tmp5_ = _tmp4_;
	g_signal_connect_object (_tmp5_, "focus-lost", (GCallback) _accounts_validating_row_on_validator_check_commit_components_validator_focus_lost, self, 0);
}

/**
     * Called when the row's value should be stored.
     *
     * This is only called when the row's value has changed, is
     * valid, and the user has activated or changed to a different
     * row.
     */
static void
accounts_validating_row_real_commit (AccountsValidatingRow* self)
{
}

void
accounts_validating_row_commit (AccountsValidatingRow* self)
{
	AccountsValidatingRowIface* _iface_;
	g_return_if_fail (ACCOUNTS_IS_VALIDATING_ROW (self));
	_iface_ = ACCOUNTS_VALIDATING_ROW_GET_INTERFACE (self);
	if (_iface_->commit) {
		_iface_->commit (self);
	}
}

static void
accounts_validating_row_on_validator_changed (AccountsValidatingRow* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	_tmp0_ = accounts_validating_row_get_has_changed (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		g_signal_emit (self, accounts_validating_row_signals[ACCOUNTS_VALIDATING_ROW_CHANGED_SIGNAL], 0);
	}
}

static void
accounts_validating_row_on_validator_check_commit (AccountsValidatingRow* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	_tmp0_ = accounts_validating_row_get_has_changed (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		accounts_validating_row_commit (self);
		g_signal_emit (self, accounts_validating_row_signals[ACCOUNTS_VALIDATING_ROW_COMMITTED_SIGNAL], 0);
	}
}

static void
accounts_validating_row_default_init (AccountsValidatingRowIface * iface,
                                      gpointer iface_data)
{
	/** The row's validator */
	g_object_interface_install_property (iface, g_param_spec_object ("validator", "validator", "validator", COMPONENTS_TYPE_VALIDATOR, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** Determines if the row's value has actually changed. */
	g_object_interface_install_property (iface, g_param_spec_boolean ("has-changed", "has-changed", "has-changed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Fired when validated and the value has actually changed. */
	accounts_validating_row_signals[ACCOUNTS_VALIDATING_ROW_CHANGED_SIGNAL] = g_signal_new ("changed", ACCOUNTS_TYPE_VALIDATING_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/** Fired when validated and the value has actually changed. */
	accounts_validating_row_signals[ACCOUNTS_VALIDATING_ROW_COMMITTED_SIGNAL] = g_signal_new ("committed", ACCOUNTS_TYPE_VALIDATING_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	iface->commit = accounts_validating_row_real_commit;
}

/** Interface for rows that use a validator for editable values. */
static GType
accounts_validating_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsValidatingRowIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_validating_row_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType accounts_validating_row_type_id;
	accounts_validating_row_type_id = g_type_register_static (G_TYPE_INTERFACE, "AccountsValidatingRow", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (accounts_validating_row_type_id, ACCOUNTS_TYPE_EDITOR_ROW);
	return accounts_validating_row_type_id;
}

GType
accounts_validating_row_get_type (void)
{
	static volatile gsize accounts_validating_row_type_id__once = 0;
	if (g_once_init_enter (&accounts_validating_row_type_id__once)) {
		GType accounts_validating_row_type_id;
		accounts_validating_row_type_id = accounts_validating_row_get_type_once ();
		g_once_init_leave (&accounts_validating_row_type_id__once, accounts_validating_row_type_id);
	}
	return accounts_validating_row_type_id__once;
}

static inline gpointer
accounts_tls_combo_box_get_instance_private (AccountsTlsComboBox* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsTlsComboBox_private_offset);
}

const gchar*
accounts_tls_combo_box_get_label (AccountsTlsComboBox* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_TLS_COMBO_BOX (self), NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

static void
accounts_tls_combo_box_set_label (AccountsTlsComboBox* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (ACCOUNTS_IS_TLS_COMBO_BOX (self));
	old_value = accounts_tls_combo_box_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_tls_combo_box_properties[ACCOUNTS_TLS_COMBO_BOX_LABEL_PROPERTY]);
	}
}

GearyTlsNegotiationMethod
accounts_tls_combo_box_get_method (AccountsTlsComboBox* self)
{
	GearyTlsNegotiationMethod result;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (ACCOUNTS_IS_TLS_COMBO_BOX (self), 0);
	{
		GearyTlsNegotiationMethod _tmp0_ = 0;
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = gtk_combo_box_get_active_id (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox));
		_tmp2_ = _tmp1_;
		_tmp0_ = geary_tls_negotiation_method_for_value (_tmp2_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		result = _tmp0_;
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		result = GEARY_TLS_NEGOTIATION_METHOD_TRANSPORT;
		return result;
	}
	__finally0:
	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 0;
}

void
accounts_tls_combo_box_set_method (AccountsTlsComboBox* self,
                                   GearyTlsNegotiationMethod value)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_TLS_COMBO_BOX (self));
	_tmp0_ = geary_tls_negotiation_method_to_value (value);
	_tmp1_ = _tmp0_;
	gtk_combo_box_set_active_id (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox), _tmp1_);
	_g_free0 (_tmp1_);
	g_object_notify_by_pspec ((GObject *) self, accounts_tls_combo_box_properties[ACCOUNTS_TLS_COMBO_BOX_METHOD_PROPERTY]);
}

AccountsTlsComboBox*
accounts_tls_combo_box_construct (GType object_type)
{
	AccountsTlsComboBox * self = NULL;
	GtkListStore* store = NULL;
	GtkListStore* _tmp0_;
	GtkTreeIter iter = {0};
	GtkTreeIter _tmp1_ = {0};
	GtkTreeIter _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	GtkTreeIter _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkTreeIter _tmp9_ = {0};
	GtkTreeIter _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkCellRendererText* text_renderer = NULL;
	GtkCellRendererText* _tmp13_;
	GtkCellRendererPixbuf* icon_renderer = NULL;
	GtkCellRendererPixbuf* _tmp14_;
	self = (AccountsTlsComboBox*) g_object_new (object_type, NULL);
	accounts_tls_combo_box_set_label (self, _ ("Connection security"));
	_tmp0_ = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, -1);
	store = _tmp0_;
	gtk_list_store_append (store, &_tmp1_);
	iter = _tmp1_;
	_tmp2_ = iter;
	_tmp3_ = geary_tls_negotiation_method_to_value (GEARY_TLS_NEGOTIATION_METHOD_NONE);
	_tmp4_ = _tmp3_;
	gtk_list_store_set (store, &_tmp2_, 0, _tmp4_, 1, ACCOUNTS_TLS_COMBO_BOX_INSECURE_ICON, 2, _ ("None"), -1);
	_g_free0 (_tmp4_);
	gtk_list_store_append (store, &_tmp5_);
	iter = _tmp5_;
	_tmp6_ = iter;
	_tmp7_ = geary_tls_negotiation_method_to_value (GEARY_TLS_NEGOTIATION_METHOD_START_TLS);
	_tmp8_ = _tmp7_;
	gtk_list_store_set (store, &_tmp6_, 0, _tmp8_, 1, ACCOUNTS_TLS_COMBO_BOX_SECURE_ICON, 2, _ ("StartTLS"), -1);
	_g_free0 (_tmp8_);
	gtk_list_store_append (store, &_tmp9_);
	iter = _tmp9_;
	_tmp10_ = iter;
	_tmp11_ = geary_tls_negotiation_method_to_value (GEARY_TLS_NEGOTIATION_METHOD_TRANSPORT);
	_tmp12_ = _tmp11_;
	gtk_list_store_set (store, &_tmp10_, 0, _tmp12_, 1, ACCOUNTS_TLS_COMBO_BOX_SECURE_ICON, 2, _ ("TLS"), -1);
	_g_free0 (_tmp12_);
	gtk_combo_box_set_model (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox), G_TYPE_CHECK_INSTANCE_CAST (store, gtk_tree_model_get_type (), GtkTreeModel));
	gtk_combo_box_set_id_column (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp13_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp13_);
	text_renderer = _tmp13_;
	g_object_set (text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
	gtk_cell_layout_pack_start (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (text_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), TRUE);
	gtk_cell_layout_add_attribute (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (text_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), "text", 2);
	_tmp14_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
	g_object_ref_sink (_tmp14_);
	icon_renderer = _tmp14_;
	gtk_cell_layout_pack_start (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (icon_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), TRUE);
	gtk_cell_layout_add_attribute (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (icon_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), "icon_name", 1);
	_g_object_unref0 (icon_renderer);
	_g_object_unref0 (text_renderer);
	_g_object_unref0 (store);
	return self;
}

AccountsTlsComboBox*
accounts_tls_combo_box_new (void)
{
	return accounts_tls_combo_box_construct (ACCOUNTS_TYPE_TLS_COMBO_BOX);
}

static void
accounts_tls_combo_box_class_init (AccountsTlsComboBoxClass * klass,
                                   gpointer klass_data)
{
	accounts_tls_combo_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsTlsComboBox_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_tls_combo_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_tls_combo_box_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_tls_combo_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_TLS_COMBO_BOX_LABEL_PROPERTY, accounts_tls_combo_box_properties[ACCOUNTS_TLS_COMBO_BOX_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_TLS_COMBO_BOX_METHOD_PROPERTY, accounts_tls_combo_box_properties[ACCOUNTS_TLS_COMBO_BOX_METHOD_PROPERTY] = g_param_spec_enum ("method", "method", "method", GEARY_TYPE_TLS_NEGOTIATION_METHOD, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
accounts_tls_combo_box_instance_init (AccountsTlsComboBox * self,
                                      gpointer klass)
{
	gchar* _tmp0_;
	self->priv = accounts_tls_combo_box_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_label = _tmp0_;
}

static void
accounts_tls_combo_box_finalize (GObject * obj)
{
	AccountsTlsComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_TLS_COMBO_BOX, AccountsTlsComboBox);
	_g_free0 (self->priv->_label);
	G_OBJECT_CLASS (accounts_tls_combo_box_parent_class)->finalize (obj);
}

static GType
accounts_tls_combo_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsTlsComboBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_tls_combo_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsTlsComboBox), 0, (GInstanceInitFunc) accounts_tls_combo_box_instance_init, NULL };
	GType accounts_tls_combo_box_type_id;
	accounts_tls_combo_box_type_id = g_type_register_static (gtk_combo_box_get_type (), "AccountsTlsComboBox", &g_define_type_info, 0);
	AccountsTlsComboBox_private_offset = g_type_add_instance_private (accounts_tls_combo_box_type_id, sizeof (AccountsTlsComboBoxPrivate));
	return accounts_tls_combo_box_type_id;
}

GType
accounts_tls_combo_box_get_type (void)
{
	static volatile gsize accounts_tls_combo_box_type_id__once = 0;
	if (g_once_init_enter (&accounts_tls_combo_box_type_id__once)) {
		GType accounts_tls_combo_box_type_id;
		accounts_tls_combo_box_type_id = accounts_tls_combo_box_get_type_once ();
		g_once_init_leave (&accounts_tls_combo_box_type_id__once, accounts_tls_combo_box_type_id);
	}
	return accounts_tls_combo_box_type_id__once;
}

static void
_vala_accounts_tls_combo_box_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	AccountsTlsComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_TLS_COMBO_BOX, AccountsTlsComboBox);
	switch (property_id) {
		case ACCOUNTS_TLS_COMBO_BOX_LABEL_PROPERTY:
		g_value_set_string (value, accounts_tls_combo_box_get_label (self));
		break;
		case ACCOUNTS_TLS_COMBO_BOX_METHOD_PROPERTY:
		g_value_set_enum (value, accounts_tls_combo_box_get_method (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_tls_combo_box_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	AccountsTlsComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_TLS_COMBO_BOX, AccountsTlsComboBox);
	switch (property_id) {
		case ACCOUNTS_TLS_COMBO_BOX_LABEL_PROPERTY:
		accounts_tls_combo_box_set_label (self, g_value_get_string (value));
		break;
		case ACCOUNTS_TLS_COMBO_BOX_METHOD_PROPERTY:
		accounts_tls_combo_box_set_method (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_outgoing_auth_combo_box_get_instance_private (AccountsOutgoingAuthComboBox* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsOutgoingAuthComboBox_private_offset);
}

const gchar*
accounts_outgoing_auth_combo_box_get_label (AccountsOutgoingAuthComboBox* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_OUTGOING_AUTH_COMBO_BOX (self), NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

static void
accounts_outgoing_auth_combo_box_set_label (AccountsOutgoingAuthComboBox* self,
                                            const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (ACCOUNTS_IS_OUTGOING_AUTH_COMBO_BOX (self));
	old_value = accounts_outgoing_auth_combo_box_get_label (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_outgoing_auth_combo_box_properties[ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_LABEL_PROPERTY]);
	}
}

GearyCredentialsRequirement
accounts_outgoing_auth_combo_box_get_source (AccountsOutgoingAuthComboBox* self)
{
	GearyCredentialsRequirement result;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (ACCOUNTS_IS_OUTGOING_AUTH_COMBO_BOX (self), 0);
	{
		GearyCredentialsRequirement _tmp0_ = 0;
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = gtk_combo_box_get_active_id (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox));
		_tmp2_ = _tmp1_;
		_tmp0_ = geary_credentials_requirement_for_value (_tmp2_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		result = _tmp0_;
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		result = GEARY_CREDENTIALS_REQUIREMENT_USE_INCOMING;
		return result;
	}
	__finally0:
	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 0;
}

void
accounts_outgoing_auth_combo_box_set_source (AccountsOutgoingAuthComboBox* self,
                                             GearyCredentialsRequirement value)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (ACCOUNTS_IS_OUTGOING_AUTH_COMBO_BOX (self));
	_tmp0_ = geary_credentials_requirement_to_value (value);
	_tmp1_ = _tmp0_;
	gtk_combo_box_set_active_id (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox), _tmp1_);
	_g_free0 (_tmp1_);
	g_object_notify_by_pspec ((GObject *) self, accounts_outgoing_auth_combo_box_properties[ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_SOURCE_PROPERTY]);
}

AccountsOutgoingAuthComboBox*
accounts_outgoing_auth_combo_box_construct (GType object_type)
{
	AccountsOutgoingAuthComboBox * self = NULL;
	GtkListStore* store = NULL;
	GtkListStore* _tmp0_;
	GtkTreeIter iter = {0};
	GtkTreeIter _tmp1_ = {0};
	GtkTreeIter _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	GtkTreeIter _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkTreeIter _tmp9_ = {0};
	GtkTreeIter _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkCellRendererText* text_renderer = NULL;
	GtkCellRendererText* _tmp13_;
	self = (AccountsOutgoingAuthComboBox*) g_object_new (object_type, NULL);
	accounts_outgoing_auth_combo_box_set_label (self, _ ("Login"));
	_tmp0_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1);
	store = _tmp0_;
	gtk_list_store_append (store, &_tmp1_);
	iter = _tmp1_;
	_tmp2_ = iter;
	_tmp3_ = geary_credentials_requirement_to_value (GEARY_CREDENTIALS_REQUIREMENT_NONE);
	_tmp4_ = _tmp3_;
	gtk_list_store_set (store, &_tmp2_, 0, _tmp4_, 1, _ ("No login needed"), -1);
	_g_free0 (_tmp4_);
	gtk_list_store_append (store, &_tmp5_);
	iter = _tmp5_;
	_tmp6_ = iter;
	_tmp7_ = geary_credentials_requirement_to_value (GEARY_CREDENTIALS_REQUIREMENT_USE_INCOMING);
	_tmp8_ = _tmp7_;
	gtk_list_store_set (store, &_tmp6_, 0, _tmp8_, 1, _ ("Use same login as receiving"), -1);
	_g_free0 (_tmp8_);
	gtk_list_store_append (store, &_tmp9_);
	iter = _tmp9_;
	_tmp10_ = iter;
	_tmp11_ = geary_credentials_requirement_to_value (GEARY_CREDENTIALS_REQUIREMENT_CUSTOM);
	_tmp12_ = _tmp11_;
	gtk_list_store_set (store, &_tmp10_, 0, _tmp12_, 1, _ ("Use a different login"), -1);
	_g_free0 (_tmp12_);
	gtk_combo_box_set_model (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox), G_TYPE_CHECK_INSTANCE_CAST (store, gtk_tree_model_get_type (), GtkTreeModel));
	gtk_combo_box_set_id_column (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_combo_box_get_type (), GtkComboBox), 0);
	_tmp13_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp13_);
	text_renderer = _tmp13_;
	g_object_set (text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
	gtk_cell_layout_pack_start (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (text_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), TRUE);
	gtk_cell_layout_add_attribute (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_cell_layout_get_type (), GtkCellLayout), G_TYPE_CHECK_INSTANCE_CAST (text_renderer, gtk_cell_renderer_get_type (), GtkCellRenderer), "text", 1);
	_g_object_unref0 (text_renderer);
	_g_object_unref0 (store);
	return self;
}

AccountsOutgoingAuthComboBox*
accounts_outgoing_auth_combo_box_new (void)
{
	return accounts_outgoing_auth_combo_box_construct (ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX);
}

static void
accounts_outgoing_auth_combo_box_class_init (AccountsOutgoingAuthComboBoxClass * klass,
                                             gpointer klass_data)
{
	accounts_outgoing_auth_combo_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsOutgoingAuthComboBox_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_outgoing_auth_combo_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_outgoing_auth_combo_box_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_outgoing_auth_combo_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_LABEL_PROPERTY, accounts_outgoing_auth_combo_box_properties[ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_LABEL_PROPERTY] = g_param_spec_string ("label", "label", "label", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_SOURCE_PROPERTY, accounts_outgoing_auth_combo_box_properties[ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_SOURCE_PROPERTY] = g_param_spec_enum ("source", "source", "source", GEARY_CREDENTIALS_TYPE_REQUIREMENT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
accounts_outgoing_auth_combo_box_instance_init (AccountsOutgoingAuthComboBox * self,
                                                gpointer klass)
{
	self->priv = accounts_outgoing_auth_combo_box_get_instance_private (self);
}

static void
accounts_outgoing_auth_combo_box_finalize (GObject * obj)
{
	AccountsOutgoingAuthComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, AccountsOutgoingAuthComboBox);
	_g_free0 (self->priv->_label);
	G_OBJECT_CLASS (accounts_outgoing_auth_combo_box_parent_class)->finalize (obj);
}

static GType
accounts_outgoing_auth_combo_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsOutgoingAuthComboBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_outgoing_auth_combo_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsOutgoingAuthComboBox), 0, (GInstanceInitFunc) accounts_outgoing_auth_combo_box_instance_init, NULL };
	GType accounts_outgoing_auth_combo_box_type_id;
	accounts_outgoing_auth_combo_box_type_id = g_type_register_static (gtk_combo_box_get_type (), "AccountsOutgoingAuthComboBox", &g_define_type_info, 0);
	AccountsOutgoingAuthComboBox_private_offset = g_type_add_instance_private (accounts_outgoing_auth_combo_box_type_id, sizeof (AccountsOutgoingAuthComboBoxPrivate));
	return accounts_outgoing_auth_combo_box_type_id;
}

GType
accounts_outgoing_auth_combo_box_get_type (void)
{
	static volatile gsize accounts_outgoing_auth_combo_box_type_id__once = 0;
	if (g_once_init_enter (&accounts_outgoing_auth_combo_box_type_id__once)) {
		GType accounts_outgoing_auth_combo_box_type_id;
		accounts_outgoing_auth_combo_box_type_id = accounts_outgoing_auth_combo_box_get_type_once ();
		g_once_init_leave (&accounts_outgoing_auth_combo_box_type_id__once, accounts_outgoing_auth_combo_box_type_id);
	}
	return accounts_outgoing_auth_combo_box_type_id__once;
}

static void
_vala_accounts_outgoing_auth_combo_box_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	AccountsOutgoingAuthComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, AccountsOutgoingAuthComboBox);
	switch (property_id) {
		case ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_LABEL_PROPERTY:
		g_value_set_string (value, accounts_outgoing_auth_combo_box_get_label (self));
		break;
		case ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_SOURCE_PROPERTY:
		g_value_set_enum (value, accounts_outgoing_auth_combo_box_get_source (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_outgoing_auth_combo_box_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec)
{
	AccountsOutgoingAuthComboBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_OUTGOING_AUTH_COMBO_BOX, AccountsOutgoingAuthComboBox);
	switch (property_id) {
		case ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_LABEL_PROPERTY:
		accounts_outgoing_auth_combo_box_set_label (self, g_value_get_string (value));
		break;
		case ACCOUNTS_OUTGOING_AUTH_COMBO_BOX_SOURCE_PROPERTY:
		accounts_outgoing_auth_combo_box_set_source (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
accounts_editor_popover_get_instance_private (AccountsEditorPopover* self)
{
	return G_STRUCT_MEMBER_P (self, AccountsEditorPopover_private_offset);
}

static void
_accounts_editor_popover_on_closed_gtk_popover_closed (GtkPopover* _sender,
                                                       gpointer self)
{
	accounts_editor_popover_on_closed ((AccountsEditorPopover*) self);
}

GtkGrid*
accounts_editor_popover_get_layout (AccountsEditorPopover* self)
{
	GtkGrid* result;
	GtkGrid* _tmp0_;
	g_return_val_if_fail (ACCOUNTS_IS_EDITOR_POPOVER (self), NULL);
	_tmp0_ = self->priv->_layout;
	result = _tmp0_;
	return result;
}

static void
accounts_editor_popover_set_layout (AccountsEditorPopover* self,
                                    GtkGrid* value)
{
	GtkGrid* old_value;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_POPOVER (self));
	old_value = accounts_editor_popover_get_layout (self);
	if (old_value != value) {
		GtkGrid* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_layout);
		self->priv->_layout = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, accounts_editor_popover_properties[ACCOUNTS_EDITOR_POPOVER_LAYOUT_PROPERTY]);
	}
}

AccountsEditorPopover*
accounts_editor_popover_construct (GType object_type)
{
	AccountsEditorPopover * self = NULL;
	GtkStyleContext* _tmp0_;
	GtkGrid* _tmp1_;
	GtkGrid* _tmp2_;
	GtkGrid* _tmp3_;
	GtkGrid* _tmp4_;
	GtkGrid* _tmp5_;
	self = (AccountsEditorPopover*) g_object_new (object_type, NULL);
	_tmp0_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp0_, "geary-editor");
	_tmp1_ = self->priv->_layout;
	gtk_orientable_set_orientation (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_orientable_get_type (), GtkOrientable), GTK_ORIENTATION_VERTICAL);
	_tmp2_ = self->priv->_layout;
	gtk_grid_set_row_spacing (_tmp2_, (guint) 6);
	_tmp3_ = self->priv->_layout;
	gtk_grid_set_column_spacing (_tmp3_, (guint) 12);
	_tmp4_ = self->priv->_layout;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
	_tmp5_ = self->priv->_layout;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_popover_get_type (), GtkPopover), "closed", (GCallback) _accounts_editor_popover_on_closed_gtk_popover_closed, self, G_CONNECT_AFTER);
	return self;
}

AccountsEditorPopover*
accounts_editor_popover_new (void)
{
	return accounts_editor_popover_construct (ACCOUNTS_TYPE_EDITOR_POPOVER);
}

/** {@inheritDoc} */
void
accounts_editor_popover_popup (AccountsEditorPopover* self)
{
	GtkWidget* target = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkAllocation content_area = {0};
	GtkWidget* _tmp2_;
	GtkAllocation _tmp3_ = {0};
	GtkStyleContext* style = NULL;
	GtkWidget* _tmp4_;
	GtkStyleContext* _tmp5_;
	GtkStyleContext* _tmp6_;
	GtkStateFlags flags = 0U;
	GtkStyleContext* _tmp7_;
	GtkBorder margin = {0};
	GtkStyleContext* _tmp8_;
	GtkBorder _tmp9_ = {0};
	GtkBorder _tmp10_;
	GtkBorder _tmp11_;
	GtkAllocation _tmp12_;
	GtkBorder _tmp13_;
	GtkAllocation _tmp14_;
	GtkBorder _tmp15_;
	GtkAllocation _tmp16_;
	GtkWidget* _tmp17_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_POPOVER (self));
	_tmp0_ = gtk_popover_get_relative_to (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_popover_get_type (), GtkPopover));
	_tmp1_ = _g_object_ref0 (_tmp0_);
	target = _tmp1_;
	_tmp2_ = target;
	gtk_widget_get_allocation (_tmp2_, &_tmp3_);
	content_area = _tmp3_;
	_tmp4_ = target;
	_tmp5_ = gtk_widget_get_style_context (_tmp4_);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	style = _tmp6_;
	_tmp7_ = style;
	flags = gtk_style_context_get_state (_tmp7_);
	_tmp8_ = style;
	gtk_style_context_get_margin (_tmp8_, flags, &_tmp9_);
	margin = _tmp9_;
	_tmp10_ = margin;
	content_area.x = (gint) _tmp10_.left;
	_tmp11_ = margin;
	content_area.y = (gint) _tmp11_.bottom;
	_tmp12_ = content_area;
	_tmp13_ = margin;
	content_area.width = content_area.width - (_tmp12_.x + _tmp13_.right);
	_tmp14_ = content_area;
	_tmp15_ = margin;
	content_area.height = content_area.height - (_tmp14_.y + _tmp15_.top);
	_tmp16_ = content_area;
	gtk_popover_set_pointing_to (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_popover_get_type (), GtkPopover), &_tmp16_);
	gtk_popover_popup (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_popover_get_type (), GtkPopover));
	_tmp17_ = self->popup_focus;
	if (_tmp17_ != NULL) {
		GtkWidget* _tmp18_;
		_tmp18_ = self->popup_focus;
		gtk_widget_grab_focus (_tmp18_);
	}
	_g_object_unref0 (style);
	_g_object_unref0 (target);
}

void
accounts_editor_popover_add_labelled_row (AccountsEditorPopover* self,
                                          const gchar* label,
                                          GtkWidget* value)
{
	GtkLabel* label_widget = NULL;
	GtkLabel* _tmp0_;
	GtkStyleContext* _tmp1_;
	GtkGrid* _tmp2_;
	GtkGrid* _tmp3_;
	g_return_if_fail (ACCOUNTS_IS_EDITOR_POPOVER (self));
	g_return_if_fail (label != NULL);
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (value, gtk_widget_get_type ()));
	_tmp0_ = (GtkLabel*) gtk_label_new (label);
	g_object_ref_sink (_tmp0_);
	label_widget = _tmp0_;
	_tmp1_ = gtk_widget_get_style_context (G_TYPE_CHECK_INSTANCE_CAST (label_widget, gtk_widget_get_type (), GtkWidget));
	gtk_style_context_add_class (_tmp1_, GTK_STYLE_CLASS_DIM_LABEL);
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (label_widget, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_END);
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (label_widget, gtk_widget_get_type (), GtkWidget));
	_tmp2_ = self->priv->_layout;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (label_widget, gtk_widget_get_type (), GtkWidget));
	_tmp3_ = self->priv->_layout;
	gtk_grid_attach_next_to (_tmp3_, value, G_TYPE_CHECK_INSTANCE_CAST (label_widget, gtk_widget_get_type (), GtkWidget), GTK_POS_RIGHT, 1, 1);
	_g_object_unref0 (label_widget);
}

static void
accounts_editor_popover_on_closed (AccountsEditorPopover* self)
{
	g_return_if_fail (ACCOUNTS_IS_EDITOR_POPOVER (self));
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
}

static void
accounts_editor_popover_class_init (AccountsEditorPopoverClass * klass,
                                    gpointer klass_data)
{
	accounts_editor_popover_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AccountsEditorPopover_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_accounts_editor_popover_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_accounts_editor_popover_set_property;
	G_OBJECT_CLASS (klass)->finalize = accounts_editor_popover_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ACCOUNTS_EDITOR_POPOVER_LAYOUT_PROPERTY, accounts_editor_popover_properties[ACCOUNTS_EDITOR_POPOVER_LAYOUT_PROPERTY] = g_param_spec_object ("layout", "layout", "layout", gtk_grid_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
accounts_editor_popover_instance_init (AccountsEditorPopover * self,
                                       gpointer klass)
{
	GtkGrid* _tmp0_;
	self->priv = accounts_editor_popover_get_instance_private (self);
	_tmp0_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp0_);
	self->priv->_layout = _tmp0_;
	self->popup_focus = NULL;
}

static void
accounts_editor_popover_finalize (GObject * obj)
{
	AccountsEditorPopover * self;
	guint _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ACCOUNTS_TYPE_EDITOR_POPOVER, AccountsEditorPopover);
	g_signal_parse_name ("closed", gtk_popover_get_type (), &_tmp0_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_popover_get_type (), GtkPopover), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _accounts_editor_popover_on_closed_gtk_popover_closed, self);
	_g_object_unref0 (self->priv->_layout);
	_g_object_unref0 (self->popup_focus);
	G_OBJECT_CLASS (accounts_editor_popover_parent_class)->finalize (obj);
}

/**
 * Displaying and manages validation of popover-based forms.
 */
static GType
accounts_editor_popover_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AccountsEditorPopoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accounts_editor_popover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AccountsEditorPopover), 0, (GInstanceInitFunc) accounts_editor_popover_instance_init, NULL };
	GType accounts_editor_popover_type_id;
	accounts_editor_popover_type_id = g_type_register_static (gtk_popover_get_type (), "AccountsEditorPopover", &g_define_type_info, 0);
	AccountsEditorPopover_private_offset = g_type_add_instance_private (accounts_editor_popover_type_id, sizeof (AccountsEditorPopoverPrivate));
	return accounts_editor_popover_type_id;
}

GType
accounts_editor_popover_get_type (void)
{
	static volatile gsize accounts_editor_popover_type_id__once = 0;
	if (g_once_init_enter (&accounts_editor_popover_type_id__once)) {
		GType accounts_editor_popover_type_id;
		accounts_editor_popover_type_id = accounts_editor_popover_get_type_once ();
		g_once_init_leave (&accounts_editor_popover_type_id__once, accounts_editor_popover_type_id);
	}
	return accounts_editor_popover_type_id__once;
}

static void
_vala_accounts_editor_popover_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	AccountsEditorPopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_POPOVER, AccountsEditorPopover);
	switch (property_id) {
		case ACCOUNTS_EDITOR_POPOVER_LAYOUT_PROPERTY:
		g_value_set_object (value, accounts_editor_popover_get_layout (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_accounts_editor_popover_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	AccountsEditorPopover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ACCOUNTS_TYPE_EDITOR_POPOVER, AccountsEditorPopover);
	switch (property_id) {
		case ACCOUNTS_EDITOR_POPOVER_LAYOUT_PROPERTY:
		accounts_editor_popover_set_layout (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

