From 5e9f4eea451a77ba3b93db3747841ed2bd969e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 30 Sep 2018 14:09:20 +0200 Subject: New upstream version 0.30.1 --- src/Exporter.c | 3064 -------------------------------------------------------- 1 file changed, 3064 deletions(-) delete mode 100644 src/Exporter.c (limited to 'src/Exporter.c') diff --git a/src/Exporter.c b/src/Exporter.c deleted file mode 100644 index bdc1f1f..0000000 --- a/src/Exporter.c +++ /dev/null @@ -1,3064 +0,0 @@ -/* Exporter.c generated by valac 0.40.4, the Vala compiler - * generated from Exporter.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define TYPE_EXPORT_FORMAT_MODE (export_format_mode_get_type ()) - -#define TYPE_EXPORT_FORMAT_PARAMETERS (export_format_parameters_get_type ()) - -#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ()) - -#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ()) -typedef struct _ExportFormatParameters ExportFormatParameters; - -#define TYPE_EXPORTER (exporter_get_type ()) -#define EXPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORTER, Exporter)) -#define EXPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORTER, ExporterClass)) -#define IS_EXPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORTER)) -#define IS_EXPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORTER)) -#define EXPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORTER, ExporterClass)) - -typedef struct _Exporter Exporter; -typedef struct _ExporterClass ExporterClass; -typedef struct _ExporterPrivate ExporterPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) -#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) -#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) -#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) -#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) -#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) - -typedef struct _ThumbnailSource ThumbnailSource; -typedef struct _ThumbnailSourceClass ThumbnailSourceClass; - -#define TYPE_MEDIA_SOURCE (media_source_get_type ()) -#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) -#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) -#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) -#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) -#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) - -typedef struct _MediaSource MediaSource; -typedef struct _MediaSourceClass MediaSourceClass; - -#define TYPE_SCALING (scaling_get_type ()) - -#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ()) - -#define TYPE_DIMENSIONS (dimensions_get_type ()) -typedef struct _Dimensions Dimensions; -typedef struct _Scaling Scaling; - -#define TYPE_WORKERS (workers_get_type ()) -#define WORKERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WORKERS, Workers)) -#define WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WORKERS, WorkersClass)) -#define IS_WORKERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WORKERS)) -#define IS_WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WORKERS)) -#define WORKERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WORKERS, WorkersClass)) - -typedef struct _Workers Workers; -typedef struct _WorkersClass WorkersClass; - -#define EXPORTER_TYPE_OVERWRITE (exporter_overwrite_get_type ()) -enum { - EXPORTER_0_PROPERTY, - EXPORTER_NUM_PROPERTIES -}; -static GParamSpec* exporter_properties[EXPORTER_NUM_PROPERTIES]; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _workers_unref0(var) ((var == NULL) ? NULL : (var = (workers_unref (var), NULL))) - -#define TYPE_BACKGROUND_JOB (background_job_get_type ()) -#define BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKGROUND_JOB, BackgroundJob)) -#define BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKGROUND_JOB, BackgroundJobClass)) -#define IS_BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKGROUND_JOB)) -#define IS_BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKGROUND_JOB)) -#define BACKGROUND_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKGROUND_JOB, BackgroundJobClass)) - -typedef struct _BackgroundJob BackgroundJob; -typedef struct _BackgroundJobClass BackgroundJobClass; - -#define EXPORTER_TYPE_EXPORT_JOB (exporter_export_job_get_type ()) -#define EXPORTER_EXPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXPORTER_TYPE_EXPORT_JOB, ExporterExportJob)) -#define EXPORTER_EXPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EXPORTER_TYPE_EXPORT_JOB, ExporterExportJobClass)) -#define EXPORTER_IS_EXPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EXPORTER_TYPE_EXPORT_JOB)) -#define EXPORTER_IS_EXPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EXPORTER_TYPE_EXPORT_JOB)) -#define EXPORTER_EXPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EXPORTER_TYPE_EXPORT_JOB, ExporterExportJobClass)) - -typedef struct _ExporterExportJob ExporterExportJob; -typedef struct _ExporterExportJobClass ExporterExportJobClass; -typedef struct _BackgroundJobPrivate BackgroundJobPrivate; - -#define BACKGROUND_JOB_TYPE_JOB_PRIORITY (background_job_job_priority_get_type ()) -typedef struct _ExporterExportJobPrivate ExporterExportJobPrivate; -#define _background_job_unref0(var) ((var == NULL) ? NULL : (var = (background_job_unref (var), NULL))) - -#define TYPE_PHOTO_SOURCE (photo_source_get_type ()) -#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource)) -#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass)) -#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE)) -#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE)) -#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass)) - -typedef struct _PhotoSource PhotoSource; -typedef struct _PhotoSourceClass PhotoSourceClass; - -#define TYPE_PHOTO (photo_get_type ()) -#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo)) -#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass)) -#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO)) -#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO)) -#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass)) - -typedef struct _Photo Photo; -typedef struct _PhotoClass PhotoClass; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_VIDEO_SOURCE (video_source_get_type ()) -#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource)) -#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass)) -#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE)) -#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE)) -#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass)) - -typedef struct _VideoSource VideoSource; -typedef struct _VideoSourceClass VideoSourceClass; - -#define TYPE_VIDEO (video_get_type ()) -#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video)) -#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass)) -#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO)) -#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO)) -#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass)) - -typedef struct _Video Video; -typedef struct _VideoClass VideoClass; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _scaling_free0(var) ((var == NULL) ? NULL : (var = (scaling_free (var), NULL))) - -#define TYPE_ABSTRACT_SEMAPHORE (abstract_semaphore_get_type ()) -#define ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore)) -#define ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass)) -#define IS_ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ABSTRACT_SEMAPHORE)) -#define IS_ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ABSTRACT_SEMAPHORE)) -#define ABSTRACT_SEMAPHORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass)) - -typedef struct _AbstractSemaphore AbstractSemaphore; -typedef struct _AbstractSemaphoreClass AbstractSemaphoreClass; - -#define TYPE_EXPORTER_UI (exporter_ui_get_type ()) -#define EXPORTER_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORTER_UI, ExporterUI)) -#define EXPORTER_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORTER_UI, ExporterUIClass)) -#define IS_EXPORTER_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORTER_UI)) -#define IS_EXPORTER_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORTER_UI)) -#define EXPORTER_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORTER_UI, ExporterUIClass)) - -typedef struct _ExporterUI ExporterUI; -typedef struct _ExporterUIClass ExporterUIClass; -typedef struct _ExporterUIPrivate ExporterUIPrivate; - -#define TYPE_PROGRESS_DIALOG (progress_dialog_get_type ()) -#define PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROGRESS_DIALOG, ProgressDialog)) -#define PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROGRESS_DIALOG, ProgressDialogClass)) -#define IS_PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROGRESS_DIALOG)) -#define IS_PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROGRESS_DIALOG)) -#define PROGRESS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROGRESS_DIALOG, ProgressDialogClass)) - -typedef struct _ProgressDialog ProgressDialog; -typedef struct _ProgressDialogClass ProgressDialogClass; - -#define TYPE_PAGE_WINDOW (page_window_get_type ()) -#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow)) -#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass)) -#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW)) -#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW)) -#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass)) - -typedef struct _PageWindow PageWindow; -typedef struct _PageWindowClass PageWindowClass; - -#define TYPE_APP_WINDOW (app_window_get_type ()) -#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow)) -#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass)) -#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW)) -#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW)) -#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass)) - -typedef struct _AppWindow AppWindow; -typedef struct _AppWindowClass AppWindowClass; -typedef struct _ParamSpecExporterUI ParamSpecExporterUI; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef enum { - EXPORT_FORMAT_MODE_UNMODIFIED, - EXPORT_FORMAT_MODE_CURRENT, - EXPORT_FORMAT_MODE_SPECIFIED, - EXPORT_FORMAT_MODE_LAST -} ExportFormatMode; - -typedef enum { - PHOTO_FILE_FORMAT_JFIF, - PHOTO_FILE_FORMAT_RAW, - PHOTO_FILE_FORMAT_PNG, - PHOTO_FILE_FORMAT_TIFF, - PHOTO_FILE_FORMAT_BMP, - PHOTO_FILE_FORMAT_UNKNOWN -} PhotoFileFormat; - -typedef enum { - JPEG_QUALITY_LOW = 50, - JPEG_QUALITY_MEDIUM = 75, - JPEG_QUALITY_HIGH = 90, - JPEG_QUALITY_MAXIMUM = 100 -} JpegQuality; - -struct _ExportFormatParameters { - ExportFormatMode mode; - PhotoFileFormat specified_format; - JpegQuality quality; - gboolean export_metadata; -}; - -struct _Exporter { - GObject parent_instance; - ExporterPrivate * priv; -}; - -struct _ExporterClass { - GObjectClass parent_class; -}; - -typedef enum { - SCALE_CONSTRAINT_ORIGINAL, - SCALE_CONSTRAINT_DIMENSIONS, - SCALE_CONSTRAINT_WIDTH, - SCALE_CONSTRAINT_HEIGHT, - SCALE_CONSTRAINT_FILL_VIEWPORT -} ScaleConstraint; - -struct _Dimensions { - gint width; - gint height; -}; - -struct _Scaling { - ScaleConstraint constraint; - gint scale; - Dimensions viewport; - gboolean scale_up; -}; - -typedef void (*ExporterCompletionCallback) (Exporter* exporter, gboolean is_cancelled, void* user_data); -typedef gboolean (*ExporterExportFailedCallback) (Exporter* exporter, GFile* file, gint remaining, GError* err, void* user_data); -typedef enum { - EXPORTER_OVERWRITE_YES, - EXPORTER_OVERWRITE_NO, - EXPORTER_OVERWRITE_CANCEL, - EXPORTER_OVERWRITE_REPLACE_ALL -} ExporterOverwrite; - -typedef ExporterOverwrite (*ExporterOverwriteCallback) (Exporter* exporter, GFile* file, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _ExporterPrivate { - GeeCollection* to_export; - GFile** exported_files; - gint exported_files_length1; - gint _exported_files_size_; - GFile* dir; - Scaling scaling; - gint completed_count; - Workers* workers; - ExporterCompletionCallback completion_callback; - gpointer completion_callback_target; - ExporterExportFailedCallback error_callback; - gpointer error_callback_target; - ExporterOverwriteCallback overwrite_callback; - gpointer overwrite_callback_target; - ProgressMonitor monitor; - gpointer monitor_target; - GCancellable* cancellable; - gboolean replace_all; - gboolean aborted; - ExportFormatParameters export_params; -}; - -typedef enum { - BACKGROUND_JOB_JOB_PRIORITY_HIGHEST = 100, - BACKGROUND_JOB_JOB_PRIORITY_HIGH = 75, - BACKGROUND_JOB_JOB_PRIORITY_NORMAL = 50, - BACKGROUND_JOB_JOB_PRIORITY_LOW = 25, - BACKGROUND_JOB_JOB_PRIORITY_LOWEST = 0 -} BackgroundJobJobPriority; - -struct _BackgroundJob { - GTypeInstance parent_instance; - volatile int ref_count; - BackgroundJobPrivate * priv; -}; - -struct _BackgroundJobClass { - GTypeClass parent_class; - void (*finalize) (BackgroundJob *self); - void (*execute) (BackgroundJob* self); - BackgroundJobJobPriority (*get_priority) (BackgroundJob* self); -}; - -struct _ExporterExportJob { - BackgroundJob parent_instance; - ExporterExportJobPrivate * priv; - MediaSource* media; - GFile* dest; - Scaling* scaling; - JpegQuality* quality; - PhotoFileFormat* format; - GError* err; - gboolean direct_copy_unmodified; - gboolean export_metadata; -}; - -struct _ExporterExportJobClass { - BackgroundJobClass parent_class; -}; - -typedef void (*CompletionCallback) (BackgroundJob* job, void* user_data); -typedef void (*CancellationCallback) (BackgroundJob* job, void* user_data); -struct _ExporterUI { - GTypeInstance parent_instance; - volatile int ref_count; - ExporterUIPrivate * priv; -}; - -struct _ExporterUIClass { - GTypeClass parent_class; - void (*finalize) (ExporterUI *self); -}; - -struct _ExporterUIPrivate { - Exporter* exporter; - GCancellable* cancellable; - ProgressDialog* progress_dialog; - ExporterCompletionCallback completion_callback; - gpointer completion_callback_target; -}; - -struct _ParamSpecExporterUI { - GParamSpec parent_instance; -}; - - -static gpointer exporter_parent_class = NULL; -static gpointer exporter_export_job_parent_class = NULL; -static gpointer exporter_ui_parent_class = NULL; - -GType export_format_mode_get_type (void) G_GNUC_CONST; -GType export_format_parameters_get_type (void) G_GNUC_CONST; -GType photo_file_format_get_type (void) G_GNUC_CONST; -GType jpeg_quality_get_type (void) G_GNUC_CONST; -ExportFormatParameters* export_format_parameters_dup (const ExportFormatParameters* self); -void export_format_parameters_free (ExportFormatParameters* self); -static void export_format_parameters_init (ExportFormatParameters *self, - ExportFormatMode mode, - PhotoFileFormat specified_format, - JpegQuality quality); -void export_format_parameters_current (ExportFormatParameters* result); -PhotoFileFormat photo_file_format_get_system_default_format (void); -void export_format_parameters_unmodified (ExportFormatParameters* result); -void export_format_parameters_for_format (PhotoFileFormat format, - ExportFormatParameters* result); -void export_format_parameters_last (ExportFormatParameters* result); -void export_format_parameters_for_JPEG (JpegQuality quality, - ExportFormatParameters* result); -GType exporter_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -GType scaling_get_type (void) G_GNUC_CONST; -GType scale_constraint_get_type (void) G_GNUC_CONST; -GType dimensions_get_type (void) G_GNUC_CONST; -Dimensions* dimensions_dup (const Dimensions* self); -void dimensions_free (Dimensions* self); -Scaling* scaling_dup (const Scaling* self); -void scaling_free (Scaling* self); -gpointer workers_ref (gpointer instance); -void workers_unref (gpointer instance); -GParamSpec* param_spec_workers (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_workers (GValue* value, - gpointer v_object); -void value_take_workers (GValue* value, - gpointer v_object); -gpointer value_get_workers (const GValue* value); -GType workers_get_type (void) G_GNUC_CONST; -GType exporter_overwrite_get_type (void) G_GNUC_CONST; -#define EXPORTER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EXPORTER, ExporterPrivate)) -guint workers_threads_per_cpu (gint per, - gint max); -Workers* workers_new (guint max_threads, - gboolean exclusive); -Workers* workers_construct (GType object_type, - guint max_threads, - gboolean exclusive); -Exporter* exporter_new (GeeCollection* to_export, - GFile* dir, - Scaling* scaling, - ExportFormatParameters* export_params, - gboolean auto_replace_all); -Exporter* exporter_construct (GType object_type, - GeeCollection* to_export, - GFile* dir, - Scaling* scaling, - ExportFormatParameters* export_params, - gboolean auto_replace_all); -Exporter* exporter_new_for_temp_file (GeeCollection* to_export, - Scaling* scaling, - ExportFormatParameters* export_params); -Exporter* exporter_construct_for_temp_file (GType object_type, - GeeCollection* to_export, - Scaling* scaling, - ExportFormatParameters* export_params); -void exporter_export (Exporter* self, - ExporterCompletionCallback completion_callback, - void* completion_callback_target, - ExporterExportFailedCallback error_callback, - void* error_callback_target, - ExporterOverwriteCallback overwrite_callback, - void* overwrite_callback_target, - GCancellable* cancellable, - ProgressMonitor monitor, - void* monitor_target); -static gboolean exporter_process_queue (Exporter* self); -static void exporter_export_completed (Exporter* self, - gboolean is_cancelled); -gpointer background_job_ref (gpointer instance); -void background_job_unref (gpointer instance); -GParamSpec* param_spec_background_job (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_background_job (GValue* value, - gpointer v_object); -void value_take_background_job (GValue* value, - gpointer v_object); -gpointer value_get_background_job (const GValue* value); -GType background_job_get_type (void) G_GNUC_CONST; -static void exporter_on_exported (Exporter* self, - BackgroundJob* j); -static GType exporter_export_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -GType background_job_job_priority_get_type (void) G_GNUC_CONST; -static void _vala_array_add128 (GFile** * array, - int* length, - int* size, - GFile* value); -static void exporter_on_export_cancelled (Exporter* self, - BackgroundJob* j); -GFile** exporter_get_exported_files (Exporter* self, - int* result_length1); -static GFile** _vala_array_dup25 (GFile** self, - int length); -GType photo_source_get_type (void) G_GNUC_CONST; -GType photo_get_type (void) G_GNUC_CONST; -PhotoFileFormat photo_get_export_format_for_parameters (Photo* self, - ExportFormatParameters* params); -gchar* photo_get_export_basename_for_parameters (Photo* self, - ExportFormatParameters* params); -GType video_source_get_type (void) G_GNUC_CONST; -GType video_get_type (void) G_GNUC_CONST; -gchar* media_source_get_basename (MediaSource* self); -static void _vala_array_add129 (GFile** * array, - int* length, - int* size, - GFile* value); -GFile* generate_unique_file (GFile* dir, - const gchar* basename, - gboolean* collision, - GError** error); -GFile* app_dirs_get_temp_dir (void); -void app_window_error_message (const gchar* message, - GtkWindow* parent); -GFile* media_source_get_file (MediaSource* self); -void workers_enqueue (Workers* self, - BackgroundJob* job); -static ExporterExportJob* exporter_export_job_new (Exporter* owner, - MediaSource* media, - GFile* dest, - Scaling* scaling, - JpegQuality* quality, - PhotoFileFormat* format, - GCancellable* cancellable, - gboolean direct_copy_unmodified, - gboolean export_metadata); -static ExporterExportJob* exporter_export_job_construct (GType object_type, - Exporter* owner, - MediaSource* media, - GFile* dest, - Scaling* scaling, - JpegQuality* quality, - PhotoFileFormat* format, - GCancellable* cancellable, - gboolean direct_copy_unmodified, - gboolean export_metadata); -static void _exporter_on_exported_completion_callback (BackgroundJob* job, - gpointer self); -static void _exporter_on_export_cancelled_cancellation_callback (BackgroundJob* job, - gpointer self); -gpointer abstract_semaphore_ref (gpointer instance); -void abstract_semaphore_unref (gpointer instance); -GParamSpec* param_spec_abstract_semaphore (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_abstract_semaphore (GValue* value, - gpointer v_object); -void value_take_abstract_semaphore (GValue* value, - gpointer v_object); -gpointer value_get_abstract_semaphore (const GValue* value); -GType abstract_semaphore_get_type (void) G_GNUC_CONST; -BackgroundJob* background_job_construct (GType object_type, - GObject* owner, - CompletionCallback callback, - void* callback_target, - GCancellable* cancellable, - CancellationCallback cancellation, - void* cancellation_target, - AbstractSemaphore* completion_semaphore); -static JpegQuality* _jpeg_quality_dup (JpegQuality* self); -static PhotoFileFormat* _photo_file_format_dup (PhotoFileFormat* self); -static void exporter_export_job_real_execute (BackgroundJob* base); -void photo_export (Photo* self, - GFile* dest_file, - Scaling* scaling, - JpegQuality quality, - PhotoFileFormat export_format, - gboolean direct_copy_unmodified, - gboolean export_metadata, - GError** error); -void video_export (Video* self, - GFile* dest_file, - GError** error); -static void exporter_export_job_finalize (BackgroundJob * obj); -static void exporter_finalize (GObject * obj); -gpointer exporter_ui_ref (gpointer instance); -void exporter_ui_unref (gpointer instance); -GParamSpec* param_spec_exporter_ui (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_exporter_ui (GValue* value, - gpointer v_object); -void value_take_exporter_ui (GValue* value, - gpointer v_object); -gpointer value_get_exporter_ui (const GValue* value); -GType exporter_ui_get_type (void) G_GNUC_CONST; -GType progress_dialog_get_type (void) G_GNUC_CONST; -#define EXPORTER_UI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EXPORTER_UI, ExporterUIPrivate)) -ExporterUI* exporter_ui_new (Exporter* exporter); -ExporterUI* exporter_ui_construct (GType object_type, - Exporter* exporter); -void exporter_ui_export (ExporterUI* self, - ExporterCompletionCallback completion_callback, - void* completion_callback_target); -GType page_window_get_type (void) G_GNUC_CONST; -GType app_window_get_type (void) G_GNUC_CONST; -AppWindow* app_window_get_instance (void); -void page_window_set_busy_cursor (PageWindow* self); -ProgressDialog* progress_dialog_new (GtkWindow* owner, - const gchar* text, - GCancellable* cancellable); -ProgressDialog* progress_dialog_construct (GType object_type, - GtkWindow* owner, - const gchar* text, - GCancellable* cancellable); -static void exporter_ui_on_export_completed (ExporterUI* self, - Exporter* exporter, - gboolean is_cancelled); -static void _exporter_ui_on_export_completed_exporter_completion_callback (Exporter* exporter, - gboolean is_cancelled, - gpointer self); -static gboolean exporter_ui_on_export_failed (ExporterUI* self, - Exporter* exporter, - GFile* file, - gint remaining, - GError* err); -static gboolean _exporter_ui_on_export_failed_exporter_export_failed_callback (Exporter* exporter, - GFile* file, - gint remaining, - GError* err, - gpointer self); -static ExporterOverwrite exporter_ui_on_export_overwrite (ExporterUI* self, - Exporter* exporter, - GFile* file); -static ExporterOverwrite _exporter_ui_on_export_overwrite_exporter_overwrite_callback (Exporter* exporter, - GFile* file, - gpointer self); -gboolean progress_dialog_monitor (ProgressDialog* self, - guint64 count, - guint64 total, - gboolean do_event_loop); -static gboolean _progress_dialog_monitor_progress_monitor (guint64 current, - guint64 total, - gboolean do_event_loop, - gpointer self); -void progress_dialog_close (ProgressDialog* self); -void page_window_set_normal_cursor (PageWindow* self); -GtkResponseType app_window_negate_affirm_all_cancel_question (const gchar* message, - const gchar* negative, - const gchar* affirmative, - const gchar* affirmative_all, - const gchar* title, - GtkWindow* parent); -GtkResponseType export_error_dialog (GFile* dest, - gboolean photos_remaining); -static void exporter_ui_finalize (ExporterUI * 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); - - -GType -export_format_mode_get_type (void) -{ - static volatile gsize export_format_mode_type_id__volatile = 0; - if (g_once_init_enter (&export_format_mode_type_id__volatile)) { - static const GEnumValue values[] = {{EXPORT_FORMAT_MODE_UNMODIFIED, "EXPORT_FORMAT_MODE_UNMODIFIED", "unmodified"}, {EXPORT_FORMAT_MODE_CURRENT, "EXPORT_FORMAT_MODE_CURRENT", "current"}, {EXPORT_FORMAT_MODE_SPECIFIED, "EXPORT_FORMAT_MODE_SPECIFIED", "specified"}, {EXPORT_FORMAT_MODE_LAST, "EXPORT_FORMAT_MODE_LAST", "last"}, {0, NULL, NULL}}; - GType export_format_mode_type_id; - export_format_mode_type_id = g_enum_register_static ("ExportFormatMode", values); - g_once_init_leave (&export_format_mode_type_id__volatile, export_format_mode_type_id); - } - return export_format_mode_type_id__volatile; -} - - -static void -export_format_parameters_init (ExportFormatParameters *self, - ExportFormatMode mode, - PhotoFileFormat specified_format, - JpegQuality quality) -{ -#line 20 "/home/jens/Source/shotwell/src/Exporter.vala" - memset (self, 0, sizeof (ExportFormatParameters)); -#line 22 "/home/jens/Source/shotwell/src/Exporter.vala" - (*self).mode = mode; -#line 23 "/home/jens/Source/shotwell/src/Exporter.vala" - (*self).specified_format = specified_format; -#line 24 "/home/jens/Source/shotwell/src/Exporter.vala" - (*self).quality = quality; -#line 25 "/home/jens/Source/shotwell/src/Exporter.vala" - (*self).export_metadata = TRUE; -#line 699 "Exporter.c" -} - - -void -export_format_parameters_current (ExportFormatParameters* result) -{ - ExportFormatParameters _tmp0_ = {0}; -#line 29 "/home/jens/Source/shotwell/src/Exporter.vala" - export_format_parameters_init (&_tmp0_, EXPORT_FORMAT_MODE_CURRENT, photo_file_format_get_system_default_format (), JPEG_QUALITY_HIGH); -#line 29 "/home/jens/Source/shotwell/src/Exporter.vala" - *result = _tmp0_; -#line 29 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 713 "Exporter.c" -} - - -void -export_format_parameters_unmodified (ExportFormatParameters* result) -{ - ExportFormatParameters _tmp0_ = {0}; -#line 34 "/home/jens/Source/shotwell/src/Exporter.vala" - export_format_parameters_init (&_tmp0_, EXPORT_FORMAT_MODE_UNMODIFIED, photo_file_format_get_system_default_format (), JPEG_QUALITY_HIGH); -#line 34 "/home/jens/Source/shotwell/src/Exporter.vala" - *result = _tmp0_; -#line 34 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 727 "Exporter.c" -} - - -void -export_format_parameters_for_format (PhotoFileFormat format, - ExportFormatParameters* result) -{ - ExportFormatParameters _tmp0_ = {0}; -#line 39 "/home/jens/Source/shotwell/src/Exporter.vala" - export_format_parameters_init (&_tmp0_, EXPORT_FORMAT_MODE_SPECIFIED, format, JPEG_QUALITY_HIGH); -#line 39 "/home/jens/Source/shotwell/src/Exporter.vala" - *result = _tmp0_; -#line 39 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 742 "Exporter.c" -} - - -void -export_format_parameters_last (ExportFormatParameters* result) -{ - ExportFormatParameters _tmp0_ = {0}; -#line 43 "/home/jens/Source/shotwell/src/Exporter.vala" - export_format_parameters_init (&_tmp0_, EXPORT_FORMAT_MODE_LAST, photo_file_format_get_system_default_format (), JPEG_QUALITY_HIGH); -#line 43 "/home/jens/Source/shotwell/src/Exporter.vala" - *result = _tmp0_; -#line 43 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 756 "Exporter.c" -} - - -void -export_format_parameters_for_JPEG (JpegQuality quality, - ExportFormatParameters* result) -{ - ExportFormatParameters _tmp0_ = {0}; -#line 48 "/home/jens/Source/shotwell/src/Exporter.vala" - export_format_parameters_init (&_tmp0_, EXPORT_FORMAT_MODE_SPECIFIED, PHOTO_FILE_FORMAT_JFIF, quality); -#line 48 "/home/jens/Source/shotwell/src/Exporter.vala" - *result = _tmp0_; -#line 48 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 771 "Exporter.c" -} - - -ExportFormatParameters* -export_format_parameters_dup (const ExportFormatParameters* self) -{ - ExportFormatParameters* dup; -#line 14 "/home/jens/Source/shotwell/src/Exporter.vala" - dup = g_new0 (ExportFormatParameters, 1); -#line 14 "/home/jens/Source/shotwell/src/Exporter.vala" - memcpy (dup, self, sizeof (ExportFormatParameters)); -#line 14 "/home/jens/Source/shotwell/src/Exporter.vala" - return dup; -#line 785 "Exporter.c" -} - - -void -export_format_parameters_free (ExportFormatParameters* self) -{ -#line 14 "/home/jens/Source/shotwell/src/Exporter.vala" - g_free (self); -#line 794 "Exporter.c" -} - - -GType -export_format_parameters_get_type (void) -{ - static volatile gsize export_format_parameters_type_id__volatile = 0; - if (g_once_init_enter (&export_format_parameters_type_id__volatile)) { - GType export_format_parameters_type_id; - export_format_parameters_type_id = g_boxed_type_register_static ("ExportFormatParameters", (GBoxedCopyFunc) export_format_parameters_dup, (GBoxedFreeFunc) export_format_parameters_free); - g_once_init_leave (&export_format_parameters_type_id__volatile, export_format_parameters_type_id); - } - return export_format_parameters_type_id__volatile; -} - - -GType -exporter_overwrite_get_type (void) -{ - static volatile gsize exporter_overwrite_type_id__volatile = 0; - if (g_once_init_enter (&exporter_overwrite_type_id__volatile)) { - static const GEnumValue values[] = {{EXPORTER_OVERWRITE_YES, "EXPORTER_OVERWRITE_YES", "yes"}, {EXPORTER_OVERWRITE_NO, "EXPORTER_OVERWRITE_NO", "no"}, {EXPORTER_OVERWRITE_CANCEL, "EXPORTER_OVERWRITE_CANCEL", "cancel"}, {EXPORTER_OVERWRITE_REPLACE_ALL, "EXPORTER_OVERWRITE_REPLACE_ALL", "replace-all"}, {0, NULL, NULL}}; - GType exporter_overwrite_type_id; - exporter_overwrite_type_id = g_enum_register_static ("ExporterOverwrite", values); - g_once_init_leave (&exporter_overwrite_type_id__volatile, exporter_overwrite_type_id); - } - return exporter_overwrite_type_id__volatile; -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 125 "/home/jens/Source/shotwell/src/Exporter.vala" - return self ? g_object_ref (self) : NULL; -#line 830 "Exporter.c" -} - - -Exporter* -exporter_construct (GType object_type, - GeeCollection* to_export, - GFile* dir, - Scaling* scaling, - ExportFormatParameters* export_params, - gboolean auto_replace_all) -{ - Exporter * self = NULL; - GeeCollection* _tmp0_; - GFile* _tmp1_; - Scaling _tmp2_; - ExportFormatParameters _tmp3_; -#line 122 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (to_export), NULL); -#line 122 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail ((dir == NULL) || G_IS_FILE (dir), NULL); -#line 122 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (scaling != NULL, NULL); -#line 122 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (export_params != NULL, NULL); -#line 122 "/home/jens/Source/shotwell/src/Exporter.vala" - self = (Exporter*) g_object_new (object_type, NULL); -#line 124 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->to_export; -#line 124 "/home/jens/Source/shotwell/src/Exporter.vala" - gee_collection_add_all (_tmp0_, to_export); -#line 125 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = _g_object_ref0 (dir); -#line 125 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->dir); -#line 125 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->dir = _tmp1_; -#line 126 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = *scaling; -#line 126 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->scaling = _tmp2_; -#line 127 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = *export_params; -#line 127 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->export_params = _tmp3_; -#line 128 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->replace_all = auto_replace_all; -#line 122 "/home/jens/Source/shotwell/src/Exporter.vala" - return self; -#line 879 "Exporter.c" -} - - -Exporter* -exporter_new (GeeCollection* to_export, - GFile* dir, - Scaling* scaling, - ExportFormatParameters* export_params, - gboolean auto_replace_all) -{ -#line 122 "/home/jens/Source/shotwell/src/Exporter.vala" - return exporter_construct (TYPE_EXPORTER, to_export, dir, scaling, export_params, auto_replace_all); -#line 892 "Exporter.c" -} - - -Exporter* -exporter_construct_for_temp_file (GType object_type, - GeeCollection* to_export, - Scaling* scaling, - ExportFormatParameters* export_params) -{ - Exporter * self = NULL; - GeeCollection* _tmp0_; - Scaling _tmp1_; - ExportFormatParameters _tmp2_; -#line 131 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (to_export), NULL); -#line 131 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (scaling != NULL, NULL); -#line 131 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (export_params != NULL, NULL); -#line 131 "/home/jens/Source/shotwell/src/Exporter.vala" - self = (Exporter*) g_object_new (object_type, NULL); -#line 133 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->to_export; -#line 133 "/home/jens/Source/shotwell/src/Exporter.vala" - gee_collection_add_all (_tmp0_, to_export); -#line 134 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->dir); -#line 134 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->dir = NULL; -#line 135 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = *scaling; -#line 135 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->scaling = _tmp1_; -#line 136 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = *export_params; -#line 136 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->export_params = _tmp2_; -#line 131 "/home/jens/Source/shotwell/src/Exporter.vala" - return self; -#line 932 "Exporter.c" -} - - -Exporter* -exporter_new_for_temp_file (GeeCollection* to_export, - Scaling* scaling, - ExportFormatParameters* export_params) -{ -#line 131 "/home/jens/Source/shotwell/src/Exporter.vala" - return exporter_construct_for_temp_file (TYPE_EXPORTER, to_export, scaling, export_params); -#line 943 "Exporter.c" -} - - -void -exporter_export (Exporter* self, - ExporterCompletionCallback completion_callback, - void* completion_callback_target, - ExporterExportFailedCallback error_callback, - void* error_callback_target, - ExporterOverwriteCallback overwrite_callback, - void* overwrite_callback_target, - GCancellable* cancellable, - ProgressMonitor monitor, - void* monitor_target) -{ - GCancellable* _tmp0_ = NULL; - GCancellable* _tmp1_; - GCancellable* _tmp3_; -#line 140 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_EXPORTER (self)); -#line 140 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable)); -#line 142 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback = completion_callback; -#line 142 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback_target = completion_callback_target; -#line 143 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->error_callback = error_callback; -#line 143 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->error_callback_target = error_callback_target; -#line 144 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->overwrite_callback = overwrite_callback; -#line 144 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->overwrite_callback_target = overwrite_callback_target; -#line 145 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->monitor = monitor; -#line 145 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->monitor_target = monitor_target; -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = _g_object_ref0 (cancellable); -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = _tmp1_; -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp0_ == NULL) { -#line 988 "Exporter.c" - GCancellable* _tmp2_; -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = g_cancellable_new (); -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp0_); -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = _tmp2_; -#line 996 "Exporter.c" - } -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = _tmp0_; -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = NULL; -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->cancellable); -#line 146 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->cancellable = _tmp3_; -#line 148 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!exporter_process_queue (self)) { -#line 149 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_export_completed (self, TRUE); -#line 1010 "Exporter.c" - } -#line 140 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp0_); -#line 1014 "Exporter.c" -} - - -static gpointer -_background_job_ref0 (gpointer self) -{ -#line 153 "/home/jens/Source/shotwell/src/Exporter.vala" - return self ? background_job_ref (self) : NULL; -#line 1023 "Exporter.c" -} - - -static void -_vala_array_add128 (GFile** * array, - int* length, - int* size, - GFile* value) -{ -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - if ((*length) == (*size)) { -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - *array = g_renew (GFile*, *array, (*size) + 1); -#line 1039 "Exporter.c" - } -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - (*array)[(*length)++] = value; -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - (*array)[*length] = NULL; -#line 1045 "Exporter.c" -} - - -static void -exporter_on_exported (Exporter* self, - BackgroundJob* j) -{ - ExporterExportJob* job = NULL; - ExporterExportJob* _tmp0_; - gint _tmp1_; - gboolean completed = FALSE; - gint _tmp2_; - GeeCollection* _tmp3_; - gint _tmp4_; - gint _tmp5_; - gboolean _tmp6_ = FALSE; - gboolean _tmp7_; - gboolean _tmp20_ = FALSE; - gboolean _tmp21_; - gboolean _tmp33_; -#line 152 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_EXPORTER (self)); -#line 152 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_BACKGROUND_JOB (j)); -#line 153 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (j, EXPORTER_TYPE_EXPORT_JOB, ExporterExportJob)); -#line 153 "/home/jens/Source/shotwell/src/Exporter.vala" - job = _tmp0_; -#line 155 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = self->priv->completed_count; -#line 155 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completed_count = _tmp1_ + 1; -#line 159 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = self->priv->completed_count; -#line 159 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = self->priv->to_export; -#line 159 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = gee_collection_get_size (_tmp3_); -#line 159 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp5_ = _tmp4_; -#line 159 "/home/jens/Source/shotwell/src/Exporter.vala" - completed = _tmp2_ == _tmp5_; -#line 161 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp7_ = self->priv->aborted; -#line 161 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp7_) { -#line 1092 "Exporter.c" - ExporterExportJob* _tmp8_; - GError* _tmp9_; -#line 161 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp8_ = job; -#line 161 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp9_ = _tmp8_->err; -#line 161 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp6_ = _tmp9_ != NULL; -#line 1101 "Exporter.c" - } else { -#line 161 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp6_ = FALSE; -#line 1105 "Exporter.c" - } -#line 161 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp6_) { -#line 1109 "Exporter.c" - ExporterExportFailedCallback _tmp10_; - void* _tmp10__target; - ExporterExportJob* _tmp11_; - GFile* _tmp12_; - GeeCollection* _tmp13_; - gint _tmp14_; - gint _tmp15_; - gint _tmp16_; - ExporterExportJob* _tmp17_; - GError* _tmp18_; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp10_ = self->priv->error_callback; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp10__target = self->priv->error_callback_target; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp11_ = job; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp12_ = _tmp11_->dest; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp13_ = self->priv->to_export; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp14_ = gee_collection_get_size (_tmp13_); -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp15_ = _tmp14_; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp16_ = self->priv->completed_count; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp17_ = job; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp18_ = _tmp17_->err; -#line 162 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp10_ (self, _tmp12_, _tmp15_ - _tmp16_, _tmp18_, _tmp10__target)) { -#line 1142 "Exporter.c" - gboolean _tmp19_; -#line 163 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->aborted = TRUE; -#line 165 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp19_ = completed; -#line 165 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp19_) { -#line 166 "/home/jens/Source/shotwell/src/Exporter.vala" - _background_job_unref0 (job); -#line 166 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 1154 "Exporter.c" - } - } - } -#line 170 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp21_ = self->priv->aborted; -#line 170 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp21_) { -#line 1162 "Exporter.c" - ProgressMonitor _tmp22_; - void* _tmp22__target; -#line 170 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp22_ = self->priv->monitor; -#line 170 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp22__target = self->priv->monitor_target; -#line 170 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp20_ = _tmp22_ != NULL; -#line 1171 "Exporter.c" - } else { -#line 170 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp20_ = FALSE; -#line 1175 "Exporter.c" - } -#line 170 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp20_) { -#line 1179 "Exporter.c" - ProgressMonitor _tmp23_; - void* _tmp23__target; - gint _tmp24_; - GeeCollection* _tmp25_; - gint _tmp26_; - gint _tmp27_; -#line 171 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp23_ = self->priv->monitor; -#line 171 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp23__target = self->priv->monitor_target; -#line 171 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp24_ = self->priv->completed_count; -#line 171 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp25_ = self->priv->to_export; -#line 171 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp26_ = gee_collection_get_size (_tmp25_); -#line 171 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp27_ = _tmp26_; -#line 171 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp23_ ((guint64) _tmp24_, (guint64) _tmp27_, FALSE, _tmp23__target)) { -#line 1200 "Exporter.c" - gboolean _tmp28_; -#line 172 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->aborted = TRUE; -#line 174 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp28_ = completed; -#line 174 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp28_) { -#line 175 "/home/jens/Source/shotwell/src/Exporter.vala" - _background_job_unref0 (job); -#line 175 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 1212 "Exporter.c" - } - } else { - GFile** _tmp29_; - gint _tmp29__length1; - ExporterExportJob* _tmp30_; - GFile* _tmp31_; - GFile* _tmp32_; -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp29_ = self->priv->exported_files; -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp29__length1 = self->priv->exported_files_length1; -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp30_ = job; -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp31_ = _tmp30_->dest; -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp32_ = _g_object_ref0 (_tmp31_); -#line 177 "/home/jens/Source/shotwell/src/Exporter.vala" - _vala_array_add128 (&self->priv->exported_files, &self->priv->exported_files_length1, &self->priv->_exported_files_size_, _tmp32_); -#line 1232 "Exporter.c" - } - } -#line 181 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp33_ = completed; -#line 181 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp33_) { -#line 182 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_export_completed (self, FALSE); -#line 1241 "Exporter.c" - } -#line 152 "/home/jens/Source/shotwell/src/Exporter.vala" - _background_job_unref0 (job); -#line 1245 "Exporter.c" -} - - -static void -exporter_on_export_cancelled (Exporter* self, - BackgroundJob* j) -{ - gint _tmp0_; - gint _tmp1_; - GeeCollection* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 185 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_EXPORTER (self)); -#line 185 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_BACKGROUND_JOB (j)); -#line 186 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->completed_count; -#line 186 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completed_count = _tmp0_ + 1; -#line 186 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = self->priv->completed_count; -#line 186 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = self->priv->to_export; -#line 186 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = gee_collection_get_size (_tmp2_); -#line 186 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = _tmp3_; -#line 186 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp1_ == _tmp4_) { -#line 187 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_export_completed (self, TRUE); -#line 1278 "Exporter.c" - } -} - - -static GFile** -_vala_array_dup25 (GFile** self, - int length) -{ - GFile** result; - int i; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - result = g_new0 (GFile*, length + 1); -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - for (i = 0; i < length; i++) { -#line 1293 "Exporter.c" - GFile* _tmp0_; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = _g_object_ref0 (self[i]); -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - result[i] = _tmp0_; -#line 1299 "Exporter.c" - } -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 1303 "Exporter.c" -} - - -GFile** -exporter_get_exported_files (Exporter* self, - int* result_length1) -{ - GFile** result = NULL; - GFile** _tmp0_; - gint _tmp0__length1; - GFile** _tmp1_; - gint _tmp1__length1; - GFile** _tmp2_; - gint _tmp2__length1; -#line 190 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER (self), NULL); -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->exported_files; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0__length1 = self->priv->exported_files_length1; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup25 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1__length1 = _tmp0__length1; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = _tmp1_; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2__length1 = _tmp1__length1; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - if (result_length1) { -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - *result_length1 = _tmp2__length1; -#line 1336 "Exporter.c" - } -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - result = _tmp2_; -#line 191 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 1342 "Exporter.c" -} - - -static void -_vala_array_add129 (GFile** * array, - int* length, - int* size, - GFile* value) -{ -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - if ((*length) == (*size)) { -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - *array = g_renew (GFile*, *array, (*size) + 1); -#line 1358 "Exporter.c" - } -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - (*array)[(*length)++] = value; -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - (*array)[*length] = NULL; -#line 1364 "Exporter.c" -} - - -static gboolean -exporter_process_queue (Exporter* self) -{ - gboolean result = FALSE; - gint submitted = 0; - gint _tmp82_; - GError * _inner_error_ = NULL; -#line 194 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER (self), FALSE); -#line 195 "/home/jens/Source/shotwell/src/Exporter.vala" - submitted = 0; -#line 1379 "Exporter.c" - { - GeeIterator* _source_it = NULL; - GeeCollection* _tmp0_; - GeeIterator* _tmp1_; -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->to_export; -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _source_it = _tmp1_; -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - while (TRUE) { -#line 1392 "Exporter.c" - GeeIterator* _tmp2_; - MediaSource* source = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - GFile* use_source_file = NULL; - PhotoFileFormat real_export_format = 0; - gchar* basename = NULL; - MediaSource* _tmp5_; - const gchar* _tmp16_; - GFile* _tmp17_; - GFile* export_dir = NULL; - GFile* _tmp29_; - GFile* _tmp30_; - GFile* dest = NULL; - GFile* _tmp31_; - Workers* _tmp67_; - MediaSource* _tmp68_; - GFile* _tmp69_; - Scaling _tmp70_; - ExportFormatParameters _tmp71_; - JpegQuality _tmp72_; - PhotoFileFormat _tmp73_; - GCancellable* _tmp74_; - ExportFormatParameters _tmp75_; - ExportFormatMode _tmp76_; - ExportFormatParameters _tmp77_; - gboolean _tmp78_; - ExporterExportJob* _tmp79_; - ExporterExportJob* _tmp80_; - gint _tmp81_; -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = _source_it; -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - break; -#line 1429 "Exporter.c" - } -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = _source_it; -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - source = (MediaSource*) _tmp4_; -#line 197 "/home/jens/Source/shotwell/src/Exporter.vala" - use_source_file = NULL; -#line 198 "/home/jens/Source/shotwell/src/Exporter.vala" - real_export_format = photo_file_format_get_system_default_format (); -#line 199 "/home/jens/Source/shotwell/src/Exporter.vala" - basename = NULL; -#line 200 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp5_ = source; -#line 200 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TYPE_PHOTO)) { -#line 1447 "Exporter.c" - Photo* photo = NULL; - MediaSource* _tmp6_; - Photo* _tmp7_; - Photo* _tmp8_; - ExportFormatParameters _tmp9_; - Photo* _tmp10_; - ExportFormatParameters _tmp11_; - gchar* _tmp12_; -#line 201 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp6_ = source; -#line 201 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_PHOTO, Photo)); -#line 201 "/home/jens/Source/shotwell/src/Exporter.vala" - photo = _tmp7_; -#line 202 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp8_ = photo; -#line 202 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp9_ = self->priv->export_params; -#line 202 "/home/jens/Source/shotwell/src/Exporter.vala" - real_export_format = photo_get_export_format_for_parameters (_tmp8_, &_tmp9_); -#line 203 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp10_ = photo; -#line 203 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp11_ = self->priv->export_params; -#line 203 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp12_ = photo_get_export_basename_for_parameters (_tmp10_, &_tmp11_); -#line 203 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 203 "/home/jens/Source/shotwell/src/Exporter.vala" - basename = _tmp12_; -#line 200 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (photo); -#line 1480 "Exporter.c" - } else { - MediaSource* _tmp13_; -#line 204 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp13_ = source; -#line 204 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, TYPE_VIDEO)) { -#line 1487 "Exporter.c" - MediaSource* _tmp14_; - gchar* _tmp15_; -#line 205 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp14_ = source; -#line 205 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp15_ = media_source_get_basename (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_VIDEO, Video), TYPE_MEDIA_SOURCE, MediaSource)); -#line 205 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 205 "/home/jens/Source/shotwell/src/Exporter.vala" - basename = _tmp15_; -#line 1498 "Exporter.c" - } - } -#line 207 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp16_ = basename; -#line 207 "/home/jens/Source/shotwell/src/Exporter.vala" - _vala_assert (_tmp16_ != NULL, "basename != null"); -#line 209 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp17_ = use_source_file; -#line 209 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp17_ != NULL) { -#line 1509 "Exporter.c" - GFile** _tmp18_; - gint _tmp18__length1; - GFile* _tmp19_; - GFile* _tmp20_; - gint _tmp21_; - ProgressMonitor _tmp22_; - void* _tmp22__target; -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp18_ = self->priv->exported_files; -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp18__length1 = self->priv->exported_files_length1; -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp19_ = use_source_file; -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp20_ = _g_object_ref0 (_tmp19_); -#line 210 "/home/jens/Source/shotwell/src/Exporter.vala" - _vala_array_add129 (&self->priv->exported_files, &self->priv->exported_files_length1, &self->priv->_exported_files_size_, _tmp20_); -#line 212 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp21_ = self->priv->completed_count; -#line 212 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completed_count = _tmp21_ + 1; -#line 213 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp22_ = self->priv->monitor; -#line 213 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp22__target = self->priv->monitor_target; -#line 213 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp22_ != NULL) { -#line 1537 "Exporter.c" - ProgressMonitor _tmp23_; - void* _tmp23__target; - gint _tmp24_; - GeeCollection* _tmp25_; - gint _tmp26_; - gint _tmp27_; -#line 214 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp23_ = self->priv->monitor; -#line 214 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp23__target = self->priv->monitor_target; -#line 214 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp24_ = self->priv->completed_count; -#line 214 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp25_ = self->priv->to_export; -#line 214 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp26_ = gee_collection_get_size (_tmp25_); -#line 214 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp27_ = _tmp26_; -#line 214 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp23_ ((guint64) _tmp24_, (guint64) _tmp27_, TRUE, _tmp23__target)) { -#line 1558 "Exporter.c" - GCancellable* _tmp28_; -#line 215 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp28_ = self->priv->cancellable; -#line 215 "/home/jens/Source/shotwell/src/Exporter.vala" - g_cancellable_cancel (_tmp28_); -#line 217 "/home/jens/Source/shotwell/src/Exporter.vala" - result = FALSE; -#line 217 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 217 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (use_source_file); -#line 217 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (source); -#line 217 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_source_it); -#line 217 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 1576 "Exporter.c" - } - } -#line 221 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 221 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (use_source_file); -#line 221 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (source); -#line 221 "/home/jens/Source/shotwell/src/Exporter.vala" - continue; -#line 1587 "Exporter.c" - } -#line 224 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp29_ = self->priv->dir; -#line 224 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp30_ = _g_object_ref0 (_tmp29_); -#line 224 "/home/jens/Source/shotwell/src/Exporter.vala" - export_dir = _tmp30_; -#line 225 "/home/jens/Source/shotwell/src/Exporter.vala" - dest = NULL; -#line 227 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp31_ = export_dir; -#line 227 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp31_ == NULL) { -#line 1601 "Exporter.c" - { - gboolean collision = FALSE; - GFile* _tmp32_ = NULL; - GFile* _tmp33_; - GFile* _tmp34_; - const gchar* _tmp35_; - gboolean _tmp36_ = FALSE; - GFile* _tmp37_; - GFile* _tmp38_; - GFile* _tmp39_; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp33_ = app_dirs_get_temp_dir (); -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp34_ = _tmp33_; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp35_ = basename; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp37_ = generate_unique_file (_tmp34_, _tmp35_, &_tmp36_, &_inner_error_); -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - collision = _tmp36_; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp38_ = _tmp37_; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp34_); -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp32_ = _tmp38_; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1630 "Exporter.c" - goto __catch488_g_error; - } -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp39_ = _tmp32_; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp32_ = NULL; -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (dest); -#line 230 "/home/jens/Source/shotwell/src/Exporter.vala" - dest = _tmp39_; -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp32_); -#line 1643 "Exporter.c" - } - goto __finally488; - __catch488_g_error: - { - GError* err = NULL; - MediaSource* _tmp40_; - GFile* _tmp41_; - GFile* _tmp42_; - gchar* _tmp43_; - gchar* _tmp44_; - GError* _tmp45_; - const gchar* _tmp46_; - gchar* _tmp47_; - gchar* _tmp48_; -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - err = _inner_error_; -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _inner_error_ = NULL; -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp40_ = source; -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp41_ = media_source_get_file (_tmp40_); -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp42_ = _tmp41_; -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp43_ = g_file_get_basename (_tmp42_); -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp44_ = _tmp43_; -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp45_ = err; -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp46_ = _tmp45_->message; -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp47_ = g_strdup_printf (_ ("Unable to generate a temporary file for %s: %s"), _tmp44_, _tmp46_); -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp48_ = _tmp47_; -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - app_window_error_message (_tmp48_, NULL); -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (_tmp48_); -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (_tmp44_); -#line 232 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp42_); -#line 235 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_error_free0 (err); -#line 235 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (dest); -#line 235 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (export_dir); -#line 235 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 235 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (use_source_file); -#line 235 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (source); -#line 235 "/home/jens/Source/shotwell/src/Exporter.vala" - break; -#line 1702 "Exporter.c" - } - __finally488: -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1707 "Exporter.c" - gboolean _tmp49_ = FALSE; -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (dest); -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (export_dir); -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (use_source_file); -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (source); -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_source_it); -#line 228 "/home/jens/Source/shotwell/src/Exporter.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 228 "/home/jens/Source/shotwell/src/Exporter.vala" - g_clear_error (&_inner_error_); -#line 228 "/home/jens/Source/shotwell/src/Exporter.vala" - return _tmp49_; -#line 1727 "Exporter.c" - } - } else { - GFile* _tmp50_; - const gchar* _tmp51_; - GFile* _tmp52_; - gboolean _tmp53_ = FALSE; - gboolean _tmp54_; -#line 238 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp50_ = self->priv->dir; -#line 238 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp51_ = basename; -#line 238 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp52_ = g_file_get_child (_tmp50_, _tmp51_); -#line 238 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (dest); -#line 238 "/home/jens/Source/shotwell/src/Exporter.vala" - dest = _tmp52_; -#line 240 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp54_ = self->priv->replace_all; -#line 240 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp54_) { -#line 1749 "Exporter.c" - GFile* _tmp55_; -#line 240 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp55_ = dest; -#line 240 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp53_ = g_file_query_exists (_tmp55_, NULL); -#line 1755 "Exporter.c" - } else { -#line 240 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp53_ = FALSE; -#line 1759 "Exporter.c" - } -#line 240 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp53_) { -#line 1763 "Exporter.c" - ExporterOverwriteCallback _tmp56_; - void* _tmp56__target; - GFile* _tmp57_; -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp56_ = self->priv->overwrite_callback; -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp56__target = self->priv->overwrite_callback_target; -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp57_ = dest; -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - switch (_tmp56_ (self, _tmp57_, _tmp56__target)) { -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - case EXPORTER_OVERWRITE_YES: -#line 1777 "Exporter.c" - { -#line 244 "/home/jens/Source/shotwell/src/Exporter.vala" - break; -#line 1781 "Exporter.c" - } -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - case EXPORTER_OVERWRITE_REPLACE_ALL: -#line 1785 "Exporter.c" - { -#line 247 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->replace_all = TRUE; -#line 248 "/home/jens/Source/shotwell/src/Exporter.vala" - break; -#line 1791 "Exporter.c" - } -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - case EXPORTER_OVERWRITE_CANCEL: -#line 1795 "Exporter.c" - { - GCancellable* _tmp58_; -#line 251 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp58_ = self->priv->cancellable; -#line 251 "/home/jens/Source/shotwell/src/Exporter.vala" - g_cancellable_cancel (_tmp58_); -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - result = FALSE; -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (dest); -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (export_dir); -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (use_source_file); -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (source); -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_source_it); -#line 253 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 1818 "Exporter.c" - } - default: -#line 241 "/home/jens/Source/shotwell/src/Exporter.vala" - case EXPORTER_OVERWRITE_NO: -#line 1823 "Exporter.c" - { - gint _tmp59_; - ProgressMonitor _tmp60_; - void* _tmp60__target; -#line 257 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp59_ = self->priv->completed_count; -#line 257 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completed_count = _tmp59_ + 1; -#line 258 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp60_ = self->priv->monitor; -#line 258 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp60__target = self->priv->monitor_target; -#line 258 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp60_ != NULL) { -#line 1838 "Exporter.c" - ProgressMonitor _tmp61_; - void* _tmp61__target; - gint _tmp62_; - GeeCollection* _tmp63_; - gint _tmp64_; - gint _tmp65_; -#line 259 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp61_ = self->priv->monitor; -#line 259 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp61__target = self->priv->monitor_target; -#line 259 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp62_ = self->priv->completed_count; -#line 259 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp63_ = self->priv->to_export; -#line 259 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp64_ = gee_collection_get_size (_tmp63_); -#line 259 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp65_ = _tmp64_; -#line 259 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!_tmp61_ ((guint64) _tmp62_, (guint64) _tmp65_, TRUE, _tmp61__target)) { -#line 1859 "Exporter.c" - GCancellable* _tmp66_; -#line 260 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp66_ = self->priv->cancellable; -#line 260 "/home/jens/Source/shotwell/src/Exporter.vala" - g_cancellable_cancel (_tmp66_); -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - result = FALSE; -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (dest); -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (export_dir); -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (use_source_file); -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (source); -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_source_it); -#line 262 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 1881 "Exporter.c" - } - } -#line 266 "/home/jens/Source/shotwell/src/Exporter.vala" - continue; -#line 1886 "Exporter.c" - } - } - } - } -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp67_ = self->priv->workers; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp68_ = source; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp69_ = dest; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp70_ = self->priv->scaling; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp71_ = self->priv->export_params; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp72_ = _tmp71_.quality; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp73_ = real_export_format; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp74_ = self->priv->cancellable; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp75_ = self->priv->export_params; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp76_ = _tmp75_.mode; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp77_ = self->priv->export_params; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp78_ = _tmp77_.export_metadata; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp79_ = exporter_export_job_new (self, _tmp68_, _tmp69_, &_tmp70_, &_tmp72_, &_tmp73_, _tmp74_, _tmp76_ == EXPORT_FORMAT_MODE_UNMODIFIED, _tmp78_); -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp80_ = _tmp79_; -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - workers_enqueue (_tmp67_, G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, TYPE_BACKGROUND_JOB, BackgroundJob)); -#line 271 "/home/jens/Source/shotwell/src/Exporter.vala" - _background_job_unref0 (_tmp80_); -#line 273 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp81_ = submitted; -#line 273 "/home/jens/Source/shotwell/src/Exporter.vala" - submitted = _tmp81_ + 1; -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (dest); -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (export_dir); -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (basename); -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (use_source_file); -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (source); -#line 1937 "Exporter.c" - } -#line 196 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_source_it); -#line 1941 "Exporter.c" - } -#line 276 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp82_ = submitted; -#line 276 "/home/jens/Source/shotwell/src/Exporter.vala" - result = _tmp82_ > 0; -#line 276 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 1949 "Exporter.c" -} - - -static void -exporter_export_completed (Exporter* self, - gboolean is_cancelled) -{ - ExporterCompletionCallback _tmp0_; - void* _tmp0__target; -#line 279 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_EXPORTER (self)); -#line 280 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->completion_callback; -#line 280 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0__target = self->priv->completion_callback_target; -#line 280 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ (self, is_cancelled, _tmp0__target); -#line 1967 "Exporter.c" -} - - -static void -_exporter_on_exported_completion_callback (BackgroundJob* job, - gpointer self) -{ -#line 81 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_on_exported ((Exporter*) self, job); -#line 1977 "Exporter.c" -} - - -static void -_exporter_on_export_cancelled_cancellation_callback (BackgroundJob* job, - gpointer self) -{ -#line 81 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_on_export_cancelled ((Exporter*) self, job); -#line 1987 "Exporter.c" -} - - -static gpointer -_scaling_dup0 (gpointer self) -{ -#line 87 "/home/jens/Source/shotwell/src/Exporter.vala" - return self ? scaling_dup (self) : NULL; -#line 1996 "Exporter.c" -} - - -static JpegQuality* -_jpeg_quality_dup (JpegQuality* self) -{ - JpegQuality* dup; -#line 88 "/home/jens/Source/shotwell/src/Exporter.vala" - dup = g_new0 (JpegQuality, 1); -#line 88 "/home/jens/Source/shotwell/src/Exporter.vala" - memcpy (dup, self, sizeof (JpegQuality)); -#line 88 "/home/jens/Source/shotwell/src/Exporter.vala" - return dup; -#line 2010 "Exporter.c" -} - - -static gpointer -__jpeg_quality_dup0 (gpointer self) -{ -#line 88 "/home/jens/Source/shotwell/src/Exporter.vala" - return self ? _jpeg_quality_dup (self) : NULL; -#line 2019 "Exporter.c" -} - - -static PhotoFileFormat* -_photo_file_format_dup (PhotoFileFormat* self) -{ - PhotoFileFormat* dup; -#line 89 "/home/jens/Source/shotwell/src/Exporter.vala" - dup = g_new0 (PhotoFileFormat, 1); -#line 89 "/home/jens/Source/shotwell/src/Exporter.vala" - memcpy (dup, self, sizeof (PhotoFileFormat)); -#line 89 "/home/jens/Source/shotwell/src/Exporter.vala" - return dup; -#line 2033 "Exporter.c" -} - - -static gpointer -__photo_file_format_dup0 (gpointer self) -{ -#line 89 "/home/jens/Source/shotwell/src/Exporter.vala" - return self ? _photo_file_format_dup (self) : NULL; -#line 2042 "Exporter.c" -} - - -static ExporterExportJob* -exporter_export_job_construct (GType object_type, - Exporter* owner, - MediaSource* media, - GFile* dest, - Scaling* scaling, - JpegQuality* quality, - PhotoFileFormat* format, - GCancellable* cancellable, - gboolean direct_copy_unmodified, - gboolean export_metadata) -{ - ExporterExportJob* self = NULL; - gboolean _tmp0_ = FALSE; - MediaSource* _tmp1_; - GFile* _tmp2_; - Scaling* _tmp3_; - JpegQuality* _tmp4_; - PhotoFileFormat* _tmp5_; -#line 78 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER (owner), NULL); -#line 78 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_MEDIA_SOURCE (media), NULL); -#line 78 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (G_IS_FILE (dest), NULL); -#line 78 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL); -#line 81 "/home/jens/Source/shotwell/src/Exporter.vala" - self = (ExporterExportJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (owner, G_TYPE_OBJECT, GObject), _exporter_on_exported_completion_callback, owner, cancellable, _exporter_on_export_cancelled_cancellation_callback, owner, NULL); -#line 83 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (media, TYPE_PHOTO)) { -#line 83 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = TRUE; -#line 2079 "Exporter.c" - } else { -#line 83 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (media, TYPE_VIDEO); -#line 2083 "Exporter.c" - } -#line 83 "/home/jens/Source/shotwell/src/Exporter.vala" - _vala_assert (_tmp0_, "media is Photo || media is Video"); -#line 85 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = _g_object_ref0 (media); -#line 85 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->media); -#line 85 "/home/jens/Source/shotwell/src/Exporter.vala" - self->media = _tmp1_; -#line 86 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = _g_object_ref0 (dest); -#line 86 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->dest); -#line 86 "/home/jens/Source/shotwell/src/Exporter.vala" - self->dest = _tmp2_; -#line 87 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = _scaling_dup0 (scaling); -#line 87 "/home/jens/Source/shotwell/src/Exporter.vala" - _scaling_free0 (self->scaling); -#line 87 "/home/jens/Source/shotwell/src/Exporter.vala" - self->scaling = _tmp3_; -#line 88 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = __jpeg_quality_dup0 (quality); -#line 88 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (self->quality); -#line 88 "/home/jens/Source/shotwell/src/Exporter.vala" - self->quality = _tmp4_; -#line 89 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp5_ = __photo_file_format_dup0 (format); -#line 89 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (self->format); -#line 89 "/home/jens/Source/shotwell/src/Exporter.vala" - self->format = _tmp5_; -#line 90 "/home/jens/Source/shotwell/src/Exporter.vala" - self->direct_copy_unmodified = direct_copy_unmodified; -#line 91 "/home/jens/Source/shotwell/src/Exporter.vala" - self->export_metadata = export_metadata; -#line 78 "/home/jens/Source/shotwell/src/Exporter.vala" - return self; -#line 2123 "Exporter.c" -} - - -static ExporterExportJob* -exporter_export_job_new (Exporter* owner, - MediaSource* media, - GFile* dest, - Scaling* scaling, - JpegQuality* quality, - PhotoFileFormat* format, - GCancellable* cancellable, - gboolean direct_copy_unmodified, - gboolean export_metadata) -{ -#line 78 "/home/jens/Source/shotwell/src/Exporter.vala" - return exporter_export_job_construct (EXPORTER_TYPE_EXPORT_JOB, owner, media, dest, scaling, quality, format, cancellable, direct_copy_unmodified, export_metadata); -#line 2140 "Exporter.c" -} - - -static gpointer -_g_error_copy0 (gpointer self) -{ -#line 102 "/home/jens/Source/shotwell/src/Exporter.vala" - return self ? g_error_copy (self) : NULL; -#line 2149 "Exporter.c" -} - - -static void -exporter_export_job_real_execute (BackgroundJob* base) -{ - ExporterExportJob * self; - GError * _inner_error_ = NULL; -#line 94 "/home/jens/Source/shotwell/src/Exporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EXPORTER_TYPE_EXPORT_JOB, ExporterExportJob); -#line 2160 "Exporter.c" - { - MediaSource* _tmp0_; -#line 96 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->media; -#line 96 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_PHOTO)) { -#line 2167 "Exporter.c" - MediaSource* _tmp1_; - GFile* _tmp2_; - Scaling* _tmp3_; - JpegQuality* _tmp4_; - PhotoFileFormat* _tmp5_; - gboolean _tmp6_; - gboolean _tmp7_; - Scaling _tmp8_; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = self->media; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = self->dest; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = self->scaling; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = self->quality; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp5_ = self->format; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp6_ = self->direct_copy_unmodified; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp7_ = self->export_metadata; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp8_ = *_tmp3_; -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - photo_export (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO, Photo), _tmp2_, &_tmp8_, *_tmp4_, *_tmp5_, _tmp6_, _tmp7_, &_inner_error_); -#line 97 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2196 "Exporter.c" - goto __catch489_g_error; - } - } else { - MediaSource* _tmp9_; -#line 98 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp9_ = self->media; -#line 98 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_VIDEO)) { -#line 2205 "Exporter.c" - MediaSource* _tmp10_; - GFile* _tmp11_; -#line 99 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp10_ = self->media; -#line 99 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp11_ = self->dest; -#line 99 "/home/jens/Source/shotwell/src/Exporter.vala" - video_export (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_VIDEO, Video), _tmp11_, &_inner_error_); -#line 99 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2216 "Exporter.c" - goto __catch489_g_error; - } - } - } - } - goto __finally489; - __catch489_g_error: - { - GError* err = NULL; - GError* _tmp12_; - GError* _tmp13_; -#line 95 "/home/jens/Source/shotwell/src/Exporter.vala" - err = _inner_error_; -#line 95 "/home/jens/Source/shotwell/src/Exporter.vala" - _inner_error_ = NULL; -#line 102 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp12_ = err; -#line 102 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp13_ = _g_error_copy0 (_tmp12_); -#line 102 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_error_free0 (self->err); -#line 102 "/home/jens/Source/shotwell/src/Exporter.vala" - self->err = _tmp13_; -#line 95 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_error_free0 (err); -#line 2242 "Exporter.c" - } - __finally489: -#line 95 "/home/jens/Source/shotwell/src/Exporter.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 95 "/home/jens/Source/shotwell/src/Exporter.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 95 "/home/jens/Source/shotwell/src/Exporter.vala" - g_clear_error (&_inner_error_); -#line 95 "/home/jens/Source/shotwell/src/Exporter.vala" - return; -#line 2253 "Exporter.c" - } -} - - -static void -exporter_export_job_class_init (ExporterExportJobClass * klass) -{ -#line 68 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_export_job_parent_class = g_type_class_peek_parent (klass); -#line 68 "/home/jens/Source/shotwell/src/Exporter.vala" - ((BackgroundJobClass *) klass)->finalize = exporter_export_job_finalize; -#line 68 "/home/jens/Source/shotwell/src/Exporter.vala" - ((BackgroundJobClass *) klass)->execute = (void (*) (BackgroundJob *)) exporter_export_job_real_execute; -#line 2267 "Exporter.c" -} - - -static void -exporter_export_job_instance_init (ExporterExportJob * self) -{ -#line 74 "/home/jens/Source/shotwell/src/Exporter.vala" - self->err = NULL; -#line 75 "/home/jens/Source/shotwell/src/Exporter.vala" - self->direct_copy_unmodified = FALSE; -#line 76 "/home/jens/Source/shotwell/src/Exporter.vala" - self->export_metadata = TRUE; -#line 2280 "Exporter.c" -} - - -static void -exporter_export_job_finalize (BackgroundJob * obj) -{ - ExporterExportJob * self; -#line 68 "/home/jens/Source/shotwell/src/Exporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, EXPORTER_TYPE_EXPORT_JOB, ExporterExportJob); -#line 69 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->media); -#line 70 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->dest); -#line 71 "/home/jens/Source/shotwell/src/Exporter.vala" - _scaling_free0 (self->scaling); -#line 72 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (self->quality); -#line 73 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (self->format); -#line 74 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_error_free0 (self->err); -#line 68 "/home/jens/Source/shotwell/src/Exporter.vala" - BACKGROUND_JOB_CLASS (exporter_export_job_parent_class)->finalize (obj); -#line 2304 "Exporter.c" -} - - -static GType -exporter_export_job_get_type (void) -{ - static volatile gsize exporter_export_job_type_id__volatile = 0; - if (g_once_init_enter (&exporter_export_job_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ExporterExportJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) exporter_export_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExporterExportJob), 0, (GInstanceInitFunc) exporter_export_job_instance_init, NULL }; - GType exporter_export_job_type_id; - exporter_export_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "ExporterExportJob", &g_define_type_info, 0); - g_once_init_leave (&exporter_export_job_type_id__volatile, exporter_export_job_type_id); - } - return exporter_export_job_type_id__volatile; -} - - -static void -exporter_class_init (ExporterClass * klass) -{ -#line 53 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_parent_class = g_type_class_peek_parent (klass); -#line 53 "/home/jens/Source/shotwell/src/Exporter.vala" - g_type_class_add_private (klass, sizeof (ExporterPrivate)); -#line 53 "/home/jens/Source/shotwell/src/Exporter.vala" - G_OBJECT_CLASS (klass)->finalize = exporter_finalize; -#line 2331 "Exporter.c" -} - - -static void -exporter_instance_init (Exporter * self) -{ - GeeArrayList* _tmp0_; - Workers* _tmp1_; -#line 53 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv = EXPORTER_GET_PRIVATE (self); -#line 107 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 107 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->to_export = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 111 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completed_count = 0; -#line 112 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = workers_new (workers_threads_per_cpu (1, 4), FALSE); -#line 112 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->workers = _tmp1_; -#line 113 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback = NULL; -#line 113 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback_target = self; -#line 114 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->error_callback = NULL; -#line 114 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->error_callback_target = self; -#line 115 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->overwrite_callback = NULL; -#line 115 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->overwrite_callback_target = self; -#line 116 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->monitor = NULL; -#line 116 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->monitor_target = self; -#line 118 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->replace_all = FALSE; -#line 119 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->aborted = FALSE; -#line 2372 "Exporter.c" -} - - -static void -exporter_finalize (GObject * obj) -{ - Exporter * self; -#line 53 "/home/jens/Source/shotwell/src/Exporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EXPORTER, Exporter); -#line 107 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->to_export); -#line 108 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->exported_files = (_vala_array_free (self->priv->exported_files, self->priv->exported_files_length1, (GDestroyNotify) g_object_unref), NULL); -#line 109 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->dir); -#line 112 "/home/jens/Source/shotwell/src/Exporter.vala" - _workers_unref0 (self->priv->workers); -#line 117 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->cancellable); -#line 53 "/home/jens/Source/shotwell/src/Exporter.vala" - G_OBJECT_CLASS (exporter_parent_class)->finalize (obj); -#line 2394 "Exporter.c" -} - - -GType -exporter_get_type (void) -{ - static volatile gsize exporter_type_id__volatile = 0; - if (g_once_init_enter (&exporter_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ExporterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) exporter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Exporter), 0, (GInstanceInitFunc) exporter_instance_init, NULL }; - GType exporter_type_id; - exporter_type_id = g_type_register_static (G_TYPE_OBJECT, "Exporter", &g_define_type_info, 0); - g_once_init_leave (&exporter_type_id__volatile, exporter_type_id); - } - return exporter_type_id__volatile; -} - - -ExporterUI* -exporter_ui_construct (GType object_type, - Exporter* exporter) -{ - ExporterUI* self = NULL; - Exporter* _tmp0_; -#line 290 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER (exporter), NULL); -#line 290 "/home/jens/Source/shotwell/src/Exporter.vala" - self = (ExporterUI*) g_type_create_instance (object_type); -#line 291 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = _g_object_ref0 (exporter); -#line 291 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->exporter); -#line 291 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->exporter = _tmp0_; -#line 290 "/home/jens/Source/shotwell/src/Exporter.vala" - return self; -#line 2430 "Exporter.c" -} - - -ExporterUI* -exporter_ui_new (Exporter* exporter) -{ -#line 290 "/home/jens/Source/shotwell/src/Exporter.vala" - return exporter_ui_construct (TYPE_EXPORTER_UI, exporter); -#line 2439 "Exporter.c" -} - - -static void -_exporter_ui_on_export_completed_exporter_completion_callback (Exporter* exporter, - gboolean is_cancelled, - gpointer self) -{ -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_ui_on_export_completed ((ExporterUI*) self, exporter, is_cancelled); -#line 2450 "Exporter.c" -} - - -static gboolean -_exporter_ui_on_export_failed_exporter_export_failed_callback (Exporter* exporter, - GFile* file, - gint remaining, - GError* err, - gpointer self) -{ - gboolean result; - result = exporter_ui_on_export_failed ((ExporterUI*) self, exporter, file, remaining, err); -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2465 "Exporter.c" -} - - -static ExporterOverwrite -_exporter_ui_on_export_overwrite_exporter_overwrite_callback (Exporter* exporter, - GFile* file, - gpointer self) -{ - ExporterOverwrite result; - result = exporter_ui_on_export_overwrite ((ExporterUI*) self, exporter, file); -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2478 "Exporter.c" -} - - -static gboolean -_progress_dialog_monitor_progress_monitor (guint64 current, - guint64 total, - gboolean do_event_loop, - gpointer self) -{ - gboolean result; - result = progress_dialog_monitor ((ProgressDialog*) self, current, total, do_event_loop); -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2492 "Exporter.c" -} - - -void -exporter_ui_export (ExporterUI* self, - ExporterCompletionCallback completion_callback, - void* completion_callback_target) -{ - AppWindow* _tmp0_; - AppWindow* _tmp1_; - AppWindow* _tmp2_; - AppWindow* _tmp3_; - GCancellable* _tmp4_; - ProgressDialog* _tmp5_; - Exporter* _tmp6_; - GCancellable* _tmp7_; - ProgressDialog* _tmp8_; -#line 294 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_EXPORTER_UI (self)); -#line 295 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback = completion_callback; -#line 295 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback_target = completion_callback_target; -#line 297 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = app_window_get_instance (); -#line 297 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = _tmp0_; -#line 297 "/home/jens/Source/shotwell/src/Exporter.vala" - page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow)); -#line 297 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp1_); -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = app_window_get_instance (); -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = _tmp2_; -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = self->priv->cancellable; -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp5_ = progress_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_window_get_type (), GtkWindow), _ ("Exporting"), _tmp4_); -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - g_object_ref_sink (_tmp5_); -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->progress_dialog); -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->progress_dialog = _tmp5_; -#line 299 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp3_); -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp6_ = self->priv->exporter; -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp7_ = self->priv->cancellable; -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp8_ = self->priv->progress_dialog; -#line 300 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_export (_tmp6_, _exporter_ui_on_export_completed_exporter_completion_callback, self, _exporter_ui_on_export_failed_exporter_export_failed_callback, self, _exporter_ui_on_export_overwrite_exporter_overwrite_callback, self, _tmp7_, _progress_dialog_monitor_progress_monitor, _tmp8_); -#line 2548 "Exporter.c" -} - - -static void -exporter_ui_on_export_completed (ExporterUI* self, - Exporter* exporter, - gboolean is_cancelled) -{ - ProgressDialog* _tmp0_; - AppWindow* _tmp2_; - AppWindow* _tmp3_; - ExporterCompletionCallback _tmp4_; - void* _tmp4__target; -#line 304 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_EXPORTER_UI (self)); -#line 304 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (IS_EXPORTER (exporter)); -#line 305 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->progress_dialog; -#line 305 "/home/jens/Source/shotwell/src/Exporter.vala" - if (_tmp0_ != NULL) { -#line 2570 "Exporter.c" - ProgressDialog* _tmp1_; -#line 306 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = self->priv->progress_dialog; -#line 306 "/home/jens/Source/shotwell/src/Exporter.vala" - progress_dialog_close (_tmp1_); -#line 307 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->progress_dialog); -#line 307 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->progress_dialog = NULL; -#line 2580 "Exporter.c" - } -#line 310 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = app_window_get_instance (); -#line 310 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = _tmp2_; -#line 310 "/home/jens/Source/shotwell/src/Exporter.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PAGE_WINDOW, PageWindow)); -#line 310 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (_tmp3_); -#line 312 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = self->priv->completion_callback; -#line 312 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4__target = self->priv->completion_callback_target; -#line 312 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ (exporter, is_cancelled, _tmp4__target); -#line 2596 "Exporter.c" -} - - -static ExporterOverwrite -exporter_ui_on_export_overwrite (ExporterUI* self, - Exporter* exporter, - GFile* file) -{ - ExporterOverwrite result = 0; - ProgressDialog* _tmp0_; - gchar* question = NULL; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - GtkResponseType response = 0; - const gchar* _tmp5_; - ProgressDialog* _tmp6_; - GtkResponseType _tmp7_; -#line 315 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER_UI (self), 0); -#line 315 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER (exporter), 0); -#line 315 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (G_IS_FILE (file), 0); -#line 316 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = self->priv->progress_dialog; -#line 316 "/home/jens/Source/shotwell/src/Exporter.vala" - gtk_window_set_modal (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_window_get_type (), GtkWindow), FALSE); -#line 317 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp1_ = g_file_get_basename (file); -#line 317 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp2_ = _tmp1_; -#line 317 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp3_ = g_strdup_printf (_ ("File %s already exists. Replace?"), _tmp2_); -#line 317 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp4_ = _tmp3_; -#line 317 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (_tmp2_); -#line 317 "/home/jens/Source/shotwell/src/Exporter.vala" - question = _tmp4_; -#line 318 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp5_ = question; -#line 318 "/home/jens/Source/shotwell/src/Exporter.vala" - response = app_window_negate_affirm_all_cancel_question (_tmp5_, _ ("_Skip"), _ ("_Replace"), _ ("Replace _All"), _ ("Export"), NULL); -#line 321 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp6_ = self->priv->progress_dialog; -#line 321 "/home/jens/Source/shotwell/src/Exporter.vala" - gtk_window_set_modal (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_window_get_type (), GtkWindow), TRUE); -#line 323 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp7_ = response; -#line 323 "/home/jens/Source/shotwell/src/Exporter.vala" - switch (_tmp7_) { -#line 323 "/home/jens/Source/shotwell/src/Exporter.vala" - case GTK_RESPONSE_APPLY: -#line 2652 "Exporter.c" - { -#line 325 "/home/jens/Source/shotwell/src/Exporter.vala" - result = EXPORTER_OVERWRITE_REPLACE_ALL; -#line 325 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (question); -#line 325 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2660 "Exporter.c" - } -#line 323 "/home/jens/Source/shotwell/src/Exporter.vala" - case GTK_RESPONSE_YES: -#line 2664 "Exporter.c" - { -#line 328 "/home/jens/Source/shotwell/src/Exporter.vala" - result = EXPORTER_OVERWRITE_YES; -#line 328 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (question); -#line 328 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2672 "Exporter.c" - } -#line 323 "/home/jens/Source/shotwell/src/Exporter.vala" - case GTK_RESPONSE_CANCEL: -#line 2676 "Exporter.c" - { -#line 331 "/home/jens/Source/shotwell/src/Exporter.vala" - result = EXPORTER_OVERWRITE_CANCEL; -#line 331 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (question); -#line 331 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2684 "Exporter.c" - } - default: -#line 323 "/home/jens/Source/shotwell/src/Exporter.vala" - case GTK_RESPONSE_NO: -#line 2689 "Exporter.c" - { -#line 335 "/home/jens/Source/shotwell/src/Exporter.vala" - result = EXPORTER_OVERWRITE_NO; -#line 335 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (question); -#line 335 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2697 "Exporter.c" - } - } -#line 315 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_free0 (question); -#line 2702 "Exporter.c" -} - - -static gboolean -exporter_ui_on_export_failed (ExporterUI* self, - Exporter* exporter, - GFile* file, - gint remaining, - GError* err) -{ - gboolean result = FALSE; -#line 339 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER_UI (self), FALSE); -#line 339 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (IS_EXPORTER (exporter), FALSE); -#line 339 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (G_IS_FILE (file), FALSE); -#line 340 "/home/jens/Source/shotwell/src/Exporter.vala" - result = export_error_dialog (file, remaining > 0) != GTK_RESPONSE_CANCEL; -#line 340 "/home/jens/Source/shotwell/src/Exporter.vala" - return result; -#line 2724 "Exporter.c" -} - - -static void -value_exporter_ui_init (GValue* value) -{ -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - value->data[0].v_pointer = NULL; -#line 2733 "Exporter.c" -} - - -static void -value_exporter_ui_free_value (GValue* value) -{ -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (value->data[0].v_pointer) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_ui_unref (value->data[0].v_pointer); -#line 2744 "Exporter.c" - } -} - - -static void -value_exporter_ui_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (src_value->data[0].v_pointer) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - dest_value->data[0].v_pointer = exporter_ui_ref (src_value->data[0].v_pointer); -#line 2757 "Exporter.c" - } else { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - dest_value->data[0].v_pointer = NULL; -#line 2761 "Exporter.c" - } -} - - -static gpointer -value_exporter_ui_peek_pointer (const GValue* value) -{ -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return value->data[0].v_pointer; -#line 2771 "Exporter.c" -} - - -static gchar* -value_exporter_ui_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (collect_values[0].v_pointer) { -#line 2783 "Exporter.c" - ExporterUI * object; - object = collect_values[0].v_pointer; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (object->parent_instance.g_class == NULL) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2790 "Exporter.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2794 "Exporter.c" - } -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - value->data[0].v_pointer = exporter_ui_ref (object); -#line 2798 "Exporter.c" - } else { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - value->data[0].v_pointer = NULL; -#line 2802 "Exporter.c" - } -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return NULL; -#line 2806 "Exporter.c" -} - - -static gchar* -value_exporter_ui_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - ExporterUI ** object_p; - object_p = collect_values[0].v_pointer; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!object_p) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 2822 "Exporter.c" - } -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (!value->data[0].v_pointer) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - *object_p = NULL; -#line 2828 "Exporter.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - *object_p = value->data[0].v_pointer; -#line 2832 "Exporter.c" - } else { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - *object_p = exporter_ui_ref (value->data[0].v_pointer); -#line 2836 "Exporter.c" - } -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return NULL; -#line 2840 "Exporter.c" -} - - -GParamSpec* -param_spec_exporter_ui (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecExporterUI* spec; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_EXPORTER_UI), NULL); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return G_PARAM_SPEC (spec); -#line 2860 "Exporter.c" -} - - -gpointer -value_get_exporter_ui (const GValue* value) -{ -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_EXPORTER_UI), NULL); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return value->data[0].v_pointer; -#line 2871 "Exporter.c" -} - - -void -value_set_exporter_ui (GValue* value, - gpointer v_object) -{ - ExporterUI * old; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_EXPORTER_UI)); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - old = value->data[0].v_pointer; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (v_object) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_EXPORTER_UI)); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - value->data[0].v_pointer = v_object; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_ui_ref (value->data[0].v_pointer); -#line 2894 "Exporter.c" - } else { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - value->data[0].v_pointer = NULL; -#line 2898 "Exporter.c" - } -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (old) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_ui_unref (old); -#line 2904 "Exporter.c" - } -} - - -void -value_take_exporter_ui (GValue* value, - gpointer v_object) -{ - ExporterUI * old; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_EXPORTER_UI)); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - old = value->data[0].v_pointer; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (v_object) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_EXPORTER_UI)); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - value->data[0].v_pointer = v_object; -#line 2926 "Exporter.c" - } else { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - value->data[0].v_pointer = NULL; -#line 2930 "Exporter.c" - } -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (old) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_ui_unref (old); -#line 2936 "Exporter.c" - } -} - - -static void -exporter_ui_class_init (ExporterUIClass * klass) -{ -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - exporter_ui_parent_class = g_type_class_peek_parent (klass); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - ((ExporterUIClass *) klass)->finalize = exporter_ui_finalize; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_type_class_add_private (klass, sizeof (ExporterUIPrivate)); -#line 2950 "Exporter.c" -} - - -static void -exporter_ui_instance_init (ExporterUI * self) -{ - GCancellable* _tmp0_; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv = EXPORTER_UI_GET_PRIVATE (self); -#line 286 "/home/jens/Source/shotwell/src/Exporter.vala" - _tmp0_ = g_cancellable_new (); -#line 286 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->cancellable = _tmp0_; -#line 287 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->progress_dialog = NULL; -#line 288 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback = NULL; -#line 288 "/home/jens/Source/shotwell/src/Exporter.vala" - self->priv->completion_callback_target = self; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - self->ref_count = 1; -#line 2972 "Exporter.c" -} - - -static void -exporter_ui_finalize (ExporterUI * obj) -{ - ExporterUI * self; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EXPORTER_UI, ExporterUI); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_signal_handlers_destroy (self); -#line 285 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->exporter); -#line 286 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->cancellable); -#line 287 "/home/jens/Source/shotwell/src/Exporter.vala" - _g_object_unref0 (self->priv->progress_dialog); -#line 2990 "Exporter.c" -} - - -GType -exporter_ui_get_type (void) -{ - static volatile gsize exporter_ui_type_id__volatile = 0; - if (g_once_init_enter (&exporter_ui_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_exporter_ui_init, value_exporter_ui_free_value, value_exporter_ui_copy_value, value_exporter_ui_peek_pointer, "p", value_exporter_ui_collect_value, "p", value_exporter_ui_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (ExporterUIClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) exporter_ui_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExporterUI), 0, (GInstanceInitFunc) exporter_ui_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType exporter_ui_type_id; - exporter_ui_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ExporterUI", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&exporter_ui_type_id__volatile, exporter_ui_type_id); - } - return exporter_ui_type_id__volatile; -} - - -gpointer -exporter_ui_ref (gpointer instance) -{ - ExporterUI * self; - self = instance; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_atomic_int_inc (&self->ref_count); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - return instance; -#line 3019 "Exporter.c" -} - - -void -exporter_ui_unref (gpointer instance) -{ - ExporterUI * self; - self = instance; -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - EXPORTER_UI_GET_CLASS (self)->finalize (self); -#line 284 "/home/jens/Source/shotwell/src/Exporter.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 3034 "Exporter.c" - } -} - - -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); -} - - - -- cgit v1.2.3