diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
commit | 2b3f22361da0c1d8e6ce70d71352821758186db7 (patch) | |
tree | 5d10633b47369b3aa52a05bf889ede0dbe5ee108 /src/dialogs/WelcomeDialog.c | |
parent | 211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff) | |
parent | dc6c76eb04dfe3d4262a1806808f0bc0bf523238 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/dialogs/WelcomeDialog.c')
-rw-r--r-- | src/dialogs/WelcomeDialog.c | 1377 |
1 files changed, 1377 insertions, 0 deletions
diff --git a/src/dialogs/WelcomeDialog.c b/src/dialogs/WelcomeDialog.c new file mode 100644 index 0000000..153175b --- /dev/null +++ b/src/dialogs/WelcomeDialog.c @@ -0,0 +1,1377 @@ +/* WelcomeDialog.c generated by valac 0.36.6, 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; +#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)) +enum { + WELCOME_DIALOG_DUMMY_PROPERTY +}; +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 129 "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 138 "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 149 "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 170 "WelcomeDialog.c" +} + + +WelcomeDialog* welcome_dialog_construct (GType object_type, GtkWindow* owner) { + WelcomeDialog * self = NULL; + gint _tmp0_; + SpitDataImportsWelcomeImportMetaHost* _tmp1_; + gboolean show_system_pictures_import = FALSE; + gboolean _tmp2_; + GtkWidget* ok_button = NULL; + GtkWidget* _tmp3_; + GtkWidget* _tmp4_; + GtkWindow* _tmp5_; + GtkLabel* primary_text = NULL; + GtkLabel* _tmp6_; + GtkLabel* _tmp7_; + gchar* _tmp8_; + gchar* _tmp9_; + GtkLabel* _tmp10_; + GtkLabel* _tmp11_; + GtkLabel* _tmp12_; + GtkLabel* _tmp13_; + gchar* _tmp14_; + gchar* _tmp15_; + GtkLabel* _tmp16_; + GtkLabel* _tmp17_; + GtkImage* image = NULL; + GtkImage* _tmp18_; + GtkBox* header_text = NULL; + GtkBox* _tmp19_; + GtkBox* _tmp20_; + GtkLabel* _tmp21_; + GtkBox* _tmp22_; + GtkLabel* _tmp23_; + GtkBox* header_content = NULL; + GtkBox* _tmp24_; + GtkBox* _tmp25_; + GtkImage* _tmp26_; + GtkBox* _tmp27_; + GtkBox* _tmp28_; + GtkLabel* instructions = NULL; + GtkLabel* _tmp29_; + gchar* indent_prefix = NULL; + gchar* _tmp30_; + const gchar* _tmp31_ = NULL; + GtkTextDirection _tmp32_; + gchar* arrow_glyph = NULL; + gchar* _tmp33_; + GtkLabel* _tmp34_; + const gchar* _tmp35_; + gchar* _tmp36_; + gchar* _tmp37_; + const gchar* _tmp38_; + gchar* _tmp39_; + gchar* _tmp40_; + gchar* _tmp41_; + gchar* _tmp42_; + const gchar* _tmp43_; + gchar* _tmp44_; + gchar* _tmp45_; + gchar* _tmp46_; + gchar* _tmp47_; + const gchar* _tmp48_; + gchar* _tmp49_; + gchar* _tmp50_; + gchar* _tmp51_; + gchar* _tmp52_; + GtkLabel* _tmp53_; + GtkLabel* _tmp54_; + GtkBox* _tmp55_; + GtkBox* _tmp56_; + GtkBox* _tmp57_; + GtkBox* _tmp58_; + gboolean _tmp59_; + GtkLabel* _tmp70_; + GtkLabel* _tmp71_; + GtkLabel* _tmp72_; + GtkLabel* _tmp73_; + GtkBox* content = NULL; + GtkBox* _tmp74_; + GtkBox* _tmp75_; + GtkBox* _tmp76_; + GtkBox* _tmp77_; + GtkLabel* _tmp78_; + GtkCheckButton* _tmp79_; + GtkCheckButton* _tmp80_; + GtkCheckButton* _tmp81_; + GtkBox* _tmp82_; + GtkWidget* _tmp83_; + SpitDataImportsWelcomeImportMetaHost* _tmp84_; +#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" + _tmp0_ = resources_use_header_bar (); +#line 29 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + self = (WelcomeDialog*) g_object_new (object_type, "use-header-bar", _tmp0_, NULL); +#line 30 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp1_ = 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 = _tmp1_; +#line 31 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp2_ = welcome_dialog_is_system_pictures_import_possible (); +#line 31 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + show_system_pictures_import = _tmp2_; +#line 32 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp3_ = 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" + _tmp4_ = _g_object_ref0 (_tmp3_); +#line 32 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + ok_button = _tmp4_; +#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" + _tmp5_ = owner; +#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), _tmp5_); +#line 40 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp6_ = (GtkLabel*) gtk_label_new (""); +#line 40 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp6_); +#line 40 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + primary_text = _tmp6_; +#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp7_ = primary_text; +#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp8_ = g_strdup_printf ("<span size=\"large\" weight=\"bold\">%s</span>", _ ("Welcome to Shotwell!")); +#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp9_ = _tmp8_; +#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_markup (_tmp7_, _tmp9_); +#line 41 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp9_); +#line 43 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp10_ = primary_text; +#line 43 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_xalign (_tmp10_, 0.0f); +#line 44 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp11_ = primary_text; +#line 44 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_yalign (_tmp11_, 0.5f); +#line 45 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp12_ = (GtkLabel*) gtk_label_new (""); +#line 45 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp12_); +#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 = _tmp12_; +#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp13_ = self->priv->secondary_text; +#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp14_ = 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" + _tmp15_ = _tmp14_; +#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_markup (_tmp13_, _tmp15_); +#line 46 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp15_); +#line 48 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp16_ = self->priv->secondary_text; +#line 48 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_xalign (_tmp16_, 0.0f); +#line 49 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp17_ = self->priv->secondary_text; +#line 49 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_yalign (_tmp17_, 0.5f); +#line 50 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp18_ = (GtkImage*) gtk_image_new_from_icon_name ("shotwell", GTK_ICON_SIZE_DIALOG); +#line 50 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp18_); +#line 50 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + image = _tmp18_; +#line 52 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp19_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 52 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp19_); +#line 52 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + header_text = _tmp19_; +#line 53 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp20_ = header_text; +#line 53 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp21_ = primary_text; +#line 53 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_box_pack_start (_tmp20_, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 5); +#line 54 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp22_ = header_text; +#line 54 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp23_ = self->priv->secondary_text; +#line 54 "/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 56 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp24_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); +#line 56 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp24_); +#line 56 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + header_content = _tmp24_; +#line 57 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp25_ = header_content; +#line 57 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp26_ = image; +#line 57 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_box_pack_start (_tmp25_, G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 58 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp27_ = header_content; +#line 58 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp28_ = header_text; +#line 58 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_box_pack_start (_tmp27_, G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 60 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp29_ = (GtkLabel*) gtk_label_new (""); +#line 60 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp29_); +#line 60 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + instructions = _tmp29_; +#line 61 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp30_ = g_strdup (" "); +#line 61 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + indent_prefix = _tmp30_; +#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp32_ = gtk_widget_get_direction (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)); +#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (_tmp32_ == GTK_TEXT_DIR_RTL) { +#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp31_ = "◂"; +#line 403 "WelcomeDialog.c" + } else { +#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp31_ = "▸"; +#line 407 "WelcomeDialog.c" + } +#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp33_ = g_strdup (_tmp31_); +#line 63 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + arrow_glyph = _tmp33_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp34_ = instructions; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp35_ = indent_prefix; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp36_ = g_strconcat (_tmp35_, "• %s\n", NULL); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp37_ = _tmp36_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp38_ = indent_prefix; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp39_ = g_strconcat (_tmp38_, "• %s\n", NULL); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp40_ = _tmp39_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp41_ = g_strconcat (_tmp37_, _tmp40_, NULL); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp42_ = _tmp41_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp43_ = indent_prefix; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp44_ = g_strconcat (_tmp43_, "• %s", NULL); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp45_ = _tmp44_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp46_ = g_strconcat (_tmp42_, _tmp45_, NULL); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp47_ = _tmp46_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp48_ = arrow_glyph; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp49_ = g_strdup_printf (_ ("Choose <span weight=\"bold\">File %s Import From Folder</span>"), _tmp48_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp50_ = _tmp49_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp51_ = g_strdup_printf (_tmp47_, _tmp50_, _ ("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" + _tmp52_ = _tmp51_; +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_markup (_tmp34_, _tmp52_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp52_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp50_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp47_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp45_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp42_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp40_); +#line 65 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp37_); +#line 70 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp53_ = instructions; +#line 70 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_xalign (_tmp53_, 0.0f); +#line 71 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp54_ = instructions; +#line 71 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_yalign (_tmp54_, 0.5f); +#line 73 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp55_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); +#line 73 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp55_); +#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 = _tmp55_; +#line 75 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp56_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); +#line 75 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp56_); +#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 = _tmp56_; +#line 76 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp57_ = self->priv->import_action_checkbox_packer; +#line 76 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp58_ = 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 (_tmp57_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, gtk_widget_get_type (), GtkWidget)); +#line 78 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp59_ = show_system_pictures_import; +#line 78 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (_tmp59_) { +#line 501 "WelcomeDialog.c" + GFile* _tmp60_; + GFile* _tmp61_; + gchar* _tmp62_; + gchar* _tmp63_; + gchar* _tmp64_; + gchar* _tmp65_; + GtkCheckButton* _tmp66_; + GtkBox* _tmp67_; + GtkCheckButton* _tmp68_; + GtkCheckButton* _tmp69_; +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp60_ = app_dirs_get_import_dir (); +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp61_ = _tmp60_; +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp62_ = get_display_pathname (_tmp61_); +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp63_ = _tmp62_; +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp64_ = g_strdup_printf (_ ("_Import photos from your %s folder"), _tmp63_); +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp65_ = _tmp64_; +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp66_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp65_); +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp66_); +#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 = _tmp66_; +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp65_); +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp63_); +#line 79 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_object_unref0 (_tmp61_); +#line 82 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp67_ = self->priv->import_action_checkbox_packer; +#line 82 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp68_ = self->priv->system_pictures_import_check; +#line 82 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, gtk_widget_get_type (), GtkWidget)); +#line 83 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp69_ = 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 (_tmp69_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 548 "WelcomeDialog.c" + } +#line 86 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp70_ = (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 (_tmp70_); +#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 = _tmp70_; +#line 88 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp71_ = self->priv->instruction_header; +#line 88 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_xalign (_tmp71_, 0.0f); +#line 89 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp72_ = self->priv->instruction_header; +#line 89 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_label_set_yalign (_tmp72_, 0.5f); +#line 90 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp73_ = self->priv->instruction_header; +#line 90 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_widget_set_margin_top (G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, gtk_widget_get_type (), GtkWidget), 20); +#line 92 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp74_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 16); +#line 92 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp74_); +#line 92 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + content = _tmp74_; +#line 93 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp75_ = header_content; +#line 93 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_box_pack_start (content, G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0); +#line 94 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp76_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); +#line 94 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp76_); +#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 = _tmp76_; +#line 95 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp77_ = 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 (_tmp77_, gtk_widget_get_type (), GtkWidget)); +#line 96 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp78_ = instructions; +#line 96 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_box_pack_start (content, G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 98 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp79_ = (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 (_tmp79_); +#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 = _tmp79_; +#line 99 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp80_ = self->priv->hide_button; +#line 99 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, gtk_toggle_button_get_type (), GtkToggleButton), TRUE); +#line 100 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp81_ = self->priv->hide_button; +#line 100 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_box_pack_start (content, G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, 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" + _tmp82_ = (GtkBox*) 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 (_tmp82_, 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" + _tmp83_ = ok_button; +#line 112 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + gtk_widget_grab_focus (_tmp83_); +#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" + _tmp84_ = self->priv->import_meta_host; +#line 116 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + spit_data_imports_welcome_import_meta_host_start (_tmp84_); +#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 662 "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 669 "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 688 "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 695 "WelcomeDialog.c" + } +#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (_tmp1_) { +#line 699 "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 705 "WelcomeDialog.c" + } else { +#line 121 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp0_ = FALSE; +#line 709 "WelcomeDialog.c" + } +#line 120 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (_tmp0_) { +#line 713 "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 737 "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 749 "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 755 "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 766 "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 772 "WelcomeDialog.c" +} + + +void welcome_dialog_install_service_entry (WelcomeDialog* self, WelcomeServiceEntry* entry) { + WelcomeServiceEntry* _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + WelcomeServiceEntry** _tmp5_; + gint _tmp5__length1; + WelcomeServiceEntry* _tmp6_; + WelcomeServiceEntry* _tmp7_; + GtkCheckButton* entry_check = NULL; + WelcomeServiceEntry* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; + gchar* _tmp11_; + gchar* _tmp12_; + GtkCheckButton* _tmp13_; + GtkCheckButton* _tmp14_; + GtkCheckButton** _tmp15_; + gint _tmp15__length1; + GtkCheckButton* _tmp16_; + GtkBox* _tmp17_; +#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_ = entry; +#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp1_ = welcome_service_entry_get_service_name (_tmp0_); +#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp2_ = _tmp1_; +#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp3_ = g_strdup_printf ("WelcomeDialog: Installing service entry for %s", _tmp2_); +#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp4_ = _tmp3_; +#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_debug ("WelcomeDialog.vala:132: %s", _tmp4_); +#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp4_); +#line 132 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp2_); +#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp5_ = self->priv->external_import_entries; +#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp5__length1 = self->priv->external_import_entries_length1; +#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp6_ = entry; +#line 133 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp7_ = _g_object_ref0 (_tmp6_); +#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_, _tmp7_); +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp8_ = entry; +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp9_ = welcome_service_entry_get_service_name (_tmp8_); +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp10_ = _tmp9_; +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp11_ = g_strdup_printf (_ ("Import photos from your %s library"), _tmp10_); +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp12_ = _tmp11_; +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp13_ = (GtkCheckButton*) gtk_check_button_new_with_label (_tmp12_); +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + g_object_ref_sink (_tmp13_); +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp14_ = _tmp13_; +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp12_); +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_free0 (_tmp10_); +#line 134 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + entry_check = _tmp14_; +#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp15_ = self->priv->external_import_checks; +#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp15__length1 = self->priv->external_import_checks_length1; +#line 136 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp16_ = _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_, _tmp16_); +#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" + _tmp17_ = 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 (_tmp17_, 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 868 "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) { + gint _tmp0_; +#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" + _tmp0_ = resp; +#line 148 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (_tmp0_ == ((gint) GTK_RESPONSE_CLOSE)) { +#line 149 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + self->priv->ok_clicked = TRUE; +#line 887 "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 893 "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 900 "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 911 "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 917 "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 928 "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 934 "WelcomeDialog.c" + } +#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + return result; +#line 938 "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** _tmp5_; + gint _result__length1; + gint __result__size_; + WelcomeServiceEntry** _tmp19_; + gint _tmp19__length1; + WelcomeServiceEntry** _tmp20_; + gint _tmp20__length1; + gboolean _tmp21_ = FALSE; + GtkCheckButton* _tmp22_; +#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 986 "WelcomeDialog.c" + GtkCheckButton* _tmp3_; + gboolean _tmp4_; +#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" + _tmp4_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 175 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + show_dialog = !_tmp4_; +#line 995 "WelcomeDialog.c" + } +#line 178 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp5_ = g_new0 (WelcomeServiceEntry*, 0 + 1); +#line 178 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _result_ = _tmp5_; +#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 1005 "WelcomeDialog.c" + { + gint i = 0; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + i = 0; +#line 1010 "WelcomeDialog.c" + { + gboolean _tmp6_ = FALSE; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp6_ = TRUE; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + while (TRUE) { +#line 1017 "WelcomeDialog.c" + gint _tmp8_; + WelcomeServiceEntry** _tmp9_; + gint _tmp9__length1; + GtkCheckButton** _tmp10_; + gint _tmp10__length1; + gint _tmp11_; + GtkCheckButton* _tmp12_; + gboolean _tmp13_; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (!_tmp6_) { +#line 1028 "WelcomeDialog.c" + gint _tmp7_; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp7_ = i; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + i = _tmp7_ + 1; +#line 1034 "WelcomeDialog.c" + } +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp6_ = FALSE; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp8_ = i; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp9_ = self->priv->external_import_entries; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp9__length1 = self->priv->external_import_entries_length1; +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (!(_tmp8_ < _tmp9__length1)) { +#line 179 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + break; +#line 1048 "WelcomeDialog.c" + } +#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp10_ = self->priv->external_import_checks; +#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp10__length1 = self->priv->external_import_checks_length1; +#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp11_ = i; +#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp12_ = _tmp10_[_tmp11_]; +#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp13_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 180 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (_tmp13_ == TRUE) { +#line 1062 "WelcomeDialog.c" + WelcomeServiceEntry** _tmp14_; + gint _tmp14__length1; + WelcomeServiceEntry** _tmp15_; + gint _tmp15__length1; + gint _tmp16_; + WelcomeServiceEntry* _tmp17_; + WelcomeServiceEntry* _tmp18_; +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp14_ = _result_; +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp14__length1 = _result__length1; +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp15_ = self->priv->external_import_entries; +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp15__length1 = self->priv->external_import_entries_length1; +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp16_ = i; +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp17_ = _tmp15_[_tmp16_]; +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp18_ = _g_object_ref0 (_tmp17_); +#line 181 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _vala_array_add6 (&_result_, &_result__length1, &__result__size_, _tmp18_); +#line 1086 "WelcomeDialog.c" + } + } + } + } +#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp19_ = _result_; +#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp19__length1 = _result__length1; +#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp20_ = (_tmp19_ != NULL) ? _vala_array_dup1 (_tmp19_, _tmp19__length1) : ((gpointer) _tmp19_); +#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp20__length1 = _tmp19__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 = _tmp20_; +#line 183 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _vala_selected_import_entries_length1 = _tmp20__length1; +#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp22_ = self->priv->system_pictures_import_check; +#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (_tmp22_ != NULL) { +#line 1109 "WelcomeDialog.c" + GtkCheckButton* _tmp23_; + gboolean _tmp24_; +#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp23_ = self->priv->system_pictures_import_check; +#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp24_ = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp21_ = _tmp24_; +#line 1118 "WelcomeDialog.c" + } else { +#line 185 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp21_ = FALSE; +#line 1122 "WelcomeDialog.c" + } +#line 184 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _vala_do_system_pictures_import = _tmp21_; +#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 1136 "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 1140 "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 1146 "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 1152 "WelcomeDialog.c" + } +#line 189 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + return result; +#line 1156 "WelcomeDialog.c" +} + + +static gboolean welcome_dialog_is_system_pictures_import_possible (void) { + gboolean result = FALSE; + GFile* system_pictures = NULL; + GFile* _tmp0_; + GFile* _tmp1_; + gboolean _tmp2_; + GFile* _tmp3_; + GFileType _tmp4_; + gboolean _tmp10_ = 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" + _tmp2_ = g_file_query_exists (_tmp1_, NULL); +#line 194 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (!_tmp2_) { +#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 1186 "WelcomeDialog.c" + } +#line 197 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp3_ = system_pictures; +#line 197 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp4_ = g_file_query_file_type (_tmp3_, G_FILE_QUERY_INFO_NONE, NULL); +#line 197 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (!(_tmp4_ == 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 1200 "WelcomeDialog.c" + } + { + GFileEnumerator* syspics_child_enum = NULL; + GFile* _tmp5_; + GFileEnumerator* _tmp6_; + GFileInfo* _tmp7_ = NULL; + GFileEnumerator* _tmp8_; + GFileInfo* _tmp9_; +#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp5_ = system_pictures; +#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp6_ = g_file_enumerate_children (_tmp5_, "standard::*", G_FILE_QUERY_INFO_NONE, NULL, &_inner_error_); +#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + syspics_child_enum = _tmp6_; +#line 201 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1217 "WelcomeDialog.c" + goto __catch24_g_error; + } +#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp8_ = syspics_child_enum; +#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp9_ = g_file_enumerator_next_file (_tmp8_, NULL, &_inner_error_); +#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _tmp7_ = _tmp9_; +#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 1230 "WelcomeDialog.c" + goto __catch24_g_error; + } +#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + result = _tmp7_ != NULL; +#line 203 "/home/jens/Source/shotwell/src/dialogs/WelcomeDialog.vala" + _g_object_unref0 (_tmp7_); +#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 1243 "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 1261 "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 _tmp10_; +#line 1272 "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 1283 "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 1314 "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 1344 "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); +} + + + |