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

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <glib-object.h>
#include "shotwell-plugin-dev-1.0.h"
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>

#define DATA_IMPORTS_UI_NO_PLUGINS_ENABLED_MESSAGE _ ("You do not have any data imports plugins enabled.\n" \
"\n" \
"In order to use the Import From Application functionality, you need to" \
" have at least one data imports plugin enabled. Plugins can be enabled" \
" in the Preferences dialog.")
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_LARGE_WINDOW_WIDTH 860
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_LARGE_WINDOW_HEIGHT 688
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_COLOSSAL_WINDOW_WIDTH 1024
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_COLOSSAL_WINDOW_HEIGHT 688
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_WINDOW_WIDTH 600
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_WINDOW_HEIGHT 510
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_WIDTH 16
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_HEIGHT 100
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_CONTENT_LABEL_WIDTH 500
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_ACTION_BUTTON_WIDTH 128
#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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE (data_imports_ui_concrete_dialog_pane_get_type ())
#define DATA_IMPORTS_UI_CONCRETE_DIALOG_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPane))
#define DATA_IMPORTS_UI_CONCRETE_DIALOG_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPaneClass))
#define DATA_IMPORTS_UI_IS_CONCRETE_DIALOG_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE))
#define DATA_IMPORTS_UI_IS_CONCRETE_DIALOG_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE))
#define DATA_IMPORTS_UI_CONCRETE_DIALOG_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPaneClass))

typedef struct _DataImportsUIConcreteDialogPane DataImportsUIConcreteDialogPane;
typedef struct _DataImportsUIConcreteDialogPaneClass DataImportsUIConcreteDialogPaneClass;
typedef struct _DataImportsUIConcreteDialogPanePrivate DataImportsUIConcreteDialogPanePrivate;
enum  {
	DATA_IMPORTS_UI_CONCRETE_DIALOG_PANE_0_PROPERTY,
	DATA_IMPORTS_UI_CONCRETE_DIALOG_PANE_NUM_PROPERTIES
};
static GParamSpec* data_imports_ui_concrete_dialog_pane_properties[DATA_IMPORTS_UI_CONCRETE_DIALOG_PANE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE (data_imports_ui_static_message_pane_get_type ())
#define DATA_IMPORTS_UI_STATIC_MESSAGE_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE, DataImportsUIStaticMessagePane))
#define DATA_IMPORTS_UI_STATIC_MESSAGE_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE, DataImportsUIStaticMessagePaneClass))
#define DATA_IMPORTS_UI_IS_STATIC_MESSAGE_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE))
#define DATA_IMPORTS_UI_IS_STATIC_MESSAGE_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE))
#define DATA_IMPORTS_UI_STATIC_MESSAGE_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE, DataImportsUIStaticMessagePaneClass))

typedef struct _DataImportsUIStaticMessagePane DataImportsUIStaticMessagePane;
typedef struct _DataImportsUIStaticMessagePaneClass DataImportsUIStaticMessagePaneClass;
typedef struct _DataImportsUIStaticMessagePanePrivate DataImportsUIStaticMessagePanePrivate;
enum  {
	DATA_IMPORTS_UI_STATIC_MESSAGE_PANE_0_PROPERTY,
	DATA_IMPORTS_UI_STATIC_MESSAGE_PANE_NUM_PROPERTIES
};
static GParamSpec* data_imports_ui_static_message_pane_properties[DATA_IMPORTS_UI_STATIC_MESSAGE_PANE_NUM_PROPERTIES];

#define DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE (data_imports_ui_library_selection_pane_get_type ())
#define DATA_IMPORTS_UI_LIBRARY_SELECTION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE, DataImportsUILibrarySelectionPane))
#define DATA_IMPORTS_UI_LIBRARY_SELECTION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE, DataImportsUILibrarySelectionPaneClass))
#define DATA_IMPORTS_UI_IS_LIBRARY_SELECTION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE))
#define DATA_IMPORTS_UI_IS_LIBRARY_SELECTION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE))
#define DATA_IMPORTS_UI_LIBRARY_SELECTION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE, DataImportsUILibrarySelectionPaneClass))

typedef struct _DataImportsUILibrarySelectionPane DataImportsUILibrarySelectionPane;
typedef struct _DataImportsUILibrarySelectionPaneClass DataImportsUILibrarySelectionPaneClass;
typedef struct _DataImportsUILibrarySelectionPanePrivate DataImportsUILibrarySelectionPanePrivate;
enum  {
	DATA_IMPORTS_UI_LIBRARY_SELECTION_PANE_0_PROPERTY,
	DATA_IMPORTS_UI_LIBRARY_SELECTION_PANE_NUM_PROPERTIES
};
static GParamSpec* data_imports_ui_library_selection_pane_properties[DATA_IMPORTS_UI_LIBRARY_SELECTION_PANE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block12Data Block12Data;
typedef struct _Block13Data Block13Data;

#define DATA_IMPORTS_UI_TYPE_PROGRESS_PANE (data_imports_ui_progress_pane_get_type ())
#define DATA_IMPORTS_UI_PROGRESS_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_UI_TYPE_PROGRESS_PANE, DataImportsUIProgressPane))
#define DATA_IMPORTS_UI_PROGRESS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_UI_TYPE_PROGRESS_PANE, DataImportsUIProgressPaneClass))
#define DATA_IMPORTS_UI_IS_PROGRESS_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_UI_TYPE_PROGRESS_PANE))
#define DATA_IMPORTS_UI_IS_PROGRESS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_UI_TYPE_PROGRESS_PANE))
#define DATA_IMPORTS_UI_PROGRESS_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_UI_TYPE_PROGRESS_PANE, DataImportsUIProgressPaneClass))

typedef struct _DataImportsUIProgressPane DataImportsUIProgressPane;
typedef struct _DataImportsUIProgressPaneClass DataImportsUIProgressPaneClass;
typedef struct _DataImportsUIProgressPanePrivate DataImportsUIProgressPanePrivate;
enum  {
	DATA_IMPORTS_UI_PROGRESS_PANE_0_PROPERTY,
	DATA_IMPORTS_UI_PROGRESS_PANE_NUM_PROPERTIES
};
static GParamSpec* data_imports_ui_progress_pane_properties[DATA_IMPORTS_UI_PROGRESS_PANE_NUM_PROPERTIES];

#define DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG (data_imports_ui_data_imports_dialog_get_type ())
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG, DataImportsUIDataImportsDialog))
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG, DataImportsUIDataImportsDialogClass))
#define DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG))
#define DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG))
#define DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG, DataImportsUIDataImportsDialogClass))

typedef struct _DataImportsUIDataImportsDialog DataImportsUIDataImportsDialog;
typedef struct _DataImportsUIDataImportsDialogClass DataImportsUIDataImportsDialogClass;
typedef struct _DataImportsUIDataImportsDialogPrivate DataImportsUIDataImportsDialogPrivate;

#define PLUGINS_TYPE_STANDARD_HOST_INTERFACE (plugins_standard_host_interface_get_type ())
#define PLUGINS_STANDARD_HOST_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUGINS_TYPE_STANDARD_HOST_INTERFACE, PluginsStandardHostInterface))
#define PLUGINS_STANDARD_HOST_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUGINS_TYPE_STANDARD_HOST_INTERFACE, PluginsStandardHostInterfaceClass))
#define PLUGINS_IS_STANDARD_HOST_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUGINS_TYPE_STANDARD_HOST_INTERFACE))
#define PLUGINS_IS_STANDARD_HOST_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUGINS_TYPE_STANDARD_HOST_INTERFACE))
#define PLUGINS_STANDARD_HOST_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUGINS_TYPE_STANDARD_HOST_INTERFACE, PluginsStandardHostInterfaceClass))

typedef struct _PluginsStandardHostInterface PluginsStandardHostInterface;
typedef struct _PluginsStandardHostInterfaceClass PluginsStandardHostInterfaceClass;

#define SPIT_DATA_IMPORTS_TYPE_CONCRETE_DATA_IMPORTS_HOST (spit_data_imports_concrete_data_imports_host_get_type ())
#define SPIT_DATA_IMPORTS_CONCRETE_DATA_IMPORTS_HOST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPIT_DATA_IMPORTS_TYPE_CONCRETE_DATA_IMPORTS_HOST, SpitDataImportsConcreteDataImportsHost))
#define SPIT_DATA_IMPORTS_CONCRETE_DATA_IMPORTS_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SPIT_DATA_IMPORTS_TYPE_CONCRETE_DATA_IMPORTS_HOST, SpitDataImportsConcreteDataImportsHostClass))
#define SPIT_DATA_IMPORTS_IS_CONCRETE_DATA_IMPORTS_HOST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPIT_DATA_IMPORTS_TYPE_CONCRETE_DATA_IMPORTS_HOST))
#define SPIT_DATA_IMPORTS_IS_CONCRETE_DATA_IMPORTS_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPIT_DATA_IMPORTS_TYPE_CONCRETE_DATA_IMPORTS_HOST))
#define SPIT_DATA_IMPORTS_CONCRETE_DATA_IMPORTS_HOST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPIT_DATA_IMPORTS_TYPE_CONCRETE_DATA_IMPORTS_HOST, SpitDataImportsConcreteDataImportsHostClass))

typedef struct _SpitDataImportsConcreteDataImportsHost SpitDataImportsConcreteDataImportsHost;
typedef struct _SpitDataImportsConcreteDataImportsHostClass SpitDataImportsConcreteDataImportsHostClass;
enum  {
	DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_0_PROPERTY,
	DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_NUM_PROPERTIES
};
static GParamSpec* data_imports_ui_data_imports_dialog_properties[DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_NUM_PROPERTIES];

#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))

typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;

#define CONFIG_TYPE_FACADE (config_facade_get_type ())
#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))

typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _DataImportsUIConcreteDialogPane {
	GObject parent_instance;
	DataImportsUIConcreteDialogPanePrivate * priv;
};

struct _DataImportsUIConcreteDialogPaneClass {
	GObjectClass parent_class;
};

struct _DataImportsUIConcreteDialogPanePrivate {
	GtkBox* pane_widget;
};

struct _DataImportsUIStaticMessagePane {
	DataImportsUIConcreteDialogPane parent_instance;
	DataImportsUIStaticMessagePanePrivate * priv;
};

struct _DataImportsUIStaticMessagePaneClass {
	DataImportsUIConcreteDialogPaneClass parent_class;
};

struct _DataImportsUILibrarySelectionPane {
	DataImportsUIConcreteDialogPane parent_instance;
	DataImportsUILibrarySelectionPanePrivate * priv;
};

struct _DataImportsUILibrarySelectionPaneClass {
	DataImportsUIConcreteDialogPaneClass parent_class;
};

struct _DataImportsUILibrarySelectionPanePrivate {
	SpitDataImportsPluginHost* host;
	SpitDataImportsImportableLibrary* selected_library;
	GFile* selected_file;
	GtkButton* import_button;
	GtkRadioButton* file_radio;
};

struct _Block12Data {
	int _ref_count_;
	DataImportsUILibrarySelectionPane* self;
	GtkFileChooserButton* file_chooser;
};

struct _Block13Data {
	int _ref_count_;
	DataImportsUILibrarySelectionPane* self;
	GtkRadioButton* button;
	SpitDataImportsImportableLibrary* library;
};

struct _DataImportsUIProgressPane {
	DataImportsUIConcreteDialogPane parent_instance;
	DataImportsUIProgressPanePrivate * priv;
};

struct _DataImportsUIProgressPaneClass {
	DataImportsUIConcreteDialogPaneClass parent_class;
};

struct _DataImportsUIProgressPanePrivate {
	GtkLabel* message_label;
	GtkLabel* progress_label;
	GtkProgressBar* progress_bar;
};

struct _DataImportsUIDataImportsDialog {
	GtkDialog parent_instance;
	DataImportsUIDataImportsDialogPrivate * priv;
};

struct _DataImportsUIDataImportsDialogClass {
	GtkDialogClass parent_class;
};

struct _DataImportsUIDataImportsDialogPrivate {
	GtkComboBoxText* service_selector_box;
	GtkBox* central_area_layouter;
	GtkButton* close_cancel_button;
	SpitDataImportsDialogPane* active_pane;
	SpitDataImportsConcreteDataImportsHost* host;
};

static gint DataImportsUIConcreteDialogPane_private_offset;
static gpointer data_imports_ui_concrete_dialog_pane_parent_class = NULL;
static SpitDataImportsDialogPaneIface * data_imports_ui_concrete_dialog_pane_spit_data_imports_dialog_pane_parent_iface = NULL;
static gpointer data_imports_ui_static_message_pane_parent_class = NULL;
static gint DataImportsUILibrarySelectionPane_private_offset;
static gpointer data_imports_ui_library_selection_pane_parent_class = NULL;
static gint DataImportsUIProgressPane_private_offset;
static gpointer data_imports_ui_progress_pane_parent_class = NULL;
static gint DataImportsUIDataImportsDialog_private_offset;
static gpointer data_imports_ui_data_imports_dialog_parent_class = NULL;
static DataImportsUIDataImportsDialog* data_imports_ui_data_imports_dialog_instance;
static DataImportsUIDataImportsDialog* data_imports_ui_data_imports_dialog_instance = NULL;

VALA_EXTERN GType data_imports_ui_concrete_dialog_pane_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataImportsUIConcreteDialogPane, g_object_unref)
VALA_EXTERN DataImportsUIConcreteDialogPane* data_imports_ui_concrete_dialog_pane_new (void);
VALA_EXTERN DataImportsUIConcreteDialogPane* data_imports_ui_concrete_dialog_pane_construct (GType object_type);
static GtkWidget* data_imports_ui_concrete_dialog_pane_real_get_widget (SpitDataImportsDialogPane* base);
static SpitDataImportsDialogPaneGeometryOptions data_imports_ui_concrete_dialog_pane_real_get_preferred_geometry (SpitDataImportsDialogPane* base);
static void data_imports_ui_concrete_dialog_pane_real_on_pane_installed (SpitDataImportsDialogPane* base);
static void data_imports_ui_concrete_dialog_pane_real_on_pane_uninstalled (SpitDataImportsDialogPane* base);
static void data_imports_ui_concrete_dialog_pane_finalize (GObject * obj);
static GType data_imports_ui_concrete_dialog_pane_get_type_once (void);
VALA_EXTERN GType data_imports_ui_static_message_pane_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataImportsUIStaticMessagePane, g_object_unref)
VALA_EXTERN DataImportsUIStaticMessagePane* data_imports_ui_static_message_pane_new (const gchar* message_string);
VALA_EXTERN DataImportsUIStaticMessagePane* data_imports_ui_static_message_pane_construct (GType object_type,
                                                                               const gchar* message_string);
VALA_EXTERN DataImportsUIStaticMessagePane* data_imports_ui_static_message_pane_new_with_pango (const gchar* msg);
VALA_EXTERN DataImportsUIStaticMessagePane* data_imports_ui_static_message_pane_construct_with_pango (GType object_type,
                                                                                          const gchar* msg);
static GType data_imports_ui_static_message_pane_get_type_once (void);
VALA_EXTERN GType data_imports_ui_library_selection_pane_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataImportsUILibrarySelectionPane, g_object_unref)
VALA_EXTERN DataImportsUILibrarySelectionPane* data_imports_ui_library_selection_pane_new (SpitDataImportsPluginHost* host,
                                                                               const gchar* welcome_message,
                                                                               SpitDataImportsImportableLibrary** discovered_libraries,
                                                                               gint discovered_libraries_length1,
                                                                               const gchar* file_select_label);
VALA_EXTERN DataImportsUILibrarySelectionPane* data_imports_ui_library_selection_pane_construct (GType object_type,
                                                                                     SpitDataImportsPluginHost* host,
                                                                                     const gchar* welcome_message,
                                                                                     SpitDataImportsImportableLibrary** discovered_libraries,
                                                                                     gint discovered_libraries_length1,
                                                                                     const gchar* file_select_label);
static void data_imports_ui_library_selection_pane_on_file_selected (DataImportsUILibrarySelectionPane* self,
                                                              GFile* file);
static GtkRadioButton* data_imports_ui_library_selection_pane_create_radio_button (DataImportsUILibrarySelectionPane* self,
                                                                            GtkBox* box,
                                                                            GtkRadioButton* group,
                                                                            SpitDataImportsImportableLibrary* library,
                                                                            const gchar* label,
                                                                            gint margin_left,
                                                                            gint margin_right);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
static void ___lambda28_ (Block12Data* _data12_);
static void data_imports_ui_library_selection_pane_set_import_button_sensitivity (DataImportsUILibrarySelectionPane* self);
static void ____lambda28__gtk_file_chooser_selection_changed (GtkFileChooser* _sender,
                                                       gpointer self);
static void __lambda29_ (DataImportsUILibrarySelectionPane* self);
static void data_imports_ui_library_selection_pane_on_library_selected (DataImportsUILibrarySelectionPane* self,
                                                                 SpitDataImportsImportableLibrary* library);
static void ___lambda29__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static Block13Data* block13_data_ref (Block13Data* _data13_);
static void block13_data_unref (void * _userdata_);
static void __lambda27_ (Block13Data* _data13_);
static void ___lambda27__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                             gpointer self);
static void data_imports_ui_library_selection_pane_finalize (GObject * obj);
static GType data_imports_ui_library_selection_pane_get_type_once (void);
VALA_EXTERN GType data_imports_ui_progress_pane_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataImportsUIProgressPane, g_object_unref)
VALA_EXTERN DataImportsUIProgressPane* data_imports_ui_progress_pane_new (const gchar* message);
VALA_EXTERN DataImportsUIProgressPane* data_imports_ui_progress_pane_construct (GType object_type,
                                                                    const gchar* message);
VALA_EXTERN void data_imports_ui_progress_pane_update_progress (DataImportsUIProgressPane* self,
                                                    gdouble progress,
                                                    const gchar* progress_message);
VALA_EXTERN void spin_event_loop (void);
static void data_imports_ui_progress_pane_finalize (GObject * obj);
static GType data_imports_ui_progress_pane_get_type_once (void);
VALA_EXTERN GType data_imports_ui_data_imports_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DataImportsUIDataImportsDialog, g_object_unref)
VALA_EXTERN GType plugins_standard_host_interface_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PluginsStandardHostInterface, g_object_unref)
VALA_EXTERN GType spit_data_imports_concrete_data_imports_host_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SpitDataImportsConcreteDataImportsHost, g_object_unref)
VALA_EXTERN DataImportsUIDataImportsDialog* data_imports_ui_data_imports_dialog_new (void);
VALA_EXTERN DataImportsUIDataImportsDialog* data_imports_ui_data_imports_dialog_construct (GType object_type);
VALA_EXTERN gint resources_use_header_bar (void);
static gboolean data_imports_ui_data_imports_dialog_on_window_close (DataImportsUIDataImportsDialog* self,
                                                              GdkEventAny* evt);
static gboolean _data_imports_ui_data_imports_dialog_on_window_close_gtk_widget_delete_event (GtkWidget* _sender,
                                                                                       GdkEventAny* event,
                                                                                       gpointer self);
VALA_EXTERN SpitDataImportsService** spit_data_imports_load_services (gboolean load_all,
                                                          gint* result_length1);
VALA_EXTERN GType configuration_facade_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigurationFacade, g_object_unref)
VALA_EXTERN GType config_facade_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigFacade, g_object_unref)
VALA_EXTERN ConfigFacade* config_facade_get_instance (void);
VALA_EXTERN gchar* configuration_facade_get_last_used_dataimports_service (ConfigurationFacade* self);
static void data_imports_ui_data_imports_dialog_on_service_changed (DataImportsUIDataImportsDialog* self);
static void _data_imports_ui_data_imports_dialog_on_service_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                                    gpointer self);
static void data_imports_ui_data_imports_dialog_on_close_cancel_clicked (DataImportsUIDataImportsDialog* self);
static void _data_imports_ui_data_imports_dialog_on_close_cancel_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void data_imports_ui_data_imports_dialog_set_standard_window_mode (DataImportsUIDataImportsDialog* self);
VALA_EXTERN void data_imports_ui_data_imports_dialog_install_pane (DataImportsUIDataImportsDialog* self,
                                                       SpitDataImportsDialogPane* pane);
VALA_EXTERN void data_imports_ui_data_imports_dialog_set_close_button_mode (DataImportsUIDataImportsDialog* self);
VALA_EXTERN DataImportsUIDataImportsDialog* data_imports_ui_data_imports_dialog_get_or_create_instance (void);
VALA_EXTERN void data_imports_ui_data_imports_dialog_terminate_instance (void);
static void data_imports_ui_data_imports_dialog_terminate (DataImportsUIDataImportsDialog* self);
VALA_EXTERN SpitDataImportsService** spit_data_imports_load_all_services (gint* result_length1);
VALA_EXTERN void configuration_facade_set_last_used_dataimports_service (ConfigurationFacade* self,
                                                             const gchar* service_name);
VALA_EXTERN SpitDataImportsConcreteDataImportsHost* spit_data_imports_concrete_data_imports_host_new (SpitDataImportsService* service,
                                                                                          DataImportsUIDataImportsDialog* dialog);
VALA_EXTERN SpitDataImportsConcreteDataImportsHost* spit_data_imports_concrete_data_imports_host_construct (GType object_type,
                                                                                                SpitDataImportsService* service,
                                                                                                DataImportsUIDataImportsDialog* dialog);
static void data_imports_ui_data_imports_dialog_set_large_window_mode (DataImportsUIDataImportsDialog* self);
static void data_imports_ui_data_imports_dialog_set_colossal_window_mode (DataImportsUIDataImportsDialog* self);
static void data_imports_ui_data_imports_dialog_set_free_sizable_window_mode (DataImportsUIDataImportsDialog* self);
static void data_imports_ui_data_imports_dialog_clear_free_sizable_window_mode (DataImportsUIDataImportsDialog* self);
VALA_EXTERN SpitDataImportsDialogPane* data_imports_ui_data_imports_dialog_get_active_pane (DataImportsUIDataImportsDialog* self);
VALA_EXTERN void data_imports_ui_data_imports_dialog_set_cancel_button_mode (DataImportsUIDataImportsDialog* self);
VALA_EXTERN void data_imports_ui_data_imports_dialog_lock_service (DataImportsUIDataImportsDialog* self);
VALA_EXTERN void data_imports_ui_data_imports_dialog_unlock_service (DataImportsUIDataImportsDialog* self);
static void data_imports_ui_data_imports_dialog_finalize (GObject * obj);
static GType data_imports_ui_data_imports_dialog_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
data_imports_ui_concrete_dialog_pane_get_instance_private (DataImportsUIConcreteDialogPane* self)
{
	return G_STRUCT_MEMBER_P (self, DataImportsUIConcreteDialogPane_private_offset);
}

DataImportsUIConcreteDialogPane*
data_imports_ui_concrete_dialog_pane_construct (GType object_type)
{
	DataImportsUIConcreteDialogPane * self = NULL;
	GtkBox* _tmp0_;
	self = (DataImportsUIConcreteDialogPane*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->pane_widget);
	self->priv->pane_widget = _tmp0_;
	return self;
}

DataImportsUIConcreteDialogPane*
data_imports_ui_concrete_dialog_pane_new (void)
{
	return data_imports_ui_concrete_dialog_pane_construct (DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE);
}

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

static GtkWidget*
data_imports_ui_concrete_dialog_pane_real_get_widget (SpitDataImportsDialogPane* base)
{
	DataImportsUIConcreteDialogPane * self;
	GtkBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPane);
	_tmp0_ = self->priv->pane_widget;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
	result = _tmp1_;
	return result;
}

static SpitDataImportsDialogPaneGeometryOptions
data_imports_ui_concrete_dialog_pane_real_get_preferred_geometry (SpitDataImportsDialogPane* base)
{
	DataImportsUIConcreteDialogPane * self;
	SpitDataImportsDialogPaneGeometryOptions result;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPane);
	result = SPIT_DATA_IMPORTS_DIALOG_PANE_GEOMETRY_OPTIONS_NONE;
	return result;
}

static void
data_imports_ui_concrete_dialog_pane_real_on_pane_installed (SpitDataImportsDialogPane* base)
{
	DataImportsUIConcreteDialogPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPane);
}

static void
data_imports_ui_concrete_dialog_pane_real_on_pane_uninstalled (SpitDataImportsDialogPane* base)
{
	DataImportsUIConcreteDialogPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPane);
}

static void
data_imports_ui_concrete_dialog_pane_class_init (DataImportsUIConcreteDialogPaneClass * klass,
                                                 gpointer klass_data)
{
	data_imports_ui_concrete_dialog_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DataImportsUIConcreteDialogPane_private_offset);
	G_OBJECT_CLASS (klass)->finalize = data_imports_ui_concrete_dialog_pane_finalize;
}

static void
data_imports_ui_concrete_dialog_pane_spit_data_imports_dialog_pane_interface_init (SpitDataImportsDialogPaneIface * iface,
                                                                                   gpointer iface_data)
{
	data_imports_ui_concrete_dialog_pane_spit_data_imports_dialog_pane_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_widget = (GtkWidget* (*) (SpitDataImportsDialogPane*)) data_imports_ui_concrete_dialog_pane_real_get_widget;
	iface->get_preferred_geometry = (SpitDataImportsDialogPaneGeometryOptions (*) (SpitDataImportsDialogPane*)) data_imports_ui_concrete_dialog_pane_real_get_preferred_geometry;
	iface->on_pane_installed = (void (*) (SpitDataImportsDialogPane*)) data_imports_ui_concrete_dialog_pane_real_on_pane_installed;
	iface->on_pane_uninstalled = (void (*) (SpitDataImportsDialogPane*)) data_imports_ui_concrete_dialog_pane_real_on_pane_uninstalled;
}

static void
data_imports_ui_concrete_dialog_pane_instance_init (DataImportsUIConcreteDialogPane * self,
                                                    gpointer klass)
{
	self->priv = data_imports_ui_concrete_dialog_pane_get_instance_private (self);
}

static void
data_imports_ui_concrete_dialog_pane_finalize (GObject * obj)
{
	DataImportsUIConcreteDialogPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, DataImportsUIConcreteDialogPane);
	_g_object_unref0 (self->priv->pane_widget);
	G_OBJECT_CLASS (data_imports_ui_concrete_dialog_pane_parent_class)->finalize (obj);
}

static GType
data_imports_ui_concrete_dialog_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DataImportsUIConcreteDialogPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_ui_concrete_dialog_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsUIConcreteDialogPane), 0, (GInstanceInitFunc) data_imports_ui_concrete_dialog_pane_instance_init, NULL };
	static const GInterfaceInfo spit_data_imports_dialog_pane_info = { (GInterfaceInitFunc) data_imports_ui_concrete_dialog_pane_spit_data_imports_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType data_imports_ui_concrete_dialog_pane_type_id;
	data_imports_ui_concrete_dialog_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsUIConcreteDialogPane", &g_define_type_info, 0);
	g_type_add_interface_static (data_imports_ui_concrete_dialog_pane_type_id, SPIT_DATA_IMPORTS_TYPE_DIALOG_PANE, &spit_data_imports_dialog_pane_info);
	DataImportsUIConcreteDialogPane_private_offset = g_type_add_instance_private (data_imports_ui_concrete_dialog_pane_type_id, sizeof (DataImportsUIConcreteDialogPanePrivate));
	return data_imports_ui_concrete_dialog_pane_type_id;
}

GType
data_imports_ui_concrete_dialog_pane_get_type (void)
{
	static volatile gsize data_imports_ui_concrete_dialog_pane_type_id__once = 0;
	if (g_once_init_enter (&data_imports_ui_concrete_dialog_pane_type_id__once)) {
		GType data_imports_ui_concrete_dialog_pane_type_id;
		data_imports_ui_concrete_dialog_pane_type_id = data_imports_ui_concrete_dialog_pane_get_type_once ();
		g_once_init_leave (&data_imports_ui_concrete_dialog_pane_type_id__once, data_imports_ui_concrete_dialog_pane_type_id);
	}
	return data_imports_ui_concrete_dialog_pane_type_id__once;
}

DataImportsUIStaticMessagePane*
data_imports_ui_static_message_pane_construct (GType object_type,
                                               const gchar* message_string)
{
	DataImportsUIStaticMessagePane * self = NULL;
	GtkLabel* message_label = NULL;
	GtkLabel* _tmp0_;
	GtkWidget* _tmp1_;
	GtkBox* _tmp2_;
	g_return_val_if_fail (message_string != NULL, NULL);
	self = (DataImportsUIStaticMessagePane*) data_imports_ui_concrete_dialog_pane_construct (object_type);
	_tmp0_ = (GtkLabel*) gtk_label_new (message_string);
	g_object_ref_sink (_tmp0_);
	message_label = _tmp0_;
	_tmp1_ = spit_data_imports_dialog_pane_get_widget (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_DATA_IMPORTS_TYPE_DIALOG_PANE, SpitDataImportsDialogPane));
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_box_get_type (), GtkBox);
	gtk_box_pack_start (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (message_label, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp2_);
	_g_object_unref0 (message_label);
	return self;
}

DataImportsUIStaticMessagePane*
data_imports_ui_static_message_pane_new (const gchar* message_string)
{
	return data_imports_ui_static_message_pane_construct (DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE, message_string);
}

DataImportsUIStaticMessagePane*
data_imports_ui_static_message_pane_construct_with_pango (GType object_type,
                                                          const gchar* msg)
{
	DataImportsUIStaticMessagePane * self = NULL;
	GtkLabel* label = NULL;
	GtkLabel* _tmp0_;
	GtkWidget* _tmp1_;
	GtkBox* _tmp2_;
	g_return_val_if_fail (msg != NULL, NULL);
	self = (DataImportsUIStaticMessagePane*) data_imports_ui_concrete_dialog_pane_construct (object_type);
	_tmp0_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp0_);
	label = _tmp0_;
	gtk_label_set_markup (label, msg);
	gtk_label_set_line_wrap (label, TRUE);
	_tmp1_ = spit_data_imports_dialog_pane_get_widget (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_DATA_IMPORTS_TYPE_DIALOG_PANE, SpitDataImportsDialogPane));
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_box_get_type (), GtkBox);
	gtk_box_pack_start (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (label, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp2_);
	_g_object_unref0 (label);
	return self;
}

DataImportsUIStaticMessagePane*
data_imports_ui_static_message_pane_new_with_pango (const gchar* msg)
{
	return data_imports_ui_static_message_pane_construct_with_pango (DATA_IMPORTS_UI_TYPE_STATIC_MESSAGE_PANE, msg);
}

static void
data_imports_ui_static_message_pane_class_init (DataImportsUIStaticMessagePaneClass * klass,
                                                gpointer klass_data)
{
	data_imports_ui_static_message_pane_parent_class = g_type_class_peek_parent (klass);
}

static void
data_imports_ui_static_message_pane_instance_init (DataImportsUIStaticMessagePane * self,
                                                   gpointer klass)
{
}

static GType
data_imports_ui_static_message_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DataImportsUIStaticMessagePaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_ui_static_message_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsUIStaticMessagePane), 0, (GInstanceInitFunc) data_imports_ui_static_message_pane_instance_init, NULL };
	GType data_imports_ui_static_message_pane_type_id;
	data_imports_ui_static_message_pane_type_id = g_type_register_static (DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, "DataImportsUIStaticMessagePane", &g_define_type_info, 0);
	return data_imports_ui_static_message_pane_type_id;
}

GType
data_imports_ui_static_message_pane_get_type (void)
{
	static volatile gsize data_imports_ui_static_message_pane_type_id__once = 0;
	if (g_once_init_enter (&data_imports_ui_static_message_pane_type_id__once)) {
		GType data_imports_ui_static_message_pane_type_id;
		data_imports_ui_static_message_pane_type_id = data_imports_ui_static_message_pane_get_type_once ();
		g_once_init_leave (&data_imports_ui_static_message_pane_type_id__once, data_imports_ui_static_message_pane_type_id);
	}
	return data_imports_ui_static_message_pane_type_id__once;
}

static inline gpointer
data_imports_ui_library_selection_pane_get_instance_private (DataImportsUILibrarySelectionPane* self)
{
	return G_STRUCT_MEMBER_P (self, DataImportsUILibrarySelectionPane_private_offset);
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		DataImportsUILibrarySelectionPane* self;
		self = _data12_->self;
		_g_object_unref0 (_data12_->file_chooser);
		_g_object_unref0 (self);
		g_slice_free (Block12Data, _data12_);
	}
}

static void
___lambda28_ (Block12Data* _data12_)
{
	DataImportsUILibrarySelectionPane* self;
	GtkFileChooserButton* _tmp0_;
	GFile* _tmp1_;
	GtkRadioButton* _tmp2_;
	self = _data12_->self;
	_tmp0_ = _data12_->file_chooser;
	_tmp1_ = gtk_file_chooser_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_file_chooser_get_type (), GtkFileChooser));
	_g_object_unref0 (self->priv->selected_file);
	self->priv->selected_file = _tmp1_;
	_tmp2_ = self->priv->file_radio;
	if (_tmp2_ != NULL) {
		GtkRadioButton* _tmp3_;
		_tmp3_ = self->priv->file_radio;
		gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
	}
	data_imports_ui_library_selection_pane_set_import_button_sensitivity (self);
}

static void
____lambda28__gtk_file_chooser_selection_changed (GtkFileChooser* _sender,
                                                  gpointer self)
{
	___lambda28_ (self);
}

static void
__lambda29_ (DataImportsUILibrarySelectionPane* self)
{
	SpitDataImportsImportableLibrary* _tmp0_;
	_tmp0_ = self->priv->selected_library;
	if (_tmp0_ != NULL) {
		SpitDataImportsImportableLibrary* _tmp1_;
		_tmp1_ = self->priv->selected_library;
		data_imports_ui_library_selection_pane_on_library_selected (self, _tmp1_);
	} else {
		GFile* _tmp2_;
		_tmp2_ = self->priv->selected_file;
		if (_tmp2_ != NULL) {
			GFile* _tmp3_;
			_tmp3_ = self->priv->selected_file;
			data_imports_ui_library_selection_pane_on_file_selected (self, _tmp3_);
		} else {
			g_debug ("DataImportsUI.vala:119: LibrarySelectionPane: Library or file should b" \
"e selected.");
		}
	}
}

static void
___lambda29__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda29_ ((DataImportsUILibrarySelectionPane*) self);
}

DataImportsUILibrarySelectionPane*
data_imports_ui_library_selection_pane_construct (GType object_type,
                                                  SpitDataImportsPluginHost* host,
                                                  const gchar* welcome_message,
                                                  SpitDataImportsImportableLibrary** discovered_libraries,
                                                  gint discovered_libraries_length1,
                                                  const gchar* file_select_label)
{
	DataImportsUILibrarySelectionPane * self = NULL;
	gboolean _tmp0_ = FALSE;
	GtkBox* content_box = NULL;
	GtkBox* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkLabel* welcome_label = NULL;
	GtkLabel* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkLabel* _tmp7_;
	GtkBox* _tmp8_;
	GtkLabel* _tmp9_;
	gint radio_margin_left = 0;
	gint radio_margin_right = 0;
	gint chooser_margin_left = 0;
	gint chooser_margin_right = 0;
	GtkRadioButton* lib_radio = NULL;
	GtkButton* _tmp29_;
	GtkButton* _tmp30_;
	GtkButtonBox* button_box = NULL;
	GtkButtonBox* _tmp31_;
	GtkButton* _tmp32_;
	GtkBox* _tmp33_;
	GtkWidget* _tmp34_;
	GtkBox* _tmp35_;
	GtkBox* _tmp36_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (host, SPIT_DATA_IMPORTS_TYPE_PLUGIN_HOST), NULL);
	g_return_val_if_fail (welcome_message != NULL, NULL);
	self = (DataImportsUILibrarySelectionPane*) data_imports_ui_concrete_dialog_pane_construct (object_type);
	if (discovered_libraries_length1 > 0) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = data_imports_ui_library_selection_pane_on_file_selected != NULL;
	}
	_vala_assert (_tmp0_, "discovered_libraries.length > 0 || on_file_selected != null");
	self->priv->host = host;
	_tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
	g_object_ref_sink (_tmp1_);
	content_box = _tmp1_;
	_tmp2_ = content_box;
	gtk_widget_set_margin_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), 30);
	_tmp3_ = content_box;
	gtk_widget_set_margin_end (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), 30);
	_tmp4_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp4_);
	welcome_label = _tmp4_;
	_tmp5_ = welcome_label;
	gtk_label_set_markup (_tmp5_, welcome_message);
	_tmp6_ = welcome_label;
	gtk_label_set_line_wrap (_tmp6_, TRUE);
	_tmp7_ = welcome_label;
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
	_tmp8_ = content_box;
	_tmp9_ = welcome_label;
	gtk_box_pack_start (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 6);
	radio_margin_left = 20;
	radio_margin_right = 20;
	chooser_margin_left = radio_margin_left;
	chooser_margin_right = radio_margin_right;
	lib_radio = NULL;
	if (discovered_libraries_length1 > 0) {
		chooser_margin_left = radio_margin_left + 20;
		{
			SpitDataImportsImportableLibrary** library_collection = NULL;
			gint library_collection_length1 = 0;
			gint _library_collection_size_ = 0;
			gint library_it = 0;
			library_collection = discovered_libraries;
			library_collection_length1 = discovered_libraries_length1;
			for (library_it = 0; library_it < library_collection_length1; library_it = library_it + 1) {
				SpitDataImportsImportableLibrary* _tmp10_;
				SpitDataImportsImportableLibrary* library = NULL;
				_tmp10_ = _g_object_ref0 (library_collection[library_it]);
				library = _tmp10_;
				{
					gchar* lib_radio_label = NULL;
					SpitDataImportsImportableLibrary* _tmp11_;
					gchar* _tmp12_;
					GtkBox* _tmp13_;
					GtkRadioButton* _tmp14_;
					SpitDataImportsImportableLibrary* _tmp15_;
					const gchar* _tmp16_;
					GtkRadioButton* _tmp17_;
					_tmp11_ = library;
					_tmp12_ = spit_data_imports_importable_library_get_display_name (_tmp11_);
					lib_radio_label = _tmp12_;
					_tmp13_ = content_box;
					_tmp14_ = lib_radio;
					_tmp15_ = library;
					_tmp16_ = lib_radio_label;
					_tmp17_ = data_imports_ui_library_selection_pane_create_radio_button (self, _tmp13_, _tmp14_, _tmp15_, _tmp16_, radio_margin_left, radio_margin_right);
					_g_object_unref0 (lib_radio);
					lib_radio = _tmp17_;
					_g_free0 (lib_radio_label);
					_g_object_unref0 (library);
				}
			}
		}
		if (file_select_label != NULL) {
			GtkBox* _tmp18_;
			GtkRadioButton* _tmp19_;
			GtkRadioButton* _tmp20_;
			GtkRadioButton* _tmp21_;
			GtkRadioButton* _tmp22_;
			_tmp18_ = content_box;
			_tmp19_ = lib_radio;
			_tmp20_ = data_imports_ui_library_selection_pane_create_radio_button (self, _tmp18_, _tmp19_, NULL, file_select_label, radio_margin_left, radio_margin_right);
			_g_object_unref0 (lib_radio);
			lib_radio = _tmp20_;
			_tmp21_ = lib_radio;
			_tmp22_ = _g_object_ref0 (_tmp21_);
			_g_object_unref0 (self->priv->file_radio);
			self->priv->file_radio = _tmp22_;
		}
	}
	if (file_select_label != NULL) {
		Block12Data* _data12_;
		GtkFileChooserButton* _tmp23_;
		GtkFileChooserButton* _tmp24_;
		GtkFileChooserButton* _tmp25_;
		GtkFileChooserButton* _tmp26_;
		GtkBox* _tmp27_;
		GtkFileChooserButton* _tmp28_;
		_data12_ = g_slice_new0 (Block12Data);
		_data12_->_ref_count_ = 1;
		_data12_->self = g_object_ref (self);
		_tmp23_ = (GtkFileChooserButton*) gtk_file_chooser_button_new (_ ("Database file:"), GTK_FILE_CHOOSER_ACTION_OPEN);
		g_object_ref_sink (_tmp23_);
		_data12_->file_chooser = _tmp23_;
		_tmp24_ = _data12_->file_chooser;
		g_signal_connect_data (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_file_chooser_get_type (), GtkFileChooser), "selection-changed", (GCallback) ____lambda28__gtk_file_chooser_selection_changed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
		_tmp25_ = _data12_->file_chooser;
		gtk_widget_set_margin_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget), chooser_margin_left);
		_tmp26_ = _data12_->file_chooser;
		gtk_widget_set_margin_end (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget), chooser_margin_right);
		_tmp27_ = content_box;
		_tmp28_ = _data12_->file_chooser;
		gtk_box_pack_start (_tmp27_, G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 6);
		block12_data_unref (_data12_);
		_data12_ = NULL;
	}
	_tmp29_ = (GtkButton*) gtk_button_new_with_mnemonic (_ ("_Import"));
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->import_button);
	self->priv->import_button = _tmp29_;
	_tmp30_ = self->priv->import_button;
	g_signal_connect_object (_tmp30_, "clicked", (GCallback) ___lambda29__gtk_button_clicked, self, 0);
	_tmp31_ = (GtkButtonBox*) gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp31_);
	button_box = _tmp31_;
	g_object_set (button_box, "layout-style", GTK_BUTTONBOX_CENTER, NULL);
	_tmp32_ = self->priv->import_button;
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (button_box, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_widget_get_type (), GtkWidget));
	_tmp33_ = content_box;
	gtk_box_pack_end (_tmp33_, G_TYPE_CHECK_INSTANCE_CAST (button_box, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 6);
	_tmp34_ = spit_data_imports_dialog_pane_get_widget (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_DATA_IMPORTS_TYPE_DIALOG_PANE, SpitDataImportsDialogPane));
	_tmp35_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_box_get_type (), GtkBox);
	_tmp36_ = content_box;
	gtk_box_pack_start (_tmp35_, G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp35_);
	data_imports_ui_library_selection_pane_set_import_button_sensitivity (self);
	_g_object_unref0 (button_box);
	_g_object_unref0 (lib_radio);
	_g_object_unref0 (welcome_label);
	_g_object_unref0 (content_box);
	return self;
}

DataImportsUILibrarySelectionPane*
data_imports_ui_library_selection_pane_new (SpitDataImportsPluginHost* host,
                                            const gchar* welcome_message,
                                            SpitDataImportsImportableLibrary** discovered_libraries,
                                            gint discovered_libraries_length1,
                                            const gchar* file_select_label)
{
	return data_imports_ui_library_selection_pane_construct (DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE, host, welcome_message, discovered_libraries, discovered_libraries_length1, file_select_label);
}

static Block13Data*
block13_data_ref (Block13Data* _data13_)
{
	g_atomic_int_inc (&_data13_->_ref_count_);
	return _data13_;
}

static void
block13_data_unref (void * _userdata_)
{
	Block13Data* _data13_;
	_data13_ = (Block13Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) {
		DataImportsUILibrarySelectionPane* self;
		self = _data13_->self;
		_g_object_unref0 (_data13_->button);
		_g_object_unref0 (_data13_->library);
		_g_object_unref0 (self);
		g_slice_free (Block13Data, _data13_);
	}
}

static void
__lambda27_ (Block13Data* _data13_)
{
	DataImportsUILibrarySelectionPane* self;
	GtkRadioButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data13_->self;
	_tmp0_ = _data13_->button;
	_tmp1_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_toggle_button_get_type (), GtkToggleButton));
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		SpitDataImportsImportableLibrary* _tmp3_;
		_tmp3_ = _g_object_ref0 (_data13_->library);
		_g_object_unref0 (self->priv->selected_library);
		self->priv->selected_library = _tmp3_;
		data_imports_ui_library_selection_pane_set_import_button_sensitivity (self);
	}
}

static void
___lambda27__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                        gpointer self)
{
	__lambda27_ (self);
}

static GtkRadioButton*
data_imports_ui_library_selection_pane_create_radio_button (DataImportsUILibrarySelectionPane* self,
                                                            GtkBox* box,
                                                            GtkRadioButton* group,
                                                            SpitDataImportsImportableLibrary* library,
                                                            const gchar* label,
                                                            gint margin_left,
                                                            gint margin_right)
{
	Block13Data* _data13_;
	SpitDataImportsImportableLibrary* _tmp0_;
	GtkRadioButton* _tmp1_;
	GtkRadioButton* _tmp4_;
	GtkRadioButton* _tmp5_;
	GtkRadioButton* _tmp6_;
	GtkRadioButton* _tmp7_;
	GtkRadioButton* _tmp8_;
	GtkRadioButton* _tmp9_;
	GtkRadioButton* result;
	g_return_val_if_fail (DATA_IMPORTS_UI_IS_LIBRARY_SELECTION_PANE (self), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (box, gtk_box_get_type ()), NULL);
	g_return_val_if_fail ((group == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (group, gtk_radio_button_get_type ()), NULL);
	g_return_val_if_fail ((library == NULL) || G_TYPE_CHECK_INSTANCE_TYPE (library, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_LIBRARY), NULL);
	g_return_val_if_fail (label != NULL, NULL);
	_data13_ = g_slice_new0 (Block13Data);
	_data13_->_ref_count_ = 1;
	_data13_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (library);
	_g_object_unref0 (_data13_->library);
	_data13_->library = _tmp0_;
	_tmp1_ = (GtkRadioButton*) gtk_radio_button_new_with_label_from_widget (group, label);
	g_object_ref_sink (_tmp1_);
	_data13_->button = _tmp1_;
	if (group == NULL) {
		GtkRadioButton* _tmp2_;
		SpitDataImportsImportableLibrary* _tmp3_;
		_tmp2_ = _data13_->button;
		gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
		_tmp3_ = _g_object_ref0 (_data13_->library);
		_g_object_unref0 (self->priv->selected_library);
		self->priv->selected_library = _tmp3_;
	}
	_tmp4_ = _data13_->button;
	g_signal_connect_data (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_toggle_button_get_type (), GtkToggleButton), "toggled", (GCallback) ___lambda27__gtk_toggle_button_toggled, block13_data_ref (_data13_), (GClosureNotify) block13_data_unref, 0);
	_tmp5_ = _data13_->button;
	gtk_widget_set_margin_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), margin_left);
	_tmp6_ = _data13_->button;
	gtk_widget_set_margin_end (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), margin_right);
	_tmp7_ = _data13_->button;
	gtk_box_pack_start (box, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 6);
	_tmp8_ = _data13_->button;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	result = _tmp9_;
	block13_data_unref (_data13_);
	_data13_ = NULL;
	return result;
}

static void
data_imports_ui_library_selection_pane_set_import_button_sensitivity (DataImportsUILibrarySelectionPane* self)
{
	gboolean _tmp0_ = FALSE;
	SpitDataImportsImportableLibrary* _tmp1_;
	GtkButton* _tmp3_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_LIBRARY_SELECTION_PANE (self));
	_tmp1_ = self->priv->selected_library;
	if (_tmp1_ != NULL) {
		_tmp0_ = TRUE;
	} else {
		GFile* _tmp2_;
		_tmp2_ = self->priv->selected_file;
		_tmp0_ = _tmp2_ != NULL;
	}
	_tmp3_ = self->priv->import_button;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), _tmp0_);
}

static void
data_imports_ui_library_selection_pane_on_library_selected (DataImportsUILibrarySelectionPane* self,
                                                            SpitDataImportsImportableLibrary* library)
{
	SpitDataImportsPluginHost* _tmp0_;
	SpitDataImportsDataImporter* _tmp1_;
	SpitDataImportsDataImporter* _tmp2_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_LIBRARY_SELECTION_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (library, SPIT_DATA_IMPORTS_TYPE_IMPORTABLE_LIBRARY));
	_tmp0_ = self->priv->host;
	_tmp1_ = spit_data_imports_plugin_host_get_data_importer (_tmp0_);
	_tmp2_ = _tmp1_;
	spit_data_imports_data_importer_on_library_selected (_tmp2_, library);
	_g_object_unref0 (_tmp2_);
}

static void
data_imports_ui_library_selection_pane_on_file_selected (DataImportsUILibrarySelectionPane* self,
                                                         GFile* file)
{
	SpitDataImportsPluginHost* _tmp0_;
	SpitDataImportsDataImporter* _tmp1_;
	SpitDataImportsDataImporter* _tmp2_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_LIBRARY_SELECTION_PANE (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (file, g_file_get_type ()));
	_tmp0_ = self->priv->host;
	_tmp1_ = spit_data_imports_plugin_host_get_data_importer (_tmp0_);
	_tmp2_ = _tmp1_;
	spit_data_imports_data_importer_on_file_selected (_tmp2_, file);
	_g_object_unref0 (_tmp2_);
}

static void
data_imports_ui_library_selection_pane_class_init (DataImportsUILibrarySelectionPaneClass * klass,
                                                   gpointer klass_data)
{
	data_imports_ui_library_selection_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DataImportsUILibrarySelectionPane_private_offset);
	G_OBJECT_CLASS (klass)->finalize = data_imports_ui_library_selection_pane_finalize;
}

static void
data_imports_ui_library_selection_pane_instance_init (DataImportsUILibrarySelectionPane * self,
                                                      gpointer klass)
{
	self->priv = data_imports_ui_library_selection_pane_get_instance_private (self);
	self->priv->selected_library = NULL;
	self->priv->selected_file = NULL;
	self->priv->file_radio = NULL;
}

static void
data_imports_ui_library_selection_pane_finalize (GObject * obj)
{
	DataImportsUILibrarySelectionPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_UI_TYPE_LIBRARY_SELECTION_PANE, DataImportsUILibrarySelectionPane);
	_g_object_unref0 (self->priv->selected_library);
	_g_object_unref0 (self->priv->selected_file);
	_g_object_unref0 (self->priv->import_button);
	_g_object_unref0 (self->priv->file_radio);
	G_OBJECT_CLASS (data_imports_ui_library_selection_pane_parent_class)->finalize (obj);
}

static GType
data_imports_ui_library_selection_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DataImportsUILibrarySelectionPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_ui_library_selection_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsUILibrarySelectionPane), 0, (GInstanceInitFunc) data_imports_ui_library_selection_pane_instance_init, NULL };
	GType data_imports_ui_library_selection_pane_type_id;
	data_imports_ui_library_selection_pane_type_id = g_type_register_static (DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, "DataImportsUILibrarySelectionPane", &g_define_type_info, 0);
	DataImportsUILibrarySelectionPane_private_offset = g_type_add_instance_private (data_imports_ui_library_selection_pane_type_id, sizeof (DataImportsUILibrarySelectionPanePrivate));
	return data_imports_ui_library_selection_pane_type_id;
}

GType
data_imports_ui_library_selection_pane_get_type (void)
{
	static volatile gsize data_imports_ui_library_selection_pane_type_id__once = 0;
	if (g_once_init_enter (&data_imports_ui_library_selection_pane_type_id__once)) {
		GType data_imports_ui_library_selection_pane_type_id;
		data_imports_ui_library_selection_pane_type_id = data_imports_ui_library_selection_pane_get_type_once ();
		g_once_init_leave (&data_imports_ui_library_selection_pane_type_id__once, data_imports_ui_library_selection_pane_type_id);
	}
	return data_imports_ui_library_selection_pane_type_id__once;
}

static inline gpointer
data_imports_ui_progress_pane_get_instance_private (DataImportsUIProgressPane* self)
{
	return G_STRUCT_MEMBER_P (self, DataImportsUIProgressPane_private_offset);
}

DataImportsUIProgressPane*
data_imports_ui_progress_pane_construct (GType object_type,
                                         const gchar* message)
{
	DataImportsUIProgressPane * self = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	GtkProgressBar* _tmp3_;
	GtkProgressBar* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	GtkWidget* _tmp7_;
	GtkContainer* _tmp8_;
	g_return_val_if_fail (message != NULL, NULL);
	self = (DataImportsUIProgressPane*) data_imports_ui_concrete_dialog_pane_construct (object_type);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
	g_object_ref_sink (_tmp0_);
	content_box = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (message);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->message_label);
	self->priv->message_label = _tmp1_;
	_tmp2_ = self->priv->message_label;
	gtk_box_pack_start (content_box, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 6);
	_tmp3_ = (GtkProgressBar*) gtk_progress_bar_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->progress_bar);
	self->priv->progress_bar = _tmp3_;
	_tmp4_ = self->priv->progress_bar;
	gtk_box_pack_start (content_box, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), FALSE, TRUE, (guint) 6);
	_tmp5_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->progress_label);
	self->priv->progress_label = _tmp5_;
	_tmp6_ = self->priv->progress_label;
	gtk_box_pack_start (content_box, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), FALSE, TRUE, (guint) 6);
	_tmp7_ = spit_data_imports_dialog_pane_get_widget (G_TYPE_CHECK_INSTANCE_CAST (self, SPIT_DATA_IMPORTS_TYPE_DIALOG_PANE, SpitDataImportsDialogPane));
	_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_container_get_type (), GtkContainer);
	gtk_container_add (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (content_box, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (content_box);
	return self;
}

DataImportsUIProgressPane*
data_imports_ui_progress_pane_new (const gchar* message)
{
	return data_imports_ui_progress_pane_construct (DATA_IMPORTS_UI_TYPE_PROGRESS_PANE, message);
}

void
data_imports_ui_progress_pane_update_progress (DataImportsUIProgressPane* self,
                                               gdouble progress,
                                               const gchar* progress_message)
{
	GtkProgressBar* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_PROGRESS_PANE (self));
	_tmp0_ = self->priv->progress_bar;
	gtk_progress_bar_set_fraction (_tmp0_, progress);
	if (progress_message != NULL) {
		GtkLabel* _tmp1_;
		_tmp1_ = self->priv->progress_label;
		gtk_label_set_label (_tmp1_, progress_message);
	}
	spin_event_loop ();
}

static void
data_imports_ui_progress_pane_class_init (DataImportsUIProgressPaneClass * klass,
                                          gpointer klass_data)
{
	data_imports_ui_progress_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DataImportsUIProgressPane_private_offset);
	G_OBJECT_CLASS (klass)->finalize = data_imports_ui_progress_pane_finalize;
}

static void
data_imports_ui_progress_pane_instance_init (DataImportsUIProgressPane * self,
                                             gpointer klass)
{
	self->priv = data_imports_ui_progress_pane_get_instance_private (self);
}

static void
data_imports_ui_progress_pane_finalize (GObject * obj)
{
	DataImportsUIProgressPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_UI_TYPE_PROGRESS_PANE, DataImportsUIProgressPane);
	_g_object_unref0 (self->priv->message_label);
	_g_object_unref0 (self->priv->progress_label);
	_g_object_unref0 (self->priv->progress_bar);
	G_OBJECT_CLASS (data_imports_ui_progress_pane_parent_class)->finalize (obj);
}

static GType
data_imports_ui_progress_pane_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DataImportsUIProgressPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_ui_progress_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsUIProgressPane), 0, (GInstanceInitFunc) data_imports_ui_progress_pane_instance_init, NULL };
	GType data_imports_ui_progress_pane_type_id;
	data_imports_ui_progress_pane_type_id = g_type_register_static (DATA_IMPORTS_UI_TYPE_CONCRETE_DIALOG_PANE, "DataImportsUIProgressPane", &g_define_type_info, 0);
	DataImportsUIProgressPane_private_offset = g_type_add_instance_private (data_imports_ui_progress_pane_type_id, sizeof (DataImportsUIProgressPanePrivate));
	return data_imports_ui_progress_pane_type_id;
}

GType
data_imports_ui_progress_pane_get_type (void)
{
	static volatile gsize data_imports_ui_progress_pane_type_id__once = 0;
	if (g_once_init_enter (&data_imports_ui_progress_pane_type_id__once)) {
		GType data_imports_ui_progress_pane_type_id;
		data_imports_ui_progress_pane_type_id = data_imports_ui_progress_pane_get_type_once ();
		g_once_init_leave (&data_imports_ui_progress_pane_type_id__once, data_imports_ui_progress_pane_type_id);
	}
	return data_imports_ui_progress_pane_type_id__once;
}

static inline gpointer
data_imports_ui_data_imports_dialog_get_instance_private (DataImportsUIDataImportsDialog* self)
{
	return G_STRUCT_MEMBER_P (self, DataImportsUIDataImportsDialog_private_offset);
}

static gboolean
_data_imports_ui_data_imports_dialog_on_window_close_gtk_widget_delete_event (GtkWidget* _sender,
                                                                              GdkEventAny* event,
                                                                              gpointer self)
{
	gboolean result;
	result = data_imports_ui_data_imports_dialog_on_window_close ((DataImportsUIDataImportsDialog*) self, event);
	return result;
}

static void
_data_imports_ui_data_imports_dialog_on_service_changed_gtk_combo_box_changed (GtkComboBox* _sender,
                                                                               gpointer self)
{
	data_imports_ui_data_imports_dialog_on_service_changed ((DataImportsUIDataImportsDialog*) self);
}

static void
_data_imports_ui_data_imports_dialog_on_close_cancel_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	data_imports_ui_data_imports_dialog_on_close_cancel_clicked ((DataImportsUIDataImportsDialog*) self);
}

DataImportsUIDataImportsDialog*
data_imports_ui_data_imports_dialog_construct (GType object_type)
{
	DataImportsUIDataImportsDialog * self = NULL;
	gboolean use_header = FALSE;
	gchar* title = NULL;
	gchar* _tmp1_;
	gchar* label = NULL;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	SpitDataImportsService** loaded_services = NULL;
	gint _tmp4_ = 0;
	SpitDataImportsService** _tmp5_;
	gint loaded_services_length1;
	gint _loaded_services_size_;
	SpitDataImportsService** _tmp6_;
	gint _tmp6__length1;
	GtkBox* _tmp57_;
	GtkBox* _tmp58_;
	GtkBox* _tmp59_;
	GtkButton* _tmp69_;
	SpitDataImportsService** _tmp70_;
	gint _tmp70__length1;
	use_header = resources_use_header_bar () == 1;
	self = (DataImportsUIDataImportsDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL);
	if (use_header) {
		GtkHeaderBar* _tmp0_;
		_tmp0_ = gtk_dialog_get_header_bar (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		gtk_header_bar_set_show_close_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_header_bar_get_type (), GtkHeaderBar), FALSE);
	}
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "delete-event", (GCallback) _data_imports_ui_data_imports_dialog_on_window_close_gtk_widget_delete_event, self, 0);
	_tmp1_ = g_strdup (_ ("Import From Application"));
	title = _tmp1_;
	_tmp2_ = g_strdup (_ ("Import media _from:"));
	label = _tmp2_;
	_tmp3_ = title;
	gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp3_);
	_tmp5_ = spit_data_imports_load_services (FALSE, &_tmp4_);
	loaded_services = _tmp5_;
	loaded_services_length1 = _tmp4_;
	_loaded_services_size_ = loaded_services_length1;
	_tmp6_ = loaded_services;
	_tmp6__length1 = loaded_services_length1;
	if (_tmp6__length1 > 0) {
		GtkComboBoxText* _tmp7_;
		GtkComboBoxText* _tmp8_;
		gchar* last_used_service = NULL;
		ConfigFacade* _tmp9_;
		ConfigFacade* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gint ticker = 0;
		gint last_used_index = 0;
		SpitDataImportsService** _tmp13_;
		gint _tmp13__length1;
		GtkComboBoxText* _tmp28_;
		_tmp7_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
		g_object_ref_sink (_tmp7_);
		_g_object_unref0 (self->priv->service_selector_box);
		self->priv->service_selector_box = _tmp7_;
		_tmp8_ = self->priv->service_selector_box;
		gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_combo_box_get_type (), GtkComboBox), 0);
		_tmp9_ = config_facade_get_instance ();
		_tmp10_ = _tmp9_;
		_tmp11_ = configuration_facade_get_last_used_dataimports_service (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
		_tmp12_ = _tmp11_;
		_g_object_unref0 (_tmp10_);
		last_used_service = _tmp12_;
		ticker = 0;
		last_used_index = -1;
		_tmp13_ = loaded_services;
		_tmp13__length1 = loaded_services_length1;
		{
			SpitDataImportsService** service_collection = NULL;
			gint service_collection_length1 = 0;
			gint _service_collection_size_ = 0;
			gint service_it = 0;
			service_collection = _tmp13_;
			service_collection_length1 = _tmp13__length1;
			for (service_it = 0; service_it < service_collection_length1; service_it = service_it + 1) {
				SpitDataImportsService* _tmp14_;
				SpitDataImportsService* service = NULL;
				_tmp14_ = _g_object_ref0 (service_collection[service_it]);
				service = _tmp14_;
				{
					gchar* curr_service_id = NULL;
					SpitDataImportsService* _tmp15_;
					const gchar* _tmp16_;
					gchar* _tmp17_;
					gboolean _tmp18_ = FALSE;
					const gchar* _tmp19_;
					GtkComboBoxText* _tmp22_;
					SpitDataImportsService* _tmp23_;
					const gchar* _tmp24_;
					gint _tmp25_;
					_tmp15_ = service;
					_tmp16_ = spit_pluggable_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
					_tmp17_ = g_strdup (_tmp16_);
					curr_service_id = _tmp17_;
					_tmp19_ = last_used_service;
					if (_tmp19_ != NULL) {
						const gchar* _tmp20_;
						const gchar* _tmp21_;
						_tmp20_ = last_used_service;
						_tmp21_ = curr_service_id;
						_tmp18_ = g_strcmp0 (_tmp20_, _tmp21_) == 0;
					} else {
						_tmp18_ = FALSE;
					}
					if (_tmp18_) {
						last_used_index = ticker;
					}
					_tmp22_ = self->priv->service_selector_box;
					_tmp23_ = service;
					_tmp24_ = spit_pluggable_get_pluggable_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
					gtk_combo_box_text_append_text (_tmp22_, _tmp24_);
					_tmp25_ = ticker;
					ticker = _tmp25_ + 1;
					_g_free0 (curr_service_id);
					_g_object_unref0 (service);
				}
			}
		}
		if (last_used_index >= 0) {
			GtkComboBoxText* _tmp26_;
			_tmp26_ = self->priv->service_selector_box;
			gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_combo_box_get_type (), GtkComboBox), last_used_index);
		} else {
			GtkComboBoxText* _tmp27_;
			_tmp27_ = self->priv->service_selector_box;
			gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_combo_box_get_type (), GtkComboBox), 0);
		}
		_tmp28_ = self->priv->service_selector_box;
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _data_imports_ui_data_imports_dialog_on_service_changed_gtk_combo_box_changed, self, 0);
		if (!use_header) {
			GtkLabel* service_selector_box_label = NULL;
			const gchar* _tmp29_;
			GtkLabel* _tmp30_;
			GtkLabel* _tmp31_;
			GtkComboBoxText* _tmp32_;
			GtkLabel* _tmp33_;
			GtkLabel* _tmp34_;
			GtkComboBoxText* _tmp35_;
			GtkComboBoxText* _tmp36_;
			GtkComboBoxText* _tmp37_;
			GtkComboBoxText* _tmp38_;
			GtkBox* service_selector_layouter = NULL;
			GtkBox* _tmp39_;
			GtkBox* _tmp40_;
			GtkBox* _tmp41_;
			GtkLabel* _tmp42_;
			GtkBox* _tmp43_;
			GtkComboBoxText* _tmp44_;
			GtkBox* service_area_layouter = NULL;
			GtkBox* _tmp45_;
			GtkBox* _tmp46_;
			GtkBox* _tmp47_;
			GtkSeparator* service_central_separator = NULL;
			GtkSeparator* _tmp48_;
			GtkBox* _tmp49_;
			GtkSeparator* _tmp50_;
			GtkBox* _tmp51_;
			GtkBox* _tmp52_;
			GtkBox* _tmp53_;
			GtkBox* _tmp54_;
			GtkBox* _tmp55_;
			GtkBox* _tmp56_;
			_tmp29_ = label;
			_tmp30_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp29_);
			g_object_ref_sink (_tmp30_);
			service_selector_box_label = _tmp30_;
			_tmp31_ = service_selector_box_label;
			_tmp32_ = self->priv->service_selector_box;
			gtk_label_set_mnemonic_widget (_tmp31_, G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_widget_get_type (), GtkWidget));
			_tmp33_ = service_selector_box_label;
			gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
			_tmp34_ = service_selector_box_label;
			gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
			_tmp35_ = self->priv->service_selector_box;
			gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_END);
			_tmp36_ = self->priv->service_selector_box;
			gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
			_tmp37_ = self->priv->service_selector_box;
			gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_widget_get_type (), GtkWidget), FALSE);
			_tmp38_ = self->priv->service_selector_box;
			gtk_widget_set_vexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_widget_get_type (), GtkWidget), FALSE);
			_tmp39_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
			g_object_ref_sink (_tmp39_);
			service_selector_layouter = _tmp39_;
			_tmp40_ = service_selector_layouter;
			gtk_container_set_border_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, gtk_container_get_type (), GtkContainer), (guint) 12);
			_tmp41_ = service_selector_layouter;
			_tmp42_ = service_selector_box_label;
			gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_widget_get_type (), GtkWidget));
			_tmp43_ = service_selector_layouter;
			_tmp44_ = self->priv->service_selector_box;
			gtk_box_pack_start (_tmp43_, G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
			_tmp45_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
			g_object_ref_sink (_tmp45_);
			service_area_layouter = _tmp45_;
			_tmp46_ = service_area_layouter;
			_tmp47_ = service_selector_layouter;
			gtk_box_pack_start (_tmp46_, G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
			_tmp48_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
			g_object_ref_sink (_tmp48_);
			service_central_separator = _tmp48_;
			_tmp49_ = service_area_layouter;
			_tmp50_ = service_central_separator;
			gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, gtk_widget_get_type (), GtkWidget));
			_tmp51_ = service_area_layouter;
			gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_FILL);
			_tmp52_ = service_area_layouter;
			gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
			_tmp53_ = service_area_layouter;
			gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_widget_get_type (), GtkWidget), TRUE);
			_tmp54_ = service_area_layouter;
			gtk_widget_set_vexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_widget_get_type (), GtkWidget), FALSE);
			_tmp55_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
			_tmp56_ = service_area_layouter;
			gtk_box_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
			_g_object_unref0 (service_central_separator);
			_g_object_unref0 (service_area_layouter);
			_g_object_unref0 (service_selector_layouter);
			_g_object_unref0 (service_selector_box_label);
		}
		_g_free0 (last_used_service);
	}
	_tmp57_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp57_);
	_g_object_unref0 (self->priv->central_area_layouter);
	self->priv->central_area_layouter = _tmp57_;
	_tmp58_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
	_tmp59_ = self->priv->central_area_layouter;
	gtk_box_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	if (use_header) {
		GtkButton* _tmp60_;
		GtkButton* _tmp61_;
		GtkHeaderBar* _tmp62_;
		GtkButton* _tmp63_;
		GtkComboBoxText* _tmp64_;
		_tmp60_ = (GtkButton*) gtk_button_new_with_mnemonic ("_Cancel");
		g_object_ref_sink (_tmp60_);
		_g_object_unref0 (self->priv->close_cancel_button);
		self->priv->close_cancel_button = _tmp60_;
		_tmp61_ = self->priv->close_cancel_button;
		gtk_widget_set_can_default (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, gtk_widget_get_type (), GtkWidget), TRUE);
		_tmp62_ = gtk_dialog_get_header_bar (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
		_tmp63_ = self->priv->close_cancel_button;
		gtk_header_bar_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, gtk_header_bar_get_type (), GtkHeaderBar), G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, gtk_widget_get_type (), GtkWidget));
		_tmp64_ = self->priv->service_selector_box;
		if (_tmp64_ != NULL) {
			GtkHeaderBar* _tmp65_;
			GtkComboBoxText* _tmp66_;
			_tmp65_ = gtk_dialog_get_header_bar (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
			_tmp66_ = self->priv->service_selector_box;
			gtk_header_bar_pack_end (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_header_bar_get_type (), GtkHeaderBar), G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, gtk_widget_get_type (), GtkWidget));
		}
	} else {
		GtkWidget* _tmp67_;
		GtkButton* _tmp68_;
		gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), _ ("_Cancel"), (gint) GTK_RESPONSE_CANCEL);
		_tmp67_ = gtk_dialog_get_widget_for_response (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_CANCEL);
		_tmp68_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp67_, gtk_button_get_type ()) ? ((GtkButton*) _tmp67_) : NULL);
		_g_object_unref0 (self->priv->close_cancel_button);
		self->priv->close_cancel_button = _tmp68_;
	}
	_tmp69_ = self->priv->close_cancel_button;
	g_signal_connect_object (_tmp69_, "clicked", (GCallback) _data_imports_ui_data_imports_dialog_on_close_cancel_clicked_gtk_button_clicked, self, 0);
	data_imports_ui_data_imports_dialog_set_standard_window_mode (self);
	_tmp70_ = loaded_services;
	_tmp70__length1 = loaded_services_length1;
	if (_tmp70__length1 > 0) {
		data_imports_ui_data_imports_dialog_on_service_changed (self);
	} else {
		DataImportsUIStaticMessagePane* _tmp71_;
		DataImportsUIStaticMessagePane* _tmp72_;
		_tmp71_ = data_imports_ui_static_message_pane_new_with_pango (DATA_IMPORTS_UI_NO_PLUGINS_ENABLED_MESSAGE);
		_tmp72_ = _tmp71_;
		data_imports_ui_data_imports_dialog_install_pane (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, SPIT_DATA_IMPORTS_TYPE_DIALOG_PANE, SpitDataImportsDialogPane));
		_g_object_unref0 (_tmp72_);
		data_imports_ui_data_imports_dialog_set_close_button_mode (self);
	}
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	loaded_services = (_vala_array_free (loaded_services, loaded_services_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_free0 (label);
	_g_free0 (title);
	return self;
}

DataImportsUIDataImportsDialog*
data_imports_ui_data_imports_dialog_new (void)
{
	return data_imports_ui_data_imports_dialog_construct (DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG);
}

DataImportsUIDataImportsDialog*
data_imports_ui_data_imports_dialog_get_or_create_instance (void)
{
	DataImportsUIDataImportsDialog* _tmp0_;
	DataImportsUIDataImportsDialog* _tmp2_;
	DataImportsUIDataImportsDialog* _tmp3_;
	DataImportsUIDataImportsDialog* result;
	_tmp0_ = data_imports_ui_data_imports_dialog_instance;
	if (_tmp0_ == NULL) {
		DataImportsUIDataImportsDialog* _tmp1_;
		_tmp1_ = data_imports_ui_data_imports_dialog_new ();
		g_object_ref_sink (_tmp1_);
		_g_object_unref0 (data_imports_ui_data_imports_dialog_instance);
		data_imports_ui_data_imports_dialog_instance = _tmp1_;
	}
	_tmp2_ = data_imports_ui_data_imports_dialog_instance;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

void
data_imports_ui_data_imports_dialog_terminate_instance (void)
{
	DataImportsUIDataImportsDialog* _tmp0_;
	_tmp0_ = data_imports_ui_data_imports_dialog_instance;
	if (_tmp0_ != NULL) {
		DataImportsUIDataImportsDialog* _tmp1_;
		_tmp1_ = data_imports_ui_data_imports_dialog_instance;
		data_imports_ui_data_imports_dialog_terminate (_tmp1_);
	}
	_g_object_unref0 (data_imports_ui_data_imports_dialog_instance);
	data_imports_ui_data_imports_dialog_instance = NULL;
}

static gboolean
data_imports_ui_data_imports_dialog_on_window_close (DataImportsUIDataImportsDialog* self,
                                                     GdkEventAny* evt)
{
	gboolean result;
	g_return_val_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self), FALSE);
	g_return_val_if_fail (evt != NULL, FALSE);
	g_debug ("DataImportsUI.vala:336: DataImportsDialog: on_window_close( ): invoked" \
".");
	data_imports_ui_data_imports_dialog_terminate (self);
	result = TRUE;
	return result;
}

static void
data_imports_ui_data_imports_dialog_on_service_changed (DataImportsUIDataImportsDialog* self)
{
	gchar* service_name = NULL;
	GtkComboBoxText* _tmp0_;
	gchar* _tmp1_;
	SpitDataImportsService* selected_service = NULL;
	SpitDataImportsService** services = NULL;
	gint _tmp2_ = 0;
	SpitDataImportsService** _tmp3_;
	gint services_length1;
	gint _services_size_;
	SpitDataImportsService** _tmp4_;
	gint _tmp4__length1;
	SpitDataImportsService* _tmp11_;
	ConfigFacade* _tmp12_;
	ConfigFacade* _tmp13_;
	SpitDataImportsService* _tmp14_;
	const gchar* _tmp15_;
	SpitDataImportsService* _tmp16_;
	SpitDataImportsConcreteDataImportsHost* _tmp17_;
	SpitDataImportsConcreteDataImportsHost* _tmp18_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	g_debug ("DataImportsUI.vala:343: DataImportsDialog: on_service_changed invoked.");
	_tmp0_ = self->priv->service_selector_box;
	_tmp1_ = gtk_combo_box_text_get_active_text (_tmp0_);
	service_name = _tmp1_;
	selected_service = NULL;
	_tmp3_ = spit_data_imports_load_all_services (&_tmp2_);
	services = _tmp3_;
	services_length1 = _tmp2_;
	_services_size_ = services_length1;
	_tmp4_ = services;
	_tmp4__length1 = services_length1;
	{
		SpitDataImportsService** service_collection = NULL;
		gint service_collection_length1 = 0;
		gint _service_collection_size_ = 0;
		gint service_it = 0;
		service_collection = _tmp4_;
		service_collection_length1 = _tmp4__length1;
		for (service_it = 0; service_it < service_collection_length1; service_it = service_it + 1) {
			SpitDataImportsService* _tmp5_;
			SpitDataImportsService* service = NULL;
			_tmp5_ = _g_object_ref0 (service_collection[service_it]);
			service = _tmp5_;
			{
				SpitDataImportsService* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				_tmp6_ = service;
				_tmp7_ = spit_pluggable_get_pluggable_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
				_tmp8_ = service_name;
				if (g_strcmp0 (_tmp7_, _tmp8_) == 0) {
					SpitDataImportsService* _tmp9_;
					SpitDataImportsService* _tmp10_;
					_tmp9_ = service;
					_tmp10_ = _g_object_ref0 (_tmp9_);
					_g_object_unref0 (selected_service);
					selected_service = _tmp10_;
					_g_object_unref0 (service);
					break;
				}
				_g_object_unref0 (service);
			}
		}
	}
	_tmp11_ = selected_service;
	_vala_assert (_tmp11_ != NULL, "selected_service != null");
	_tmp12_ = config_facade_get_instance ();
	_tmp13_ = _tmp12_;
	_tmp14_ = selected_service;
	_tmp15_ = spit_pluggable_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, SPIT_TYPE_PLUGGABLE, SpitPluggable));
	configuration_facade_set_last_used_dataimports_service (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp15_);
	_g_object_unref0 (_tmp13_);
	_tmp16_ = selected_service;
	_tmp17_ = spit_data_imports_concrete_data_imports_host_new (_tmp16_, self);
	_g_object_unref0 (self->priv->host);
	self->priv->host = _tmp17_;
	_tmp18_ = self->priv->host;
	spit_data_imports_plugin_host_start_importing (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, SPIT_DATA_IMPORTS_TYPE_PLUGIN_HOST, SpitDataImportsPluginHost));
	services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (selected_service);
	_g_free0 (service_name);
}

static void
data_imports_ui_data_imports_dialog_on_close_cancel_clicked (DataImportsUIDataImportsDialog* self)
{
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	g_debug ("DataImportsUI.vala:363: DataImportsDialog: on_close_cancel_clicked( ):" \
" invoked.");
	data_imports_ui_data_imports_dialog_terminate (self);
}

static void
data_imports_ui_data_imports_dialog_terminate (DataImportsUIDataImportsDialog* self)
{
	SpitDataImportsConcreteDataImportsHost* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	g_debug ("DataImportsUI.vala:369: DataImportsDialog: terminate( ): invoked.");
	_tmp0_ = self->priv->host;
	if (_tmp0_ != NULL) {
		SpitDataImportsConcreteDataImportsHost* _tmp1_;
		_tmp1_ = self->priv->host;
		spit_data_imports_plugin_host_stop_importing (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SPIT_DATA_IMPORTS_TYPE_PLUGIN_HOST, SpitDataImportsPluginHost));
		_g_object_unref0 (self->priv->host);
		self->priv->host = NULL;
	}
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (data_imports_ui_data_imports_dialog_instance);
	data_imports_ui_data_imports_dialog_instance = NULL;
}

static void
data_imports_ui_data_imports_dialog_set_large_window_mode (DataImportsUIDataImportsDialog* self)
{
	GtkBox* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_LARGE_WINDOW_WIDTH, DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_LARGE_WINDOW_HEIGHT);
	_tmp0_ = self->priv->central_area_layouter;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_LARGE_WINDOW_WIDTH - DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_WIDTH, DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_LARGE_WINDOW_HEIGHT - DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_HEIGHT);
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

static void
data_imports_ui_data_imports_dialog_set_colossal_window_mode (DataImportsUIDataImportsDialog* self)
{
	GtkBox* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_COLOSSAL_WINDOW_WIDTH, DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_COLOSSAL_WINDOW_HEIGHT);
	_tmp0_ = self->priv->central_area_layouter;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_COLOSSAL_WINDOW_WIDTH - DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_WIDTH, DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_COLOSSAL_WINDOW_HEIGHT - DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_HEIGHT);
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

static void
data_imports_ui_data_imports_dialog_set_standard_window_mode (DataImportsUIDataImportsDialog* self)
{
	GtkBox* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_WINDOW_WIDTH, DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_WINDOW_HEIGHT);
	_tmp0_ = self->priv->central_area_layouter;
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_WINDOW_WIDTH - DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_WIDTH, DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_STANDARD_WINDOW_HEIGHT - DATA_IMPORTS_UI_DATA_IMPORTS_DIALOG_BORDER_REGION_HEIGHT);
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

static void
data_imports_ui_data_imports_dialog_set_free_sizable_window_mode (DataImportsUIDataImportsDialog* self)
{
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), TRUE);
}

static void
data_imports_ui_data_imports_dialog_clear_free_sizable_window_mode (DataImportsUIDataImportsDialog* self)
{
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
}

SpitDataImportsDialogPane*
data_imports_ui_data_imports_dialog_get_active_pane (DataImportsUIDataImportsDialog* self)
{
	SpitDataImportsDialogPane* _tmp0_;
	SpitDataImportsDialogPane* _tmp1_;
	SpitDataImportsDialogPane* result;
	g_return_val_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self), NULL);
	_tmp0_ = self->priv->active_pane;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

void
data_imports_ui_data_imports_dialog_set_close_button_mode (DataImportsUIDataImportsDialog* self)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	_tmp0_ = self->priv->close_cancel_button;
	gtk_button_set_label (_tmp0_, _ ("_Close"));
	_tmp1_ = self->priv->close_cancel_button;
	gtk_window_set_default (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget));
}

void
data_imports_ui_data_imports_dialog_set_cancel_button_mode (DataImportsUIDataImportsDialog* self)
{
	GtkButton* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	_tmp0_ = self->priv->close_cancel_button;
	gtk_button_set_label (_tmp0_, _ ("_Cancel"));
}

void
data_imports_ui_data_imports_dialog_lock_service (DataImportsUIDataImportsDialog* self)
{
	GtkComboBoxText* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	_tmp0_ = self->priv->service_selector_box;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), FALSE);
}

void
data_imports_ui_data_imports_dialog_unlock_service (DataImportsUIDataImportsDialog* self)
{
	GtkComboBoxText* _tmp0_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	_tmp0_ = self->priv->service_selector_box;
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), TRUE);
}

void
data_imports_ui_data_imports_dialog_install_pane (DataImportsUIDataImportsDialog* self,
                                                  SpitDataImportsDialogPane* pane)
{
	SpitDataImportsDialogPane* _tmp0_;
	GtkBox* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* _tmp8_;
	SpitDataImportsDialogPaneGeometryOptions geometry_options = 0;
	SpitDataImportsDialogPane* _tmp9_;
	g_return_if_fail (DATA_IMPORTS_UI_IS_DATA_IMPORTS_DIALOG (self));
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (pane, SPIT_DATA_IMPORTS_TYPE_DIALOG_PANE));
	g_debug ("DataImportsUI.vala:432: DataImportsDialog: install_pane( ): invoked.");
	_tmp0_ = self->priv->active_pane;
	if (_tmp0_ != NULL) {
		SpitDataImportsDialogPane* _tmp1_;
		GtkBox* _tmp2_;
		SpitDataImportsDialogPane* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		g_debug ("DataImportsUI.vala:435: DataImportsDialog: install_pane( ): a pane is " \
"already installed; removing it.");
		_tmp1_ = self->priv->active_pane;
		spit_data_imports_dialog_pane_on_pane_uninstalled (_tmp1_);
		_tmp2_ = self->priv->central_area_layouter;
		_tmp3_ = self->priv->active_pane;
		_tmp4_ = spit_data_imports_dialog_pane_get_widget (_tmp3_);
		_tmp5_ = _tmp4_;
		gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), _tmp5_);
		_g_object_unref0 (_tmp5_);
	}
	_tmp6_ = self->priv->central_area_layouter;
	_tmp7_ = spit_data_imports_dialog_pane_get_widget (pane);
	_tmp8_ = _tmp7_;
	gtk_box_pack_start (_tmp6_, _tmp8_, TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp8_);
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	geometry_options = spit_data_imports_dialog_pane_get_preferred_geometry (pane);
	if ((geometry_options & SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_EXTENDED_SIZE) != 0) {
		data_imports_ui_data_imports_dialog_set_large_window_mode (self);
	} else {
		if ((geometry_options & SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_COLOSSAL_SIZE) != 0) {
			data_imports_ui_data_imports_dialog_set_colossal_window_mode (self);
		} else {
			data_imports_ui_data_imports_dialog_set_standard_window_mode (self);
		}
	}
	if ((geometry_options & SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_RESIZABLE) != 0) {
		data_imports_ui_data_imports_dialog_set_free_sizable_window_mode (self);
	} else {
		data_imports_ui_data_imports_dialog_clear_free_sizable_window_mode (self);
	}
	_tmp9_ = _g_object_ref0 (pane);
	_g_object_unref0 (self->priv->active_pane);
	self->priv->active_pane = _tmp9_;
	spit_data_imports_dialog_pane_on_pane_installed (pane);
}

static void
data_imports_ui_data_imports_dialog_class_init (DataImportsUIDataImportsDialogClass * klass,
                                                gpointer klass_data)
{
	data_imports_ui_data_imports_dialog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DataImportsUIDataImportsDialog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = data_imports_ui_data_imports_dialog_finalize;
}

static void
data_imports_ui_data_imports_dialog_instance_init (DataImportsUIDataImportsDialog * self,
                                                   gpointer klass)
{
	self->priv = data_imports_ui_data_imports_dialog_get_instance_private (self);
}

static void
data_imports_ui_data_imports_dialog_finalize (GObject * obj)
{
	DataImportsUIDataImportsDialog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_UI_TYPE_DATA_IMPORTS_DIALOG, DataImportsUIDataImportsDialog);
	_g_object_unref0 (self->priv->service_selector_box);
	_g_object_unref0 (self->priv->central_area_layouter);
	_g_object_unref0 (self->priv->close_cancel_button);
	_g_object_unref0 (self->priv->active_pane);
	_g_object_unref0 (self->priv->host);
	G_OBJECT_CLASS (data_imports_ui_data_imports_dialog_parent_class)->finalize (obj);
}

static GType
data_imports_ui_data_imports_dialog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DataImportsUIDataImportsDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_ui_data_imports_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsUIDataImportsDialog), 0, (GInstanceInitFunc) data_imports_ui_data_imports_dialog_instance_init, NULL };
	GType data_imports_ui_data_imports_dialog_type_id;
	data_imports_ui_data_imports_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "DataImportsUIDataImportsDialog", &g_define_type_info, 0);
	DataImportsUIDataImportsDialog_private_offset = g_type_add_instance_private (data_imports_ui_data_imports_dialog_type_id, sizeof (DataImportsUIDataImportsDialogPrivate));
	return data_imports_ui_data_imports_dialog_type_id;
}

GType
data_imports_ui_data_imports_dialog_get_type (void)
{
	static volatile gsize data_imports_ui_data_imports_dialog_type_id__once = 0;
	if (g_once_init_enter (&data_imports_ui_data_imports_dialog_type_id__once)) {
		GType data_imports_ui_data_imports_dialog_type_id;
		data_imports_ui_data_imports_dialog_type_id = data_imports_ui_data_imports_dialog_get_type_once ();
		g_once_init_leave (&data_imports_ui_data_imports_dialog_type_id__once, data_imports_ui_data_imports_dialog_type_id);
	}
	return data_imports_ui_data_imports_dialog_type_id__once;
}

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

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

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

