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

/* Copyright 2016 Software Freedom Conservancy Inc.
 * Copyright 2017 Jens Georg <mail@jensge.org>
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <gio/gio.h>


#define TYPE_WELCOME_SERVICE_ENTRY (welcome_service_entry_get_type ())
#define WELCOME_SERVICE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WELCOME_SERVICE_ENTRY, WelcomeServiceEntry))
#define IS_WELCOME_SERVICE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WELCOME_SERVICE_ENTRY))
#define WELCOME_SERVICE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_WELCOME_SERVICE_ENTRY, WelcomeServiceEntryIface))

typedef struct _WelcomeServiceEntry WelcomeServiceEntry;
typedef struct _WelcomeServiceEntryIface WelcomeServiceEntryIface;

#define TYPE_WELCOME_DIALOG (welcome_dialog_get_type ())
#define WELCOME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WELCOME_DIALOG, WelcomeDialog))
#define WELCOME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WELCOME_DIALOG, WelcomeDialogClass))
#define IS_WELCOME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WELCOME_DIALOG))
#define IS_WELCOME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WELCOME_DIALOG))
#define WELCOME_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WELCOME_DIALOG, WelcomeDialogClass))

typedef struct _WelcomeDialog WelcomeDialog;
typedef struct _WelcomeDialogClass WelcomeDialogClass;
typedef struct _WelcomeDialogPrivate WelcomeDialogPrivate;

#define SPIT_DATA_IMPORTS_TYPE_WELCOME_IMPORT_META_HOST (spit_data_imports_welcome_import_meta_host_get_type ())
#define SPIT_DATA_IMPORTS_WELCOME_IMPORT_META_HOST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPIT_DATA_IMPORTS_TYPE_WELCOME_IMPORT_META_HOST, SpitDataImportsWelcomeImportMetaHost))
#define SPIT_DATA_IMPORTS_WELCOME_IMPORT_META_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SPIT_DATA_IMPORTS_TYPE_WELCOME_IMPORT_META_HOST, SpitDataImportsWelcomeImportMetaHostClass))
#define SPIT_DATA_IMPORTS_IS_WELCOME_IMPORT_META_HOST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPIT_DATA_IMPORTS_TYPE_WELCOME_IMPORT_META_HOST))
#define SPIT_DATA_IMPORTS_IS_WELCOME_IMPORT_META_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPIT_DATA_IMPORTS_TYPE_WELCOME_IMPORT_META_HOST))
#define SPIT_DATA_IMPORTS_WELCOME_IMPORT_META_HOST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPIT_DATA_IMPORTS_TYPE_WELCOME_IMPORT_META_HOST, SpitDataImportsWelcomeImportMetaHostClass))

typedef struct _SpitDataImportsWelcomeImportMetaHost SpitDataImportsWelcomeImportMetaHost;
typedef struct _SpitDataImportsWelcomeImportMetaHostClass SpitDataImportsWelcomeImportMetaHostClass;
enum  {
	WELCOME_DIALOG_0_PROPERTY,
	WELCOME_DIALOG_NUM_PROPERTIES
};
static GParamSpec* welcome_dialog_properties[WELCOME_DIALOG_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _WelcomeServiceEntryIface {
	GTypeInterface parent_iface;
	gchar* (*get_service_name) (WelcomeServiceEntry* self);
	void (*execute) (WelcomeServiceEntry* self);
};

struct _WelcomeDialog {
	GtkDialog parent_instance;
	WelcomeDialogPrivate * priv;
};

struct _WelcomeDialogClass {
	GtkDialogClass parent_class;
};

struct _WelcomeDialogPrivate {
	GtkCheckButton* hide_button;
	GtkCheckButton* system_pictures_import_check;
	GtkCheckButton** external_import_checks;
	gint external_import_checks_length1;
	gint _external_import_checks_size_;
	WelcomeServiceEntry** external_import_entries;
	gint external_import_entries_length1;
	gint _external_import_entries_size_;
	GtkLabel* secondary_text;
	GtkLabel* instruction_header;
	GtkBox* import_content;
	GtkBox* import_action_checkbox_packer;
	GtkBox* external_import_action_checkbox_packer;
	SpitDataImportsWelcomeImportMetaHost* import_meta_host;
	gboolean import_content_already_installed;
	gboolean ok_clicked;
};


static gpointer welcome_dialog_parent_class = NULL;

GType welcome_service_entry_get_type (void) G_GNUC_CONST;
gchar* welcome_service_entry_get_service_name (WelcomeServiceEntry* self);
void welcome_service_entry_execute (WelcomeServiceEntry* self);
GType welcome_dialog_get_type (void) G_GNUC_CONST;
GType spit_data_imports_welcome_import_meta_host_get_type (void) G_GNUC_CONST;
#define WELCOME_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_WELCOME_DIALOG, WelcomeDialogPrivate))
WelcomeDialog* welcome_dialog_new (GtkWindow* owner);
WelcomeDialog* welcome_dialog_construct (GType object_type,
                                         GtkWindow* owner);
gint resources_use_header_bar (void);
SpitDataImportsWelcomeImportMetaHost* spit_data_imports_welcome_import_meta_host_new (WelcomeDialog* dialog);
SpitDataImportsWelcomeImportMetaHost* spit_data_imports_welcome_import_meta_host_construct (GType object_type,
                                                                                            WelcomeDialog* dialog);
static gboolean welcome_dialog_is_system_pictures_import_possible (void);
#define RESOURCES_OK_LABEL _ ("_OK")
gchar* get_display_pathname (GFile* file);
GFile* app_dirs_get_import_dir (void);
static void welcome_dialog_install_import_content (WelcomeDialog* self);
void spit_data_imports_welcome_import_meta_host_start (SpitDataImportsWelcomeImportMetaHost* self);
void welcome_dialog_install_service_entry (WelcomeDialog* self,
                                           WelcomeServiceEntry* entry);
static void _vala_array_add4 (WelcomeServiceEntry** * array,
                       int* length,
                       int* size,
                       WelcomeServiceEntry* value);
static void _vala_array_add5 (GtkCheckButton** * array,
                       int* length,
                       int* size,
                       GtkCheckButton* value);
static void welcome_dialog_on_dismiss (WelcomeDialog* self,
                                gint resp);
gboolean welcome_dialog_execute (WelcomeDialog* self,
                                 WelcomeServiceEntry*** selected_import_entries,
                                 int* selected_import_entries_length1,
                                 gboolean* do_system_pictures_import);
static void _welcome_dialog_on_dismiss_gtk_dialog_response (GtkDialog* _sender,
                                                     gint response_id,
                                                     gpointer self);
static void _vala_array_add6 (WelcomeServiceEntry** * array,
                       int* length,
                       int* size,
                       WelcomeServiceEntry* value);
static WelcomeServiceEntry** _vala_array_dup1 (WelcomeServiceEntry** self,
                                        int length);
static void welcome_dialog_finalize (GObject * obj);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);


gchar*
welcome_service_entry_get_service_name (WelcomeServiceEntry* self)
{
#line 9 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_val_if_fail (IS_WELCOME_SERVICE_ENTRY (self), NULL);
#line 9 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	return WELCOME_SERVICE_ENTRY_GET_INTERFACE (self)->get_service_name (self);
#line 157 "WelcomeDialog.c"
}


void
welcome_service_entry_execute (WelcomeServiceEntry* self)
{
#line 11 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_if_fail (IS_WELCOME_SERVICE_ENTRY (self));
#line 11 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	WELCOME_SERVICE_ENTRY_GET_INTERFACE (self)->execute (self);
#line 168 "WelcomeDialog.c"
}


static void
welcome_service_entry_base_init (WelcomeServiceEntryIface * iface)
{
#line 8 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	static gboolean initialized = FALSE;
#line 8 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (!initialized) {
#line 8 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		initialized = TRUE;
#line 181 "WelcomeDialog.c"
	}
}


GType
welcome_service_entry_get_type (void)
{
	static volatile gsize welcome_service_entry_type_id__volatile = 0;
	if (g_once_init_enter (&welcome_service_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (WelcomeServiceEntryIface), (GBaseInitFunc) welcome_service_entry_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType welcome_service_entry_type_id;
		welcome_service_entry_type_id = g_type_register_static (G_TYPE_INTERFACE, "WelcomeServiceEntry", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (welcome_service_entry_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&welcome_service_entry_type_id__volatile, welcome_service_entry_type_id);
	}
	return welcome_service_entry_type_id__volatile;
}


static gpointer
_g_object_ref0 (gpointer self)
{
#line 32 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	return self ? g_object_ref (self) : NULL;
#line 206 "WelcomeDialog.c"
}


WelcomeDialog*
welcome_dialog_construct (GType object_type,
                          GtkWindow* owner)
{
	WelcomeDialog * self = NULL;
	SpitDataImportsWelcomeImportMetaHost* _tmp0_;
	gboolean show_system_pictures_import = FALSE;
	GtkWidget* ok_button = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkLabel* primary_text = NULL;
	GtkLabel* _tmp3_;
	GtkLabel* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkLabel* _tmp7_;
	GtkLabel* _tmp8_;
	GtkLabel* _tmp9_;
	GtkLabel* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkLabel* _tmp13_;
	GtkLabel* _tmp14_;
	GtkImage* image = NULL;
	GtkImage* _tmp15_;
	GtkBox* header_text = NULL;
	GtkBox* _tmp16_;
	GtkBox* _tmp17_;
	GtkLabel* _tmp18_;
	GtkBox* _tmp19_;
	GtkLabel* _tmp20_;
	GtkBox* header_content = NULL;
	GtkBox* _tmp21_;
	GtkBox* _tmp22_;
	GtkImage* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* _tmp25_;
	GtkLabel* instructions = NULL;
	GtkLabel* _tmp26_;
	gchar* indent_prefix = NULL;
	gchar* _tmp27_;
	const gchar* _tmp28_ = NULL;
	gchar* arrow_glyph = NULL;
	gchar* _tmp29_;
	GtkLabel* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	const gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	GtkLabel* _tmp49_;
	GtkLabel* _tmp50_;
	GtkBox* _tmp51_;
	GtkBox* _tmp52_;
	GtkBox* _tmp53_;
	GtkBox* _tmp54_;
	gboolean _tmp55_;
	GtkLabel* _tmp66_;
	GtkLabel* _tmp67_;
	GtkLabel* _tmp68_;
	GtkLabel* _tmp69_;
	GtkBox* content = NULL;
	GtkBox* _tmp70_;
	GtkBox* _tmp71_;
	GtkBox* _tmp72_;
	GtkBox* _tmp73_;
	GtkLabel* _tmp74_;
	GtkCheckButton* _tmp75_;
	GtkCheckButton* _tmp76_;
	GtkCheckButton* _tmp77_;
	GtkBox* _tmp78_;
	GtkWidget* _tmp79_;
	SpitDataImportsWelcomeImportMetaHost* _tmp80_;
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_val_if_fail (GTK_IS_WINDOW (owner), NULL);
#line 29 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self = (WelcomeDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL);
#line 30 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp0_ = spit_data_imports_welcome_import_meta_host_new (self);
#line 30 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->import_meta_host);
#line 30 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->import_meta_host = _tmp0_;
#line 31 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	show_system_pictures_import = welcome_dialog_is_system_pictures_import_possible ();
#line 32 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp1_ = gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), RESOURCES_OK_LABEL, (gint) GTK_RESPONSE_CLOSE);
#line 32 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 32 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	ok_button = _tmp2_;
#line 33 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_dialog_set_default_response (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_CLOSE);
#line 35 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _ ("Welcome!"));
#line 36 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
#line 37 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_window_set_type_hint (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GDK_WINDOW_TYPE_HINT_DIALOG);
#line 38 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), owner);
#line 40 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp3_ = (GtkLabel*) gtk_label_new ("");
#line 40 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp3_);
#line 40 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	primary_text = _tmp3_;
#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp4_ = primary_text;
#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp5_ = g_strdup_printf ("<span size=\"large\" weight=\"bold\">%s</span>", _ ("Welcome to Shotwell!"));
#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp6_ = _tmp5_;
#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_markup (_tmp4_, _tmp6_);
#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp6_);
#line 43 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp7_ = primary_text;
#line 43 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_xalign (_tmp7_, 0.0f);
#line 44 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp8_ = primary_text;
#line 44 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_yalign (_tmp8_, 0.5f);
#line 45 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp9_ = (GtkLabel*) gtk_label_new ("");
#line 45 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp9_);
#line 45 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->secondary_text);
#line 45 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->secondary_text = _tmp9_;
#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp10_ = self->priv->secondary_text;
#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp11_ = g_strdup_printf ("<span weight=\"normal\">%s</span>", _ ("To get started, import photos in any of these ways:"));
#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp12_ = _tmp11_;
#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_markup (_tmp10_, _tmp12_);
#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp12_);
#line 48 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp13_ = self->priv->secondary_text;
#line 48 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_xalign (_tmp13_, 0.0f);
#line 49 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp14_ = self->priv->secondary_text;
#line 49 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_yalign (_tmp14_, 0.5f);
#line 50 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp15_ = (GtkImage*) gtk_image_new_from_icon_name ("shotwell", (GtkIconSize) GTK_ICON_SIZE_DIALOG);
#line 50 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp15_);
#line 50 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	image = _tmp15_;
#line 52 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp16_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
#line 52 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp16_);
#line 52 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	header_text = _tmp16_;
#line 53 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp17_ = header_text;
#line 53 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp18_ = primary_text;
#line 53 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 5);
#line 54 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp19_ = header_text;
#line 54 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp20_ = self->priv->secondary_text;
#line 54 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (_tmp19_, G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 56 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp21_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
#line 56 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp21_);
#line 56 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	header_content = _tmp21_;
#line 57 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp22_ = header_content;
#line 57 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp23_ = image;
#line 57 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (_tmp22_, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 58 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp24_ = header_content;
#line 58 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp25_ = header_text;
#line 58 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (_tmp24_, G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 60 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp26_ = (GtkLabel*) gtk_label_new ("");
#line 60 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp26_);
#line 60 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	instructions = _tmp26_;
#line 61 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp27_ = g_strdup ("   ");
#line 61 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	indent_prefix = _tmp27_;
#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (gtk_widget_get_direction (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)) == GTK_TEXT_DIR_RTL) {
#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp28_ = "◂";
#line 430 "WelcomeDialog.c"
	} else {
#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp28_ = "▸";
#line 434 "WelcomeDialog.c"
	}
#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp29_ = g_strdup (_tmp28_);
#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	arrow_glyph = _tmp29_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp30_ = instructions;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp31_ = indent_prefix;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp32_ = g_strconcat (_tmp31_, "&#8226; %s\n", NULL);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp33_ = _tmp32_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp34_ = indent_prefix;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp35_ = g_strconcat (_tmp34_, "&#8226; %s\n", NULL);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp36_ = _tmp35_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp37_ = g_strconcat (_tmp33_, _tmp36_, NULL);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp38_ = _tmp37_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp39_ = indent_prefix;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp40_ = g_strconcat (_tmp39_, "&#8226; %s", NULL);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp41_ = _tmp40_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp42_ = g_strconcat (_tmp38_, _tmp41_, NULL);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp43_ = _tmp42_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp44_ = arrow_glyph;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp45_ = g_strdup_printf (_ ("Choose <span weight=\"bold\">File %s Import From Folder</span>"), _tmp44_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp46_ = _tmp45_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp47_ = g_strdup_printf (_tmp43_, _tmp46_, _ ("Drag and drop photos onto the Shotwell window"), _ ("Connect a camera to your computer and import"));
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp48_ = _tmp47_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_markup (_tmp30_, _tmp48_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp48_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp46_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp43_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp41_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp38_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp36_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp33_);
#line 70 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp49_ = instructions;
#line 70 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_xalign (_tmp49_, 0.0f);
#line 71 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp50_ = instructions;
#line 71 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_yalign (_tmp50_, 0.5f);
#line 73 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp51_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
#line 73 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp51_);
#line 73 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->import_action_checkbox_packer);
#line 73 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->import_action_checkbox_packer = _tmp51_;
#line 75 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp52_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
#line 75 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp52_);
#line 75 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->external_import_action_checkbox_packer);
#line 75 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->external_import_action_checkbox_packer = _tmp52_;
#line 76 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp53_ = self->priv->import_action_checkbox_packer;
#line 76 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp54_ = self->priv->external_import_action_checkbox_packer;
#line 76 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_widget_get_type (), GtkWidget));
#line 78 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp55_ = show_system_pictures_import;
#line 78 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (_tmp55_) {
#line 528 "WelcomeDialog.c"
		GFile* _tmp56_;
		GFile* _tmp57_;
		gchar* _tmp58_;
		gchar* _tmp59_;
		gchar* _tmp60_;
		gchar* _tmp61_;
		GtkCheckButton* _tmp62_;
		GtkBox* _tmp63_;
		GtkCheckButton* _tmp64_;
		GtkCheckButton* _tmp65_;
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp56_ = app_dirs_get_import_dir ();
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp57_ = _tmp56_;
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp58_ = get_display_pathname (_tmp57_);
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp59_ = _tmp58_;
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp60_ = g_strdup_printf (_ ("_Import photos from your %s folder"), _tmp59_);
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp61_ = _tmp60_;
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp62_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp61_);
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		g_object_ref_sink (_tmp62_);
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (self->priv->system_pictures_import_check);
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		self->priv->system_pictures_import_check = _tmp62_;
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_free0 (_tmp61_);
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_free0 (_tmp59_);
#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (_tmp57_);
#line 82 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp63_ = self->priv->import_action_checkbox_packer;
#line 82 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp64_ = self->priv->system_pictures_import_check;
#line 82 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, gtk_widget_get_type (), GtkWidget));
#line 83 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp65_ = self->priv->system_pictures_import_check;
#line 83 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
#line 575 "WelcomeDialog.c"
	}
#line 86 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp66_ = (GtkLabel*) gtk_label_new (_ ("You can also import photos in any of these ways:"));
#line 86 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp66_);
#line 86 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->instruction_header);
#line 86 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->instruction_header = _tmp66_;
#line 88 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp67_ = self->priv->instruction_header;
#line 88 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_xalign (_tmp67_, 0.0f);
#line 89 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp68_ = self->priv->instruction_header;
#line 89 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_label_set_yalign (_tmp68_, 0.5f);
#line 90 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp69_ = self->priv->instruction_header;
#line 90 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_margin_top (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, gtk_widget_get_type (), GtkWidget), 20);
#line 92 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp70_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 16);
#line 92 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp70_);
#line 92 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	content = _tmp70_;
#line 93 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp71_ = header_content;
#line 93 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (content, G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
#line 94 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp72_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
#line 94 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp72_);
#line 94 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->import_content);
#line 94 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->import_content = _tmp72_;
#line 95 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp73_ = self->priv->import_content;
#line 95 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, gtk_widget_get_type (), GtkWidget));
#line 96 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp74_ = instructions;
#line 96 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (content, G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 98 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp75_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_ ("_Don’t show this message again"));
#line 98 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp75_);
#line 98 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->hide_button);
#line 98 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->hide_button = _tmp75_;
#line 99 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp76_ = self->priv->hide_button;
#line 99 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
#line 100 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp77_ = self->priv->hide_button;
#line 100 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (content, G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 6);
#line 101 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_FILL);
#line 102 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_FILL);
#line 103 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), FALSE);
#line 104 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_vexpand (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), FALSE);
#line 105 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_margin_top (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), 12);
#line 106 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_margin_bottom (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), 0);
#line 107 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_margin_start (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), 12);
#line 108 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_set_margin_end (G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), 12);
#line 110 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp78_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
#line 110 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_box_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (content, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 112 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp79_ = ok_button;
#line 112 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_grab_focus (_tmp79_);
#line 114 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	welcome_dialog_install_import_content (self);
#line 116 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp80_ = self->priv->import_meta_host;
#line 116 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	spit_data_imports_welcome_import_meta_host_start (_tmp80_);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (content);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (arrow_glyph);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (indent_prefix);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (instructions);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (header_content);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (header_text);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (image);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (primary_text);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (ok_button);
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	return self;
#line 689 "WelcomeDialog.c"
}


WelcomeDialog*
welcome_dialog_new (GtkWindow* owner)
{
#line 28 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	return welcome_dialog_construct (TYPE_WELCOME_DIALOG, owner);
#line 698 "WelcomeDialog.c"
}


static void
welcome_dialog_install_import_content (WelcomeDialog* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkCheckButton** _tmp2_;
	gint _tmp2__length1;
#line 119 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_if_fail (IS_WELCOME_DIALOG (self));
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp2_ = self->priv->external_import_checks;
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp2__length1 = self->priv->external_import_checks_length1;
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (_tmp2__length1 > 0) {
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp1_ = TRUE;
#line 719 "WelcomeDialog.c"
	} else {
		GtkCheckButton* _tmp3_;
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp3_ = self->priv->system_pictures_import_check;
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp1_ = _tmp3_ != NULL;
#line 726 "WelcomeDialog.c"
	}
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (_tmp1_) {
#line 730 "WelcomeDialog.c"
		gboolean _tmp4_;
#line 122 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp4_ = self->priv->import_content_already_installed;
#line 122 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp0_ = _tmp4_ == FALSE;
#line 736 "WelcomeDialog.c"
	} else {
#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp0_ = FALSE;
#line 740 "WelcomeDialog.c"
	}
#line 120 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (_tmp0_) {
#line 744 "WelcomeDialog.c"
		GtkLabel* _tmp5_;
		GtkBox* _tmp6_;
		GtkBox* _tmp7_;
		GtkBox* _tmp8_;
		GtkLabel* _tmp9_;
#line 124 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp5_ = self->priv->secondary_text;
#line 124 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		gtk_label_set_markup (_tmp5_, "");
#line 125 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp6_ = self->priv->import_content;
#line 125 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp7_ = self->priv->import_action_checkbox_packer;
#line 125 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
#line 126 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp8_ = self->priv->import_content;
#line 126 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp9_ = self->priv->instruction_header;
#line 126 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
#line 127 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		self->priv->import_content_already_installed = TRUE;
#line 768 "WelcomeDialog.c"
	}
}


static void
_vala_array_add4 (WelcomeServiceEntry** * array,
                  int* length,
                  int* size,
                  WelcomeServiceEntry* value)
{
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if ((*length) == (*size)) {
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*array = g_renew (WelcomeServiceEntry*, *array, (*size) + 1);
#line 785 "WelcomeDialog.c"
	}
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	(*array)[(*length)++] = value;
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	(*array)[*length] = NULL;
#line 791 "WelcomeDialog.c"
}


static void
_vala_array_add5 (GtkCheckButton** * array,
                  int* length,
                  int* size,
                  GtkCheckButton* value)
{
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if ((*length) == (*size)) {
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*array = g_renew (GtkCheckButton*, *array, (*size) + 1);
#line 807 "WelcomeDialog.c"
	}
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	(*array)[(*length)++] = value;
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	(*array)[*length] = NULL;
#line 813 "WelcomeDialog.c"
}


void
welcome_dialog_install_service_entry (WelcomeDialog* self,
                                      WelcomeServiceEntry* entry)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	WelcomeServiceEntry** _tmp4_;
	gint _tmp4__length1;
	WelcomeServiceEntry* _tmp5_;
	GtkCheckButton* entry_check = NULL;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GtkCheckButton* _tmp10_;
	GtkCheckButton* _tmp11_;
	GtkCheckButton** _tmp12_;
	gint _tmp12__length1;
	GtkCheckButton* _tmp13_;
	GtkBox* _tmp14_;
#line 131 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_if_fail (IS_WELCOME_DIALOG (self));
#line 131 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_if_fail (IS_WELCOME_SERVICE_ENTRY (entry));
#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp0_ = welcome_service_entry_get_service_name (entry);
#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp1_ = _tmp0_;
#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp2_ = g_strdup_printf ("WelcomeDialog: Installing service entry for %s", _tmp1_);
#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp3_ = _tmp2_;
#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_debug ("WelcomeDialog.vala:132: %s", _tmp3_);
#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp3_);
#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp1_);
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp4_ = self->priv->external_import_entries;
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp4__length1 = self->priv->external_import_entries_length1;
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp5_ = _g_object_ref0 (entry);
#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_vala_array_add4 (&self->priv->external_import_entries, &self->priv->external_import_entries_length1, &self->priv->_external_import_entries_size_, _tmp5_);
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp6_ = welcome_service_entry_get_service_name (entry);
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp7_ = _tmp6_;
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp8_ = g_strdup_printf (_ ("Import photos from your %s library"), _tmp7_);
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp9_ = _tmp8_;
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp10_ = (GtkCheckButton*) gtk_check_button_new_with_label (_tmp9_);
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_object_ref_sink (_tmp10_);
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp11_ = _tmp10_;
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp9_);
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_free0 (_tmp7_);
#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	entry_check = _tmp11_;
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp12_ = self->priv->external_import_checks;
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp12__length1 = self->priv->external_import_checks_length1;
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp13_ = _g_object_ref0 (entry_check);
#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_vala_array_add5 (&self->priv->external_import_checks, &self->priv->external_import_checks_length1, &self->priv->_external_import_checks_size_, _tmp13_);
#line 137 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (entry_check, gtk_toggle_button_get_type (), GtkToggleButton), TRUE);
#line 138 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp14_ = self->priv->external_import_action_checkbox_packer;
#line 138 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (entry_check, gtk_widget_get_type (), GtkWidget));
#line 139 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	welcome_dialog_install_import_content (self);
#line 131 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (entry_check);
#line 903 "WelcomeDialog.c"
}


/**
     * Connected to the 'response' signal.  This is part of a workaround
     * for the fact that run()-ning this dialog can interfere with displaying
     * images from a camera; please see #4997 for details.
     */
static void
welcome_dialog_on_dismiss (WelcomeDialog* self,
                           gint resp)
{
#line 147 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_if_fail (IS_WELCOME_DIALOG (self));
#line 148 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (resp == ((gint) GTK_RESPONSE_CLOSE)) {
#line 149 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		self->priv->ok_clicked = TRUE;
#line 922 "WelcomeDialog.c"
	}
#line 151 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 152 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_main_quit ();
#line 928 "WelcomeDialog.c"
}


static void
_welcome_dialog_on_dismiss_gtk_dialog_response (GtkDialog* _sender,
                                                gint response_id,
                                                gpointer self)
{
#line 158 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	welcome_dialog_on_dismiss ((WelcomeDialog*) self, response_id);
#line 939 "WelcomeDialog.c"
}


static void
_vala_array_add6 (WelcomeServiceEntry** * array,
                  int* length,
                  int* size,
                  WelcomeServiceEntry* value)
{
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if ((*length) == (*size)) {
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*array = g_renew (WelcomeServiceEntry*, *array, (*size) + 1);
#line 955 "WelcomeDialog.c"
	}
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	(*array)[(*length)++] = value;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	(*array)[*length] = NULL;
#line 961 "WelcomeDialog.c"
}


static WelcomeServiceEntry**
_vala_array_dup1 (WelcomeServiceEntry** self,
                  int length)
{
	WelcomeServiceEntry** result;
	int i;
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	result = g_new0 (WelcomeServiceEntry*, length + 1);
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	for (i = 0; i < length; i++) {
#line 975 "WelcomeDialog.c"
		WelcomeServiceEntry* _tmp0_;
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp0_ = _g_object_ref0 (self[i]);
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		result[i] = _tmp0_;
#line 981 "WelcomeDialog.c"
	}
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	return result;
#line 985 "WelcomeDialog.c"
}


gboolean
welcome_dialog_execute (WelcomeDialog* self,
                        WelcomeServiceEntry*** selected_import_entries,
                        int* selected_import_entries_length1,
                        gboolean* do_system_pictures_import)
{
	WelcomeServiceEntry** _vala_selected_import_entries = NULL;
	int _vala_selected_import_entries_length1 = 0;
	gboolean _vala_do_system_pictures_import = FALSE;
	gboolean result = FALSE;
	guint _tmp0_;
	gboolean ok = FALSE;
	gboolean _tmp1_;
	gboolean show_dialog = FALSE;
	gboolean _tmp2_;
	WelcomeServiceEntry** _result_ = NULL;
	WelcomeServiceEntry** _tmp4_;
	gint _result__length1;
	gint __result__size_;
	WelcomeServiceEntry** _tmp17_;
	gint _tmp17__length1;
	WelcomeServiceEntry** _tmp18_;
	gint _tmp18__length1;
	gboolean _tmp19_ = FALSE;
	GtkCheckButton* _tmp20_;
#line 155 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_return_val_if_fail (IS_WELCOME_DIALOG (self), FALSE);
#line 158 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), "response", (GCallback) _welcome_dialog_on_dismiss_gtk_dialog_response, self, 0);
#line 159 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 160 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 165 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_main ();
#line 169 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_signal_parse_name ("response", gtk_dialog_get_type (), &_tmp0_, NULL, FALSE);
#line 169 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _welcome_dialog_on_dismiss_gtk_dialog_response, self);
#line 171 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp1_ = self->priv->ok_clicked;
#line 171 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	ok = _tmp1_;
#line 172 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	show_dialog = TRUE;
#line 174 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp2_ = ok;
#line 174 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (_tmp2_) {
#line 1038 "WelcomeDialog.c"
		GtkCheckButton* _tmp3_;
#line 175 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp3_ = self->priv->hide_button;
#line 175 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		show_dialog = !gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_toggle_button_get_type (), GtkToggleButton));
#line 1044 "WelcomeDialog.c"
	}
#line 178 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp4_ = g_new0 (WelcomeServiceEntry*, 0 + 1);
#line 178 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_result_ = _tmp4_;
#line 178 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_result__length1 = 0;
#line 178 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	__result__size_ = _result__length1;
#line 1054 "WelcomeDialog.c"
	{
		gint i = 0;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		i = 0;
#line 1059 "WelcomeDialog.c"
		{
			gboolean _tmp5_ = FALSE;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
			_tmp5_ = TRUE;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
			while (TRUE) {
#line 1066 "WelcomeDialog.c"
				gint _tmp7_;
				WelcomeServiceEntry** _tmp8_;
				gint _tmp8__length1;
				GtkCheckButton** _tmp9_;
				gint _tmp9__length1;
				gint _tmp10_;
				GtkCheckButton* _tmp11_;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				if (!_tmp5_) {
#line 1076 "WelcomeDialog.c"
					gint _tmp6_;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp6_ = i;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					i = _tmp6_ + 1;
#line 1082 "WelcomeDialog.c"
				}
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp5_ = FALSE;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp7_ = i;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp8_ = self->priv->external_import_entries;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp8__length1 = self->priv->external_import_entries_length1;
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				if (!(_tmp7_ < _tmp8__length1)) {
#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					break;
#line 1096 "WelcomeDialog.c"
				}
#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp9_ = self->priv->external_import_checks;
#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp9__length1 = self->priv->external_import_checks_length1;
#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp10_ = i;
#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				_tmp11_ = _tmp9_[_tmp10_];
#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
				if (gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_toggle_button_get_type (), GtkToggleButton)) == TRUE) {
#line 1108 "WelcomeDialog.c"
					WelcomeServiceEntry** _tmp12_;
					gint _tmp12__length1;
					WelcomeServiceEntry** _tmp13_;
					gint _tmp13__length1;
					gint _tmp14_;
					WelcomeServiceEntry* _tmp15_;
					WelcomeServiceEntry* _tmp16_;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp12_ = _result_;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp12__length1 = _result__length1;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp13_ = self->priv->external_import_entries;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp13__length1 = self->priv->external_import_entries_length1;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp14_ = i;
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp15_ = _tmp13_[_tmp14_];
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_tmp16_ = _g_object_ref0 (_tmp15_);
#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
					_vala_array_add6 (&_result_, &_result__length1, &__result__size_, _tmp16_);
#line 1132 "WelcomeDialog.c"
				}
			}
		}
	}
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp17_ = _result_;
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp17__length1 = _result__length1;
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp18_ = (_tmp17_ != NULL) ? _vala_array_dup1 (_tmp17_, _tmp17__length1) : ((gpointer) _tmp17_);
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp18__length1 = _tmp17__length1;
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_vala_selected_import_entries = (_vala_array_free (_vala_selected_import_entries, _vala_selected_import_entries_length1, (GDestroyNotify) g_object_unref), NULL);
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_vala_selected_import_entries = _tmp18_;
#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_vala_selected_import_entries_length1 = _tmp18__length1;
#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp20_ = self->priv->system_pictures_import_check;
#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (_tmp20_ != NULL) {
#line 1155 "WelcomeDialog.c"
		GtkCheckButton* _tmp21_;
#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp21_ = self->priv->system_pictures_import_check;
#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp19_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_toggle_button_get_type (), GtkToggleButton));
#line 1161 "WelcomeDialog.c"
	} else {
#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp19_ = FALSE;
#line 1165 "WelcomeDialog.c"
	}
#line 184 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_vala_do_system_pictures_import = _tmp19_;
#line 187 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	result = show_dialog;
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_result_ = (_vala_array_free (_result_, _result__length1, (GDestroyNotify) g_object_unref), NULL);
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (selected_import_entries) {
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*selected_import_entries = _vala_selected_import_entries;
#line 1179 "WelcomeDialog.c"
	} else {
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_vala_selected_import_entries = (_vala_array_free (_vala_selected_import_entries, _vala_selected_import_entries_length1, (GDestroyNotify) g_object_unref), NULL);
#line 1183 "WelcomeDialog.c"
	}
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (selected_import_entries_length1) {
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*selected_import_entries_length1 = _vala_selected_import_entries_length1;
#line 1189 "WelcomeDialog.c"
	}
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (do_system_pictures_import) {
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		*do_system_pictures_import = _vala_do_system_pictures_import;
#line 1195 "WelcomeDialog.c"
	}
#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	return result;
#line 1199 "WelcomeDialog.c"
}


static gboolean
welcome_dialog_is_system_pictures_import_possible (void)
{
	gboolean result = FALSE;
	GFile* system_pictures = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	gboolean _tmp8_ = FALSE;
	GError * _inner_error_ = NULL;
#line 193 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp0_ = app_dirs_get_import_dir ();
#line 193 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	system_pictures = _tmp0_;
#line 194 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp1_ = system_pictures;
#line 194 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (!g_file_query_exists (_tmp1_, NULL)) {
#line 195 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		result = FALSE;
#line 195 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (system_pictures);
#line 195 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		return result;
#line 1227 "WelcomeDialog.c"
	}
#line 197 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp2_ = system_pictures;
#line 197 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	if (!(g_file_query_file_type (_tmp2_, G_FILE_QUERY_INFO_NONE, NULL) == G_FILE_TYPE_DIRECTORY)) {
#line 198 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		result = FALSE;
#line 198 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (system_pictures);
#line 198 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		return result;
#line 1239 "WelcomeDialog.c"
	}
	{
		GFileEnumerator* syspics_child_enum = NULL;
		GFile* _tmp3_;
		GFileEnumerator* _tmp4_;
		GFileInfo* _tmp5_ = NULL;
		GFileEnumerator* _tmp6_;
		GFileInfo* _tmp7_;
#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp3_ = system_pictures;
#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp4_ = g_file_enumerate_children (_tmp3_, "standard::*", G_FILE_QUERY_INFO_NONE, NULL, &_inner_error_);
#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		syspics_child_enum = _tmp4_;
#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1256 "WelcomeDialog.c"
			goto __catch24_g_error;
		}
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp6_ = syspics_child_enum;
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp7_ = g_file_enumerator_next_file (_tmp6_, NULL, &_inner_error_);
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_tmp5_ = _tmp7_;
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
			_g_object_unref0 (syspics_child_enum);
#line 1269 "WelcomeDialog.c"
			goto __catch24_g_error;
		}
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		result = _tmp5_ != NULL;
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (_tmp5_);
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (syspics_child_enum);
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (system_pictures);
#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		return result;
#line 1282 "WelcomeDialog.c"
	}
	goto __finally24;
	__catch24_g_error:
	{
		GError* e = NULL;
#line 200 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		e = _inner_error_;
#line 200 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_inner_error_ = NULL;
#line 205 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		result = FALSE;
#line 205 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_error_free0 (e);
#line 205 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		_g_object_unref0 (system_pictures);
#line 205 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
		return result;
#line 1300 "WelcomeDialog.c"
	}
	__finally24:
#line 200 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (system_pictures);
#line 200 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 200 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_clear_error (&_inner_error_);
#line 200 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	return _tmp8_;
#line 1311 "WelcomeDialog.c"
}


static void
welcome_dialog_class_init (WelcomeDialogClass * klass)
{
#line 14 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	welcome_dialog_parent_class = g_type_class_peek_parent (klass);
#line 14 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	g_type_class_add_private (klass, sizeof (WelcomeDialogPrivate));
#line 14 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	G_OBJECT_CLASS (klass)->finalize = welcome_dialog_finalize;
#line 1324 "WelcomeDialog.c"
}


static void
welcome_dialog_instance_init (WelcomeDialog * self)
{
	GtkCheckButton** _tmp0_;
	WelcomeServiceEntry** _tmp1_;
#line 14 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv = WELCOME_DIALOG_GET_PRIVATE (self);
#line 16 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->system_pictures_import_check = NULL;
#line 17 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp0_ = g_new0 (GtkCheckButton*, 0 + 1);
#line 17 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->external_import_checks = _tmp0_;
#line 17 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->external_import_checks_length1 = 0;
#line 17 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->_external_import_checks_size_ = self->priv->external_import_checks_length1;
#line 18 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_tmp1_ = g_new0 (WelcomeServiceEntry*, 0 + 1);
#line 18 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->external_import_entries = _tmp1_;
#line 18 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->external_import_entries_length1 = 0;
#line 18 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->_external_import_entries_size_ = self->priv->external_import_entries_length1;
#line 25 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->import_content_already_installed = FALSE;
#line 26 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->ok_clicked = FALSE;
#line 1357 "WelcomeDialog.c"
}


static void
welcome_dialog_finalize (GObject * obj)
{
	WelcomeDialog * self;
#line 14 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_WELCOME_DIALOG, WelcomeDialog);
#line 15 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->hide_button);
#line 16 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->system_pictures_import_check);
#line 17 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->external_import_checks = (_vala_array_free (self->priv->external_import_checks, self->priv->external_import_checks_length1, (GDestroyNotify) g_object_unref), NULL);
#line 18 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	self->priv->external_import_entries = (_vala_array_free (self->priv->external_import_entries, self->priv->external_import_entries_length1, (GDestroyNotify) g_object_unref), NULL);
#line 19 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->secondary_text);
#line 20 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->instruction_header);
#line 21 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->import_content);
#line 22 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->import_action_checkbox_packer);
#line 23 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->external_import_action_checkbox_packer);
#line 24 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	_g_object_unref0 (self->priv->import_meta_host);
#line 14 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala"
	G_OBJECT_CLASS (welcome_dialog_parent_class)->finalize (obj);
#line 1389 "WelcomeDialog.c"
}


GType
welcome_dialog_get_type (void)
{
	static volatile gsize welcome_dialog_type_id__volatile = 0;
	if (g_once_init_enter (&welcome_dialog_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (WelcomeDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) welcome_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WelcomeDialog), 0, (GInstanceInitFunc) welcome_dialog_instance_init, NULL };
		GType welcome_dialog_type_id;
		welcome_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "WelcomeDialog", &g_define_type_info, 0);
		g_once_init_leave (&welcome_dialog_type_id__volatile, welcome_dialog_type_id);
	}
	return welcome_dialog_type_id__volatile;
}


static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



