diff options
Diffstat (limited to 'src/direct')
-rw-r--r-- | src/direct/Direct.c | 85 | ||||
-rw-r--r-- | src/direct/DirectPhoto.c | 2829 | ||||
-rw-r--r-- | src/direct/DirectPhotoPage.c | 5294 | ||||
-rw-r--r-- | src/direct/DirectView.c | 827 | ||||
-rw-r--r-- | src/direct/DirectWindow.c | 935 | ||||
-rw-r--r-- | src/direct/mk/direct.mk | 36 |
6 files changed, 9970 insertions, 36 deletions
diff --git a/src/direct/Direct.c b/src/direct/Direct.c new file mode 100644 index 0000000..2e1bfa4 --- /dev/null +++ b/src/direct/Direct.c @@ -0,0 +1,85 @@ +/* Direct.c generated by valac 0.32.1, the Vala compiler + * generated from Direct.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. + */ +/* This file is the master unit file for the Direct unit. It should be edited to include + * whatever code is deemed necessary. + * + * The init() and terminate() methods are mandatory. + * + * If the unit needs to be configured prior to initialization, add the proper parameters to + * the preconfigure() method, implement it, and ensure in init() that it's been called. + */ + +#include <glib.h> +#include <glib-object.h> +#include <gio/gio.h> + +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#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); + + +extern GFile* direct_initial_file; +GFile* direct_initial_file = NULL; + +void direct_preconfigure (GFile* initial_file); +void direct_init (GError** error); +void direct_photo_init (GFile* initial_file); +void direct_terminate (void); +void direct_photo_terminate (void); + + +static gpointer _g_object_ref0 (gpointer self) { +#line 21 "/home/jens/Source/shotwell/src/direct/Direct.vala" + return self ? g_object_ref (self) : NULL; +#line 43 "Direct.c" +} + + +void direct_preconfigure (GFile* initial_file) { + GFile* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; +#line 20 "/home/jens/Source/shotwell/src/direct/Direct.vala" + g_return_if_fail (G_IS_FILE (initial_file)); +#line 21 "/home/jens/Source/shotwell/src/direct/Direct.vala" + _tmp0_ = initial_file; +#line 21 "/home/jens/Source/shotwell/src/direct/Direct.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 21 "/home/jens/Source/shotwell/src/direct/Direct.vala" + _g_object_unref0 (direct_initial_file); +#line 21 "/home/jens/Source/shotwell/src/direct/Direct.vala" + direct_initial_file = _tmp1_; +#line 60 "Direct.c" +} + + +void direct_init (GError** error) { + GFile* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; +#line 25 "/home/jens/Source/shotwell/src/direct/Direct.vala" + _tmp0_ = direct_initial_file; +#line 25 "/home/jens/Source/shotwell/src/direct/Direct.vala" + _vala_assert (_tmp0_ != NULL, "initial_file != null"); +#line 27 "/home/jens/Source/shotwell/src/direct/Direct.vala" + _tmp1_ = direct_initial_file; +#line 27 "/home/jens/Source/shotwell/src/direct/Direct.vala" + direct_photo_init (_tmp1_); +#line 75 "Direct.c" +} + + +void direct_terminate (void) { +#line 31 "/home/jens/Source/shotwell/src/direct/Direct.vala" + direct_photo_terminate (); +#line 82 "Direct.c" +} + + + diff --git a/src/direct/DirectPhoto.c b/src/direct/DirectPhoto.c new file mode 100644 index 0000000..97ebcd5 --- /dev/null +++ b/src/direct/DirectPhoto.c @@ -0,0 +1,2829 @@ +/* DirectPhoto.c generated by valac 0.32.1, the Vala compiler + * generated from DirectPhoto.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 <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <gio/gio.h> +#include <time.h> +#include <gee.h> + + +#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; +typedef struct _DataObjectPrivate DataObjectPrivate; + +#define TYPE_ALTERATION (alteration_get_type ()) +#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) +#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) +#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) +#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) +#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) + +typedef struct _Alteration Alteration; +typedef struct _AlterationClass AlterationClass; + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; + +#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; +typedef struct _DataSourcePrivate DataSourcePrivate; + +#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ()) +#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank)) +#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) +#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK)) +#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK)) +#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) + +typedef struct _SourceHoldingTank SourceHoldingTank; +typedef struct _SourceHoldingTankClass SourceHoldingTankClass; + +#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) +#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) +#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) +#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) +#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) +#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) + +typedef struct _SourceCollection SourceCollection; +typedef struct _SourceCollectionClass SourceCollectionClass; + +#define TYPE_SOURCE_SNAPSHOT (source_snapshot_get_type ()) +#define SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshot)) +#define SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) +#define IS_SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_SNAPSHOT)) +#define IS_SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_SNAPSHOT)) +#define SOURCE_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) + +typedef struct _SourceSnapshot SourceSnapshot; +typedef struct _SourceSnapshotClass SourceSnapshotClass; + +#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; +typedef struct _ThumbnailSourcePrivate ThumbnailSourcePrivate; + +#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ()) + +#define TYPE_INDEXABLE (indexable_get_type ()) +#define INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDEXABLE, Indexable)) +#define IS_INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDEXABLE)) +#define INDEXABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_INDEXABLE, IndexableIface)) + +typedef struct _Indexable Indexable; +typedef struct _IndexableIface IndexableIface; + +#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; +typedef struct _MediaSourcePrivate MediaSourcePrivate; + +#define TYPE_EVENT_ID (event_id_get_type ()) +typedef struct _EventID EventID; + +#define TYPE_BACKING_FILE_STATE (backing_file_state_get_type ()) +#define BACKING_FILE_STATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKING_FILE_STATE, BackingFileState)) +#define BACKING_FILE_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKING_FILE_STATE, BackingFileStateClass)) +#define IS_BACKING_FILE_STATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKING_FILE_STATE)) +#define IS_BACKING_FILE_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKING_FILE_STATE)) +#define BACKING_FILE_STATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKING_FILE_STATE, BackingFileStateClass)) + +typedef struct _BackingFileState BackingFileState; +typedef struct _BackingFileStateClass BackingFileStateClass; + +#define TYPE_RATING (rating_get_type ()) + +#define PHOTO_TYPE_EXCEPTION (photo_exception_get_type ()) + +#define TYPE_DIMENSIONS (dimensions_get_type ()) +typedef struct _Dimensions Dimensions; + +#define TYPE_SCALING (scaling_get_type ()) + +#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ()) +typedef struct _Scaling Scaling; + +#define TYPE_IMPORT_ID (import_id_get_type ()) +typedef struct _ImportID ImportID; + +#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; +typedef struct _PhotoSourcePrivate PhotoSourcePrivate; + +#define TYPE_MEDIA_METADATA (media_metadata_get_type ()) +#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata)) +#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass)) +#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA)) +#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA)) +#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass)) + +typedef struct _MediaMetadata MediaMetadata; +typedef struct _MediaMetadataClass MediaMetadataClass; + +#define TYPE_PHOTO_METADATA (photo_metadata_get_type ()) +#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata)) +#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass)) +#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA)) +#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA)) +#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass)) + +typedef struct _PhotoMetadata PhotoMetadata; +typedef struct _PhotoMetadataClass PhotoMetadataClass; + +#define TYPE_DATEABLE (dateable_get_type ()) +#define DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATEABLE, Dateable)) +#define IS_DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATEABLE)) +#define DATEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_DATEABLE, DateableIface)) + +typedef struct _Dateable Dateable; +typedef struct _DateableIface DateableIface; + +#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; +typedef struct _PhotoPrivate PhotoPrivate; + +#define TYPE_ROTATION (rotation_get_type ()) + +#define TYPE_PHOTO_ROW (photo_row_get_type ()) +#define PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_ROW, PhotoRow)) +#define PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_ROW, PhotoRowClass)) +#define IS_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_ROW)) +#define IS_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_ROW)) +#define PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_ROW, PhotoRowClass)) + +typedef struct _PhotoRow PhotoRow; +typedef struct _PhotoRowClass PhotoRowClass; + +#define TYPE_BACKING_PHOTO_ROW (backing_photo_row_get_type ()) +#define BACKING_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKING_PHOTO_ROW, BackingPhotoRow)) +#define BACKING_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKING_PHOTO_ROW, BackingPhotoRowClass)) +#define IS_BACKING_PHOTO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKING_PHOTO_ROW)) +#define IS_BACKING_PHOTO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKING_PHOTO_ROW)) +#define BACKING_PHOTO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKING_PHOTO_ROW, BackingPhotoRowClass)) + +typedef struct _BackingPhotoRow BackingPhotoRow; +typedef struct _BackingPhotoRowClass BackingPhotoRowClass; + +#define TYPE_DIRECT_PHOTO (direct_photo_get_type ()) +#define DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO, DirectPhoto)) +#define DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO, DirectPhotoClass)) +#define IS_DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO)) +#define IS_DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO)) +#define DIRECT_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO, DirectPhotoClass)) + +typedef struct _DirectPhoto DirectPhoto; +typedef struct _DirectPhotoClass DirectPhotoClass; +typedef struct _DirectPhotoPrivate DirectPhotoPrivate; + +#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) +#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) +#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) +#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) +#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) +#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) + +typedef struct _DatabaseSourceCollection DatabaseSourceCollection; +typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; + +#define TYPE_DIRECT_PHOTO_SOURCE_COLLECTION (direct_photo_source_collection_get_type ()) +#define DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection)) +#define DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass)) +#define IS_DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION)) +#define IS_DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION)) +#define DIRECT_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass)) + +typedef struct _DirectPhotoSourceCollection DirectPhotoSourceCollection; +typedef struct _DirectPhotoSourceCollectionClass DirectPhotoSourceCollectionClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define TYPE_ORIENTATION (orientation_get_type ()) +typedef struct _PhotoRowPrivate PhotoRowPrivate; + +#define TYPE_PHOTO_ID (photo_id_get_type ()) +typedef struct _PhotoID PhotoID; + +#define TYPE_KEY_VALUE_MAP (key_value_map_get_type ()) +#define KEY_VALUE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_VALUE_MAP, KeyValueMap)) +#define KEY_VALUE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_VALUE_MAP, KeyValueMapClass)) +#define IS_KEY_VALUE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_VALUE_MAP)) +#define IS_KEY_VALUE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_VALUE_MAP)) +#define KEY_VALUE_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_VALUE_MAP, KeyValueMapClass)) + +typedef struct _KeyValueMap KeyValueMap; +typedef struct _KeyValueMapClass KeyValueMapClass; + +#define TYPE_BACKING_PHOTO_ID (backing_photo_id_get_type ()) +typedef struct _BackingPhotoID BackingPhotoID; + +#define TYPE_RAW_DEVELOPER (raw_developer_get_type ()) +typedef struct _BackingPhotoRowPrivate BackingPhotoRowPrivate; +#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define TYPE_BACKING_FETCH_MODE (backing_fetch_mode_get_type ()) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define TYPE_IMPORT_RESULT (import_result_get_type ()) + +#define PHOTO_TYPE_REIMPORT_MASTER_STATE (photo_reimport_master_state_get_type ()) +#define PHOTO_REIMPORT_MASTER_STATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOTO_TYPE_REIMPORT_MASTER_STATE, PhotoReimportMasterState)) +#define PHOTO_REIMPORT_MASTER_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOTO_TYPE_REIMPORT_MASTER_STATE, PhotoReimportMasterStateClass)) +#define PHOTO_IS_REIMPORT_MASTER_STATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOTO_TYPE_REIMPORT_MASTER_STATE)) +#define PHOTO_IS_REIMPORT_MASTER_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOTO_TYPE_REIMPORT_MASTER_STATE)) +#define PHOTO_REIMPORT_MASTER_STATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOTO_TYPE_REIMPORT_MASTER_STATE, PhotoReimportMasterStateClass)) + +typedef struct _PhotoReimportMasterState PhotoReimportMasterState; +typedef struct _PhotoReimportMasterStateClass PhotoReimportMasterStateClass; +#define _photo_reimport_master_state_unref0(var) ((var == NULL) ? NULL : (var = (photo_reimport_master_state_unref (var), NULL))) + +#define TYPE_PHOTO_IMPORT_PARAMS (photo_import_params_get_type ()) +#define PHOTO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_IMPORT_PARAMS, PhotoImportParams)) +#define PHOTO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_IMPORT_PARAMS, PhotoImportParamsClass)) +#define IS_PHOTO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_IMPORT_PARAMS)) +#define IS_PHOTO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_IMPORT_PARAMS)) +#define PHOTO_IMPORT_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_IMPORT_PARAMS, PhotoImportParamsClass)) + +typedef struct _PhotoImportParams PhotoImportParams; +typedef struct _PhotoImportParamsClass PhotoImportParamsClass; + +#define TYPE_DATABASE_TABLE (database_table_get_type ()) +#define DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_TABLE, DatabaseTable)) +#define DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_TABLE, DatabaseTableClass)) +#define IS_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_TABLE)) +#define IS_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_TABLE)) +#define DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_TABLE, DatabaseTableClass)) + +typedef struct _DatabaseTable DatabaseTable; +typedef struct _DatabaseTableClass DatabaseTableClass; + +#define TYPE_PHOTO_TABLE (photo_table_get_type ()) +#define PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_TABLE, PhotoTable)) +#define PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_TABLE, PhotoTableClass)) +#define IS_PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_TABLE)) +#define IS_PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_TABLE)) +#define PHOTO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_TABLE, PhotoTableClass)) + +typedef struct _PhotoTable PhotoTable; +typedef struct _PhotoTableClass PhotoTableClass; +typedef struct _PhotoImportParamsPrivate PhotoImportParamsPrivate; + +#define PHOTO_FILE_SNIFFER_TYPE_OPTIONS (photo_file_sniffer_options_get_type ()) + +#define TYPE_THUMBNAILS (thumbnails_get_type ()) +#define THUMBNAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAILS, Thumbnails)) +#define THUMBNAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAILS, ThumbnailsClass)) +#define IS_THUMBNAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAILS)) +#define IS_THUMBNAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAILS)) +#define THUMBNAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAILS, ThumbnailsClass)) + +typedef struct _Thumbnails Thumbnails; +typedef struct _ThumbnailsClass ThumbnailsClass; +#define _database_table_unref0(var) ((var == NULL) ? NULL : (var = (database_table_unref (var), NULL))) +#define _photo_import_params_unref0(var) ((var == NULL) ? NULL : (var = (photo_import_params_unref (var), NULL))) + +#define TYPE_PHOTO_PREVIEW (photo_preview_get_type ()) +#define PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_PREVIEW, PhotoPreview)) +#define PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_PREVIEW, PhotoPreviewClass)) +#define IS_PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_PREVIEW)) +#define IS_PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_PREVIEW)) +#define PHOTO_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_PREVIEW, PhotoPreviewClass)) + +typedef struct _PhotoPreview PhotoPreview; +typedef struct _PhotoPreviewClass PhotoPreviewClass; +#define _photo_preview_unref0(var) ((var == NULL) ? NULL : (var = (photo_preview_unref (var), NULL))) +#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL))) +typedef struct _DataCollectionPrivate DataCollectionPrivate; + +#define TYPE_MARKER (marker_get_type ()) +#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) +#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) +#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) + +typedef struct _Marker Marker; +typedef struct _MarkerIface MarkerIface; +typedef struct _SourceCollectionPrivate SourceCollectionPrivate; + +#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) +#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) +#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) +#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) +#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) +#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) + +typedef struct _SourceBacklink SourceBacklink; +typedef struct _SourceBacklinkClass SourceBacklinkClass; +typedef struct _DatabaseSourceCollectionPrivate DatabaseSourceCollectionPrivate; +typedef struct _DirectPhotoSourceCollectionPrivate DirectPhotoSourceCollectionPrivate; + +#define TYPE_DIRECTORY_MONITOR (directory_monitor_get_type ()) +#define DIRECTORY_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECTORY_MONITOR, DirectoryMonitor)) +#define DIRECTORY_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECTORY_MONITOR, DirectoryMonitorClass)) +#define IS_DIRECTORY_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECTORY_MONITOR)) +#define IS_DIRECTORY_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECTORY_MONITOR)) +#define DIRECTORY_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECTORY_MONITOR, DirectoryMonitorClass)) + +typedef struct _DirectoryMonitor DirectoryMonitor; +typedef struct _DirectoryMonitorClass DirectoryMonitorClass; +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _DataObject { + GObject parent_instance; + DataObjectPrivate * priv; +}; + +struct _DataObjectClass { + GObjectClass parent_class; + void (*notify_altered) (DataObject* self, Alteration* alteration); + void (*notify_membership_changed) (DataObject* self, DataCollection* collection); + void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); + void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); + gchar* (*get_name) (DataObject* self); + gchar* (*to_string) (DataObject* self); +}; + +struct _DataSource { + DataObject parent_instance; + DataSourcePrivate * priv; +}; + +struct _DataSourceClass { + DataObjectClass parent_class; + void (*notify_held_in_tank) (DataSource* self, SourceHoldingTank* holding_tank); + void (*notify_unlinking) (DataSource* self, SourceCollection* collection); + void (*notify_unlinked) (DataSource* self); + void (*notify_relinking) (DataSource* self, SourceCollection* collection); + void (*notify_relinked) (DataSource* self); + gchar* (*get_typename) (DataSource* self); + gint64 (*get_instance_id) (DataSource* self); + gchar* (*get_source_id) (DataSource* self); + void (*commit_backlinks) (DataSource* self, SourceCollection* sources, const gchar* dehydrated); + SourceSnapshot* (*save_snapshot) (DataSource* self); + gboolean (*internal_delete_backing) (DataSource* self, GError** error); + gboolean (*equals) (DataSource* self, DataSource* source); + void (*destroy) (DataSource* self); + void (*unlinked) (DataSource* self, SourceCollection* sources); + void (*relinked) (DataSource* self, SourceCollection* sources); + void (*destroyed) (DataSource* self); +}; + +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; + +struct _ThumbnailSource { + DataSource parent_instance; + ThumbnailSourcePrivate * priv; +}; + +struct _ThumbnailSourceClass { + DataSourceClass parent_class; + void (*notify_thumbnail_altered) (ThumbnailSource* self); + GdkPixbuf* (*get_thumbnail) (ThumbnailSource* self, gint scale, GError** error); + GdkPixbuf* (*create_thumbnail) (ThumbnailSource* self, gint scale, GError** error); + gchar* (*get_representative_id) (ThumbnailSource* self); + PhotoFileFormat (*get_preferred_thumbnail_format) (ThumbnailSource* self); + void (*thumbnail_altered) (ThumbnailSource* self); +}; + +struct _IndexableIface { + GTypeInterface parent_iface; + const gchar* (*get_indexable_keywords) (Indexable* self); +}; + +struct _EventID { + gint64 id; +}; + +typedef enum { + RATING_REJECTED = -1, + RATING_UNRATED = 0, + RATING_ONE = 1, + RATING_TWO = 2, + RATING_THREE = 3, + RATING_FOUR = 4, + RATING_FIVE = 5 +} Rating; + +typedef enum { + PHOTO_EXCEPTION_NONE = 0, + PHOTO_EXCEPTION_ORIENTATION = 1 << 0, + PHOTO_EXCEPTION_CROP = 1 << 1, + PHOTO_EXCEPTION_REDEYE = 1 << 2, + PHOTO_EXCEPTION_ADJUST = 1 << 3, + PHOTO_EXCEPTION_STRAIGHTEN = 1 << 4, + PHOTO_EXCEPTION_ALL = 0xFFFFFFFFLL +} PhotoException; + +struct _Dimensions { + gint width; + gint height; +}; + +typedef enum { + SCALE_CONSTRAINT_ORIGINAL, + SCALE_CONSTRAINT_DIMENSIONS, + SCALE_CONSTRAINT_WIDTH, + SCALE_CONSTRAINT_HEIGHT, + SCALE_CONSTRAINT_FILL_VIEWPORT +} ScaleConstraint; + +struct _Scaling { + ScaleConstraint constraint; + gint scale; + Dimensions viewport; + gboolean scale_up; +}; + +struct _ImportID { + gint64 id; +}; + +struct _MediaSource { + ThumbnailSource parent_instance; + MediaSourcePrivate * priv; +}; + +struct _MediaSourceClass { + ThumbnailSourceClass parent_class; + void (*notify_master_replaced) (MediaSource* self, GFile* old_file, GFile* new_file); + gboolean (*set_event_id) (MediaSource* self, EventID* id); + gchar* (*get_basename) (MediaSource* self); + GFile* (*get_file) (MediaSource* self); + GFile* (*get_master_file) (MediaSource* self); + guint64 (*get_master_filesize) (MediaSource* self); + guint64 (*get_filesize) (MediaSource* self); + time_t (*get_timestamp) (MediaSource* self); + BackingFileState** (*get_backing_files_state) (MediaSource* self, int* result_length1); + gchar* (*get_title) (MediaSource* self); + gchar* (*get_comment) (MediaSource* self); + void (*set_title) (MediaSource* self, const gchar* title); + gboolean (*set_comment) (MediaSource* self, const gchar* comment); + Rating (*get_rating) (MediaSource* self); + void (*set_rating) (MediaSource* self, Rating rating); + void (*increase_rating) (MediaSource* self); + void (*decrease_rating) (MediaSource* self); + void (*get_dimensions) (MediaSource* self, PhotoException disallowed_steps, Dimensions* result); + GdkPixbuf* (*get_preview_pixbuf) (MediaSource* self, Scaling* scaling, GError** error); + gboolean (*is_trashed) (MediaSource* self); + void (*trash) (MediaSource* self); + void (*untrash) (MediaSource* self); + gboolean (*is_offline) (MediaSource* self); + void (*mark_offline) (MediaSource* self); + void (*mark_online) (MediaSource* self); + gchar* (*get_master_md5) (MediaSource* self); + void (*get_event_id) (MediaSource* self, EventID* result); + time_t (*get_exposure_time) (MediaSource* self); + void (*get_import_id) (MediaSource* self, ImportID* result); + void (*master_replaced) (MediaSource* self, GFile* old_file, GFile* new_file); +}; + +struct _PhotoSource { + MediaSource parent_instance; + PhotoSourcePrivate * priv; +}; + +struct _PhotoSourceClass { + MediaSourceClass parent_class; + PhotoMetadata* (*get_metadata) (PhotoSource* self); + GdkPixbuf* (*get_pixbuf) (PhotoSource* self, Scaling* scaling, GError** error); +}; + +struct _DateableIface { + GTypeInterface parent_iface; + void (*set_exposure_time) (Dateable* self, time_t target_time); + time_t (*get_exposure_time) (Dateable* self); +}; + +typedef enum { + ROTATION_CLOCKWISE, + ROTATION_COUNTERCLOCKWISE, + ROTATION_MIRROR, + ROTATION_UPSIDE_DOWN +} Rotation; + +struct _Photo { + PhotoSource parent_instance; + PhotoPrivate * priv; + PhotoRow* row; + gboolean can_rotate_now; + BackingPhotoRow* backing_photo_row; +}; + +struct _PhotoClass { + PhotoSourceClass parent_class; + void (*notify_editable_replaced) (Photo* self, GFile* old_file, GFile* new_file); + void (*notify_raw_development_modified) (Photo* self); + void (*notify_baseline_replaced) (Photo* self); + void (*notify_master_reimported) (Photo* self, PhotoMetadata* metadata); + void (*notify_editable_reimported) (Photo* self, PhotoMetadata* metadata); + void (*notify_source_reimported) (Photo* self, PhotoMetadata* metadata); + void (*notify_baseline_reimported) (Photo* self, PhotoMetadata* metadata); + void (*apply_user_metadata_for_reimport) (Photo* self, PhotoMetadata* metadata); + void (*rotate) (Photo* self, Rotation rotation); + gboolean (*has_user_generated_metadata) (Photo* self); + void (*set_user_metadata_for_export) (Photo* self, PhotoMetadata* metadata); + void (*editable_replaced) (Photo* self, GFile* old_file, GFile* new_file); + void (*raw_development_modified) (Photo* self); + void (*baseline_replaced) (Photo* self); + void (*master_reimported) (Photo* self, PhotoMetadata* metadata); + void (*editable_reimported) (Photo* self, PhotoMetadata* metadata); + void (*baseline_reimported) (Photo* self, PhotoMetadata* metadata); + void (*source_reimported) (Photo* self, PhotoMetadata* metadata); +}; + +struct _DirectPhoto { + Photo parent_instance; + DirectPhotoPrivate * priv; +}; + +struct _DirectPhotoClass { + PhotoClass parent_class; +}; + +struct _DirectPhotoPrivate { + GdkPixbuf* preview; + gboolean loaded; +}; + +typedef enum { + ORIENTATION_MIN = 1, + ORIENTATION_TOP_LEFT = 1, + ORIENTATION_TOP_RIGHT = 2, + ORIENTATION_BOTTOM_RIGHT = 3, + ORIENTATION_BOTTOM_LEFT = 4, + ORIENTATION_LEFT_TOP = 5, + ORIENTATION_RIGHT_TOP = 6, + ORIENTATION_RIGHT_BOTTOM = 7, + ORIENTATION_LEFT_BOTTOM = 8, + ORIENTATION_MAX = 8 +} Orientation; + +struct _PhotoID { + gint64 id; +}; + +struct _BackingPhotoID { + gint64 id; +}; + +typedef enum { + RAW_DEVELOPER_SHOTWELL = 0, + RAW_DEVELOPER_CAMERA, + RAW_DEVELOPER_EMBEDDED +} RawDeveloper; + +struct _PhotoRow { + GTypeInstance parent_instance; + volatile int ref_count; + PhotoRowPrivate * priv; + PhotoID photo_id; + BackingPhotoRow* master; + time_t exposure_time; + ImportID import_id; + EventID event_id; + Orientation orientation; + GeeHashMap* transformations; + gchar* md5; + gchar* thumbnail_md5; + gchar* exif_md5; + time_t time_created; + guint64 flags; + Rating rating; + gchar* title; + gchar* comment; + gchar* backlinks; + time_t time_reimported; + BackingPhotoID editable_id; + gboolean metadata_dirty; + RawDeveloper developer; + BackingPhotoID* development_ids; + gint development_ids_length1; +}; + +struct _PhotoRowClass { + GTypeClass parent_class; + void (*finalize) (PhotoRow *self); +}; + +struct _BackingPhotoRow { + GTypeInstance parent_instance; + volatile int ref_count; + BackingPhotoRowPrivate * priv; + BackingPhotoID id; + time_t time_created; + gchar* filepath; + gint64 filesize; + time_t timestamp; + PhotoFileFormat file_format; + Dimensions dim; + Orientation original_orientation; +}; + +struct _BackingPhotoRowClass { + GTypeClass parent_class; + void (*finalize) (BackingPhotoRow *self); +}; + +typedef enum { + BACKING_FETCH_MODE_SOURCE, + BACKING_FETCH_MODE_BASELINE, + BACKING_FETCH_MODE_MASTER, + BACKING_FETCH_MODE_UNMODIFIED +} BackingFetchMode; + +typedef enum { + IMPORT_RESULT_SUCCESS, + IMPORT_RESULT_FILE_ERROR, + IMPORT_RESULT_DECODE_ERROR, + IMPORT_RESULT_DATABASE_ERROR, + IMPORT_RESULT_USER_ABORT, + IMPORT_RESULT_NOT_A_FILE, + IMPORT_RESULT_PHOTO_EXISTS, + IMPORT_RESULT_UNSUPPORTED_FORMAT, + IMPORT_RESULT_NOT_AN_IMAGE, + IMPORT_RESULT_DISK_FAILURE, + IMPORT_RESULT_DISK_FULL, + IMPORT_RESULT_CAMERA_ERROR, + IMPORT_RESULT_FILE_WRITE_ERROR, + IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE +} ImportResult; + +typedef enum { + DATABASE_ERROR_ERROR, + DATABASE_ERROR_BACKING, + DATABASE_ERROR_MEMORY, + DATABASE_ERROR_ABORT, + DATABASE_ERROR_LIMITS, + DATABASE_ERROR_TYPESPEC +} DatabaseError; +#define DATABASE_ERROR database_error_quark () +typedef enum { + PHOTO_FILE_SNIFFER_OPTIONS_GET_ALL = 0x00000000, + PHOTO_FILE_SNIFFER_OPTIONS_NO_MD5 = 0x00000001 +} PhotoFileSnifferOptions; + +struct _PhotoImportParams { + GTypeInstance parent_instance; + volatile int ref_count; + PhotoImportParamsPrivate * priv; + GFile* file; + GFile* final_associated_file; + ImportID import_id; + PhotoFileSnifferOptions sniffer_options; + gchar* exif_md5; + gchar* thumbnail_md5; + gchar* full_md5; + Thumbnails* thumbnails; + PhotoRow* row; + GeeCollection* keywords; +}; + +struct _PhotoImportParamsClass { + GTypeClass parent_class; + void (*finalize) (PhotoImportParams *self); +}; + +typedef gint64 (*Comparator) (void* a, void* b, void* user_data); +typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); +typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); +struct _MarkerIface { + GTypeInterface parent_iface; + void (*mark) (Marker* self, DataObject* object); + void (*unmark) (Marker* self, DataObject* object); + gboolean (*toggle) (Marker* self, DataObject* object); + void (*mark_many) (Marker* self, GeeCollection* list); + void (*unmark_many) (Marker* self, GeeCollection* list); + void (*mark_all) (Marker* self); + gint (*get_count) (Marker* self); + GeeCollection* (*get_all) (Marker* self); +}; + +struct _DataCollection { + GTypeInstance parent_instance; + volatile int ref_count; + DataCollectionPrivate * priv; +}; + +struct _DataCollectionClass { + GTypeClass parent_class; + void (*finalize) (DataCollection *self); + gchar* (*to_string) (DataCollection* self); + void (*notify_items_added) (DataCollection* self, GeeIterable* added); + void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); + void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); + void (*notify_items_altered) (DataCollection* self, GeeMap* items); + void (*notify_ordering_changed) (DataCollection* self); + void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); + void (*notify_property_cleared) (DataCollection* self, const gchar* name); + gboolean (*valid_type) (DataCollection* self, DataObject* object); + void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); + void (*reset_comparator) (DataCollection* self); + GeeCollection* (*get_all) (DataCollection* self); + gint (*get_count) (DataCollection* self); + DataObject* (*get_at) (DataCollection* self, gint index); + gint (*index_of) (DataCollection* self, DataObject* object); + gboolean (*contains) (DataCollection* self, DataObject* object); + gboolean (*add) (DataCollection* self, DataObject* object); + GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); + void (*remove_marked) (DataCollection* self, Marker* m); + void (*clear) (DataCollection* self); + void (*close) (DataCollection* self); + void (*notify_frozen) (DataCollection* self); + void (*notify_thawed) (DataCollection* self); + void (*items_added) (DataCollection* self, GeeIterable* added); + void (*items_removed) (DataCollection* self, GeeIterable* removed); + void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); + void (*items_altered) (DataCollection* self, GeeMap* items); + void (*ordering_changed) (DataCollection* self); + void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); + void (*property_cleared) (DataCollection* self, const gchar* name); + void (*frozen) (DataCollection* self); + void (*thawed) (DataCollection* self); +}; + +struct _SourceCollection { + DataCollection parent_instance; + SourceCollectionPrivate * priv; +}; + +struct _SourceCollectionClass { + DataCollectionClass parent_class; + gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source); + void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking); + void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked); + void (*notify_item_destroyed) (SourceCollection* self, DataSource* source); + void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed); + void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked); + void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); + gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink); + void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink); + void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking); + void (*items_relinked) (SourceCollection* self, GeeCollection* relinked); + void (*item_destroyed) (SourceCollection* self, DataSource* source); + void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed); + void (*unlinked_destroyed) (SourceCollection* self, DataSource* source); + void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); +}; + +struct _DatabaseSourceCollection { + SourceCollection parent_instance; + DatabaseSourceCollectionPrivate * priv; +}; + +struct _DatabaseSourceCollectionClass { + SourceCollectionClass parent_class; +}; + +struct _DirectPhotoSourceCollection { + DatabaseSourceCollection parent_instance; + DirectPhotoSourceCollectionPrivate * priv; +}; + +struct _DirectPhotoSourceCollectionClass { + DatabaseSourceCollectionClass parent_class; +}; + +struct _DirectPhotoSourceCollectionPrivate { + GeeCollection* prepared_photos; + GeeHashMap* file_map; + DirectoryMonitor* monitor; +}; + +typedef gint64 (*GetSourceDatabaseKey) (DataSource* source, void* user_data); + +static gpointer direct_photo_parent_class = NULL; +extern DirectPhotoSourceCollection* direct_photo_global; +DirectPhotoSourceCollection* direct_photo_global = NULL; +static gpointer direct_photo_source_collection_parent_class = NULL; + +GType data_object_get_type (void) G_GNUC_CONST; +gpointer alteration_ref (gpointer instance); +void alteration_unref (gpointer instance); +GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_alteration (GValue* value, gpointer v_object); +void value_take_alteration (GValue* value, gpointer v_object); +gpointer value_get_alteration (const GValue* value); +GType alteration_get_type (void) G_GNUC_CONST; +gpointer data_collection_ref (gpointer instance); +void data_collection_unref (gpointer instance); +GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_data_collection (GValue* value, gpointer v_object); +void value_take_data_collection (GValue* value, gpointer v_object); +gpointer value_get_data_collection (const GValue* value); +GType data_collection_get_type (void) G_GNUC_CONST; +GType data_source_get_type (void) G_GNUC_CONST; +gpointer source_holding_tank_ref (gpointer instance); +void source_holding_tank_unref (gpointer instance); +GParamSpec* param_spec_source_holding_tank (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_source_holding_tank (GValue* value, gpointer v_object); +void value_take_source_holding_tank (GValue* value, gpointer v_object); +gpointer value_get_source_holding_tank (const GValue* value); +GType source_holding_tank_get_type (void) G_GNUC_CONST; +GType source_collection_get_type (void) G_GNUC_CONST; +gpointer source_snapshot_ref (gpointer instance); +void source_snapshot_unref (gpointer instance); +GParamSpec* param_spec_source_snapshot (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_source_snapshot (GValue* value, gpointer v_object); +void value_take_source_snapshot (GValue* value, gpointer v_object); +gpointer value_get_source_snapshot (const GValue* value); +GType source_snapshot_get_type (void) G_GNUC_CONST; +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType photo_file_format_get_type (void) G_GNUC_CONST; +GType indexable_get_type (void) G_GNUC_CONST; +GType media_source_get_type (void) G_GNUC_CONST; +GType event_id_get_type (void) G_GNUC_CONST; +EventID* event_id_dup (const EventID* self); +void event_id_free (EventID* self); +gpointer backing_file_state_ref (gpointer instance); +void backing_file_state_unref (gpointer instance); +GParamSpec* param_spec_backing_file_state (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_backing_file_state (GValue* value, gpointer v_object); +void value_take_backing_file_state (GValue* value, gpointer v_object); +gpointer value_get_backing_file_state (const GValue* value); +GType backing_file_state_get_type (void) G_GNUC_CONST; +GType rating_get_type (void) G_GNUC_CONST; +GType photo_exception_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); +GType scaling_get_type (void) G_GNUC_CONST; +GType scale_constraint_get_type (void) G_GNUC_CONST; +Scaling* scaling_dup (const Scaling* self); +void scaling_free (Scaling* self); +GType import_id_get_type (void) G_GNUC_CONST; +ImportID* import_id_dup (const ImportID* self); +void import_id_free (ImportID* self); +GType photo_source_get_type (void) G_GNUC_CONST; +gpointer media_metadata_ref (gpointer instance); +void media_metadata_unref (gpointer instance); +GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_media_metadata (GValue* value, gpointer v_object); +void value_take_media_metadata (GValue* value, gpointer v_object); +gpointer value_get_media_metadata (const GValue* value); +GType media_metadata_get_type (void) G_GNUC_CONST; +GType photo_metadata_get_type (void) G_GNUC_CONST; +GType dateable_get_type (void) G_GNUC_CONST; +GType photo_get_type (void) G_GNUC_CONST; +GType rotation_get_type (void) G_GNUC_CONST; +gpointer photo_row_ref (gpointer instance); +void photo_row_unref (gpointer instance); +GParamSpec* param_spec_photo_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_photo_row (GValue* value, gpointer v_object); +void value_take_photo_row (GValue* value, gpointer v_object); +gpointer value_get_photo_row (const GValue* value); +GType photo_row_get_type (void) G_GNUC_CONST; +gpointer backing_photo_row_ref (gpointer instance); +void backing_photo_row_unref (gpointer instance); +GParamSpec* param_spec_backing_photo_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_backing_photo_row (GValue* value, gpointer v_object); +void value_take_backing_photo_row (GValue* value, gpointer v_object); +gpointer value_get_backing_photo_row (const GValue* value); +GType backing_photo_row_get_type (void) G_GNUC_CONST; +GType direct_photo_get_type (void) G_GNUC_CONST; +#define DIRECT_PHOTO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECT_PHOTO, DirectPhotoPrivate)) +enum { + DIRECT_PHOTO_DUMMY_PROPERTY +}; +GType database_source_collection_get_type (void) G_GNUC_CONST; +GType direct_photo_source_collection_get_type (void) G_GNUC_CONST; +#define DIRECT_PHOTO_PREVIEW_BEST_FIT 360 +static DirectPhoto* direct_photo_new (PhotoRow* row); +static DirectPhoto* direct_photo_construct (GType object_type, PhotoRow* row); +Photo* photo_construct (GType object_type, PhotoRow* row); +GType orientation_get_type (void) G_GNUC_CONST; +void direct_photo_fixup_orientation_after_reimport (DirectPhoto* self, Orientation dest); +GType photo_id_get_type (void) G_GNUC_CONST; +PhotoID* photo_id_dup (const PhotoID* self); +void photo_id_free (PhotoID* self); +gpointer key_value_map_ref (gpointer instance); +void key_value_map_unref (gpointer instance); +GParamSpec* param_spec_key_value_map (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_key_value_map (GValue* value, gpointer v_object); +void value_take_key_value_map (GValue* value, gpointer v_object); +gpointer value_get_key_value_map (const GValue* value); +GType key_value_map_get_type (void) G_GNUC_CONST; +GType backing_photo_id_get_type (void) G_GNUC_CONST; +BackingPhotoID* backing_photo_id_dup (const BackingPhotoID* self); +void backing_photo_id_free (BackingPhotoID* self); +GType raw_developer_get_type (void) G_GNUC_CONST; +void direct_photo_init (GFile* initial_file); +void photo_init_photo (void); +DirectPhotoSourceCollection* direct_photo_source_collection_new (GFile* initial_file); +DirectPhotoSourceCollection* direct_photo_source_collection_construct (GType object_type, GFile* initial_file); +gchar* direct_photo_source_collection_fetch (DirectPhotoSourceCollection* self, GFile* file, DirectPhoto** photo, gboolean reimport); +gboolean data_collection_add (DataCollection* self, DataObject* object); +void direct_photo_terminate (void); +void photo_terminate_photo (void); +static void direct_photo_save_dims (DirectPhoto* self); +GType backing_fetch_mode_get_type (void) G_GNUC_CONST; +GdkPixbuf* photo_get_pixbuf_with_options (Photo* self, Scaling* scaling, PhotoException exceptions, BackingFetchMode fetch_mode, GError** error); +void scaling_for_original (Scaling* result); +void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result); +gchar* data_object_to_string (DataObject* self); +GType import_result_get_type (void) G_GNUC_CONST; +ImportResult direct_photo_demand_load (DirectPhoto* self); +gpointer photo_reimport_master_state_ref (gpointer instance); +void photo_reimport_master_state_unref (gpointer instance); +GParamSpec* photo_param_spec_reimport_master_state (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void photo_value_set_reimport_master_state (GValue* value, gpointer v_object); +void photo_value_take_reimport_master_state (GValue* value, gpointer v_object); +gpointer photo_value_get_reimport_master_state (const GValue* value); +GType photo_reimport_master_state_get_type (void) G_GNUC_CONST; +gboolean photo_prepare_for_reimport_master (Photo* self, PhotoReimportMasterState** reimport_state, GError** error); +GQuark database_error_quark (void); +void photo_finish_reimport_master (Photo* self, PhotoReimportMasterState* state, GError** error); +ImportResult direct_photo_internal_import (GFile* file, DirectPhoto** photo); +gpointer photo_import_params_ref (gpointer instance); +void photo_import_params_unref (gpointer instance); +GParamSpec* param_spec_photo_import_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_photo_import_params (GValue* value, gpointer v_object); +void value_take_photo_import_params (GValue* value, gpointer v_object); +gpointer value_get_photo_import_params (const GValue* value); +GType photo_import_params_get_type (void) G_GNUC_CONST; +void import_id_generate (ImportID* result); +PhotoImportParams* photo_import_params_new_create_placeholder (GFile* file, ImportID* import_id); +PhotoImportParams* photo_import_params_construct_create_placeholder (GType object_type, GFile* file, ImportID* import_id); +void photo_create_pre_import (PhotoImportParams* params); +gpointer database_table_ref (gpointer instance); +void database_table_unref (gpointer instance); +GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_database_table (GValue* value, gpointer v_object); +void value_take_database_table (GValue* value, gpointer v_object); +gpointer value_get_database_table (const GValue* value); +GType database_table_get_type (void) G_GNUC_CONST; +GType photo_table_get_type (void) G_GNUC_CONST; +PhotoTable* photo_table_get_instance (void); +void photo_table_add (PhotoTable* self, PhotoRow* photo_row, PhotoID* result); +GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST; +gpointer thumbnails_ref (gpointer instance); +void thumbnails_unref (gpointer instance); +GParamSpec* param_spec_thumbnails (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_thumbnails (GValue* value, gpointer v_object); +void value_take_thumbnails (GValue* value, gpointer v_object); +gpointer value_get_thumbnails (const GValue* value); +GType thumbnails_get_type (void) G_GNUC_CONST; +static GdkPixbuf* direct_photo_real_get_preview_pixbuf (MediaSource* base, Scaling* scaling, GError** error); +GdkPixbuf* thumbnail_source_get_thumbnail (ThumbnailSource* self, gint scale, GError** error); +GdkPixbuf* photo_source_get_pixbuf (PhotoSource* self, Scaling* scaling, GError** error); +GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self, GdkPixbuf* pixbuf, GdkInterpType interp, gboolean scale_up); +static void direct_photo_real_rotate (Photo* base, Rotation rotation); +void photo_rotate (Photo* self, Rotation rotation); +static GdkPixbuf* direct_photo_real_get_pixbuf (PhotoSource* base, Scaling* scaling, GError** error); +static GdkPixbuf* direct_photo_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error); +PhotoMetadata* photo_source_get_metadata (PhotoSource* self); +guint photo_metadata_get_preview_count (PhotoMetadata* self); +gpointer photo_preview_ref (gpointer instance); +void photo_preview_unref (gpointer instance); +GParamSpec* param_spec_photo_preview (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_photo_preview (GValue* value, gpointer v_object); +void value_take_photo_preview (GValue* value, gpointer v_object); +gpointer value_get_photo_preview (const GValue* value); +GType photo_preview_get_type (void) G_GNUC_CONST; +PhotoPreview* photo_metadata_get_preview (PhotoMetadata* self, guint number); +GdkPixbuf* photo_preview_get_pixbuf (PhotoPreview* self, GError** error); +Orientation photo_get_orientation (Photo* self); +GdkPixbuf* orientation_rotate_pixbuf (Orientation self, GdkPixbuf* pixbuf); +static void direct_photo_real_notify_altered (DataObject* base, Alteration* alteration); +void data_object_notify_altered (DataObject* self, Alteration* alteration); +static gboolean direct_photo_real_has_user_generated_metadata (Photo* base); +static void direct_photo_real_set_user_metadata_for_export (Photo* base, PhotoMetadata* metadata); +static void direct_photo_real_apply_user_metadata_for_reimport (Photo* base, PhotoMetadata* metadata); +static gboolean direct_photo_real_is_trashed (MediaSource* base); +static gboolean direct_photo_real_is_offline (MediaSource* base); +static void direct_photo_real_trash (MediaSource* base); +static void direct_photo_real_untrash (MediaSource* base); +static void direct_photo_real_mark_offline (MediaSource* base); +static void direct_photo_real_mark_online (MediaSource* base); +static void direct_photo_finalize (GObject* obj); +GType marker_get_type (void) G_GNUC_CONST; +gpointer source_backlink_ref (gpointer instance); +void source_backlink_unref (gpointer instance); +GParamSpec* param_spec_source_backlink (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_source_backlink (GValue* value, gpointer v_object); +void value_take_source_backlink (GValue* value, gpointer v_object); +gpointer value_get_source_backlink (const GValue* value); +GType source_backlink_get_type (void) G_GNUC_CONST; +GType directory_monitor_get_type (void) G_GNUC_CONST; +#define DIRECT_PHOTO_SOURCE_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionPrivate)) +enum { + DIRECT_PHOTO_SOURCE_COLLECTION_DUMMY_PROPERTY +}; +guint file_hash (GFile* file); +static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self); +gboolean file_equal (GFile* a, GFile* b); +static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self); +#define DIRECT_PHOTO_SOURCE_COLLECTION_DISCOVERED_FILES_BATCH_ADD 500 +static gint64 direct_photo_source_collection_get_direct_key (DataSource* source); +static gint64 _direct_photo_source_collection_get_direct_key_get_source_database_key (DataSource* source, gpointer self); +DatabaseSourceCollection* database_source_collection_construct (GType object_type, const gchar* name, GetSourceDatabaseKey source_key_func, void* source_key_func_target); +DirectoryMonitor* directory_monitor_new (GFile* root, gboolean recurse, gboolean monitoring); +DirectoryMonitor* directory_monitor_construct (GType object_type, GFile* root, gboolean recurse, gboolean monitoring); +static void direct_photo_source_collection_on_file_discovered (DirectPhotoSourceCollection* self, GFile* file, GFileInfo* info); +static void _direct_photo_source_collection_on_file_discovered_directory_monitor_file_discovered (DirectoryMonitor* _sender, GFile* file, GFileInfo* info, gpointer self); +static void direct_photo_source_collection_on_discovery_completed (DirectPhotoSourceCollection* self); +static void _direct_photo_source_collection_on_discovery_completed_directory_monitor_discovery_completed (DirectoryMonitor* _sender, gpointer self); +void directory_monitor_start_discovery (DirectoryMonitor* self); +static gboolean direct_photo_source_collection_real_holds_type_of_source (SourceCollection* base, DataSource* source); +void photo_get_photo_id (Photo* self, PhotoID* result); +static void direct_photo_source_collection_real_notify_items_added (DataCollection* base, GeeIterable* added); +GFile* media_source_get_file (MediaSource* self); +void data_collection_notify_items_added (DataCollection* self, GeeIterable* added); +static void direct_photo_source_collection_real_notify_items_removed (DataCollection* base, GeeIterable* removed); +void data_collection_notify_items_removed (DataCollection* self, GeeIterable* removed); +gboolean direct_photo_source_collection_has_source_for_file (DirectPhotoSourceCollection* self, GFile* file); +gboolean photo_file_format_is_file_supported (GFile* file); +static void direct_photo_source_collection_flush_prepared_photos (DirectPhotoSourceCollection* self); +GeeCollection* data_collection_add_many (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); +gboolean direct_photo_source_collection_has_file (DirectPhotoSourceCollection* self, GFile* file); +void direct_photo_source_collection_reimport_photo (DirectPhotoSourceCollection* self, DirectPhoto* photo); +void photo_discard_prefetched (Photo* self); +gboolean photo_only_metadata_changed (Photo* self); +PhotoFileFormat photo_get_file_format (Photo* self); +gchar* import_result_to_string (ImportResult self); +gboolean direct_photo_source_collection_has_file_source (DirectPhotoSourceCollection* self, GFile* file); +DirectPhoto* direct_photo_source_collection_get_file_source (DirectPhotoSourceCollection* self, GFile* file); +static void direct_photo_source_collection_finalize (DataCollection* obj); + + +static DirectPhoto* direct_photo_construct (GType object_type, PhotoRow* row) { + DirectPhoto * self = NULL; + PhotoRow* _tmp0_ = NULL; +#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_PHOTO_ROW (row), NULL); +#line 18 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = row; +#line 18 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = (DirectPhoto*) photo_construct (object_type, _tmp0_); +#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return self; +#line 1125 "DirectPhoto.c" +} + + +static DirectPhoto* direct_photo_new (PhotoRow* row) { +#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return direct_photo_construct (TYPE_DIRECT_PHOTO, row); +#line 1132 "DirectPhoto.c" +} + + +/** + * @brief Because all transformations are discarded on reimport by design, including + * Orientation, a JFIF file that is only rotated or flipped, then saved, has the orientation + * change the user made before saving removed (recall that fetch() remembers which images it + * has seen before and will only add a file to the file map once; every time it sees it + * again after this is considered a reimport). This will set the orientation to the + * specified value, fixing up both the row and the backing row. + * + * @warning Only reimported JFIF files should need this; non-lossy image types have their + * actual pixels physically rotated in the file when they're exported. + * + * @param dest The orientation to set the photo to; usually, this should be a value + * obtained by calling get_orientation() prior to export()ing a DirectPhoto. + */ +void direct_photo_fixup_orientation_after_reimport (DirectPhoto* self, Orientation dest) { + PhotoRow* _tmp0_ = NULL; + Orientation _tmp1_ = 0; + BackingPhotoRow* _tmp2_ = NULL; + Orientation _tmp3_ = 0; +#line 35 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_DIRECT_PHOTO (self)); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo)->row; +#line 36 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = dest; +#line 36 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_->orientation = _tmp1_; +#line 37 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo)->backing_photo_row; +#line 37 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = dest; +#line 37 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_->original_orientation = _tmp3_; +#line 1169 "DirectPhoto.c" +} + + +void direct_photo_init (GFile* initial_file) { + GFile* _tmp0_ = NULL; + DirectPhotoSourceCollection* _tmp1_ = NULL; + DirectPhoto* photo = NULL; + gchar* reason = NULL; + DirectPhotoSourceCollection* _tmp2_ = NULL; + GFile* _tmp3_ = NULL; + DirectPhoto* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + DirectPhotoSourceCollection* _tmp8_ = NULL; + DirectPhoto* _tmp9_ = NULL; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (G_IS_FILE (initial_file)); +#line 41 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_init_photo (); +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = initial_file; +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = direct_photo_source_collection_new (_tmp0_); +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _data_collection_unref0 (direct_photo_global); +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_global = _tmp1_; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = direct_photo_global; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = initial_file; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = direct_photo_source_collection_fetch (_tmp2_, _tmp3_, &_tmp4_, FALSE); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (photo); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo = _tmp4_; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reason = _tmp5_; +#line 46 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = reason; +#line 46 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp6_ != NULL) { +#line 1213 "DirectPhoto.c" + const gchar* _tmp7_ = NULL; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = reason; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_warning ("DirectPhoto.vala:47: fetch error: %s", _tmp7_); +#line 1219 "DirectPhoto.c" + } +#line 48 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = direct_photo_global; +#line 48 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp9_ = photo; +#line 48 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject)); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (reason); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (photo); +#line 1231 "DirectPhoto.c" +} + + +void direct_photo_terminate (void) { +#line 52 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_terminate_photo (); +#line 1238 "DirectPhoto.c" +} + + +static void direct_photo_save_dims (DirectPhoto* self) { + GError * _inner_error_ = NULL; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_DIRECT_PHOTO (self)); +#line 1246 "DirectPhoto.c" + { + GdkPixbuf* _tmp0_ = NULL; + Scaling _tmp1_ = {0}; + GdkPixbuf* _tmp2_ = NULL; + BackingPhotoRow* _tmp3_ = NULL; + Dimensions _tmp4_ = {0}; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + scaling_for_original (&_tmp1_); +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = photo_get_pixbuf_with_options (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo), &_tmp1_, (PHOTO_EXCEPTION_CROP | PHOTO_EXCEPTION_STRAIGHTEN) | PHOTO_EXCEPTION_ORIENTATION, BACKING_FETCH_MODE_BASELINE, &_inner_error_); +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = _tmp2_; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1261 "DirectPhoto.c" + goto __catch42_g_error; + } +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo)->backing_photo_row; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + dimensions_for_pixbuf (_tmp0_, &_tmp4_); +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_->dim = _tmp4_; +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp0_); +#line 1272 "DirectPhoto.c" + } + goto __finally42; + __catch42_g_error: + { + GError* e = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + e = _inner_error_; +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _inner_error_ = NULL; +#line 62 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); +#line 62 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = _tmp5_; +#line 62 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_warning ("DirectPhoto.vala:62: Dimensions for image %s could not be gotten.", _tmp6_); +#line 62 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (_tmp6_); +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_error_free0 (e); +#line 1294 "DirectPhoto.c" + } + __finally42: +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.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 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_clear_error (&_inner_error_); +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return; +#line 1305 "DirectPhoto.c" + } +} + + +ImportResult direct_photo_demand_load (DirectPhoto* self) { + ImportResult result = 0; + gboolean _tmp0_ = FALSE; + PhotoReimportMasterState* reimport_state = NULL; + GError * _inner_error_ = NULL; +#line 67 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO (self), 0); +#line 68 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->loaded; +#line 68 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp0_) { +#line 69 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_save_dims (self); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = IMPORT_RESULT_SUCCESS; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1327 "DirectPhoto.c" + } + { + PhotoReimportMasterState* _tmp1_ = NULL; + PhotoReimportMasterState* _tmp2_ = NULL; +#line 75 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_prepare_for_reimport_master (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo), &_tmp1_, &_inner_error_); +#line 75 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 75 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reimport_state = _tmp1_; +#line 75 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1340 "DirectPhoto.c" + goto __catch43_g_error; + } +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = reimport_state; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_finish_reimport_master (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo), _tmp2_, &_inner_error_); +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1349 "DirectPhoto.c" + goto __catch43_g_error; + } + } + goto __finally43; + __catch43_g_error: + { + GError* err = NULL; + GError* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + err = _inner_error_; +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _inner_error_ = NULL; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = err; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = _tmp3_->message; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_warning ("DirectPhoto.vala:78: Database error on re-importing image: %s", _tmp4_); +#line 79 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = IMPORT_RESULT_DATABASE_ERROR; +#line 79 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_error_free0 (err); +#line 79 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 79 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1377 "DirectPhoto.c" + } + __finally43: +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhoto.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 74 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_clear_error (&_inner_error_); +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return 0; +#line 1390 "DirectPhoto.c" + } +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->loaded = TRUE; +#line 83 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_save_dims (self); +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = IMPORT_RESULT_SUCCESS; +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1402 "DirectPhoto.c" +} + + +ImportResult direct_photo_internal_import (GFile* file, DirectPhoto** photo) { + DirectPhoto* _vala_photo = NULL; + ImportResult result = 0; + PhotoImportParams* params = NULL; + GFile* _tmp0_ = NULL; + ImportID _tmp1_ = {0}; + PhotoImportParams* _tmp2_ = NULL; + PhotoTable* _tmp3_ = NULL; + PhotoTable* _tmp4_ = NULL; + PhotoRow* _tmp5_ = NULL; + PhotoID _tmp6_ = {0}; + PhotoRow* _tmp7_ = NULL; + DirectPhoto* _tmp8_ = NULL; +#line 89 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (G_IS_FILE (file), 0); +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = file; +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + import_id_generate (&_tmp1_); +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = photo_import_params_new_create_placeholder (_tmp0_, &_tmp1_); +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + params = _tmp2_; +#line 91 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_create_pre_import (params); +#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = photo_table_get_instance (); +#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = _tmp3_; +#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = params->row; +#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_table_add (_tmp4_, _tmp5_, &_tmp6_); +#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _database_table_unref0 (_tmp4_); +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = params->row; +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = direct_photo_new (_tmp7_); +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_vala_photo); +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _vala_photo = _tmp8_; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = IMPORT_RESULT_SUCCESS; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_import_params_unref0 (params); +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (photo) { +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + *photo = _vala_photo; +#line 1457 "DirectPhoto.c" + } else { +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_vala_photo); +#line 1461 "DirectPhoto.c" + } +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1465 "DirectPhoto.c" +} + + +static GdkPixbuf* direct_photo_real_get_preview_pixbuf (MediaSource* base, Scaling* scaling, GError** error) { + DirectPhoto * self; + GdkPixbuf* result = NULL; + GdkPixbuf* _tmp0_ = NULL; + GdkPixbuf* _tmp9_ = NULL; + GdkPixbuf* _tmp10_ = NULL; + GError * _inner_error_ = NULL; +#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (scaling != NULL, NULL); +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->preview; +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp0_ == NULL) { +#line 1484 "DirectPhoto.c" + GdkPixbuf* _tmp1_ = NULL; + GdkPixbuf* _tmp2_ = NULL; + GdkPixbuf* _tmp3_ = NULL; + GdkPixbuf* _tmp4_ = NULL; +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = thumbnail_source_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), DIRECT_PHOTO_PREVIEW_BEST_FIT, &_inner_error_); +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = _tmp2_; +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return NULL; +#line 1499 "DirectPhoto.c" + } +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = _tmp1_; +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = NULL; +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->preview); +#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->preview = _tmp3_; +#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = self->priv->preview; +#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp4_ == NULL) { +#line 1513 "DirectPhoto.c" + GdkPixbuf* _tmp5_ = NULL; + Scaling _tmp6_ = {0}; + GdkPixbuf* _tmp7_ = NULL; + GdkPixbuf* _tmp8_ = NULL; +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = *scaling; +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = photo_source_get_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_SOURCE, PhotoSource), &_tmp6_, &_inner_error_); +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = _tmp7_; +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp1_); +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return NULL; +#line 1532 "DirectPhoto.c" + } +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = _tmp5_; +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = NULL; +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->preview); +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->preview = _tmp8_; +#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp5_); +#line 1544 "DirectPhoto.c" + } +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp1_); +#line 1548 "DirectPhoto.c" + } +#line 107 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp9_ = self->priv->preview; +#line 107 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp10_ = scaling_perform_on_pixbuf (scaling, _tmp9_, GDK_INTERP_BILINEAR, TRUE); +#line 107 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = _tmp10_; +#line 107 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1558 "DirectPhoto.c" +} + + +static void direct_photo_real_rotate (Photo* base, Rotation rotation) { + DirectPhoto * self; + Rotation _tmp0_ = 0; +#line 110 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo)->can_rotate_now = FALSE; +#line 112 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_signal_emit_by_name (self, "can-rotate-changed", FALSE); +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = rotation; +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + PHOTO_CLASS (direct_photo_parent_class)->rotate (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo), _tmp0_); +#line 1575 "DirectPhoto.c" +} + + +static GdkPixbuf* direct_photo_real_get_pixbuf (PhotoSource* base, Scaling* scaling, GError** error) { + DirectPhoto * self; + GdkPixbuf* result = NULL; + GdkPixbuf* ret = NULL; + Scaling _tmp0_ = {0}; + GdkPixbuf* _tmp1_ = NULL; + GError * _inner_error_ = NULL; +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (scaling != NULL, NULL); +#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = *scaling; +#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = PHOTO_SOURCE_CLASS (direct_photo_parent_class)->get_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo), TYPE_PHOTO_SOURCE, PhotoSource), &_tmp0_, &_inner_error_); +#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ret = _tmp1_; +#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return NULL; +#line 1602 "DirectPhoto.c" + } +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_signal_emit_by_name (self, "can-rotate-changed", TRUE); +#line 119 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo)->can_rotate_now = TRUE; +#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = ret; +#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1612 "DirectPhoto.c" +} + + +static GdkPixbuf* direct_photo_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error) { + DirectPhoto * self; + GdkPixbuf* result = NULL; + PhotoMetadata* metadata = NULL; + PhotoMetadata* _tmp0_ = NULL; + GdkPixbuf* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + PhotoMetadata* _tmp3_ = NULL; + GError * _inner_error_ = NULL; +#line 123 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = photo_source_get_metadata (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_SOURCE, PhotoSource)); +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + metadata = _tmp0_; +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = metadata; +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp3_ == NULL) { +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = TRUE; +#line 1637 "DirectPhoto.c" + } else { + PhotoMetadata* _tmp4_ = NULL; + guint _tmp5_ = 0U; +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = metadata; +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = photo_metadata_get_preview_count (_tmp4_); +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = _tmp5_ == ((guint) 0); +#line 1647 "DirectPhoto.c" + } +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp2_) { +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp1_); +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = NULL; +#line 1655 "DirectPhoto.c" + } else { + GdkPixbuf* _tmp6_ = NULL; + PhotoMetadata* _tmp7_ = NULL; + PhotoPreview* _tmp8_ = NULL; + PhotoPreview* _tmp9_ = NULL; + GdkPixbuf* _tmp10_ = NULL; + GdkPixbuf* _tmp11_ = NULL; + Orientation _tmp12_ = 0; + GdkPixbuf* _tmp13_ = NULL; +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = metadata; +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = photo_metadata_get_preview (_tmp7_, (guint) 0); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp9_ = _tmp8_; +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp10_ = photo_preview_get_pixbuf (_tmp9_, &_inner_error_); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp11_ = _tmp10_; +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_preview_unref0 (_tmp9_); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = _tmp11_; +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_propagate_error (error, _inner_error_); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp1_); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _media_metadata_unref0 (metadata); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return NULL; +#line 1689 "DirectPhoto.c" + } +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp12_ = photo_get_orientation (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo)); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp13_ = orientation_rotate_pixbuf (_tmp12_, _tmp6_); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp1_); +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = _tmp13_; +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp6_); +#line 1701 "DirectPhoto.c" + } +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = _tmp1_; +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _media_metadata_unref0 (metadata); +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1709 "DirectPhoto.c" +} + + +static void direct_photo_real_notify_altered (DataObject* base, Alteration* alteration) { + DirectPhoto * self; + Alteration* _tmp0_ = NULL; +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_ALTERATION (alteration)); +#line 131 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->preview); +#line 131 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->preview = NULL; +#line 133 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = alteration; +#line 133 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + DATA_OBJECT_CLASS (direct_photo_parent_class)->notify_altered (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO, Photo), TYPE_DATA_OBJECT, DataObject), _tmp0_); +#line 1728 "DirectPhoto.c" +} + + +static gboolean direct_photo_real_has_user_generated_metadata (Photo* base) { + DirectPhoto * self; + gboolean result = FALSE; +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 138 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = FALSE; +#line 138 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1741 "DirectPhoto.c" +} + + +static void direct_photo_real_set_user_metadata_for_export (Photo* base, PhotoMetadata* metadata) { + DirectPhoto * self; +#line 141 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 141 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_PHOTO_METADATA (metadata)); +#line 1751 "DirectPhoto.c" +} + + +static void direct_photo_real_apply_user_metadata_for_reimport (Photo* base, PhotoMetadata* metadata) { + DirectPhoto * self; +#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_PHOTO_METADATA (metadata)); +#line 1761 "DirectPhoto.c" +} + + +static gboolean direct_photo_real_is_trashed (MediaSource* base) { + DirectPhoto * self; + gboolean result = FALSE; +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 150 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = FALSE; +#line 150 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1774 "DirectPhoto.c" +} + + +static gboolean direct_photo_real_is_offline (MediaSource* base) { + DirectPhoto * self; + gboolean result = FALSE; +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 155 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = FALSE; +#line 155 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1787 "DirectPhoto.c" +} + + +static void direct_photo_real_trash (MediaSource* base) { + DirectPhoto * self; +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 1795 "DirectPhoto.c" +} + + +static void direct_photo_real_untrash (MediaSource* base) { + DirectPhoto * self; +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 1803 "DirectPhoto.c" +} + + +static void direct_photo_real_mark_offline (MediaSource* base) { + DirectPhoto * self; +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 1811 "DirectPhoto.c" +} + + +static void direct_photo_real_mark_online (MediaSource* base) { + DirectPhoto * self; +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 1819 "DirectPhoto.c" +} + + +static void direct_photo_class_init (DirectPhotoClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_type_class_add_private (klass, sizeof (DirectPhotoPrivate)); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((MediaSourceClass *) klass)->get_preview_pixbuf = direct_photo_real_get_preview_pixbuf; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((PhotoClass *) klass)->rotate = direct_photo_real_rotate; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((PhotoSourceClass *) klass)->get_pixbuf = direct_photo_real_get_pixbuf; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((ThumbnailSourceClass *) klass)->get_thumbnail = direct_photo_real_get_thumbnail; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((DataObjectClass *) klass)->notify_altered = direct_photo_real_notify_altered; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((PhotoClass *) klass)->has_user_generated_metadata = direct_photo_real_has_user_generated_metadata; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((PhotoClass *) klass)->set_user_metadata_for_export = direct_photo_real_set_user_metadata_for_export; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((PhotoClass *) klass)->apply_user_metadata_for_reimport = direct_photo_real_apply_user_metadata_for_reimport; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((MediaSourceClass *) klass)->is_trashed = direct_photo_real_is_trashed; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((MediaSourceClass *) klass)->is_offline = direct_photo_real_is_offline; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((MediaSourceClass *) klass)->trash = direct_photo_real_trash; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((MediaSourceClass *) klass)->untrash = direct_photo_real_untrash; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((MediaSourceClass *) klass)->mark_offline = direct_photo_real_mark_offline; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((MediaSourceClass *) klass)->mark_online = direct_photo_real_mark_online; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + G_OBJECT_CLASS (klass)->finalize = direct_photo_finalize; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_signal_new ("can_rotate_changed", TYPE_DIRECT_PHOTO, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); +#line 1860 "DirectPhoto.c" +} + + +static void direct_photo_instance_init (DirectPhoto * self) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv = DIRECT_PHOTO_GET_PRIVATE (self); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->preview = NULL; +#line 15 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->loaded = FALSE; +#line 1871 "DirectPhoto.c" +} + + +static void direct_photo_finalize (GObject* obj) { + DirectPhoto * self; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_PHOTO, DirectPhoto); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->preview); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + G_OBJECT_CLASS (direct_photo_parent_class)->finalize (obj); +#line 1883 "DirectPhoto.c" +} + + +GType direct_photo_get_type (void) { + static volatile gsize direct_photo_type_id__volatile = 0; + if (g_once_init_enter (&direct_photo_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectPhotoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_photo_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectPhoto), 0, (GInstanceInitFunc) direct_photo_instance_init, NULL }; + GType direct_photo_type_id; + direct_photo_type_id = g_type_register_static (TYPE_PHOTO, "DirectPhoto", &g_define_type_info, 0); + g_once_init_leave (&direct_photo_type_id__volatile, direct_photo_type_id); + } + return direct_photo_type_id__volatile; +} + + +static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self) { + guint result; + result = file_hash ((GFile*) v); +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1904 "DirectPhoto.c" +} + + +static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) { + gboolean result; + result = file_equal ((GFile*) a, (GFile*) b); +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1913 "DirectPhoto.c" +} + + +static gint64 _direct_photo_source_collection_get_direct_key_get_source_database_key (DataSource* source, gpointer self) { + gint64 result; + result = direct_photo_source_collection_get_direct_key (source); +#line 183 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 1922 "DirectPhoto.c" +} + + +static void _direct_photo_source_collection_on_file_discovered_directory_monitor_file_discovered (DirectoryMonitor* _sender, GFile* file, GFileInfo* info, gpointer self) { +#line 187 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_source_collection_on_file_discovered ((DirectPhotoSourceCollection*) self, file, info); +#line 1929 "DirectPhoto.c" +} + + +static void _direct_photo_source_collection_on_discovery_completed_directory_monitor_discovery_completed (DirectoryMonitor* _sender, gpointer self) { +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_source_collection_on_discovery_completed ((DirectPhotoSourceCollection*) self); +#line 1936 "DirectPhoto.c" +} + + +DirectPhotoSourceCollection* direct_photo_source_collection_construct (GType object_type, GFile* initial_file) { + DirectPhotoSourceCollection* self = NULL; + GFile* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; + DirectoryMonitor* _tmp3_ = NULL; + DirectoryMonitor* _tmp4_ = NULL; + DirectoryMonitor* _tmp5_ = NULL; + DirectoryMonitor* _tmp6_ = NULL; +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (G_IS_FILE (initial_file), NULL); +#line 183 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = (DirectPhotoSourceCollection*) database_source_collection_construct (object_type, "DirectPhotoSourceCollection", _direct_photo_source_collection_get_direct_key_get_source_database_key, NULL); +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = initial_file; +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = g_file_get_parent (_tmp0_); +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = _tmp1_; +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = directory_monitor_new (_tmp2_, FALSE, FALSE); +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->monitor); +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->monitor = _tmp3_; +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp2_); +#line 187 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = self->priv->monitor; +#line 187 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_signal_connect (_tmp4_, "file-discovered", (GCallback) _direct_photo_source_collection_on_file_discovered_directory_monitor_file_discovered, self); +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = self->priv->monitor; +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_signal_connect (_tmp5_, "discovery-completed", (GCallback) _direct_photo_source_collection_on_discovery_completed_directory_monitor_discovery_completed, self); +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = self->priv->monitor; +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + directory_monitor_start_discovery (_tmp6_); +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return self; +#line 1981 "DirectPhoto.c" +} + + +DirectPhotoSourceCollection* direct_photo_source_collection_new (GFile* initial_file) { +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return direct_photo_source_collection_construct (TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, initial_file); +#line 1988 "DirectPhoto.c" +} + + +static gboolean direct_photo_source_collection_real_holds_type_of_source (SourceCollection* base, DataSource* source) { + DirectPhotoSourceCollection * self; + gboolean result = FALSE; + DataSource* _tmp0_ = NULL; +#line 193 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection); +#line 193 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); +#line 194 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = source; +#line 194 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_DIRECT_PHOTO); +#line 194 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2006 "DirectPhoto.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return self ? g_object_ref (self) : NULL; +#line 2013 "DirectPhoto.c" +} + + +static gint64 direct_photo_source_collection_get_direct_key (DataSource* source) { + gint64 result = 0LL; + DirectPhoto* photo = NULL; + DataSource* _tmp0_ = NULL; + DirectPhoto* _tmp1_ = NULL; + PhotoID photo_id = {0}; + PhotoID _tmp2_ = {0}; + PhotoID _tmp3_ = {0}; + gint64 _tmp4_ = 0LL; +#line 197 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DATA_SOURCE (source), 0LL); +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = source; +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_PHOTO, DirectPhoto)); +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo = _tmp1_; +#line 199 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_get_photo_id (G_TYPE_CHECK_INSTANCE_CAST (photo, TYPE_PHOTO, Photo), &_tmp2_); +#line 199 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_id = _tmp2_; +#line 201 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = photo_id; +#line 201 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = _tmp3_.id; +#line 201 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = _tmp4_; +#line 201 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (photo); +#line 201 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2048 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_real_notify_items_added (DataCollection* base, GeeIterable* added) { + DirectPhotoSourceCollection * self; + GeeIterable* _tmp16_ = NULL; +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection); +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (GEE_IS_ITERABLE (added)); +#line 2059 "DirectPhoto.c" + { + GeeIterator* _object_it = NULL; + GeeIterable* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = added; +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = gee_iterable_iterator (_tmp0_); +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _object_it = _tmp1_; +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + while (TRUE) { +#line 2072 "DirectPhoto.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataObject* object = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DirectPhoto* photo = NULL; + DataObject* _tmp6_ = NULL; + DirectPhoto* _tmp7_ = NULL; + GFile* file = NULL; + DirectPhoto* _tmp8_ = NULL; + GFile* _tmp9_ = NULL; + GeeHashMap* _tmp10_ = NULL; + GFile* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + GeeHashMap* _tmp13_ = NULL; + GFile* _tmp14_ = NULL; + DirectPhoto* _tmp15_ = NULL; +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = _object_it; +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = gee_iterator_next (_tmp2_); +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (!_tmp3_) { +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + break; +#line 2098 "DirectPhoto.c" + } +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = _object_it; +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = gee_iterator_get (_tmp4_); +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + object = (DataObject*) _tmp5_; +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = object; +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DIRECT_PHOTO, DirectPhoto)); +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo = _tmp7_; +#line 207 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = photo; +#line 207 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp9_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 207 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + file = _tmp9_; +#line 209 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp10_ = self->priv->file_map; +#line 209 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp11_ = file; +#line 209 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp12_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp11_); +#line 209 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _vala_assert (!_tmp12_, "!file_map.has_key(file)"); +#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp13_ = self->priv->file_map; +#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp14_ = file; +#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp15_ = photo; +#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_, _tmp15_); +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (file); +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (photo); +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (object); +#line 2140 "DirectPhoto.c" + } +#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_object_it); +#line 2144 "DirectPhoto.c" + } +#line 214 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp16_ = added; +#line 214 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + DATA_COLLECTION_CLASS (direct_photo_source_collection_parent_class)->notify_items_added (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), TYPE_DATA_COLLECTION, DataCollection), _tmp16_); +#line 2150 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_real_notify_items_removed (DataCollection* base, GeeIterable* removed) { + DirectPhotoSourceCollection * self; + GeeIterable* _tmp14_ = NULL; +#line 217 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection); +#line 217 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (GEE_IS_ITERABLE (removed)); +#line 2161 "DirectPhoto.c" + { + GeeIterator* _object_it = NULL; + GeeIterable* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = removed; +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = gee_iterable_iterator (_tmp0_); +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _object_it = _tmp1_; +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + while (TRUE) { +#line 2174 "DirectPhoto.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataObject* object = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DirectPhoto* photo = NULL; + DataObject* _tmp6_ = NULL; + DirectPhoto* _tmp7_ = NULL; + GFile* file = NULL; + DirectPhoto* _tmp8_ = NULL; + GFile* _tmp9_ = NULL; + gboolean is_removed = FALSE; + GeeHashMap* _tmp10_ = NULL; + GFile* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + gboolean _tmp13_ = FALSE; +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = _object_it; +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = gee_iterator_next (_tmp2_); +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (!_tmp3_) { +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + break; +#line 2199 "DirectPhoto.c" + } +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = _object_it; +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = gee_iterator_get (_tmp4_); +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + object = (DataObject*) _tmp5_; +#line 219 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = object; +#line 219 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DIRECT_PHOTO, DirectPhoto)); +#line 219 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo = _tmp7_; +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = photo; +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp9_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + file = _tmp9_; +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp10_ = self->priv->file_map; +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp11_ = file; +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp12_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp11_, NULL); +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + is_removed = _tmp12_; +#line 223 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp13_ = is_removed; +#line 223 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _vala_assert (_tmp13_, "is_removed"); +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (file); +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (photo); +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (object); +#line 2237 "DirectPhoto.c" + } +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_object_it); +#line 2241 "DirectPhoto.c" + } +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp14_ = removed; +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + DATA_COLLECTION_CLASS (direct_photo_source_collection_parent_class)->notify_items_removed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), TYPE_DATA_COLLECTION, DataCollection), _tmp14_); +#line 2247 "DirectPhoto.c" +} + + +gboolean direct_photo_source_collection_has_source_for_file (DirectPhotoSourceCollection* self, GFile* file) { + gboolean result = FALSE; + GeeHashMap* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self), FALSE); +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (G_IS_FILE (file), FALSE); +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->file_map; +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = file; +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = _tmp2_; +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2270 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_on_file_discovered (DirectPhotoSourceCollection* self, GFile* file, GFileInfo* info) { + GFile* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + GFile* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DirectPhoto* photo = NULL; + gchar* reason = NULL; + GFile* _tmp4_ = NULL; + DirectPhoto* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + GeeCollection* _tmp9_ = NULL; + DirectPhoto* _tmp10_ = NULL; + GeeCollection* _tmp11_ = NULL; + gint _tmp12_ = 0; + gint _tmp13_ = 0; +#line 233 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self)); +#line 233 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (G_IS_FILE (file)); +#line 233 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (G_IS_FILE_INFO (info)); +#line 235 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = file; +#line 235 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = direct_photo_source_collection_has_source_for_file (self, _tmp0_); +#line 235 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp1_) { +#line 236 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return; +#line 2304 "DirectPhoto.c" + } +#line 239 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = file; +#line 239 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = photo_file_format_is_file_supported (_tmp2_); +#line 239 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (!_tmp3_) { +#line 240 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return; +#line 2314 "DirectPhoto.c" + } +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = file; +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = direct_photo_source_collection_fetch (self, _tmp4_, &_tmp5_, FALSE); +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (photo); +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo = _tmp5_; +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reason = _tmp6_; +#line 244 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = reason; +#line 244 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp7_ != NULL) { +#line 2330 "DirectPhoto.c" + const gchar* _tmp8_ = NULL; +#line 245 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = reason; +#line 245 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_warning ("DirectPhoto.vala:245: Error fetching file: %s", _tmp8_); +#line 2336 "DirectPhoto.c" + } +#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp9_ = self->priv->prepared_photos; +#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp10_ = photo; +#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + gee_collection_add (_tmp9_, _tmp10_); +#line 247 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp11_ = self->priv->prepared_photos; +#line 247 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp12_ = gee_collection_get_size (_tmp11_); +#line 247 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp13_ = _tmp12_; +#line 247 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp13_ >= DIRECT_PHOTO_SOURCE_COLLECTION_DISCOVERED_FILES_BATCH_ADD) { +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_source_collection_flush_prepared_photos (self); +#line 2354 "DirectPhoto.c" + } +#line 233 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (reason); +#line 233 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (photo); +#line 2360 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_on_discovery_completed (DirectPhotoSourceCollection* self) { +#line 251 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self)); +#line 252 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_source_collection_flush_prepared_photos (self); +#line 2369 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_flush_prepared_photos (DirectPhotoSourceCollection* self) { + GeeCollection* _tmp0_ = NULL; + GeeCollection* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; +#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self)); +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->prepared_photos; +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp0_, NULL, NULL); +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = _tmp1_; +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp2_); +#line 257 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = self->priv->prepared_photos; +#line 257 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + gee_collection_clear (_tmp3_); +#line 2392 "DirectPhoto.c" +} + + +gboolean direct_photo_source_collection_has_file (DirectPhotoSourceCollection* self, GFile* file) { + gboolean result = FALSE; + GeeHashMap* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 260 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self), FALSE); +#line 260 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (G_IS_FILE (file), FALSE); +#line 261 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->file_map; +#line 261 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = file; +#line 261 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 261 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = _tmp2_; +#line 261 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2415 "DirectPhoto.c" +} + + +void direct_photo_source_collection_reimport_photo (DirectPhotoSourceCollection* self, DirectPhoto* photo) { + DirectPhoto* _tmp0_ = NULL; + DirectPhoto* reimported_photo = NULL; + DirectPhoto* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; + GFile* _tmp3_ = NULL; + DirectPhoto* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 264 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self)); +#line 264 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_if_fail (IS_DIRECT_PHOTO (photo)); +#line 265 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = photo; +#line 265 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_discard_prefetched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo)); +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = photo; +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = _tmp2_; +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = direct_photo_source_collection_fetch (self, _tmp3_, &_tmp4_, TRUE); +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (reimported_photo); +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reimported_photo = _tmp4_; +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = _tmp5_; +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (_tmp6_); +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_tmp3_); +#line 264 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (reimported_photo); +#line 2456 "DirectPhoto.c" +} + + +gchar* direct_photo_source_collection_fetch (DirectPhotoSourceCollection* self, GFile* file, DirectPhoto** photo, gboolean reimport) { + DirectPhoto* _vala_photo = NULL; + gchar* result = NULL; + GeeHashMap* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + gpointer _tmp2_ = NULL; + DirectPhoto* _tmp3_ = NULL; + ImportResult _result_ = 0; + GFile* _tmp25_ = NULL; + DirectPhoto* _tmp26_ = NULL; + ImportResult _tmp27_ = 0; + gchar* _tmp28_ = NULL; + ImportResult _tmp29_ = 0; + GError * _inner_error_ = NULL; +#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self), NULL); +#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (G_IS_FILE (file), NULL); +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->file_map; +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = file; +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_vala_photo); +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _vala_photo = (DirectPhoto*) _tmp2_; +#line 274 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp3_ = _vala_photo; +#line 274 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp3_ != NULL) { +#line 2492 "DirectPhoto.c" + gchar* reason = NULL; + gboolean _tmp4_ = FALSE; +#line 275 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reason = NULL; +#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp4_ = reimport; +#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp4_) { +#line 2501 "DirectPhoto.c" + { + Orientation ori_tmp = 0; + gboolean should_restore_ori = FALSE; + gboolean _tmp5_ = FALSE; + DirectPhoto* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + PhotoReimportMasterState* reimport_state = NULL; + gboolean _tmp12_ = FALSE; + DirectPhoto* _tmp13_ = NULL; + PhotoReimportMasterState* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; +#line 279 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ori_tmp = ORIENTATION_TOP_LEFT; +#line 280 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + should_restore_ori = FALSE; +#line 282 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp6_ = _vala_photo; +#line 282 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp7_ = photo_only_metadata_changed (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_PHOTO, Photo)); +#line 282 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp7_) { +#line 282 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = TRUE; +#line 2525 "DirectPhoto.c" + } else { + DirectPhoto* _tmp8_ = NULL; + PhotoFileFormat _tmp9_ = 0; +#line 283 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp8_ = _vala_photo; +#line 283 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp9_ = photo_get_file_format (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PHOTO, Photo)); +#line 283 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp5_ = _tmp9_ == PHOTO_FILE_FORMAT_JFIF; +#line 2535 "DirectPhoto.c" + } +#line 282 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp5_) { +#line 2539 "DirectPhoto.c" + DirectPhoto* _tmp10_ = NULL; + Orientation _tmp11_ = 0; +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp10_ = _vala_photo; +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp11_ = photo_get_orientation (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_PHOTO, Photo)); +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ori_tmp = _tmp11_; +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + should_restore_ori = TRUE; +#line 2550 "DirectPhoto.c" + } +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp13_ = _vala_photo; +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp15_ = photo_prepare_for_reimport_master (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_PHOTO, Photo), &_tmp14_, &_inner_error_); +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reimport_state = _tmp14_; +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp12_ = _tmp15_; +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 2566 "DirectPhoto.c" + goto __catch44_g_error; + } +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp12_) { +#line 2571 "DirectPhoto.c" + DirectPhoto* _tmp16_ = NULL; + PhotoReimportMasterState* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; +#line 290 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp16_ = _vala_photo; +#line 290 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp17_ = reimport_state; +#line 290 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + photo_finish_reimport_master (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_PHOTO, Photo), _tmp17_, &_inner_error_); +#line 290 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 290 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 2585 "DirectPhoto.c" + goto __catch44_g_error; + } +#line 291 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp18_ = should_restore_ori; +#line 291 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp18_) { +#line 2592 "DirectPhoto.c" + DirectPhoto* _tmp19_ = NULL; + Orientation _tmp20_ = 0; +#line 292 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp19_ = _vala_photo; +#line 292 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp20_ = ori_tmp; +#line 292 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_fixup_orientation_after_reimport (_tmp19_, _tmp20_); +#line 2601 "DirectPhoto.c" + } + } else { + gchar* _tmp21_ = NULL; +#line 296 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp21_ = import_result_to_string (IMPORT_RESULT_FILE_ERROR); +#line 296 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (reason); +#line 296 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reason = _tmp21_; +#line 2611 "DirectPhoto.c" + } +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _photo_reimport_master_state_unref0 (reimport_state); +#line 2615 "DirectPhoto.c" + } + goto __finally44; + __catch44_g_error: + { + GError* err = NULL; + GError* _tmp22_ = NULL; + const gchar* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + err = _inner_error_; +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _inner_error_ = NULL; +#line 299 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp22_ = err; +#line 299 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp23_ = _tmp22_->message; +#line 299 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp24_ = g_strdup (_tmp23_); +#line 299 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (reason); +#line 299 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + reason = _tmp24_; +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_error_free0 (err); +#line 2640 "DirectPhoto.c" + } + __finally44: +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (reason); +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.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 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_clear_error (&_inner_error_); +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return NULL; +#line 2653 "DirectPhoto.c" + } + } +#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = reason; +#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (photo) { +#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + *photo = _vala_photo; +#line 2662 "DirectPhoto.c" + } else { +#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_vala_photo); +#line 2666 "DirectPhoto.c" + } +#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2670 "DirectPhoto.c" + } +#line 308 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp25_ = file; +#line 308 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp27_ = direct_photo_internal_import (_tmp25_, &_tmp26_); +#line 308 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_vala_photo); +#line 308 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _vala_photo = _tmp26_; +#line 308 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _result_ = _tmp27_; +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp29_ = _result_; +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (_tmp29_ == IMPORT_RESULT_SUCCESS) { +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (_tmp28_); +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp28_ = NULL; +#line 2690 "DirectPhoto.c" + } else { + ImportResult _tmp30_ = 0; + gchar* _tmp31_ = NULL; +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp30_ = _result_; +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp31_ = import_result_to_string (_tmp30_); +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_free0 (_tmp28_); +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp28_ = _tmp31_; +#line 2702 "DirectPhoto.c" + } +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = _tmp28_; +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + if (photo) { +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + *photo = _vala_photo; +#line 2710 "DirectPhoto.c" + } else { +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (_vala_photo); +#line 2714 "DirectPhoto.c" + } +#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2718 "DirectPhoto.c" +} + + +gboolean direct_photo_source_collection_has_file_source (DirectPhotoSourceCollection* self, GFile* file) { + gboolean result = FALSE; + GeeHashMap* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self), FALSE); +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (G_IS_FILE (file), FALSE); +#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->file_map; +#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = file; +#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = _tmp2_; +#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2741 "DirectPhoto.c" +} + + +DirectPhoto* direct_photo_source_collection_get_file_source (DirectPhotoSourceCollection* self, GFile* file) { + DirectPhoto* result = NULL; + GeeHashMap* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + gpointer _tmp2_ = NULL; +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_SOURCE_COLLECTION (self), NULL); +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_return_val_if_fail (G_IS_FILE (file), NULL); +#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = self->priv->file_map; +#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = file; +#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + result = (DirectPhoto*) _tmp2_; +#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + return result; +#line 2764 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_class_init (DirectPhotoSourceCollectionClass * klass) { +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + direct_photo_source_collection_parent_class = g_type_class_peek_parent (klass); +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((DataCollectionClass *) klass)->finalize = direct_photo_source_collection_finalize; +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + g_type_class_add_private (klass, sizeof (DirectPhotoSourceCollectionPrivate)); +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((SourceCollectionClass *) klass)->holds_type_of_source = direct_photo_source_collection_real_holds_type_of_source; +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((DataCollectionClass *) klass)->notify_items_added = direct_photo_source_collection_real_notify_items_added; +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + ((DataCollectionClass *) klass)->notify_items_removed = direct_photo_source_collection_real_notify_items_removed; +#line 2781 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_instance_init (DirectPhotoSourceCollection * self) { + GeeArrayList* _tmp0_ = NULL; + GeeHashMap* _tmp1_ = NULL; +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv = DIRECT_PHOTO_SOURCE_COLLECTION_GET_PRIVATE (self); +#line 177 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp0_ = gee_array_list_new (TYPE_DIRECT_PHOTO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); +#line 177 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->prepared_photos = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _tmp1_ = gee_hash_map_new (G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, TYPE_DIRECT_PHOTO, (GBoxedCopyFunc) g_object_ref, g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL); +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self->priv->file_map = _tmp1_; +#line 2798 "DirectPhoto.c" +} + + +static void direct_photo_source_collection_finalize (DataCollection* obj) { + DirectPhotoSourceCollection * self; +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection); +#line 177 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->prepared_photos); +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->file_map); +#line 180 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + _g_object_unref0 (self->priv->monitor); +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhoto.vala" + DATA_COLLECTION_CLASS (direct_photo_source_collection_parent_class)->finalize (obj); +#line 2814 "DirectPhoto.c" +} + + +GType direct_photo_source_collection_get_type (void) { + static volatile gsize direct_photo_source_collection_type_id__volatile = 0; + if (g_once_init_enter (&direct_photo_source_collection_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectPhotoSourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_photo_source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectPhotoSourceCollection), 0, (GInstanceInitFunc) direct_photo_source_collection_instance_init, NULL }; + GType direct_photo_source_collection_type_id; + direct_photo_source_collection_type_id = g_type_register_static (TYPE_DATABASE_SOURCE_COLLECTION, "DirectPhotoSourceCollection", &g_define_type_info, 0); + g_once_init_leave (&direct_photo_source_collection_type_id__volatile, direct_photo_source_collection_type_id); + } + return direct_photo_source_collection_type_id__volatile; +} + + + diff --git a/src/direct/DirectPhotoPage.c b/src/direct/DirectPhotoPage.c new file mode 100644 index 0000000..c9094a2 --- /dev/null +++ b/src/direct/DirectPhotoPage.c @@ -0,0 +1,5294 @@ +/* DirectPhotoPage.c generated by valac 0.32.1, the Vala compiler + * generated from DirectPhotoPage.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 <glib.h> +#include <glib-object.h> +#include <gtk/gtk.h> +#include <stdlib.h> +#include <string.h> +#include <gee.h> +#include <gdk/gdk.h> +#include <cairo.h> +#include <gdk-pixbuf/gdk-pixbuf.h> +#include <gio/gio.h> +#include <glib/gi18n-lib.h> +#include <glib/gstdio.h> +#include <float.h> +#include <math.h> + + +#define TYPE_PAGE (page_get_type ()) +#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) +#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) +#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) +#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) +#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) + +typedef struct _Page Page; +typedef struct _PageClass PageClass; +typedef struct _PagePrivate PagePrivate; + +#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_FULLSCREEN_WINDOW (fullscreen_window_get_type ()) +#define FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindow)) +#define FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) +#define IS_FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FULLSCREEN_WINDOW)) +#define IS_FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FULLSCREEN_WINDOW)) +#define FULLSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) + +typedef struct _FullscreenWindow FullscreenWindow; +typedef struct _FullscreenWindowClass FullscreenWindowClass; + +#define TYPE_INJECTION_GROUP (injection_group_get_type ()) +#define INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INJECTION_GROUP, InjectionGroup)) +#define INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INJECTION_GROUP, InjectionGroupClass)) +#define IS_INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INJECTION_GROUP)) +#define IS_INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INJECTION_GROUP)) +#define INJECTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INJECTION_GROUP, InjectionGroupClass)) + +typedef struct _InjectionGroup InjectionGroup; +typedef struct _InjectionGroupClass InjectionGroupClass; + +#define TYPE_SINGLE_PHOTO_PAGE (single_photo_page_get_type ()) +#define SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)) +#define SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass)) +#define IS_SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_PAGE)) +#define IS_SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_PAGE)) +#define SINGLE_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass)) + +typedef struct _SinglePhotoPage SinglePhotoPage; +typedef struct _SinglePhotoPageClass SinglePhotoPageClass; +typedef struct _SinglePhotoPagePrivate SinglePhotoPagePrivate; + +#define TYPE_ZOOM_BUFFER (zoom_buffer_get_type ()) +#define ZOOM_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZOOM_BUFFER, ZoomBuffer)) +#define ZOOM_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZOOM_BUFFER, ZoomBufferClass)) +#define IS_ZOOM_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZOOM_BUFFER)) +#define IS_ZOOM_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZOOM_BUFFER)) +#define ZOOM_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZOOM_BUFFER, ZoomBufferClass)) + +typedef struct _ZoomBuffer ZoomBuffer; +typedef struct _ZoomBufferClass ZoomBufferClass; + +#define TYPE_DIMENSIONS (dimensions_get_type ()) +typedef struct _Dimensions Dimensions; + +#define SINGLE_PHOTO_PAGE_TYPE_UPDATE_REASON (single_photo_page_update_reason_get_type ()) + +#define TYPE_EDITING_HOST_PAGE (editing_host_page_get_type ()) +#define EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPage)) +#define EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDITING_HOST_PAGE, EditingHostPageClass)) +#define IS_EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDITING_HOST_PAGE)) +#define IS_EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDITING_HOST_PAGE)) +#define EDITING_HOST_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPageClass)) + +typedef struct _EditingHostPage EditingHostPage; +typedef struct _EditingHostPageClass EditingHostPageClass; +typedef struct _EditingHostPagePrivate EditingHostPagePrivate; + +#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_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 TYPE_DATA_VIEW (data_view_get_type ()) +#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) +#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) +#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) +#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) +#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) + +typedef struct _DataView DataView; +typedef struct _DataViewClass DataViewClass; + +#define TYPE_DIRECT_PHOTO_PAGE (direct_photo_page_get_type ()) +#define DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage)) +#define DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass)) +#define IS_DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_PAGE)) +#define IS_DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_PAGE)) +#define DIRECT_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass)) + +typedef struct _DirectPhotoPage DirectPhotoPage; +typedef struct _DirectPhotoPageClass DirectPhotoPageClass; +typedef struct _DirectPhotoPagePrivate DirectPhotoPagePrivate; + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; + +#define TYPE_VIEW_COLLECTION (view_collection_get_type ()) +#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection)) +#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass)) +#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION)) +#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION)) +#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass)) + +typedef struct _ViewCollection ViewCollection; +typedef struct _ViewCollectionClass ViewCollectionClass; + +#define TYPE_DIRECT_VIEW_COLLECTION (direct_view_collection_get_type ()) +#define DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollection)) +#define DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass)) +#define IS_DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW_COLLECTION)) +#define IS_DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW_COLLECTION)) +#define DIRECT_VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass)) + +typedef struct _DirectViewCollection DirectViewCollection; +typedef struct _DirectViewCollectionClass DirectViewCollectionClass; + +#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) +#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) +#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) +#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) +#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) +#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) + +typedef struct _SourceCollection SourceCollection; +typedef struct _SourceCollectionClass SourceCollectionClass; + +#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) +#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) +#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) +#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) +#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) +#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) + +typedef struct _DatabaseSourceCollection DatabaseSourceCollection; +typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; + +#define TYPE_DIRECT_PHOTO_SOURCE_COLLECTION (direct_photo_source_collection_get_type ()) +#define DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection)) +#define DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass)) +#define IS_DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION)) +#define IS_DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION)) +#define DIRECT_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass)) + +typedef struct _DirectPhotoSourceCollection DirectPhotoSourceCollection; +typedef struct _DirectPhotoSourceCollectionClass DirectPhotoSourceCollectionClass; + +#define TYPE_ALTERATION (alteration_get_type ()) +#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) +#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) +#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) +#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) +#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) + +typedef struct _Alteration Alteration; +typedef struct _AlterationClass AlterationClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define TYPE_APPLICATION (application_get_type ()) +#define APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APPLICATION, Application)) +#define APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APPLICATION, ApplicationClass)) +#define IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APPLICATION)) +#define IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APPLICATION)) +#define APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APPLICATION, ApplicationClass)) + +typedef struct _Application Application; +typedef struct _ApplicationClass ApplicationClass; +#define _application_unref0(var) ((var == NULL) ? NULL : (var = (application_unref (var), NULL))) +#define _injection_group_unref0(var) ((var == NULL) ? NULL : (var = (injection_group_unref (var), NULL))) + +#define TYPE_DIRECT_PHOTO (direct_photo_get_type ()) +#define DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO, DirectPhoto)) +#define DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO, DirectPhotoClass)) +#define IS_DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO)) +#define IS_DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO)) +#define DIRECT_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO, DirectPhotoClass)) + +typedef struct _DirectPhoto DirectPhoto; +typedef struct _DirectPhotoClass DirectPhotoClass; + +#define TYPE_IMPORT_RESULT (import_result_get_type ()) + +#define TYPE_ZOOM_STATE (zoom_state_get_type ()) +typedef struct _ZoomState ZoomState; + +#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ()) + +#define TYPE_COMMAND_MANAGER (command_manager_get_type ()) +#define COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_MANAGER, CommandManager)) +#define COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND_MANAGER, CommandManagerClass)) +#define IS_COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_MANAGER)) +#define IS_COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND_MANAGER)) +#define COMMAND_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND_MANAGER, CommandManagerClass)) + +typedef struct _CommandManager CommandManager; +typedef struct _CommandManagerClass CommandManagerClass; +#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL))) + +#define TYPE_SCALING (scaling_get_type ()) + +#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ()) +typedef struct _Scaling Scaling; + +#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ()) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) + +#define TYPE_DIRECT_VIEW (direct_view_get_type ()) +#define DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW, DirectView)) +#define DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW, DirectViewClass)) +#define IS_DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW)) +#define IS_DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW)) +#define DIRECT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW, DirectViewClass)) + +typedef struct _DirectView DirectView; +typedef struct _DirectViewClass DirectViewClass; + +#define TYPE_EXPORT_DIALOG (export_dialog_get_type ()) +#define EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORT_DIALOG, ExportDialog)) +#define EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORT_DIALOG, ExportDialogClass)) +#define IS_EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORT_DIALOG)) +#define IS_EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORT_DIALOG)) +#define EXPORT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORT_DIALOG, ExportDialogClass)) + +typedef struct _ExportDialog ExportDialog; +typedef struct _ExportDialogClass ExportDialogClass; + +#define TYPE_EXPORT_FORMAT_PARAMETERS (export_format_parameters_get_type ()) + +#define TYPE_EXPORT_FORMAT_MODE (export_format_mode_get_type ()) +typedef struct _ExportFormatParameters ExportFormatParameters; + +#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ()) +#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties)) +#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass)) +#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES)) +#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES)) +#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass)) + +typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties; +typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass; +#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL))) + +#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; + +#define TYPE_PRINT_MANAGER (print_manager_get_type ()) +#define PRINT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PRINT_MANAGER, PrintManager)) +#define PRINT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PRINT_MANAGER, PrintManagerClass)) +#define IS_PRINT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PRINT_MANAGER)) +#define IS_PRINT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PRINT_MANAGER)) +#define PRINT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PRINT_MANAGER, PrintManagerClass)) + +typedef struct _PrintManager PrintManager; +typedef struct _PrintManagerClass PrintManagerClass; +#define _print_manager_unref0(var) ((var == NULL) ? NULL : (var = (print_manager_unref (var), NULL))) +typedef struct _Block6Data Block6Data; + +#define TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE (direct_fullscreen_photo_page_get_type ()) +#define DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPage)) +#define DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass)) +#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE)) +#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE)) +#define DIRECT_FULLSCREEN_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass)) + +typedef struct _DirectFullscreenPhotoPage DirectFullscreenPhotoPage; +typedef struct _DirectFullscreenPhotoPageClass DirectFullscreenPhotoPageClass; +typedef struct _DirectFullscreenPhotoPagePrivate DirectFullscreenPhotoPagePrivate; + +struct _Page { + GtkScrolledWindow parent_instance; + PagePrivate * priv; + GtkUIManager* ui; + GtkToolbar* toolbar; + gboolean in_view; +}; + +struct _PageClass { + GtkScrolledWindowClass parent_class; + void (*set_page_name) (Page* self, const gchar* page_name); + void (*set_container) (Page* self, GtkWindow* container); + void (*clear_container) (Page* self); + GtkMenuBar* (*get_menubar) (Page* self); + GtkWidget* (*get_page_ui_widget) (Page* self, const gchar* path); + GtkToolbar* (*get_toolbar) (Page* self); + GtkMenu* (*get_page_context_menu) (Page* self); + void (*switching_from) (Page* self); + void (*switched_to) (Page* self); + void (*ready) (Page* self); + void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw); + void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw); + void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames); + GtkActionEntry* (*init_collect_action_entries) (Page* self, int* result_length1); + GtkToggleActionEntry* (*init_collect_toggle_action_entries) (Page* self, int* result_length1); + void (*register_radio_actions) (Page* self, GtkActionGroup* action_group); + InjectionGroup** (*init_collect_injection_groups) (Page* self, int* result_length1); + void (*init_actions) (Page* self, gint selected_count, gint count); + void (*update_actions) (Page* self, gint selected_count, gint count); + gboolean (*source_drag_failed) (Page* self, GdkDragContext* context, GtkDragResult drag_result); + gboolean (*on_left_click) (Page* self, GdkEventButton* event); + gboolean (*on_middle_click) (Page* self, GdkEventButton* event); + gboolean (*on_right_click) (Page* self, GdkEventButton* event); + gboolean (*on_left_released) (Page* self, GdkEventButton* event); + gboolean (*on_middle_released) (Page* self, GdkEventButton* event); + gboolean (*on_right_released) (Page* self, GdkEventButton* event); + gboolean (*on_ctrl_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_ctrl_released) (Page* self, GdkEventKey* event); + gboolean (*on_alt_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_alt_released) (Page* self, GdkEventKey* event); + gboolean (*on_shift_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_shift_released) (Page* self, GdkEventKey* event); + gboolean (*on_super_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_super_released) (Page* self, GdkEventKey* event); + gboolean (*on_app_key_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_app_key_released) (Page* self, GdkEventKey* event); + void (*on_move) (Page* self, GdkRectangle* rect); + void (*on_move_start) (Page* self, GdkRectangle* rect); + void (*on_move_finished) (Page* self, GdkRectangle* rect); + void (*on_resize) (Page* self, GdkRectangle* rect); + void (*on_resize_start) (Page* self, GdkRectangle* rect); + void (*on_resize_finished) (Page* self, GdkRectangle* rect); + gboolean (*on_configure) (Page* self, GdkEventConfigure* event, GdkRectangle* rect); + gboolean (*on_motion) (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask); + gboolean (*on_leave_notify_event) (Page* self); + gboolean (*on_mousewheel_up) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_down) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_left) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_right) (Page* self, GdkEventScroll* event); + gboolean (*on_context_keypress) (Page* self); + gboolean (*on_context_buttonpress) (Page* self, GdkEventButton* event); + gboolean (*on_context_invoked) (Page* self); + void (*set_page_cursor) (Page* self, GdkCursorType cursor_type); +}; + +struct _Dimensions { + gint width; + gint height; +}; + +typedef enum { + SINGLE_PHOTO_PAGE_UPDATE_REASON_NEW_PIXBUF, + SINGLE_PHOTO_PAGE_UPDATE_REASON_QUALITY_IMPROVEMENT, + SINGLE_PHOTO_PAGE_UPDATE_REASON_RESIZED_CANVAS +} SinglePhotoPageUpdateReason; + +struct _SinglePhotoPage { + Page parent_instance; + SinglePhotoPagePrivate * priv; + GtkDrawingArea* canvas; + GtkViewport* viewport; +}; + +struct _SinglePhotoPageClass { + PageClass parent_class; + gboolean (*is_zoom_supported) (SinglePhotoPage* self); + void (*cancel_zoom) (SinglePhotoPage* self); + void (*save_zoom_state) (SinglePhotoPage* self); + void (*restore_zoom_state) (SinglePhotoPage* self); + ZoomBuffer* (*get_zoom_buffer) (SinglePhotoPage* self); + void (*new_surface) (SinglePhotoPage* self, cairo_t* ctx, Dimensions* ctx_dim); + void (*updated_pixbuf) (SinglePhotoPage* self, GdkPixbuf* pixbuf, SinglePhotoPageUpdateReason reason, Dimensions* old_dim); + void (*paint) (SinglePhotoPage* self, cairo_t* ctx, Dimensions* ctx_dim); + void (*on_previous_photo) (SinglePhotoPage* self); + void (*on_next_photo) (SinglePhotoPage* self); +}; + +struct _EditingHostPage { + SinglePhotoPage parent_instance; + EditingHostPagePrivate * priv; +}; + +struct _EditingHostPageClass { + SinglePhotoPageClass parent_class; + gboolean (*on_zoom_slider_key_press) (EditingHostPage* self, GdkEventKey* event); + void (*on_increase_size) (EditingHostPage* self); + void (*on_decrease_size) (EditingHostPage* self); + void (*photo_changing) (EditingHostPage* self, Photo* new_photo); + DataView* (*create_photo_view) (EditingHostPage* self, DataSource* source); + void (*update_ui) (EditingHostPage* self, gboolean missing); + void (*notify_photo_backing_missing) (EditingHostPage* self, Photo* photo, gboolean missing); + gboolean (*confirm_replace_photo) (EditingHostPage* self, Photo* old_photo, Photo* new_photo); + gboolean (*on_double_click) (EditingHostPage* self, GdkEventButton* event); + GdkPixbuf* (*get_bottom_left_trinket) (EditingHostPage* self, gint scale); + GdkPixbuf* (*get_top_left_trinket) (EditingHostPage* self, gint scale); + GdkPixbuf* (*get_top_right_trinket) (EditingHostPage* self, gint scale); + GdkPixbuf* (*get_bottom_right_trinket) (EditingHostPage* self, gint scale); +}; + +struct _DirectPhotoPage { + EditingHostPage parent_instance; + DirectPhotoPagePrivate * priv; +}; + +struct _DirectPhotoPageClass { + EditingHostPageClass parent_class; +}; + +struct _DirectPhotoPagePrivate { + GFile* initial_file; + DirectViewCollection* view_controller; + GFile* current_save_dir; + gboolean drop_if_dirty; +}; + +typedef enum { + IMPORT_RESULT_SUCCESS, + IMPORT_RESULT_FILE_ERROR, + IMPORT_RESULT_DECODE_ERROR, + IMPORT_RESULT_DATABASE_ERROR, + IMPORT_RESULT_USER_ABORT, + IMPORT_RESULT_NOT_A_FILE, + IMPORT_RESULT_PHOTO_EXISTS, + IMPORT_RESULT_UNSUPPORTED_FORMAT, + IMPORT_RESULT_NOT_AN_IMAGE, + IMPORT_RESULT_DISK_FAILURE, + IMPORT_RESULT_DISK_FULL, + IMPORT_RESULT_CAMERA_ERROR, + IMPORT_RESULT_FILE_WRITE_ERROR, + IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE +} ImportResult; + +struct _ZoomState { + Dimensions content_dimensions; + Dimensions viewport_dimensions; + gdouble zoom_factor; + gdouble interpolation_factor; + gdouble min_factor; + gdouble max_factor; + GdkPoint viewport_center; +}; + +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 { + SCALE_CONSTRAINT_ORIGINAL, + SCALE_CONSTRAINT_DIMENSIONS, + SCALE_CONSTRAINT_WIDTH, + SCALE_CONSTRAINT_HEIGHT, + SCALE_CONSTRAINT_FILL_VIEWPORT +} ScaleConstraint; + +struct _Scaling { + ScaleConstraint constraint; + gint scale; + Dimensions viewport; + gboolean scale_up; +}; + +typedef enum { + JPEG_QUALITY_LOW = 50, + JPEG_QUALITY_MEDIUM = 75, + JPEG_QUALITY_HIGH = 90, + JPEG_QUALITY_MAXIMUM = 100 +} JpegQuality; + +typedef enum { + EXPORT_FORMAT_MODE_UNMODIFIED, + EXPORT_FORMAT_MODE_CURRENT, + EXPORT_FORMAT_MODE_SPECIFIED, + EXPORT_FORMAT_MODE_LAST +} ExportFormatMode; + +struct _ExportFormatParameters { + ExportFormatMode mode; + PhotoFileFormat specified_format; + JpegQuality quality; + gboolean export_metadata; +}; + +struct _Block6Data { + int _ref_count_; + DirectPhotoPage* self; + gboolean should_allow_rotation; +}; + +struct _DirectFullscreenPhotoPage { + DirectPhotoPage parent_instance; + DirectFullscreenPhotoPagePrivate * priv; +}; + +struct _DirectFullscreenPhotoPageClass { + DirectPhotoPageClass parent_class; +}; + + +static gpointer direct_photo_page_parent_class = NULL; +extern DirectPhotoSourceCollection* direct_photo_global; +static gpointer direct_fullscreen_photo_page_parent_class = NULL; + +GType page_get_type (void) G_GNUC_CONST; +GType page_window_get_type (void) G_GNUC_CONST; +GType fullscreen_window_get_type (void) G_GNUC_CONST; +gpointer injection_group_ref (gpointer instance); +void injection_group_unref (gpointer instance); +GParamSpec* param_spec_injection_group (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_injection_group (GValue* value, gpointer v_object); +void value_take_injection_group (GValue* value, gpointer v_object); +gpointer value_get_injection_group (const GValue* value); +GType injection_group_get_type (void) G_GNUC_CONST; +GType single_photo_page_get_type (void) G_GNUC_CONST; +GType zoom_buffer_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); +GType single_photo_page_update_reason_get_type (void) G_GNUC_CONST; +GType editing_host_page_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 photo_source_get_type (void) G_GNUC_CONST; +GType photo_get_type (void) G_GNUC_CONST; +GType data_view_get_type (void) G_GNUC_CONST; +GType direct_photo_page_get_type (void) G_GNUC_CONST; +gpointer data_collection_ref (gpointer instance); +void data_collection_unref (gpointer instance); +GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_data_collection (GValue* value, gpointer v_object); +void value_take_data_collection (GValue* value, gpointer v_object); +gpointer value_get_data_collection (const GValue* value); +GType data_collection_get_type (void) G_GNUC_CONST; +GType view_collection_get_type (void) G_GNUC_CONST; +GType direct_view_collection_get_type (void) G_GNUC_CONST; +#define DIRECT_PHOTO_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPagePrivate)) +enum { + DIRECT_PHOTO_PAGE_DUMMY_PROPERTY +}; +GType source_collection_get_type (void) G_GNUC_CONST; +GType database_source_collection_get_type (void) G_GNUC_CONST; +GType direct_photo_source_collection_get_type (void) G_GNUC_CONST; +gpointer alteration_ref (gpointer instance); +void alteration_unref (gpointer instance); +GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_alteration (GValue* value, gpointer v_object); +void value_take_alteration (GValue* value, gpointer v_object); +gpointer value_get_alteration (const GValue* value); +GType alteration_get_type (void) G_GNUC_CONST; +static void direct_photo_page_on_photos_altered (DirectPhotoPage* self, GeeMap* map); +static void _direct_photo_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self); +DirectPhotoPage* direct_photo_page_new (GFile* file); +DirectPhotoPage* direct_photo_page_construct (GType object_type, GFile* file); +EditingHostPage* editing_host_page_construct (GType object_type, SourceCollection* sources, const gchar* name); +static gboolean direct_photo_page_check_editable_file (GFile* file); +gpointer application_ref (gpointer instance); +void application_unref (gpointer instance); +GParamSpec* param_spec_application (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_application (GValue* value, gpointer v_object); +void value_take_application (GValue* value, gpointer v_object); +gpointer value_get_application (const GValue* value); +GType application_get_type (void) G_GNUC_CONST; +Application* application_get_instance (void); +void application_panic (Application* self); +DirectViewCollection* direct_view_collection_new (void); +DirectViewCollection* direct_view_collection_construct (GType object_type); +ViewCollection* page_get_view (Page* self); +static void direct_photo_page_on_selection_group_altered (DirectPhotoPage* self); +static void _direct_photo_page_on_selection_group_altered_view_collection_selection_group_altered (ViewCollection* _sender, gpointer self); +static void direct_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames); +void page_init_collect_ui_filenames (Page* self, GeeList* ui_filenames); +static GtkActionEntry* direct_photo_page_real_init_collect_action_entries (Page* base, int* result_length1); +GtkActionEntry* page_init_collect_action_entries (Page* self, int* result_length1); +#define TRANSLATABLE "translatable" +static void _vala_array_add91 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_SAVE_LABEL _ ("_Save") +static void direct_photo_page_on_save (DirectPhotoPage* self); +static void _direct_photo_page_on_save_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add92 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_SAVE_AS_LABEL _ ("Save _As") +static void direct_photo_page_on_save_as (DirectPhotoPage* self); +static void _direct_photo_page_on_save_as_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add93 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static void direct_photo_page_on_send_to (DirectPhotoPage* self); +static void _direct_photo_page_on_send_to_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_SEND_TO_MENU _ ("Send _To...") +static void _vala_array_add94 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_PRINT_LABEL _ ("_Print") +static void direct_photo_page_on_print (DirectPhotoPage* self); +static void _direct_photo_page_on_print_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_PRINT_MENU _ ("_Print...") +static void _vala_array_add95 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static void _vala_array_add96 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static void _vala_array_add97 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static void _vala_array_add98 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_PREVIOUS_LABEL _ ("_Previous") +void single_photo_page_on_previous_photo (SinglePhotoPage* self); +static void _single_photo_page_on_previous_photo_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add99 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_NEXT_LABEL _ ("_Next") +void single_photo_page_on_next_photo (SinglePhotoPage* self); +static void _single_photo_page_on_next_photo_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add100 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_CLOCKWISE "object-rotate-right" +void editing_host_page_on_rotate_clockwise (EditingHostPage* self); +static void _editing_host_page_on_rotate_clockwise_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_ROTATE_CW_MENU _ ("Rotate _Right") +#define RESOURCES_ROTATE_CCW_TOOLTIP _ ("Rotate the photos left") +static void _vala_array_add101 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_COUNTERCLOCKWISE "object-rotate-left" +void editing_host_page_on_rotate_counterclockwise (EditingHostPage* self); +static void _editing_host_page_on_rotate_counterclockwise_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_ROTATE_CCW_MENU _ ("Rotate _Left") +static void _vala_array_add102 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_HFLIP "object-flip-horizontal" +void editing_host_page_on_flip_horizontally (EditingHostPage* self); +static void _editing_host_page_on_flip_horizontally_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_HFLIP_MENU _ ("Flip Hori_zontally") +static void _vala_array_add103 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_VFLIP "object-flip-vertical" +void editing_host_page_on_flip_vertically (EditingHostPage* self); +static void _editing_host_page_on_flip_vertically_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_VFLIP_MENU _ ("Flip Verti_cally") +static void _vala_array_add104 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_ENHANCE "shotwell-auto-enhance" +void editing_host_page_on_enhance (EditingHostPage* self); +static void _editing_host_page_on_enhance_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_ENHANCE_MENU _ ("_Enhance") +#define RESOURCES_ENHANCE_TOOLTIP _ ("Automatically improve the photo's appearance") +static void _vala_array_add105 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_CROP "shotwell-crop" +void editing_host_page_toggle_crop (EditingHostPage* self); +static void _editing_host_page_toggle_crop_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_CROP_MENU _ ("_Crop") +#define RESOURCES_CROP_TOOLTIP _ ("Crop the photo's size") +static void _vala_array_add106 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_REFRESH_LABEL _ ("_Refresh") +void editing_host_page_toggle_straighten (EditingHostPage* self); +static void _editing_host_page_toggle_straighten_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_STRAIGHTEN_MENU _ ("_Straighten") +#define RESOURCES_STRAIGHTEN_TOOLTIP _ ("Straighten the photo") +static void _vala_array_add107 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_REDEYE "shotwell-redeye" +void editing_host_page_toggle_redeye (EditingHostPage* self); +static void _editing_host_page_toggle_redeye_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_RED_EYE_MENU _ ("_Red-eye") +#define RESOURCES_RED_EYE_TOOLTIP _ ("Reduce or eliminate any red-eye effects in the photo") +static void _vala_array_add108 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_ADJUST "image-adjust" +void editing_host_page_toggle_adjust (EditingHostPage* self); +static void _editing_host_page_toggle_adjust_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_ADJUST_MENU _ ("_Adjust") +#define RESOURCES_ADJUST_TOOLTIP _ ("Adjust the photo's color and tone") +static void _vala_array_add109 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_REVERT_LABEL _ ("Revert to Original") +void editing_host_page_on_revert (EditingHostPage* self); +static void _editing_host_page_on_revert_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_REVERT_MENU _ ("Re_vert to Original") +static void _vala_array_add110 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +void editing_host_page_on_adjust_date_time (EditingHostPage* self); +static void _editing_host_page_on_adjust_date_time_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_ADJUST_DATE_TIME_MENU _ ("_Adjust Date and Time...") +static void _vala_array_add111 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +void editing_host_page_on_set_background (EditingHostPage* self); +static void _editing_host_page_on_set_background_gtk_action_callback (GtkAction* action, gpointer self); +#define RESOURCES_SET_BACKGROUND_MENU _ ("Set as _Desktop Background") +#define RESOURCES_SET_BACKGROUND_TOOLTIP _ ("Set selected image to be the new desktop background") +static void _vala_array_add112 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static void _vala_array_add113 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static void _vala_array_add114 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_ZOOM_IN_LABEL _ ("Zoom _In") +void editing_host_page_on_increase_size (EditingHostPage* self); +static void _editing_host_page_on_increase_size_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add115 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_ZOOM_OUT_LABEL _ ("Zoom _Out") +void editing_host_page_on_decrease_size (EditingHostPage* self); +static void _editing_host_page_on_decrease_size_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add116 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_ZOOM_FIT_LABEL _ ("Best _Fit") +void editing_host_page_snap_zoom_to_min (EditingHostPage* self); +static void _editing_host_page_snap_zoom_to_min_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add117 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +#define RESOURCES_ZOOM_100_LABEL _ ("_Normal Size") +void editing_host_page_snap_zoom_to_isomorphic (EditingHostPage* self); +static void _editing_host_page_snap_zoom_to_isomorphic_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add118 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +void editing_host_page_snap_zoom_to_max (EditingHostPage* self); +static void _editing_host_page_snap_zoom_to_max_gtk_action_callback (GtkAction* action, gpointer self); +static void _vala_array_add119 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value); +static InjectionGroup** direct_photo_page_real_init_collect_injection_groups (Page* base, int* result_length1); +InjectionGroup** page_init_collect_injection_groups (Page* self, int* result_length1); +InjectionGroup* injection_group_new (const gchar* path); +InjectionGroup* injection_group_construct (GType object_type, const gchar* path); +void injection_group_add_menu_item (InjectionGroup* self, const gchar* name, const gchar* action); +static void _vala_array_add120 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value); +static void _vala_array_add121 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value); +void app_window_error_message (const gchar* message, GtkWindow* parent); +gboolean photo_file_format_is_file_supported (GFile* file); +#define RESOURCES_APP_TITLE "Shotwell" +static void direct_photo_page_real_realize (GtkWidget* base); +GType direct_photo_get_type (void) G_GNUC_CONST; +DirectPhoto* direct_photo_source_collection_get_file_source (DirectPhotoSourceCollection* self, GFile* file); +void editing_host_page_display_mirror_of (EditingHostPage* self, ViewCollection* controller, Photo* starting_photo); +void app_window_panic (const gchar* msg); +static void direct_photo_page_real_photo_changing (EditingHostPage* base, Photo* new_photo); +Photo* editing_host_page_get_photo (EditingHostPage* self); +static void direct_photo_page_on_dphoto_can_rotate_changed (DirectPhotoPage* self, gboolean should_allow_rotation); +static void _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed (DirectPhoto* _sender, gboolean b, gpointer self); +GType import_result_get_type (void) G_GNUC_CONST; +ImportResult direct_photo_demand_load (DirectPhoto* self); +GFile* direct_photo_page_get_current_file (DirectPhotoPage* self); +GFile* media_source_get_file (MediaSource* self); +static gboolean direct_photo_page_real_on_context_buttonpress (Page* base, GdkEventButton* event); +gboolean page_popup_context_menu (Page* self, GtkMenu* context_menu, GdkEventButton* event); +static void direct_photo_page_update_zoom_menu_item_sensitivity (DirectPhotoPage* self); +GType zoom_state_get_type (void) G_GNUC_CONST; +ZoomState* zoom_state_dup (const ZoomState* self); +void zoom_state_free (ZoomState* self); +void single_photo_page_get_zoom_state (SinglePhotoPage* self, ZoomState* result); +gboolean zoom_state_is_max (ZoomState *self); +gboolean editing_host_page_get_photo_missing (EditingHostPage* self); +void page_set_action_sensitive (Page* self, const gchar* name, gboolean sensitive); +gboolean zoom_state_is_default (ZoomState *self); +static void direct_photo_page_real_on_increase_size (EditingHostPage* base); +static void direct_photo_page_real_on_decrease_size (EditingHostPage* base); +gboolean editing_host_page_has_photo (EditingHostPage* self); +GType photo_file_format_get_type (void) G_GNUC_CONST; +PhotoFileFormat photo_get_file_format (Photo* self); +gboolean photo_file_format_can_write (PhotoFileFormat self); +gpointer command_manager_ref (gpointer instance); +void command_manager_unref (gpointer instance); +GParamSpec* param_spec_command_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_command_manager (GValue* value, gpointer v_object); +void value_take_command_manager (GValue* value, gpointer v_object); +gpointer value_get_command_manager (const GValue* value); +GType command_manager_get_type (void) G_GNUC_CONST; +CommandManager* page_get_command_manager (Page* self); +void command_manager_reset (CommandManager* self); +static gboolean direct_photo_page_real_on_double_click (EditingHostPage* base, GdkEventButton* event); +GtkWindow* page_get_container (Page* self); +void fullscreen_window_close (FullscreenWindow* self); +gboolean editing_host_page_on_double_click (EditingHostPage* self, GdkEventButton* event); +static void direct_photo_page_real_update_ui (EditingHostPage* base, gboolean missing); +void editing_host_page_update_ui (EditingHostPage* self, gboolean missing); +static void direct_photo_page_real_update_actions (Page* base, gint selected_count, gint count); +gint data_collection_get_count (DataCollection* self); +gboolean photo_has_transformations (Photo* self); +gboolean editing_host_page_is_rotate_available (EditingHostPage* self, Photo* photo); +gboolean editing_host_page_is_enhance_available (EditingHostPage* self, Photo* photo); +GType scaling_get_type (void) G_GNUC_CONST; +GType scale_constraint_get_type (void) G_GNUC_CONST; +Scaling* scaling_dup (const Scaling* self); +void scaling_free (Scaling* self); +gboolean editing_tools_crop_tool_is_available (Photo* photo, Scaling* scaling); +void scaling_for_original (Scaling* result); +gboolean editing_tools_redeye_tool_is_available (Photo* photo, Scaling* scaling); +void page_update_actions (Page* self, gint selected_count, gint count); +static gboolean direct_photo_page_check_ok_to_close_photo (DirectPhotoPage* self, Photo* photo); +gboolean photo_has_alterations (Photo* self); +void photo_remove_all_transformations (Photo* self); +GtkResponseType app_window_negate_affirm_cancel_question (const gchar* message, const gchar* negative, const gchar* affirmative, const gchar* title, GtkWindow* parent); +gchar* media_source_get_basename (MediaSource* self); +GType jpeg_quality_get_type (void) G_GNUC_CONST; +static void direct_photo_page_save (DirectPhotoPage* self, GFile* dest, gint scale, ScaleConstraint constraint, JpegQuality quality, PhotoFileFormat format, gboolean copy_unmodified, gboolean save_metadata); +gboolean direct_photo_page_check_quit (DirectPhotoPage* self); +static gboolean direct_photo_page_real_confirm_replace_photo (EditingHostPage* base, Photo* old_photo, Photo* new_photo); +void scaling_for_constraint (ScaleConstraint constraint, gint scale, gboolean scale_up, Scaling* result); +void photo_export (Photo* self, GFile* dest_file, Scaling* scaling, JpegQuality quality, PhotoFileFormat export_format, gboolean direct_copy_unmodified, gboolean export_metadata, GError** error); +gchar* direct_photo_source_collection_fetch (DirectPhotoSourceCollection* self, GFile* file, DirectPhoto** photo, gboolean reimport); +GType direct_view_get_type (void) G_GNUC_CONST; +DirectView* direct_view_new (DirectPhoto* source); +DirectView* direct_view_construct (GType object_type, DirectPhoto* source); +gboolean data_collection_add (DataCollection* self, DataObject* object); +void direct_photo_source_collection_reimport_photo (DirectPhotoSourceCollection* self, DirectPhoto* photo); +GType export_dialog_get_type (void) G_GNUC_CONST; +ExportDialog* export_dialog_new (const gchar* title); +ExportDialog* export_dialog_construct (GType object_type, const gchar* title); +GType export_format_parameters_get_type (void) G_GNUC_CONST; +GType export_format_mode_get_type (void) G_GNUC_CONST; +ExportFormatParameters* export_format_parameters_dup (const ExportFormatParameters* self); +void export_format_parameters_free (ExportFormatParameters* self); +void export_format_parameters_last (ExportFormatParameters* result); +gboolean export_dialog_execute (ExportDialog* self, gint* scale, ScaleConstraint* constraint, ExportFormatParameters* parameters); +gchar* photo_get_export_basename_for_parameters (Photo* self, ExportFormatParameters* params); +PhotoFileFormat photo_get_export_format_for_parameters (Photo* self, ExportFormatParameters* params); +gpointer photo_file_format_properties_ref (gpointer instance); +void photo_file_format_properties_unref (gpointer instance); +GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_photo_file_format_properties (GValue* value, gpointer v_object); +void value_take_photo_file_format_properties (GValue* value, gpointer v_object); +gpointer value_get_photo_file_format_properties (const GValue* value); +GType photo_file_format_properties_get_type (void) G_GNUC_CONST; +PhotoFileFormatProperties* photo_file_format_get_properties (PhotoFileFormat self); +gchar** photo_file_format_properties_get_known_extensions (PhotoFileFormatProperties* self, int* result_length1); +GType app_window_get_type (void) G_GNUC_CONST; +AppWindow* app_window_get_instance (void); +#define RESOURCES_CANCEL_LABEL _ ("_Cancel") +#define RESOURCES_OK_LABEL _ ("_OK") +void desktop_integration_send_to (GeeCollection* media); +GeeList* view_collection_get_selected_sources (ViewCollection* self); +static gboolean direct_photo_page_real_on_app_key_pressed (Page* base, GdkEventKey* event); +void page_activate_action (Page* self, const gchar* name); +gboolean page_on_app_key_pressed (Page* self, GdkEventKey* event); +gint view_collection_get_selected_count (ViewCollection* self); +gpointer print_manager_ref (gpointer instance); +void print_manager_unref (gpointer instance); +GParamSpec* param_spec_print_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_print_manager (GValue* value, gpointer v_object); +void value_take_print_manager (GValue* value, gpointer v_object); +gpointer value_get_print_manager (const GValue* value); +GType print_manager_get_type (void) G_GNUC_CONST; +PrintManager* print_manager_get_instance (void); +void print_manager_spool_photo (PrintManager* self, GeeCollection* to_print); +GeeList* view_collection_get_selected_sources_of_type (ViewCollection* self, GType t); +static Block6Data* block6_data_ref (Block6Data* _data6_); +static void block6_data_unref (void * _userdata_); +static gboolean __lambda14_ (Block6Data* _data6_); +void editing_host_page_enable_rotate (EditingHostPage* self, gboolean should_enable); +static gboolean ___lambda14__gsource_func (gpointer self); +static DataView* direct_photo_page_real_create_photo_view (EditingHostPage* base, DataSource* source); +static void direct_photo_page_finalize (GObject* obj); +GType direct_fullscreen_photo_page_get_type (void) G_GNUC_CONST; +enum { + DIRECT_FULLSCREEN_PHOTO_PAGE_DUMMY_PROPERTY +}; +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_new (GFile* file); +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_construct (GType object_type, GFile* file); +static void direct_fullscreen_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames); +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); + + +static void _direct_photo_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { +#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_photos_altered ((DirectPhotoPage*) self, items); +#line 937 "DirectPhotoPage.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return self ? g_object_ref (self) : NULL; +#line 944 "DirectPhotoPage.c" +} + + +static void _direct_photo_page_on_selection_group_altered_view_collection_selection_group_altered (ViewCollection* _sender, gpointer self) { +#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_selection_group_altered ((DirectPhotoPage*) self); +#line 951 "DirectPhotoPage.c" +} + + +DirectPhotoPage* direct_photo_page_construct (GType object_type, GFile* file) { + DirectPhotoPage * self = NULL; + DirectPhotoSourceCollection* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + GFile* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + GFile* _tmp8_ = NULL; + GFile* _tmp9_ = NULL; + DirectViewCollection* _tmp10_ = NULL; + GFile* _tmp11_ = NULL; + GFile* _tmp12_ = NULL; + DirectPhotoSourceCollection* _tmp13_ = NULL; + ViewCollection* _tmp14_ = NULL; + ViewCollection* _tmp15_ = NULL; +#line 13 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (G_IS_FILE (file), NULL); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = direct_photo_global; +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = file; +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = g_file_get_basename (_tmp1_); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _tmp2_; +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = (DirectPhotoPage*) editing_host_page_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp3_); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp3_); +#line 16 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = file; +#line 16 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = direct_photo_page_check_editable_file (_tmp4_); +#line 16 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (!_tmp5_) { +#line 991 "DirectPhotoPage.c" + Application* _tmp6_ = NULL; + Application* _tmp7_ = NULL; +#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = application_get_instance (); +#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = _tmp6_; +#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + application_panic (_tmp7_); +#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _application_unref0 (_tmp7_); +#line 19 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return self; +#line 1004 "DirectPhotoPage.c" + } +#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = file; +#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = _g_object_ref0 (_tmp8_); +#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (self->priv->initial_file); +#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->initial_file = _tmp9_; +#line 23 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = direct_view_collection_new (); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data_collection_unref0 (self->priv->view_controller); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->view_controller = _tmp10_; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = file; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = g_file_get_parent (_tmp11_); +#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (self->priv->current_save_dir); +#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->current_save_dir = _tmp12_; +#line 26 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = direct_photo_global; +#line 26 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _direct_photo_page_on_photos_altered_data_collection_items_altered, self, 0); +#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = _tmp14_; +#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_signal_connect_object (_tmp15_, "selection-group-altered", (GCallback) _direct_photo_page_on_selection_group_altered_view_collection_selection_group_altered, self, 0); +#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data_collection_unref0 (_tmp15_); +#line 13 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return self; +#line 1042 "DirectPhotoPage.c" +} + + +DirectPhotoPage* direct_photo_page_new (GFile* file) { +#line 13 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return direct_photo_page_construct (TYPE_DIRECT_PHOTO_PAGE, file); +#line 1049 "DirectPhotoPage.c" +} + + +static void direct_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames) { + DirectPhotoPage * self; + GeeList* _tmp0_ = NULL; + GeeList* _tmp1_ = NULL; + GeeList* _tmp2_ = NULL; +#line 35 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 35 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (GEE_IS_LIST (ui_filenames)); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = ui_filenames; +#line 36 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + PAGE_CLASS (direct_photo_page_parent_class)->init_collect_ui_filenames (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp0_); +#line 38 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = ui_filenames; +#line 38 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection), "direct_context.ui"); +#line 39 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = ui_filenames; +#line 39 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), "direct.ui"); +#line 1074 "DirectPhotoPage.c" +} + + +static void _vala_array_add91 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1085 "DirectPhotoPage.c" + } +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1089 "DirectPhotoPage.c" +} + + +static void _direct_photo_page_on_save_gtk_action_callback (GtkAction* action, gpointer self) { +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_save ((DirectPhotoPage*) self); +#line 1096 "DirectPhotoPage.c" +} + + +static void _vala_array_add92 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1107 "DirectPhotoPage.c" + } +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1111 "DirectPhotoPage.c" +} + + +static void _direct_photo_page_on_save_as_gtk_action_callback (GtkAction* action, gpointer self) { +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_save_as ((DirectPhotoPage*) self); +#line 1118 "DirectPhotoPage.c" +} + + +static void _vala_array_add93 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1129 "DirectPhotoPage.c" + } +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1133 "DirectPhotoPage.c" +} + + +static void _direct_photo_page_on_send_to_gtk_action_callback (GtkAction* action, gpointer self) { +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_send_to ((DirectPhotoPage*) self); +#line 1140 "DirectPhotoPage.c" +} + + +static void _vala_array_add94 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1151 "DirectPhotoPage.c" + } +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1155 "DirectPhotoPage.c" +} + + +static void _direct_photo_page_on_print_gtk_action_callback (GtkAction* action, gpointer self) { +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_print ((DirectPhotoPage*) self); +#line 1162 "DirectPhotoPage.c" +} + + +static void _vala_array_add95 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1173 "DirectPhotoPage.c" + } +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1177 "DirectPhotoPage.c" +} + + +static void _vala_array_add96 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1188 "DirectPhotoPage.c" + } +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1192 "DirectPhotoPage.c" +} + + +static void _vala_array_add97 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1203 "DirectPhotoPage.c" + } +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1207 "DirectPhotoPage.c" +} + + +static void _vala_array_add98 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1218 "DirectPhotoPage.c" + } +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1222 "DirectPhotoPage.c" +} + + +static void _single_photo_page_on_previous_photo_gtk_action_callback (GtkAction* action, gpointer self) { +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + single_photo_page_on_previous_photo ((SinglePhotoPage*) self); +#line 1229 "DirectPhotoPage.c" +} + + +static void _vala_array_add99 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1240 "DirectPhotoPage.c" + } +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1244 "DirectPhotoPage.c" +} + + +static void _single_photo_page_on_next_photo_gtk_action_callback (GtkAction* action, gpointer self) { +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + single_photo_page_on_next_photo ((SinglePhotoPage*) self); +#line 1251 "DirectPhotoPage.c" +} + + +static void _vala_array_add100 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1262 "DirectPhotoPage.c" + } +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1266 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_rotate_clockwise_gtk_action_callback (GtkAction* action, gpointer self) { +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_rotate_clockwise ((EditingHostPage*) self); +#line 1273 "DirectPhotoPage.c" +} + + +static void _vala_array_add101 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1284 "DirectPhotoPage.c" + } +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1288 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_rotate_counterclockwise_gtk_action_callback (GtkAction* action, gpointer self) { +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_rotate_counterclockwise ((EditingHostPage*) self); +#line 1295 "DirectPhotoPage.c" +} + + +static void _vala_array_add102 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1306 "DirectPhotoPage.c" + } +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1310 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_flip_horizontally_gtk_action_callback (GtkAction* action, gpointer self) { +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_flip_horizontally ((EditingHostPage*) self); +#line 1317 "DirectPhotoPage.c" +} + + +static void _vala_array_add103 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1328 "DirectPhotoPage.c" + } +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1332 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_flip_vertically_gtk_action_callback (GtkAction* action, gpointer self) { +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_flip_vertically ((EditingHostPage*) self); +#line 1339 "DirectPhotoPage.c" +} + + +static void _vala_array_add104 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1350 "DirectPhotoPage.c" + } +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1354 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_enhance_gtk_action_callback (GtkAction* action, gpointer self) { +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_enhance ((EditingHostPage*) self); +#line 1361 "DirectPhotoPage.c" +} + + +static void _vala_array_add105 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1372 "DirectPhotoPage.c" + } +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1376 "DirectPhotoPage.c" +} + + +static void _editing_host_page_toggle_crop_gtk_action_callback (GtkAction* action, gpointer self) { +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_toggle_crop ((EditingHostPage*) self); +#line 1383 "DirectPhotoPage.c" +} + + +static void _vala_array_add106 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1394 "DirectPhotoPage.c" + } +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1398 "DirectPhotoPage.c" +} + + +static void _editing_host_page_toggle_straighten_gtk_action_callback (GtkAction* action, gpointer self) { +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_toggle_straighten ((EditingHostPage*) self); +#line 1405 "DirectPhotoPage.c" +} + + +static void _vala_array_add107 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1416 "DirectPhotoPage.c" + } +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1420 "DirectPhotoPage.c" +} + + +static void _editing_host_page_toggle_redeye_gtk_action_callback (GtkAction* action, gpointer self) { +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_toggle_redeye ((EditingHostPage*) self); +#line 1427 "DirectPhotoPage.c" +} + + +static void _vala_array_add108 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1438 "DirectPhotoPage.c" + } +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1442 "DirectPhotoPage.c" +} + + +static void _editing_host_page_toggle_adjust_gtk_action_callback (GtkAction* action, gpointer self) { +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_toggle_adjust ((EditingHostPage*) self); +#line 1449 "DirectPhotoPage.c" +} + + +static void _vala_array_add109 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1460 "DirectPhotoPage.c" + } +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1464 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_revert_gtk_action_callback (GtkAction* action, gpointer self) { +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_revert ((EditingHostPage*) self); +#line 1471 "DirectPhotoPage.c" +} + + +static void _vala_array_add110 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1482 "DirectPhotoPage.c" + } +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1486 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_adjust_date_time_gtk_action_callback (GtkAction* action, gpointer self) { +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_adjust_date_time ((EditingHostPage*) self); +#line 1493 "DirectPhotoPage.c" +} + + +static void _vala_array_add111 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1504 "DirectPhotoPage.c" + } +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1508 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_set_background_gtk_action_callback (GtkAction* action, gpointer self) { +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_set_background ((EditingHostPage*) self); +#line 1515 "DirectPhotoPage.c" +} + + +static void _vala_array_add112 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1526 "DirectPhotoPage.c" + } +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1530 "DirectPhotoPage.c" +} + + +static void _vala_array_add113 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1541 "DirectPhotoPage.c" + } +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1545 "DirectPhotoPage.c" +} + + +static void _vala_array_add114 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1556 "DirectPhotoPage.c" + } +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1560 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_increase_size_gtk_action_callback (GtkAction* action, gpointer self) { +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_increase_size ((EditingHostPage*) self); +#line 1567 "DirectPhotoPage.c" +} + + +static void _vala_array_add115 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1578 "DirectPhotoPage.c" + } +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1582 "DirectPhotoPage.c" +} + + +static void _editing_host_page_on_decrease_size_gtk_action_callback (GtkAction* action, gpointer self) { +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_on_decrease_size ((EditingHostPage*) self); +#line 1589 "DirectPhotoPage.c" +} + + +static void _vala_array_add116 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1600 "DirectPhotoPage.c" + } +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1604 "DirectPhotoPage.c" +} + + +static void _editing_host_page_snap_zoom_to_min_gtk_action_callback (GtkAction* action, gpointer self) { +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_snap_zoom_to_min ((EditingHostPage*) self); +#line 1611 "DirectPhotoPage.c" +} + + +static void _vala_array_add117 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1622 "DirectPhotoPage.c" + } +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1626 "DirectPhotoPage.c" +} + + +static void _editing_host_page_snap_zoom_to_isomorphic_gtk_action_callback (GtkAction* action, gpointer self) { +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_snap_zoom_to_isomorphic ((EditingHostPage*) self); +#line 1633 "DirectPhotoPage.c" +} + + +static void _vala_array_add118 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1644 "DirectPhotoPage.c" + } +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1648 "DirectPhotoPage.c" +} + + +static void _editing_host_page_snap_zoom_to_max_gtk_action_callback (GtkAction* action, gpointer self) { +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_snap_zoom_to_max ((EditingHostPage*) self); +#line 1655 "DirectPhotoPage.c" +} + + +static void _vala_array_add119 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) { +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (GtkActionEntry, *array, *size); +#line 1666 "DirectPhotoPage.c" + } +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = *value; +#line 1670 "DirectPhotoPage.c" +} + + +static GtkActionEntry* direct_photo_page_real_init_collect_action_entries (Page* base, int* result_length1) { + DirectPhotoPage * self; + GtkActionEntry* result = NULL; + GtkActionEntry* actions = NULL; + gint _tmp0_ = 0; + GtkActionEntry* _tmp1_ = NULL; + gint actions_length1 = 0; + gint _actions_size_ = 0; + GtkActionEntry file = {0}; + GtkActionEntry _tmp2_ = {0}; + const gchar* _tmp3_ = NULL; + GtkActionEntry* _tmp4_ = NULL; + gint _tmp4__length1 = 0; + GtkActionEntry _tmp5_ = {0}; + GtkActionEntry save = {0}; + GtkActionEntry _tmp6_ = {0}; + const gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + GtkActionEntry* _tmp9_ = NULL; + gint _tmp9__length1 = 0; + GtkActionEntry _tmp10_ = {0}; + GtkActionEntry save_as = {0}; + GtkActionEntry _tmp11_ = {0}; + const gchar* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + GtkActionEntry* _tmp14_ = NULL; + gint _tmp14__length1 = 0; + GtkActionEntry _tmp15_ = {0}; + GtkActionEntry send_to = {0}; + GtkActionEntry _tmp16_ = {0}; + GtkActionEntry* _tmp17_ = NULL; + gint _tmp17__length1 = 0; + GtkActionEntry _tmp18_ = {0}; + GtkActionEntry print = {0}; + GtkActionEntry _tmp19_ = {0}; + const gchar* _tmp20_ = NULL; + GtkActionEntry* _tmp21_ = NULL; + gint _tmp21__length1 = 0; + GtkActionEntry _tmp22_ = {0}; + GtkActionEntry edit = {0}; + GtkActionEntry _tmp23_ = {0}; + const gchar* _tmp24_ = NULL; + GtkActionEntry* _tmp25_ = NULL; + gint _tmp25__length1 = 0; + GtkActionEntry _tmp26_ = {0}; + GtkActionEntry photo = {0}; + GtkActionEntry _tmp27_ = {0}; + const gchar* _tmp28_ = NULL; + GtkActionEntry* _tmp29_ = NULL; + gint _tmp29__length1 = 0; + GtkActionEntry _tmp30_ = {0}; + GtkActionEntry tools = {0}; + GtkActionEntry _tmp31_ = {0}; + const gchar* _tmp32_ = NULL; + GtkActionEntry* _tmp33_ = NULL; + gint _tmp33__length1 = 0; + GtkActionEntry _tmp34_ = {0}; + GtkActionEntry prev = {0}; + GtkActionEntry _tmp35_ = {0}; + const gchar* _tmp36_ = NULL; + const gchar* _tmp37_ = NULL; + GtkActionEntry* _tmp38_ = NULL; + gint _tmp38__length1 = 0; + GtkActionEntry _tmp39_ = {0}; + GtkActionEntry next = {0}; + GtkActionEntry _tmp40_ = {0}; + const gchar* _tmp41_ = NULL; + const gchar* _tmp42_ = NULL; + GtkActionEntry* _tmp43_ = NULL; + gint _tmp43__length1 = 0; + GtkActionEntry _tmp44_ = {0}; + GtkActionEntry rotate_right = {0}; + GtkActionEntry _tmp45_ = {0}; + GtkActionEntry* _tmp46_ = NULL; + gint _tmp46__length1 = 0; + GtkActionEntry _tmp47_ = {0}; + GtkActionEntry rotate_left = {0}; + GtkActionEntry _tmp48_ = {0}; + GtkActionEntry* _tmp49_ = NULL; + gint _tmp49__length1 = 0; + GtkActionEntry _tmp50_ = {0}; + GtkActionEntry hflip = {0}; + GtkActionEntry _tmp51_ = {0}; + GtkActionEntry* _tmp52_ = NULL; + gint _tmp52__length1 = 0; + GtkActionEntry _tmp53_ = {0}; + GtkActionEntry vflip = {0}; + GtkActionEntry _tmp54_ = {0}; + GtkActionEntry* _tmp55_ = NULL; + gint _tmp55__length1 = 0; + GtkActionEntry _tmp56_ = {0}; + GtkActionEntry enhance = {0}; + GtkActionEntry _tmp57_ = {0}; + GtkActionEntry* _tmp58_ = NULL; + gint _tmp58__length1 = 0; + GtkActionEntry _tmp59_ = {0}; + GtkActionEntry crop = {0}; + GtkActionEntry _tmp60_ = {0}; + GtkActionEntry* _tmp61_ = NULL; + gint _tmp61__length1 = 0; + GtkActionEntry _tmp62_ = {0}; + GtkActionEntry straighten = {0}; + GtkActionEntry _tmp63_ = {0}; + GtkActionEntry* _tmp64_ = NULL; + gint _tmp64__length1 = 0; + GtkActionEntry _tmp65_ = {0}; + GtkActionEntry red_eye = {0}; + GtkActionEntry _tmp66_ = {0}; + GtkActionEntry* _tmp67_ = NULL; + gint _tmp67__length1 = 0; + GtkActionEntry _tmp68_ = {0}; + GtkActionEntry adjust = {0}; + GtkActionEntry _tmp69_ = {0}; + GtkActionEntry* _tmp70_ = NULL; + gint _tmp70__length1 = 0; + GtkActionEntry _tmp71_ = {0}; + GtkActionEntry revert = {0}; + GtkActionEntry _tmp72_ = {0}; + GtkActionEntry* _tmp73_ = NULL; + gint _tmp73__length1 = 0; + GtkActionEntry _tmp74_ = {0}; + GtkActionEntry adjust_date_time = {0}; + GtkActionEntry _tmp75_ = {0}; + GtkActionEntry* _tmp76_ = NULL; + gint _tmp76__length1 = 0; + GtkActionEntry _tmp77_ = {0}; + GtkActionEntry set_background = {0}; + GtkActionEntry _tmp78_ = {0}; + GtkActionEntry* _tmp79_ = NULL; + gint _tmp79__length1 = 0; + GtkActionEntry _tmp80_ = {0}; + GtkActionEntry view = {0}; + GtkActionEntry _tmp81_ = {0}; + const gchar* _tmp82_ = NULL; + GtkActionEntry* _tmp83_ = NULL; + gint _tmp83__length1 = 0; + GtkActionEntry _tmp84_ = {0}; + GtkActionEntry help = {0}; + GtkActionEntry _tmp85_ = {0}; + const gchar* _tmp86_ = NULL; + GtkActionEntry* _tmp87_ = NULL; + gint _tmp87__length1 = 0; + GtkActionEntry _tmp88_ = {0}; + GtkActionEntry increase_size = {0}; + GtkActionEntry _tmp89_ = {0}; + const gchar* _tmp90_ = NULL; + const gchar* _tmp91_ = NULL; + GtkActionEntry* _tmp92_ = NULL; + gint _tmp92__length1 = 0; + GtkActionEntry _tmp93_ = {0}; + GtkActionEntry decrease_size = {0}; + GtkActionEntry _tmp94_ = {0}; + const gchar* _tmp95_ = NULL; + const gchar* _tmp96_ = NULL; + GtkActionEntry* _tmp97_ = NULL; + gint _tmp97__length1 = 0; + GtkActionEntry _tmp98_ = {0}; + GtkActionEntry best_fit = {0}; + GtkActionEntry _tmp99_ = {0}; + const gchar* _tmp100_ = NULL; + const gchar* _tmp101_ = NULL; + GtkActionEntry* _tmp102_ = NULL; + gint _tmp102__length1 = 0; + GtkActionEntry _tmp103_ = {0}; + GtkActionEntry actual_size = {0}; + GtkActionEntry _tmp104_ = {0}; + const gchar* _tmp105_ = NULL; + const gchar* _tmp106_ = NULL; + GtkActionEntry* _tmp107_ = NULL; + gint _tmp107__length1 = 0; + GtkActionEntry _tmp108_ = {0}; + GtkActionEntry max_size = {0}; + GtkActionEntry _tmp109_ = {0}; + const gchar* _tmp110_ = NULL; + const gchar* _tmp111_ = NULL; + GtkActionEntry* _tmp112_ = NULL; + gint _tmp112__length1 = 0; + GtkActionEntry _tmp113_ = {0}; + GtkActionEntry* _tmp114_ = NULL; + gint _tmp114__length1 = 0; +#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = PAGE_CLASS (direct_photo_page_parent_class)->init_collect_action_entries (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), &_tmp0_); +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + actions = _tmp1_; +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + actions_length1 = _tmp0_; +#line 43 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _actions_size_ = actions_length1; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_.name = "FileMenu"; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_.stock_id = NULL; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_.label = TRANSLATABLE; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_.accelerator = NULL; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_.tooltip = NULL; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_.callback = (GCallback) NULL; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + file = _tmp2_; +#line 46 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _ ("_File"); +#line 46 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + file.label = _tmp3_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = actions; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4__length1 = actions_length1; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = file; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add91 (&actions, &actions_length1, &_actions_size_, &_tmp5_); +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_.name = "Save"; +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_.stock_id = RESOURCES_SAVE_LABEL; +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_.label = TRANSLATABLE; +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_.accelerator = "<Ctrl>S"; +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_.tooltip = TRANSLATABLE; +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_.callback = (GCallback) _direct_photo_page_on_save_gtk_action_callback; +#line 49 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save = _tmp6_; +#line 51 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = _ ("_Save"); +#line 51 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save.label = _tmp7_; +#line 52 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = _ ("Save photo"); +#line 52 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save.tooltip = _tmp8_; +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = actions; +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9__length1 = actions_length1; +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = save; +#line 53 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add92 (&actions, &actions_length1, &_actions_size_, &_tmp10_); +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_.name = "SaveAs"; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_.stock_id = RESOURCES_SAVE_AS_LABEL; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_.label = TRANSLATABLE; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_.accelerator = "<Ctrl><Shift>S"; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_.tooltip = TRANSLATABLE; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_.callback = (GCallback) _direct_photo_page_on_save_as_gtk_action_callback; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save_as = _tmp11_; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = _ ("Save _As..."); +#line 57 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save_as.label = _tmp12_; +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = _ ("Save photo with a different name"); +#line 58 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save_as.tooltip = _tmp13_; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = actions; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14__length1 = actions_length1; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = save_as; +#line 59 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add93 (&actions, &actions_length1, &_actions_size_, &_tmp15_); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_.name = "SendTo"; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_.stock_id = "document-send"; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_.label = TRANSLATABLE; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_.accelerator = NULL; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_.tooltip = TRANSLATABLE; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_.callback = (GCallback) _direct_photo_page_on_send_to_gtk_action_callback; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + send_to = _tmp16_; +#line 63 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + send_to.label = RESOURCES_SEND_TO_MENU; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = actions; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17__length1 = actions_length1; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = send_to; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add94 (&actions, &actions_length1, &_actions_size_, &_tmp18_); +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_.name = "Print"; +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_.stock_id = RESOURCES_PRINT_LABEL; +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_.label = TRANSLATABLE; +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_.accelerator = "<Ctrl>P"; +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_.tooltip = TRANSLATABLE; +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_.callback = (GCallback) _direct_photo_page_on_print_gtk_action_callback; +#line 66 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + print = _tmp19_; +#line 68 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + print.label = RESOURCES_PRINT_MENU; +#line 69 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp20_ = _ ("Print the photo to a printer connected to your computer"); +#line 69 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + print.tooltip = _tmp20_; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21_ = actions; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21__length1 = actions_length1; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = print; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add95 (&actions, &actions_length1, &_actions_size_, &_tmp22_); +#line 72 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_.name = "EditMenu"; +#line 72 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_.stock_id = NULL; +#line 72 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_.label = TRANSLATABLE; +#line 72 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_.accelerator = NULL; +#line 72 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_.tooltip = NULL; +#line 72 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_.callback = (GCallback) NULL; +#line 72 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + edit = _tmp23_; +#line 73 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = _ ("_Edit"); +#line 73 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + edit.label = _tmp24_; +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = actions; +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25__length1 = actions_length1; +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = edit; +#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add96 (&actions, &actions_length1, &_actions_size_, &_tmp26_); +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_.name = "PhotoMenu"; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_.stock_id = NULL; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_.label = ""; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_.accelerator = NULL; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_.tooltip = NULL; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_.callback = (GCallback) NULL; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo = _tmp27_; +#line 77 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp28_ = _ ("_Photo"); +#line 77 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo.label = _tmp28_; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29_ = actions; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29__length1 = actions_length1; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp30_ = photo; +#line 78 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add97 (&actions, &actions_length1, &_actions_size_, &_tmp30_); +#line 80 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_.name = "Tools"; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_.stock_id = NULL; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_.label = TRANSLATABLE; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_.accelerator = NULL; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_.tooltip = NULL; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_.callback = (GCallback) NULL; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + tools = _tmp31_; +#line 81 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp32_ = _ ("T_ools"); +#line 81 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + tools.label = _tmp32_; +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp33_ = actions; +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp33__length1 = actions_length1; +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp34_ = tools; +#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add98 (&actions, &actions_length1, &_actions_size_, &_tmp34_); +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_.name = "PrevPhoto"; +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_.stock_id = RESOURCES_PREVIOUS_LABEL; +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_.label = TRANSLATABLE; +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_.accelerator = NULL; +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_.tooltip = TRANSLATABLE; +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_.callback = (GCallback) _single_photo_page_on_previous_photo_gtk_action_callback; +#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + prev = _tmp35_; +#line 86 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp36_ = _ ("_Previous Photo"); +#line 86 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + prev.label = _tmp36_; +#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp37_ = _ ("Previous Photo"); +#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + prev.tooltip = _tmp37_; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp38_ = actions; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp38__length1 = actions_length1; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp39_ = prev; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add99 (&actions, &actions_length1, &_actions_size_, &_tmp39_); +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_.name = "NextPhoto"; +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_.stock_id = RESOURCES_NEXT_LABEL; +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_.label = TRANSLATABLE; +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_.accelerator = NULL; +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_.tooltip = TRANSLATABLE; +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_.callback = (GCallback) _single_photo_page_on_next_photo_gtk_action_callback; +#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + next = _tmp40_; +#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp41_ = _ ("_Next Photo"); +#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + next.label = _tmp41_; +#line 93 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp42_ = _ ("Next Photo"); +#line 93 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + next.tooltip = _tmp42_; +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp43_ = actions; +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp43__length1 = actions_length1; +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp44_ = next; +#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add100 (&actions, &actions_length1, &_actions_size_, &_tmp44_); +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_.name = "RotateClockwise"; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_.stock_id = RESOURCES_CLOCKWISE; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_.label = TRANSLATABLE; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_.accelerator = "<Ctrl>R"; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_.tooltip = TRANSLATABLE; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_.callback = (GCallback) _editing_host_page_on_rotate_clockwise_gtk_action_callback; +#line 96 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + rotate_right = _tmp45_; +#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + rotate_right.label = RESOURCES_ROTATE_CW_MENU; +#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + rotate_right.tooltip = RESOURCES_ROTATE_CCW_TOOLTIP; +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp46_ = actions; +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp46__length1 = actions_length1; +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp47_ = rotate_right; +#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add101 (&actions, &actions_length1, &_actions_size_, &_tmp47_); +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp48_.name = "RotateCounterclockwise"; +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp48_.stock_id = RESOURCES_COUNTERCLOCKWISE; +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp48_.label = TRANSLATABLE; +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp48_.accelerator = "<Ctrl><Shift>R"; +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp48_.tooltip = TRANSLATABLE; +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp48_.callback = (GCallback) _editing_host_page_on_rotate_counterclockwise_gtk_action_callback; +#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + rotate_left = _tmp48_; +#line 104 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + rotate_left.label = RESOURCES_ROTATE_CCW_MENU; +#line 105 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + rotate_left.tooltip = RESOURCES_ROTATE_CCW_TOOLTIP; +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp49_ = actions; +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp49__length1 = actions_length1; +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp50_ = rotate_left; +#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add102 (&actions, &actions_length1, &_actions_size_, &_tmp50_); +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp51_.name = "FlipHorizontally"; +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp51_.stock_id = RESOURCES_HFLIP; +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp51_.label = TRANSLATABLE; +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp51_.accelerator = NULL; +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp51_.tooltip = TRANSLATABLE; +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp51_.callback = (GCallback) _editing_host_page_on_flip_horizontally_gtk_action_callback; +#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + hflip = _tmp51_; +#line 110 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + hflip.label = RESOURCES_HFLIP_MENU; +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp52_ = actions; +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp52__length1 = actions_length1; +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp53_ = hflip; +#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add103 (&actions, &actions_length1, &_actions_size_, &_tmp53_); +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp54_.name = "FlipVertically"; +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp54_.stock_id = RESOURCES_VFLIP; +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp54_.label = TRANSLATABLE; +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp54_.accelerator = NULL; +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp54_.tooltip = TRANSLATABLE; +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp54_.callback = (GCallback) _editing_host_page_on_flip_vertically_gtk_action_callback; +#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + vflip = _tmp54_; +#line 115 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + vflip.label = RESOURCES_VFLIP_MENU; +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp55_ = actions; +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp55__length1 = actions_length1; +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp56_ = vflip; +#line 116 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add104 (&actions, &actions_length1, &_actions_size_, &_tmp56_); +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp57_.name = "Enhance"; +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp57_.stock_id = RESOURCES_ENHANCE; +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp57_.label = TRANSLATABLE; +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp57_.accelerator = "<Ctrl>E"; +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp57_.tooltip = TRANSLATABLE; +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp57_.callback = (GCallback) _editing_host_page_on_enhance_gtk_action_callback; +#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + enhance = _tmp57_; +#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + enhance.label = RESOURCES_ENHANCE_MENU; +#line 121 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + enhance.tooltip = RESOURCES_ENHANCE_TOOLTIP; +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp58_ = actions; +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp58__length1 = actions_length1; +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp59_ = enhance; +#line 122 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add105 (&actions, &actions_length1, &_actions_size_, &_tmp59_); +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp60_.name = "Crop"; +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp60_.stock_id = RESOURCES_CROP; +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp60_.label = TRANSLATABLE; +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp60_.accelerator = "<Ctrl>O"; +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp60_.tooltip = TRANSLATABLE; +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp60_.callback = (GCallback) _editing_host_page_toggle_crop_gtk_action_callback; +#line 124 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + crop = _tmp60_; +#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + crop.label = RESOURCES_CROP_MENU; +#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + crop.tooltip = RESOURCES_CROP_TOOLTIP; +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp61_ = actions; +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp61__length1 = actions_length1; +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp62_ = crop; +#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add106 (&actions, &actions_length1, &_actions_size_, &_tmp62_); +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp63_.name = "Straighten"; +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp63_.stock_id = RESOURCES_REFRESH_LABEL; +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp63_.label = TRANSLATABLE; +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp63_.accelerator = "<Ctrl>A"; +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp63_.tooltip = TRANSLATABLE; +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp63_.callback = (GCallback) _editing_host_page_toggle_straighten_gtk_action_callback; +#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + straighten = _tmp63_; +#line 132 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + straighten.label = RESOURCES_STRAIGHTEN_MENU; +#line 133 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + straighten.tooltip = RESOURCES_STRAIGHTEN_TOOLTIP; +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp64_ = actions; +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp64__length1 = actions_length1; +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp65_ = straighten; +#line 134 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add107 (&actions, &actions_length1, &_actions_size_, &_tmp65_); +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp66_.name = "RedEye"; +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp66_.stock_id = RESOURCES_REDEYE; +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp66_.label = TRANSLATABLE; +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp66_.accelerator = "<Ctrl>Y"; +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp66_.tooltip = TRANSLATABLE; +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp66_.callback = (GCallback) _editing_host_page_toggle_redeye_gtk_action_callback; +#line 136 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + red_eye = _tmp66_; +#line 138 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + red_eye.label = RESOURCES_RED_EYE_MENU; +#line 139 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + red_eye.tooltip = RESOURCES_RED_EYE_TOOLTIP; +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp67_ = actions; +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp67__length1 = actions_length1; +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp68_ = red_eye; +#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add108 (&actions, &actions_length1, &_actions_size_, &_tmp68_); +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp69_.name = "Adjust"; +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp69_.stock_id = RESOURCES_ADJUST; +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp69_.label = TRANSLATABLE; +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp69_.accelerator = "<Ctrl>D"; +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp69_.tooltip = TRANSLATABLE; +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp69_.callback = (GCallback) _editing_host_page_toggle_adjust_gtk_action_callback; +#line 142 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + adjust = _tmp69_; +#line 144 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + adjust.label = RESOURCES_ADJUST_MENU; +#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + adjust.tooltip = RESOURCES_ADJUST_TOOLTIP; +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp70_ = actions; +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp70__length1 = actions_length1; +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp71_ = adjust; +#line 146 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add109 (&actions, &actions_length1, &_actions_size_, &_tmp71_); +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp72_.name = "Revert"; +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp72_.stock_id = RESOURCES_REVERT_LABEL; +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp72_.label = TRANSLATABLE; +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp72_.accelerator = NULL; +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp72_.tooltip = TRANSLATABLE; +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp72_.callback = (GCallback) _editing_host_page_on_revert_gtk_action_callback; +#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + revert = _tmp72_; +#line 150 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + revert.label = RESOURCES_REVERT_MENU; +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp73_ = actions; +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp73__length1 = actions_length1; +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp74_ = revert; +#line 151 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add110 (&actions, &actions_length1, &_actions_size_, &_tmp74_); +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp75_.name = "AdjustDateTime"; +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp75_.stock_id = NULL; +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp75_.label = TRANSLATABLE; +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp75_.accelerator = NULL; +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp75_.tooltip = TRANSLATABLE; +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp75_.callback = (GCallback) _editing_host_page_on_adjust_date_time_gtk_action_callback; +#line 153 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + adjust_date_time = _tmp75_; +#line 155 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + adjust_date_time.label = RESOURCES_ADJUST_DATE_TIME_MENU; +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp76_ = actions; +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp76__length1 = actions_length1; +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp77_ = adjust_date_time; +#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add111 (&actions, &actions_length1, &_actions_size_, &_tmp77_); +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp78_.name = "SetBackground"; +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp78_.stock_id = NULL; +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp78_.label = TRANSLATABLE; +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp78_.accelerator = "<Ctrl>B"; +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp78_.tooltip = TRANSLATABLE; +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp78_.callback = (GCallback) _editing_host_page_on_set_background_gtk_action_callback; +#line 158 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + set_background = _tmp78_; +#line 160 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + set_background.label = RESOURCES_SET_BACKGROUND_MENU; +#line 161 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + set_background.tooltip = RESOURCES_SET_BACKGROUND_TOOLTIP; +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp79_ = actions; +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp79__length1 = actions_length1; +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp80_ = set_background; +#line 162 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add112 (&actions, &actions_length1, &_actions_size_, &_tmp80_); +#line 164 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp81_.name = "ViewMenu"; +#line 164 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp81_.stock_id = NULL; +#line 164 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp81_.label = TRANSLATABLE; +#line 164 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp81_.accelerator = NULL; +#line 164 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp81_.tooltip = NULL; +#line 164 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp81_.callback = (GCallback) NULL; +#line 164 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + view = _tmp81_; +#line 165 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp82_ = _ ("_View"); +#line 165 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + view.label = _tmp82_; +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp83_ = actions; +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp83__length1 = actions_length1; +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp84_ = view; +#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add113 (&actions, &actions_length1, &_actions_size_, &_tmp84_); +#line 168 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp85_.name = "HelpMenu"; +#line 168 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp85_.stock_id = NULL; +#line 168 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp85_.label = TRANSLATABLE; +#line 168 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp85_.accelerator = NULL; +#line 168 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp85_.tooltip = NULL; +#line 168 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp85_.callback = (GCallback) NULL; +#line 168 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + help = _tmp85_; +#line 169 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp86_ = _ ("_Help"); +#line 169 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + help.label = _tmp86_; +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp87_ = actions; +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp87__length1 = actions_length1; +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp88_ = help; +#line 170 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add114 (&actions, &actions_length1, &_actions_size_, &_tmp88_); +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp89_.name = "IncreaseSize"; +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp89_.stock_id = RESOURCES_ZOOM_IN_LABEL; +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp89_.label = TRANSLATABLE; +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp89_.accelerator = "<Ctrl>plus"; +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp89_.tooltip = TRANSLATABLE; +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp89_.callback = (GCallback) _editing_host_page_on_increase_size_gtk_action_callback; +#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + increase_size = _tmp89_; +#line 174 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp90_ = _ ("Zoom _In"); +#line 174 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + increase_size.label = _tmp90_; +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp91_ = _ ("Increase the magnification of the photo"); +#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + increase_size.tooltip = _tmp91_; +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp92_ = actions; +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp92__length1 = actions_length1; +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp93_ = increase_size; +#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add115 (&actions, &actions_length1, &_actions_size_, &_tmp93_); +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp94_.name = "DecreaseSize"; +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp94_.stock_id = RESOURCES_ZOOM_OUT_LABEL; +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp94_.label = TRANSLATABLE; +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp94_.accelerator = "<Ctrl>minus"; +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp94_.tooltip = TRANSLATABLE; +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp94_.callback = (GCallback) _editing_host_page_on_decrease_size_gtk_action_callback; +#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + decrease_size = _tmp94_; +#line 180 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp95_ = _ ("Zoom _Out"); +#line 180 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + decrease_size.label = _tmp95_; +#line 181 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp96_ = _ ("Decrease the magnification of the photo"); +#line 181 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + decrease_size.tooltip = _tmp96_; +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp97_ = actions; +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp97__length1 = actions_length1; +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp98_ = decrease_size; +#line 182 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add116 (&actions, &actions_length1, &_actions_size_, &_tmp98_); +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp99_.name = "ZoomFit"; +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp99_.stock_id = RESOURCES_ZOOM_FIT_LABEL; +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp99_.label = TRANSLATABLE; +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp99_.accelerator = "<Ctrl>0"; +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp99_.tooltip = TRANSLATABLE; +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp99_.callback = (GCallback) _editing_host_page_snap_zoom_to_min_gtk_action_callback; +#line 184 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + best_fit = _tmp99_; +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp100_ = _ ("Fit to _Page"); +#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + best_fit.label = _tmp100_; +#line 187 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp101_ = _ ("Zoom the photo to fit on the screen"); +#line 187 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + best_fit.tooltip = _tmp101_; +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp102_ = actions; +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp102__length1 = actions_length1; +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp103_ = best_fit; +#line 188 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add117 (&actions, &actions_length1, &_actions_size_, &_tmp103_); +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp104_.name = "Zoom100"; +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp104_.stock_id = RESOURCES_ZOOM_100_LABEL; +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp104_.label = TRANSLATABLE; +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp104_.accelerator = "<Ctrl>1"; +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp104_.tooltip = TRANSLATABLE; +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp104_.callback = (GCallback) _editing_host_page_snap_zoom_to_isomorphic_gtk_action_callback; +#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + actual_size = _tmp104_; +#line 193 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp105_ = _ ("Zoom _100%"); +#line 193 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + actual_size.label = _tmp105_; +#line 195 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp106_ = _ ("Zoom the photo to 100% magnification"); +#line 195 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + actual_size.tooltip = _tmp106_; +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp107_ = actions; +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp107__length1 = actions_length1; +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp108_ = actual_size; +#line 196 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add118 (&actions, &actions_length1, &_actions_size_, &_tmp108_); +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp109_.name = "Zoom200"; +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp109_.stock_id = NULL; +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp109_.label = TRANSLATABLE; +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp109_.accelerator = "<Ctrl>2"; +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp109_.tooltip = TRANSLATABLE; +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp109_.callback = (GCallback) _editing_host_page_snap_zoom_to_max_gtk_action_callback; +#line 198 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + max_size = _tmp109_; +#line 201 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp110_ = _ ("Zoom _200%"); +#line 201 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + max_size.label = _tmp110_; +#line 203 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp111_ = _ ("Zoom the photo to 200% magnification"); +#line 203 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + max_size.tooltip = _tmp111_; +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp112_ = actions; +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp112__length1 = actions_length1; +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp113_ = max_size; +#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add119 (&actions, &actions_length1, &_actions_size_, &_tmp113_); +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp114_ = actions; +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp114__length1 = actions_length1; +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (result_length1) { +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *result_length1 = _tmp114__length1; +#line 2654 "DirectPhotoPage.c" + } +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = _tmp114_; +#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 2660 "DirectPhotoPage.c" +} + + +static gpointer _injection_group_ref0 (gpointer self) { +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return self ? injection_group_ref (self) : NULL; +#line 2667 "DirectPhotoPage.c" +} + + +static void _vala_array_add120 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value) { +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (InjectionGroup*, *array, (*size) + 1); +#line 2678 "DirectPhotoPage.c" + } +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = value; +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[*length] = NULL; +#line 2684 "DirectPhotoPage.c" +} + + +static void _vala_array_add121 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value) { +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if ((*length) == (*size)) { +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *size = (*size) ? (2 * (*size)) : 4; +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *array = g_renew (InjectionGroup*, *array, (*size) + 1); +#line 2695 "DirectPhotoPage.c" + } +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[(*length)++] = value; +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + (*array)[*length] = NULL; +#line 2701 "DirectPhotoPage.c" +} + + +static InjectionGroup** direct_photo_page_real_init_collect_injection_groups (Page* base, int* result_length1) { + DirectPhotoPage * self; + InjectionGroup** result = NULL; + InjectionGroup** groups = NULL; + gint _tmp0_ = 0; + InjectionGroup** _tmp1_ = NULL; + gint groups_length1 = 0; + gint _groups_size_ = 0; + InjectionGroup* print_group = NULL; + InjectionGroup* _tmp2_ = NULL; + InjectionGroup** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + InjectionGroup* _tmp4_ = NULL; + InjectionGroup* bg_group = NULL; + InjectionGroup* _tmp5_ = NULL; + InjectionGroup** _tmp6_ = NULL; + gint _tmp6__length1 = 0; + InjectionGroup* _tmp7_ = NULL; + InjectionGroup** _tmp8_ = NULL; + gint _tmp8__length1 = 0; +#line 209 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 210 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = PAGE_CLASS (direct_photo_page_parent_class)->init_collect_injection_groups (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), &_tmp0_); +#line 210 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + groups = _tmp1_; +#line 210 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + groups_length1 = _tmp0_; +#line 210 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _groups_size_ = groups_length1; +#line 212 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = injection_group_new ("/MenuBar/FileMenu/PrintPlaceholder"); +#line 212 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + print_group = _tmp2_; +#line 213 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + injection_group_add_menu_item (print_group, "Print", NULL); +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = groups; +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3__length1 = groups_length1; +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = _injection_group_ref0 (print_group); +#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add120 (&groups, &groups_length1, &_groups_size_, _tmp4_); +#line 217 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = injection_group_new ("/MenuBar/FileMenu/SetBackgroundPlaceholder"); +#line 217 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + bg_group = _tmp5_; +#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + injection_group_add_menu_item (bg_group, "SetBackground", NULL); +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = groups; +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6__length1 = groups_length1; +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = _injection_group_ref0 (bg_group); +#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _vala_array_add121 (&groups, &groups_length1, &_groups_size_, _tmp7_); +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = groups; +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8__length1 = groups_length1; +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (result_length1) { +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + *result_length1 = _tmp8__length1; +#line 2771 "DirectPhotoPage.c" + } +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = _tmp8_; +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _injection_group_unref0 (bg_group); +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _injection_group_unref0 (print_group); +#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 2781 "DirectPhotoPage.c" +} + + +static gboolean direct_photo_page_check_editable_file (GFile* file) { + gboolean result = FALSE; + GFile* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_ = FALSE; +#line 225 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (G_IS_FILE (file), FALSE); +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = file; +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = g_file_get_path (_tmp0_); +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = _tmp1_; +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = g_file_test (_tmp2_, G_FILE_TEST_EXISTS); +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = !_tmp3_; +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp2_); +#line 226 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp4_) { +#line 2808 "DirectPhotoPage.c" + const gchar* _tmp5_ = NULL; + GFile* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = _ ("%s does not exist."); +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = file; +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = g_file_get_path (_tmp6_); +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = _tmp7_; +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = g_strdup_printf (_tmp5_, _tmp8_); +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = _tmp9_; +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + app_window_error_message (_tmp10_, NULL); +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp10_); +#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp8_); +#line 2833 "DirectPhotoPage.c" + } else { + GFile* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; + gboolean _tmp15_ = FALSE; +#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = file; +#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = g_file_get_path (_tmp11_); +#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = _tmp12_; +#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = g_file_test (_tmp13_, G_FILE_TEST_IS_REGULAR); +#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = !_tmp14_; +#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp13_); +#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp15_) { +#line 2854 "DirectPhotoPage.c" + const gchar* _tmp16_ = NULL; + GFile* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = _ ("%s is not a file."); +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = file; +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = g_file_get_path (_tmp17_); +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = _tmp18_; +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp20_ = g_strdup_printf (_tmp16_, _tmp19_); +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21_ = _tmp20_; +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + app_window_error_message (_tmp21_, NULL); +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp21_); +#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp19_); +#line 2879 "DirectPhotoPage.c" + } else { + GFile* _tmp22_ = NULL; + gboolean _tmp23_ = FALSE; +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = file; +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_ = photo_file_format_is_file_supported (_tmp22_); +#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (!_tmp23_) { +#line 2889 "DirectPhotoPage.c" + const gchar* _tmp24_ = NULL; + GFile* _tmp25_ = NULL; + gchar* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + gchar* _tmp29_ = NULL; +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = _ ("%s does not support the file format of\n%s."); +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = file; +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = g_file_get_path (_tmp25_); +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_ = _tmp26_; +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp28_ = g_strdup_printf (_tmp24_, RESOURCES_APP_TITLE, _tmp27_); +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29_ = _tmp28_; +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + app_window_error_message (_tmp29_, NULL); +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp29_); +#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp27_); +#line 2914 "DirectPhotoPage.c" + } else { +#line 234 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = TRUE; +#line 234 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 2920 "DirectPhotoPage.c" + } + } + } +#line 236 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = FALSE; +#line 236 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 2928 "DirectPhotoPage.c" +} + + +static void direct_photo_page_real_realize (GtkWidget* base) { + DirectPhotoPage * self; + DirectPhoto* photo = NULL; + DirectPhotoSourceCollection* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; + DirectPhoto* _tmp2_ = NULL; + DirectPhoto* _tmp3_ = NULL; +#line 239 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 240 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (GTK_WIDGET_CLASS (direct_photo_page_parent_class)->realize != NULL) { +#line 241 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + GTK_WIDGET_CLASS (direct_photo_page_parent_class)->realize (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), gtk_widget_get_type (), GtkWidget)); +#line 2945 "DirectPhotoPage.c" + } +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = direct_photo_global; +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = self->priv->initial_file; +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = direct_photo_source_collection_get_file_source (_tmp0_, _tmp1_); +#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo = _tmp2_; +#line 245 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = photo; +#line 245 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp3_ != NULL) { +#line 2959 "DirectPhotoPage.c" + DirectViewCollection* _tmp4_ = NULL; + DirectPhoto* _tmp5_ = NULL; +#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = self->priv->view_controller; +#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = photo; +#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_display_mirror_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_VIEW_COLLECTION, ViewCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PHOTO, Photo)); +#line 2968 "DirectPhotoPage.c" + } else { + const gchar* _tmp6_ = NULL; + GFile* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = _ ("Unable open photo %s. Sorry."); +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = self->priv->initial_file; +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = g_file_get_path (_tmp7_); +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = _tmp8_; +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = g_strdup_printf (_tmp6_, _tmp9_); +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = _tmp10_; +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + app_window_panic (_tmp11_); +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp11_); +#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp9_); +#line 2994 "DirectPhotoPage.c" + } +#line 251 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (self->priv->initial_file); +#line 251 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->initial_file = NULL; +#line 239 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (photo); +#line 3002 "DirectPhotoPage.c" +} + + +static void _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed (DirectPhoto* _sender, gboolean b, gpointer self) { +#line 259 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_dphoto_can_rotate_changed ((DirectPhotoPage*) self, b); +#line 3009 "DirectPhotoPage.c" +} + + +static void direct_photo_page_real_photo_changing (EditingHostPage* base, Photo* new_photo) { + DirectPhotoPage * self; + Photo* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + Photo* _tmp8_ = NULL; + DirectPhoto* tmp = NULL; + Photo* _tmp9_ = NULL; + DirectPhoto* _tmp10_ = NULL; + DirectPhoto* _tmp11_ = NULL; +#line 254 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 254 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_PHOTO (new_photo)); +#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = _tmp0_; +#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = _tmp1_ != NULL; +#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp1_); +#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp2_) { +#line 3037 "DirectPhotoPage.c" + DirectPhoto* tmp = NULL; + Photo* _tmp3_ = NULL; + DirectPhoto* _tmp4_ = NULL; + DirectPhoto* _tmp5_ = NULL; +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_DIRECT_PHOTO) ? ((DirectPhoto*) _tmp3_) : NULL; +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp4_ == NULL) { +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp3_); +#line 3050 "DirectPhotoPage.c" + } +#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + tmp = _tmp4_; +#line 258 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = tmp; +#line 258 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp5_ != NULL) { +#line 3058 "DirectPhotoPage.c" + DirectPhoto* _tmp6_ = NULL; + guint _tmp7_ = 0U; +#line 259 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = tmp; +#line 259 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_signal_parse_name ("can-rotate-changed", TYPE_DIRECT_PHOTO, &_tmp7_, NULL, FALSE); +#line 259 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed, self); +#line 3067 "DirectPhotoPage.c" + } +#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (tmp); +#line 3071 "DirectPhotoPage.c" + } +#line 263 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = new_photo; +#line 263 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_demand_load (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DIRECT_PHOTO, DirectPhoto)); +#line 265 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = new_photo; +#line 265 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_DIRECT_PHOTO) ? ((DirectPhoto*) _tmp9_) : NULL); +#line 265 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + tmp = _tmp10_; +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = tmp; +#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp11_ != NULL) { +#line 3087 "DirectPhotoPage.c" + DirectPhoto* _tmp12_ = NULL; +#line 268 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = tmp; +#line 268 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_signal_connect_object (_tmp12_, "can-rotate-changed", (GCallback) _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed, self, 0); +#line 3093 "DirectPhotoPage.c" + } +#line 254 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (tmp); +#line 3097 "DirectPhotoPage.c" +} + + +GFile* direct_photo_page_get_current_file (DirectPhotoPage* self) { + GFile* result = NULL; + Photo* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; + GFile* _tmp3_ = NULL; +#line 272 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_PAGE (self), NULL); +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = _tmp0_; +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _tmp2_; +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp1_); +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = _tmp3_; +#line 273 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 3123 "DirectPhotoPage.c" +} + + +static gboolean direct_photo_page_real_on_context_buttonpress (Page* base, GdkEventButton* event) { + DirectPhotoPage * self; + gboolean result = FALSE; + GtkMenu* context_menu = NULL; + GtkUIManager* _tmp0_ = NULL; + GtkWidget* _tmp1_ = NULL; + GtkMenu* _tmp2_ = NULL; + GdkEventButton* _tmp3_ = NULL; +#line 276 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 276 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->ui; +#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = gtk_ui_manager_get_widget (_tmp0_, "/DirectContextMenu"); +#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_menu_get_type (), GtkMenu)); +#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + context_menu = _tmp2_; +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = event; +#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_popup_context_menu (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), context_menu, _tmp3_); +#line 280 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = TRUE; +#line 280 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (context_menu); +#line 280 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 3157 "DirectPhotoPage.c" +} + + +static void direct_photo_page_update_zoom_menu_item_sensitivity (DirectPhotoPage* self) { + gboolean _tmp0_ = FALSE; + ZoomState _tmp1_ = {0}; + gboolean _tmp2_ = FALSE; + gboolean _tmp4_ = FALSE; + ZoomState _tmp5_ = {0}; + gboolean _tmp6_ = FALSE; +#line 283 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp1_); +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = zoom_state_is_max (&_tmp1_); +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (!_tmp2_) { +#line 3176 "DirectPhotoPage.c" + gboolean _tmp3_ = FALSE; +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = !_tmp3_; +#line 3182 "DirectPhotoPage.c" + } else { +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = FALSE; +#line 3186 "DirectPhotoPage.c" + } +#line 284 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize", _tmp0_); +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp5_); +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = zoom_state_is_default (&_tmp5_); +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (!_tmp6_) { +#line 3196 "DirectPhotoPage.c" + gboolean _tmp7_ = FALSE; +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = !_tmp7_; +#line 3202 "DirectPhotoPage.c" + } else { +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = FALSE; +#line 3206 "DirectPhotoPage.c" + } +#line 285 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize", _tmp4_); +#line 3210 "DirectPhotoPage.c" +} + + +static void direct_photo_page_real_on_increase_size (EditingHostPage* base) { + DirectPhotoPage * self; +#line 288 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->on_increase_size (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 291 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_update_zoom_menu_item_sensitivity (self); +#line 3222 "DirectPhotoPage.c" +} + + +static void direct_photo_page_real_on_decrease_size (EditingHostPage* base) { + DirectPhotoPage * self; +#line 294 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 295 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->on_decrease_size (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 297 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_update_zoom_menu_item_sensitivity (self); +#line 3234 "DirectPhotoPage.c" +} + + +static void direct_photo_page_on_photos_altered (DirectPhotoPage* self, GeeMap* map) { + gboolean contains = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp14_ = FALSE; + gboolean _tmp15_ = FALSE; + gboolean sensitive = FALSE; + gboolean _tmp17_ = FALSE; + gboolean _tmp19_ = FALSE; + gboolean _tmp20_ = FALSE; + gboolean _tmp25_ = FALSE; +#line 300 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 300 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (GEE_IS_MAP (map)); +#line 301 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + contains = FALSE; +#line 302 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 302 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp0_) { +#line 3258 "DirectPhotoPage.c" + Photo* photo = NULL; + Photo* _tmp1_ = NULL; +#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo = _tmp1_; +#line 3265 "DirectPhotoPage.c" + { + GeeIterator* _object_it = NULL; + GeeMap* _tmp2_ = NULL; + GeeSet* _tmp3_ = NULL; + GeeSet* _tmp4_ = NULL; + GeeSet* _tmp5_ = NULL; + GeeIterator* _tmp6_ = NULL; + GeeIterator* _tmp7_ = NULL; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = map; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = gee_map_get_keys (_tmp2_); +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = _tmp3_; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = _tmp4_; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = _tmp6_; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp5_); +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _object_it = _tmp7_; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + while (TRUE) { +#line 3292 "DirectPhotoPage.c" + GeeIterator* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + DataObject* object = NULL; + GeeIterator* _tmp10_ = NULL; + gpointer _tmp11_ = NULL; + DataObject* _tmp12_ = NULL; + Photo* _tmp13_ = NULL; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = _object_it; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = gee_iterator_next (_tmp8_); +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (!_tmp9_) { +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + break; +#line 3308 "DirectPhotoPage.c" + } +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = _object_it; +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = gee_iterator_get (_tmp10_); +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + object = (DataObject*) _tmp11_; +#line 305 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = object; +#line 305 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = photo; +#line 305 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PHOTO, Photo) == _tmp13_) { +#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + contains = TRUE; +#line 308 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (object); +#line 308 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + break; +#line 3328 "DirectPhotoPage.c" + } +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (object); +#line 3332 "DirectPhotoPage.c" + } +#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_object_it); +#line 3336 "DirectPhotoPage.c" + } +#line 302 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (photo); +#line 3340 "DirectPhotoPage.c" + } +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp15_) { +#line 3346 "DirectPhotoPage.c" + gboolean _tmp16_ = FALSE; +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = !_tmp16_; +#line 3352 "DirectPhotoPage.c" + } else { +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = FALSE; +#line 3356 "DirectPhotoPage.c" + } +#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + sensitive = _tmp14_; +#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = sensitive; +#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp17_) { +#line 3364 "DirectPhotoPage.c" + gboolean _tmp18_ = FALSE; +#line 315 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = contains; +#line 315 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + sensitive = _tmp18_; +#line 3370 "DirectPhotoPage.c" + } +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp20_ = sensitive; +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp20_) { +#line 3376 "DirectPhotoPage.c" + Photo* _tmp21_ = NULL; + Photo* _tmp22_ = NULL; + PhotoFileFormat _tmp23_ = 0; + gboolean _tmp24_ = FALSE; +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = _tmp21_; +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_ = photo_get_file_format (_tmp22_); +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = photo_file_format_can_write (_tmp23_); +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = _tmp24_; +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp22_); +#line 3393 "DirectPhotoPage.c" + } else { +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = FALSE; +#line 3397 "DirectPhotoPage.c" + } +#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Save", _tmp19_); +#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = sensitive; +#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp25_); +#line 3405 "DirectPhotoPage.c" +} + + +static void direct_photo_page_on_selection_group_altered (DirectPhotoPage* self) { + CommandManager* _tmp0_ = NULL; + CommandManager* _tmp1_ = NULL; +#line 321 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 328 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 328 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = _tmp0_; +#line 328 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + command_manager_reset (_tmp1_); +#line 328 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _command_manager_unref0 (_tmp1_); +#line 3422 "DirectPhotoPage.c" +} + + +static gboolean direct_photo_page_real_on_double_click (EditingHostPage* base, GdkEventButton* event) { + DirectPhotoPage * self; + gboolean result = FALSE; + FullscreenWindow* fs = NULL; + GtkWindow* _tmp0_ = NULL; + FullscreenWindow* _tmp1_ = NULL; + FullscreenWindow* _tmp2_ = NULL; + GdkEventButton* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 332 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 332 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_FULLSCREEN_WINDOW) ? ((FullscreenWindow*) _tmp0_) : NULL; +#line 332 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp1_ == NULL) { +#line 332 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp0_); +#line 3447 "DirectPhotoPage.c" + } +#line 332 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + fs = _tmp1_; +#line 333 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = fs; +#line 333 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp2_ != NULL) { +#line 3455 "DirectPhotoPage.c" + FullscreenWindow* _tmp3_ = NULL; +#line 334 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = fs; +#line 334 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + fullscreen_window_close (_tmp3_); +#line 336 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = TRUE; +#line 336 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (fs); +#line 336 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 3467 "DirectPhotoPage.c" + } +#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = event; +#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->on_double_click (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp4_); +#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = _tmp5_; +#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (fs); +#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 3479 "DirectPhotoPage.c" +} + + +static void direct_photo_page_real_update_ui (EditingHostPage* base, gboolean missing) { + DirectPhotoPage * self; + gboolean sensitivity = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + gboolean _tmp6_ = FALSE; + gboolean _tmp7_ = FALSE; + gboolean _tmp8_ = FALSE; + gboolean _tmp9_ = FALSE; + gboolean _tmp10_ = FALSE; + gboolean _tmp11_ = FALSE; + gboolean _tmp12_ = FALSE; + gboolean _tmp13_ = FALSE; + gboolean _tmp14_ = FALSE; + gboolean _tmp15_ = FALSE; + gboolean _tmp16_ = FALSE; + gboolean _tmp17_ = FALSE; + gboolean _tmp18_ = FALSE; + gboolean _tmp19_ = FALSE; + gboolean _tmp20_ = FALSE; + gboolean _tmp21_ = FALSE; + gboolean _tmp22_ = FALSE; + gboolean _tmp23_ = FALSE; + gboolean _tmp24_ = FALSE; + gboolean _tmp25_ = FALSE; + gboolean _tmp26_ = FALSE; + gboolean _tmp27_ = FALSE; + gboolean _tmp29_ = FALSE; +#line 342 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 343 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = missing; +#line 343 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + sensitivity = !_tmp0_; +#line 345 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = sensitivity; +#line 345 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Save", _tmp1_); +#line 346 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = sensitivity; +#line 346 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SaveAs", _tmp2_); +#line 347 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = sensitivity; +#line 347 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SendTo", _tmp3_); +#line 348 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = sensitivity; +#line 348 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Publish", _tmp4_); +#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = sensitivity; +#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Print", _tmp5_); +#line 350 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = sensitivity; +#line 350 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonJumpToFile", _tmp6_); +#line 352 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = sensitivity; +#line 352 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonUndo", _tmp7_); +#line 353 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = sensitivity; +#line 353 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonRedo", _tmp8_); +#line 355 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = sensitivity; +#line 355 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize", _tmp9_); +#line 356 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = sensitivity; +#line 356 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize", _tmp10_); +#line 357 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = sensitivity; +#line 357 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ZoomFit", _tmp11_); +#line 358 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = sensitivity; +#line 358 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Zoom100", _tmp12_); +#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = sensitivity; +#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Zoom200", _tmp13_); +#line 361 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = sensitivity; +#line 361 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", _tmp14_); +#line 362 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = sensitivity; +#line 362 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", _tmp15_); +#line 363 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = sensitivity; +#line 363 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipHorizontally", _tmp16_); +#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = sensitivity; +#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipVertically", _tmp17_); +#line 365 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = sensitivity; +#line 365 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Enhance", _tmp18_); +#line 366 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = sensitivity; +#line 366 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Crop", _tmp19_); +#line 367 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp20_ = sensitivity; +#line 367 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Straighten", _tmp20_); +#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21_ = sensitivity; +#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RedEye", _tmp21_); +#line 369 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = sensitivity; +#line 369 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Adjust", _tmp22_); +#line 370 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_ = sensitivity; +#line 370 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp23_); +#line 371 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = sensitivity; +#line 371 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", _tmp24_); +#line 372 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = sensitivity; +#line 372 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Fullscreen", _tmp25_); +#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp27_) { +#line 3625 "DirectPhotoPage.c" + gboolean _tmp28_ = FALSE; +#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp28_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = !_tmp28_; +#line 3631 "DirectPhotoPage.c" + } else { +#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = FALSE; +#line 3635 "DirectPhotoPage.c" + } +#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", _tmp26_); +#line 376 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29_ = missing; +#line 376 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->update_ui (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp29_); +#line 3643 "DirectPhotoPage.c" +} + + +static void direct_photo_page_real_update_actions (Page* base, gint selected_count, gint count) { + DirectPhotoPage * self; + gboolean multiple = FALSE; + ViewCollection* _tmp0_ = NULL; + ViewCollection* _tmp1_ = NULL; + gint _tmp2_ = 0; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + gboolean revert_possible = FALSE; + gboolean _tmp12_ = FALSE; + gboolean _tmp13_ = FALSE; + gboolean rotate_possible = FALSE; + gboolean _tmp17_ = FALSE; + gboolean _tmp18_ = FALSE; + gboolean enhance_possible = FALSE; + gboolean _tmp22_ = FALSE; + gboolean _tmp23_ = FALSE; + gboolean _tmp24_ = FALSE; + gboolean _tmp25_ = FALSE; + gboolean _tmp26_ = FALSE; + gboolean _tmp27_ = FALSE; + gboolean _tmp28_ = FALSE; + gboolean _tmp29_ = FALSE; + gboolean _tmp30_ = FALSE; + gboolean _tmp31_ = FALSE; + Photo* _tmp40_ = NULL; + Photo* _tmp41_ = NULL; + gboolean _tmp42_ = FALSE; + gint _tmp46_ = 0; + gint _tmp47_ = 0; +#line 379 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 380 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 380 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = _tmp0_; +#line 380 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection)); +#line 380 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _tmp2_ > 1; +#line 380 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data_collection_unref0 (_tmp1_); +#line 380 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + multiple = _tmp3_; +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp5_) { +#line 3696 "DirectPhotoPage.c" + gboolean _tmp6_ = FALSE; + Photo* _tmp7_ = NULL; + Photo* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + gboolean _tmp10_ = FALSE; +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = _tmp7_; +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = photo_has_transformations (_tmp8_); +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = _tmp9_; +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp8_); +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp10_) { +#line 3714 "DirectPhotoPage.c" + gboolean _tmp11_ = FALSE; +#line 382 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 382 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = !_tmp11_; +#line 3720 "DirectPhotoPage.c" + } else { +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = FALSE; +#line 3724 "DirectPhotoPage.c" + } +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = _tmp6_; +#line 3728 "DirectPhotoPage.c" + } else { +#line 382 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = FALSE; +#line 3732 "DirectPhotoPage.c" + } +#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + revert_possible = _tmp4_; +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp13_) { +#line 3740 "DirectPhotoPage.c" + Photo* _tmp14_ = NULL; + Photo* _tmp15_ = NULL; + gboolean _tmp16_ = FALSE; +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = _tmp14_; +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = editing_host_page_is_rotate_available (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp15_); +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = _tmp16_; +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp15_); +#line 3754 "DirectPhotoPage.c" + } else { +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = FALSE; +#line 3758 "DirectPhotoPage.c" + } +#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + rotate_possible = _tmp12_; +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp18_) { +#line 3766 "DirectPhotoPage.c" + Photo* _tmp19_ = NULL; + Photo* _tmp20_ = NULL; + gboolean _tmp21_ = FALSE; +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp20_ = _tmp19_; +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21_ = editing_host_page_is_enhance_available (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp20_); +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = _tmp21_; +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp20_); +#line 3780 "DirectPhotoPage.c" + } else { +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = FALSE; +#line 3784 "DirectPhotoPage.c" + } +#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + enhance_possible = _tmp17_; +#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = multiple; +#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "PrevPhoto", _tmp22_); +#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_ = multiple; +#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "NextPhoto", _tmp23_); +#line 388 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = rotate_possible; +#line 388 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", _tmp24_); +#line 389 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = rotate_possible; +#line 389 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", _tmp25_); +#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = rotate_possible; +#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipHorizontally", _tmp26_); +#line 391 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_ = rotate_possible; +#line 391 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipVertically", _tmp27_); +#line 392 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp28_ = revert_possible; +#line 392 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp28_); +#line 393 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29_ = enhance_possible; +#line 393 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Enhance", _tmp29_); +#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp30_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", _tmp30_); +#line 397 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 397 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp31_) { +#line 3828 "DirectPhotoPage.c" + Photo* _tmp32_ = NULL; + Photo* _tmp33_ = NULL; + Scaling _tmp34_ = {0}; + gboolean _tmp35_ = FALSE; + Photo* _tmp36_ = NULL; + Photo* _tmp37_ = NULL; + Scaling _tmp38_ = {0}; + gboolean _tmp39_ = FALSE; +#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp32_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp33_ = _tmp32_; +#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + scaling_for_original (&_tmp34_); +#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_ = editing_tools_crop_tool_is_available (_tmp33_, &_tmp34_); +#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Crop", _tmp35_); +#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp33_); +#line 399 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp36_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 399 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp37_ = _tmp36_; +#line 399 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + scaling_for_original (&_tmp38_); +#line 399 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp39_ = editing_tools_redeye_tool_is_available (_tmp37_, &_tmp38_); +#line 399 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RedEye", _tmp39_); +#line 399 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp37_); +#line 3861 "DirectPhotoPage.c" + } +#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp41_ = _tmp40_; +#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp42_ = _tmp41_ != NULL; +#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp41_); +#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp42_) { +#line 3873 "DirectPhotoPage.c" + Photo* _tmp43_ = NULL; + Photo* _tmp44_ = NULL; + PhotoFileFormat _tmp45_ = 0; +#line 406 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp43_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 406 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp44_ = _tmp43_; +#line 406 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_ = photo_get_file_format (_tmp44_); +#line 406 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", _tmp45_ != PHOTO_FILE_FORMAT_RAW); +#line 406 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp44_); +#line 3887 "DirectPhotoPage.c" + } else { +#line 408 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", FALSE); +#line 3891 "DirectPhotoPage.c" + } +#line 411 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp46_ = selected_count; +#line 411 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp47_ = count; +#line 411 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + PAGE_CLASS (direct_photo_page_parent_class)->update_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp46_, _tmp47_); +#line 3899 "DirectPhotoPage.c" +} + + +static gboolean direct_photo_page_check_ok_to_close_photo (DirectPhotoPage* self, Photo* photo) { + gboolean result = FALSE; + Photo* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + gboolean is_writeable = FALSE; + Photo* _tmp5_ = NULL; + Photo* _tmp6_ = NULL; + PhotoFileFormat _tmp7_ = 0; + gboolean _tmp8_ = FALSE; + gboolean _tmp9_ = FALSE; + const gchar* _tmp10_ = NULL; + gboolean _tmp11_ = FALSE; + gchar* save_option = NULL; + gchar* _tmp14_ = NULL; + GtkResponseType response = 0; + const gchar* _tmp15_ = NULL; + Photo* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + const gchar* _tmp22_ = NULL; + GtkResponseType _tmp23_ = 0; + GtkResponseType _tmp24_ = 0; + GtkResponseType _tmp25_ = 0; +#line 414 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_PAGE (self), FALSE); +#line 414 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail ((photo == NULL) || IS_PHOTO (photo), FALSE); +#line 417 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = photo; +#line 417 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp0_ == NULL) { +#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = TRUE; +#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 3943 "DirectPhotoPage.c" + } +#line 420 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = photo; +#line 420 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = photo_has_alterations (_tmp1_); +#line 420 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (!_tmp2_) { +#line 421 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = TRUE; +#line 421 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 3955 "DirectPhotoPage.c" + } +#line 423 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = self->priv->drop_if_dirty; +#line 423 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp3_) { +#line 3961 "DirectPhotoPage.c" + Photo* _tmp4_ = NULL; +#line 426 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = photo; +#line 426 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo_remove_all_transformations (_tmp4_); +#line 428 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = TRUE; +#line 428 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 3971 "DirectPhotoPage.c" + } +#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = _tmp5_; +#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = photo_get_file_format (_tmp6_); +#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = photo_file_format_can_write (_tmp7_); +#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = _tmp8_; +#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp6_); +#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + is_writeable = _tmp9_; +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = is_writeable; +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp11_) { +#line 3991 "DirectPhotoPage.c" + const gchar* _tmp12_ = NULL; +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = _ ("_Save"); +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = _tmp12_; +#line 3997 "DirectPhotoPage.c" + } else { + const gchar* _tmp13_ = NULL; +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = _ ("_Save a Copy"); +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = _tmp13_; +#line 4004 "DirectPhotoPage.c" + } +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = g_strdup (_tmp10_); +#line 432 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save_option = _tmp14_; +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = _ ("Lose changes to %s?"); +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = photo; +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = media_source_get_basename (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = _tmp17_; +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = g_strdup_printf (_tmp15_, _tmp18_); +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp20_ = _tmp19_; +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21_ = save_option; +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = _ ("Close _without Saving"); +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_ = app_window_negate_affirm_cancel_question (_tmp20_, _tmp21_, _tmp22_, NULL, NULL); +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = _tmp23_; +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp20_); +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp18_); +#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + response = _tmp24_; +#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = response; +#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp25_ == GTK_RESPONSE_YES) { +#line 4040 "DirectPhotoPage.c" + Photo* _tmp26_ = NULL; +#line 439 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = photo; +#line 439 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo_remove_all_transformations (_tmp26_); +#line 4046 "DirectPhotoPage.c" + } else { + GtkResponseType _tmp27_ = 0; +#line 440 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_ = response; +#line 440 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp27_ == GTK_RESPONSE_NO) { +#line 4053 "DirectPhotoPage.c" + gboolean _tmp28_ = FALSE; +#line 441 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp28_ = is_writeable; +#line 441 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp28_) { +#line 4059 "DirectPhotoPage.c" + Photo* _tmp29_ = NULL; + GFile* _tmp30_ = NULL; + GFile* _tmp31_ = NULL; + Photo* _tmp32_ = NULL; + Photo* _tmp33_ = NULL; + PhotoFileFormat _tmp34_ = 0; +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29_ = photo; +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp30_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_ = _tmp30_; +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp32_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp33_ = _tmp32_; +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp34_ = photo_get_file_format (_tmp33_); +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_save (self, _tmp31_, 0, SCALE_CONSTRAINT_ORIGINAL, JPEG_QUALITY_HIGH, _tmp34_, FALSE, TRUE); +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp33_); +#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp31_); +#line 4084 "DirectPhotoPage.c" + } else { +#line 445 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_on_save_as (self); +#line 4088 "DirectPhotoPage.c" + } + } else { + gboolean _tmp35_ = FALSE; + gboolean _tmp36_ = FALSE; + GtkResponseType _tmp37_ = 0; +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp37_ = response; +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp37_ == GTK_RESPONSE_CANCEL) { +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp36_ = TRUE; +#line 4100 "DirectPhotoPage.c" + } else { + GtkResponseType _tmp38_ = 0; +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp38_ = response; +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp36_ = _tmp38_ == GTK_RESPONSE_DELETE_EVENT; +#line 4107 "DirectPhotoPage.c" + } +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp36_) { +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_ = TRUE; +#line 4113 "DirectPhotoPage.c" + } else { + GtkResponseType _tmp39_ = 0; +#line 447 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp39_ = response; +#line 447 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_ = _tmp39_ == GTK_RESPONSE_CLOSE; +#line 4120 "DirectPhotoPage.c" + } +#line 446 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp35_) { +#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = FALSE; +#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (save_option); +#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 4130 "DirectPhotoPage.c" + } + } + } +#line 451 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = TRUE; +#line 451 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (save_option); +#line 451 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 4140 "DirectPhotoPage.c" +} + + +gboolean direct_photo_page_check_quit (DirectPhotoPage* self) { + gboolean result = FALSE; + Photo* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; +#line 454 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO_PAGE (self), FALSE); +#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = _tmp0_; +#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = direct_photo_page_check_ok_to_close_photo (self, _tmp1_); +#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _tmp2_; +#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp1_); +#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = _tmp3_; +#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 4166 "DirectPhotoPage.c" +} + + +static gboolean direct_photo_page_real_confirm_replace_photo (EditingHostPage* base, Photo* old_photo, Photo* new_photo) { + DirectPhotoPage * self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + Photo* _tmp1_ = NULL; +#line 458 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 458 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail ((old_photo == NULL) || IS_PHOTO (old_photo), FALSE); +#line 458 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (IS_PHOTO (new_photo), FALSE); +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = old_photo; +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp1_ != NULL) { +#line 4185 "DirectPhotoPage.c" + Photo* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = old_photo; +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = direct_photo_page_check_ok_to_close_photo (self, _tmp2_); +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = _tmp3_; +#line 4194 "DirectPhotoPage.c" + } else { +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = TRUE; +#line 4198 "DirectPhotoPage.c" + } +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = _tmp0_; +#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 4204 "DirectPhotoPage.c" +} + + +static void direct_photo_page_save (DirectPhotoPage* self, GFile* dest, gint scale, ScaleConstraint constraint, JpegQuality quality, PhotoFileFormat format, gboolean copy_unmodified, gboolean save_metadata) { + Scaling scaling = {0}; + ScaleConstraint _tmp0_ = 0; + gint _tmp1_ = 0; + Scaling _tmp2_ = {0}; + DirectPhoto* photo = NULL; + DirectPhotoSourceCollection* _tmp19_ = NULL; + GFile* _tmp20_ = NULL; + DirectPhoto* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + DirectView* tmp_view = NULL; + DirectPhoto* _tmp24_ = NULL; + DirectView* _tmp25_ = NULL; + DirectViewCollection* _tmp26_ = NULL; + DirectView* _tmp27_ = NULL; + DirectPhotoSourceCollection* _tmp28_ = NULL; + DirectPhoto* _tmp29_ = NULL; + DirectViewCollection* _tmp30_ = NULL; + DirectPhoto* _tmp31_ = NULL; + GError * _inner_error_ = NULL; +#line 462 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 462 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (G_IS_FILE (dest)); +#line 464 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = constraint; +#line 464 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = scale; +#line 464 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + scaling_for_constraint (_tmp0_, _tmp1_, FALSE, &_tmp2_); +#line 464 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + scaling = _tmp2_; +#line 4241 "DirectPhotoPage.c" + { + Photo* _tmp3_ = NULL; + Photo* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + Scaling _tmp6_ = {0}; + JpegQuality _tmp7_ = 0; + PhotoFileFormat _tmp8_ = 0; + gboolean _tmp9_ = FALSE; + gboolean _tmp10_ = FALSE; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = _tmp3_; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = dest; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = scaling; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = quality; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = format; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = copy_unmodified; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = save_metadata; +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo_export (_tmp4_, _tmp5_, &_tmp6_, _tmp7_, _tmp8_, _tmp9_, _tmp10_, &_inner_error_); +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp4_); +#line 467 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 4273 "DirectPhotoPage.c" + goto __catch45_g_error; + } + } + goto __finally45; + __catch45_g_error: + { + GError* err = NULL; + const gchar* _tmp11_ = NULL; + GFile* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + GError* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; + gchar* _tmp18_ = NULL; +#line 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + err = _inner_error_; +#line 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _inner_error_ = NULL; +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = _ ("Error while saving to %s: %s"); +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = dest; +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = g_file_get_path (_tmp12_); +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = _tmp13_; +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = err; +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = _tmp15_->message; +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = g_strdup_printf (_tmp11_, _tmp14_, _tmp16_); +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = _tmp17_; +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + app_window_error_message (_tmp18_, NULL); +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp18_); +#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp14_); +#line 472 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_error_free0 (err); +#line 472 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return; +#line 4319 "DirectPhotoPage.c" + } + __finally45: +#line 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.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 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_clear_error (&_inner_error_); +#line 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return; +#line 4330 "DirectPhotoPage.c" + } +#line 477 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = direct_photo_global; +#line 477 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp20_ = dest; +#line 477 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = direct_photo_source_collection_fetch (_tmp19_, _tmp20_, &_tmp21_, TRUE); +#line 477 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (photo); +#line 477 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + photo = _tmp21_; +#line 477 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_ = _tmp22_; +#line 477 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp23_); +#line 479 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = photo; +#line 479 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = direct_view_new (_tmp24_); +#line 479 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + tmp_view = _tmp25_; +#line 480 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = self->priv->view_controller; +#line 480 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_ = tmp_view; +#line 480 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_DATA_OBJECT, DataObject)); +#line 482 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp28_ = direct_photo_global; +#line 482 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29_ = photo; +#line 482 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_source_collection_reimport_photo (_tmp28_, _tmp29_); +#line 483 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp30_ = self->priv->view_controller; +#line 483 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_ = photo; +#line 483 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_display_mirror_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_VIEW_COLLECTION, ViewCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_PHOTO, Photo)); +#line 462 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (tmp_view); +#line 462 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (photo); +#line 4374 "DirectPhotoPage.c" +} + + +static void direct_photo_page_on_save (DirectPhotoPage* self) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + Photo* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + Photo* _tmp11_ = NULL; + Photo* _tmp12_ = NULL; + GFile* _tmp13_ = NULL; + GFile* _tmp14_ = NULL; + Photo* _tmp15_ = NULL; + Photo* _tmp16_ = NULL; + PhotoFileFormat _tmp17_ = 0; +#line 486 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _tmp2_; +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = photo_has_alterations (_tmp3_); +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = !_tmp4_; +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp3_); +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp5_) { +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = TRUE; +#line 4408 "DirectPhotoPage.c" + } else { + Photo* _tmp6_ = NULL; + Photo* _tmp7_ = NULL; + PhotoFileFormat _tmp8_ = 0; + gboolean _tmp9_ = FALSE; +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = _tmp6_; +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = photo_get_file_format (_tmp7_); +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = photo_file_format_can_write (_tmp8_); +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = !_tmp9_; +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp7_); +#line 4426 "DirectPhotoPage.c" + } +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp1_) { +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = TRUE; +#line 4432 "DirectPhotoPage.c" + } else { + gboolean _tmp10_ = FALSE; +#line 488 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 488 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = _tmp10_; +#line 4439 "DirectPhotoPage.c" + } +#line 487 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp0_) { +#line 489 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return; +#line 4445 "DirectPhotoPage.c" + } +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = _tmp11_; +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = _tmp13_; +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = _tmp15_; +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = photo_get_file_format (_tmp16_); +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_save (self, _tmp14_, 0, SCALE_CONSTRAINT_ORIGINAL, JPEG_QUALITY_HIGH, _tmp17_, FALSE, TRUE); +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp16_); +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp14_); +#line 492 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp12_); +#line 4469 "DirectPhotoPage.c" +} + + +static void direct_photo_page_on_save_as (DirectPhotoPage* self) { + ExportDialog* export_dialog = NULL; + const gchar* _tmp0_ = NULL; + ExportDialog* _tmp1_ = NULL; + gint scale = 0; + ScaleConstraint constraint = 0; + ExportFormatParameters export_params = {0}; + ExportFormatParameters _tmp2_ = {0}; + ExportDialog* _tmp3_ = NULL; + gint _tmp4_ = 0; + ScaleConstraint _tmp5_ = 0; + gboolean _tmp6_ = FALSE; + gchar* filename = NULL; + Photo* _tmp7_ = NULL; + Photo* _tmp8_ = NULL; + ExportFormatParameters _tmp9_ = {0}; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + PhotoFileFormat effective_export_format = 0; + Photo* _tmp12_ = NULL; + Photo* _tmp13_ = NULL; + ExportFormatParameters _tmp14_ = {0}; + PhotoFileFormat _tmp15_ = 0; + PhotoFileFormat _tmp16_ = 0; + gchar** output_format_extensions = NULL; + PhotoFileFormat _tmp17_ = 0; + PhotoFileFormatProperties* _tmp18_ = NULL; + PhotoFileFormatProperties* _tmp19_ = NULL; + gint _tmp20_ = 0; + gchar** _tmp21_ = NULL; + gchar** _tmp22_ = NULL; + gint _tmp22__length1 = 0; + gint output_format_extensions_length1 = 0; + gint _output_format_extensions_size_ = 0; + GtkFileFilter* output_format_filter = NULL; + GtkFileFilter* _tmp23_ = NULL; + gchar** _tmp24_ = NULL; + gint _tmp24__length1 = 0; + GtkFileChooserDialog* save_as_dialog = NULL; + const gchar* _tmp36_ = NULL; + AppWindow* _tmp37_ = NULL; + AppWindow* _tmp38_ = NULL; + GtkFileChooserDialog* _tmp39_ = NULL; + GtkFileChooserDialog* _tmp40_ = NULL; + GtkFileChooserDialog* _tmp41_ = NULL; + GtkFileChooserDialog* _tmp42_ = NULL; + const gchar* _tmp43_ = NULL; + GtkFileChooserDialog* _tmp44_ = NULL; + GFile* _tmp45_ = NULL; + gchar* _tmp46_ = NULL; + gchar* _tmp47_ = NULL; + GtkFileChooserDialog* _tmp48_ = NULL; + GtkFileFilter* _tmp49_ = NULL; + GtkFileFilter* _tmp50_ = NULL; + GtkFileChooserDialog* _tmp51_ = NULL; + GtkFileChooserDialog* _tmp52_ = NULL; + gint response = 0; + GtkFileChooserDialog* _tmp53_ = NULL; + gint _tmp54_ = 0; + gint _tmp55_ = 0; + GtkFileChooserDialog* _tmp74_ = NULL; +#line 496 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 497 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = _ ("Save As"); +#line 497 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = export_dialog_new (_tmp0_); +#line 497 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_object_ref_sink (_tmp1_); +#line 497 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + export_dialog = _tmp1_; +#line 501 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + export_format_parameters_last (&_tmp2_); +#line 501 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + export_params = _tmp2_; +#line 502 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = export_dialog; +#line 502 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = export_dialog_execute (_tmp3_, &_tmp4_, &_tmp5_, &export_params); +#line 502 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + scale = _tmp4_; +#line 502 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + constraint = _tmp5_; +#line 502 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (!_tmp6_) { +#line 503 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (export_dialog); +#line 503 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return; +#line 4562 "DirectPhotoPage.c" + } +#line 505 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 505 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = _tmp7_; +#line 505 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = export_params; +#line 505 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp10_ = photo_get_export_basename_for_parameters (_tmp8_, &_tmp9_); +#line 505 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp11_ = _tmp10_; +#line 505 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp8_); +#line 505 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + filename = _tmp11_; +#line 506 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp12_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 506 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp13_ = _tmp12_; +#line 506 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp14_ = export_params; +#line 506 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp15_ = photo_get_export_format_for_parameters (_tmp13_, &_tmp14_); +#line 506 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp16_ = _tmp15_; +#line 506 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp13_); +#line 506 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + effective_export_format = _tmp16_; +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp17_ = effective_export_format; +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp18_ = photo_file_format_get_properties (_tmp17_); +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp19_ = _tmp18_; +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp21_ = photo_file_format_properties_get_known_extensions (_tmp19_, &_tmp20_); +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22_ = _tmp21_; +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp22__length1 = _tmp20_; +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _photo_file_format_properties_unref0 (_tmp19_); +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + output_format_extensions = _tmp22_; +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + output_format_extensions_length1 = _tmp22__length1; +#line 509 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _output_format_extensions_size_ = output_format_extensions_length1; +#line 511 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp23_ = gtk_file_filter_new (); +#line 511 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_object_ref_sink (_tmp23_); +#line 511 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + output_format_filter = _tmp23_; +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24_ = output_format_extensions; +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp24__length1 = output_format_extensions_length1; +#line 4622 "DirectPhotoPage.c" + { + gchar** extension_collection = NULL; + gint extension_collection_length1 = 0; + gint _extension_collection_size_ = 0; + gint extension_it = 0; +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + extension_collection = _tmp24_; +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + extension_collection_length1 = _tmp24__length1; +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + for (extension_it = 0; extension_it < _tmp24__length1; extension_it = extension_it + 1) { +#line 4634 "DirectPhotoPage.c" + gchar* _tmp25_ = NULL; + gchar* extension = NULL; +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp25_ = g_strdup (extension_collection[extension_it]); +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + extension = _tmp25_; +#line 4641 "DirectPhotoPage.c" + { + gchar* uppercase_extension = NULL; + const gchar* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + GtkFileFilter* _tmp28_ = NULL; + const gchar* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + GtkFileFilter* _tmp32_ = NULL; + const gchar* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; +#line 513 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp26_ = extension; +#line 513 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp27_ = g_utf8_strup (_tmp26_, (gssize) -1); +#line 513 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + uppercase_extension = _tmp27_; +#line 514 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp28_ = output_format_filter; +#line 514 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp29_ = extension; +#line 514 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp30_ = g_strconcat ("*.", _tmp29_, NULL); +#line 514 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp31_ = _tmp30_; +#line 514 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_filter_add_pattern (_tmp28_, _tmp31_); +#line 514 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp31_); +#line 515 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp32_ = output_format_filter; +#line 515 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp33_ = uppercase_extension; +#line 515 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp34_ = g_strconcat ("*.", _tmp33_, NULL); +#line 515 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp35_ = _tmp34_; +#line 515 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_filter_add_pattern (_tmp32_, _tmp35_); +#line 515 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp35_); +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (uppercase_extension); +#line 512 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (extension); +#line 4688 "DirectPhotoPage.c" + } + } + } +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp36_ = _ ("Save As"); +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp37_ = app_window_get_instance (); +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp38_ = _tmp37_; +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp39_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp36_, G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_window_get_type (), GtkWindow), GTK_FILE_CHOOSER_ACTION_SAVE, RESOURCES_CANCEL_LABEL, GTK_RESPONSE_CANCEL, RESOURCES_OK_LABEL, GTK_RESPONSE_OK, NULL); +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_object_ref_sink (_tmp39_); +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp40_ = _tmp39_; +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp38_); +#line 518 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + save_as_dialog = _tmp40_; +#line 521 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp41_ = save_as_dialog; +#line 521 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_chooser_set_select_multiple (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), FALSE); +#line 522 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp42_ = save_as_dialog; +#line 522 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp43_ = filename; +#line 522 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_chooser_set_current_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), _tmp43_); +#line 523 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp44_ = save_as_dialog; +#line 523 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp45_ = self->priv->current_save_dir; +#line 523 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp46_ = g_file_get_path (_tmp45_); +#line 523 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp47_ = _tmp46_; +#line 523 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_chooser_set_current_folder (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), _tmp47_); +#line 523 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp47_); +#line 524 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp48_ = save_as_dialog; +#line 524 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp49_ = output_format_filter; +#line 524 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp50_ = _g_object_ref0 (_tmp49_); +#line 524 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_chooser_add_filter (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), _tmp50_); +#line 525 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp51_ = save_as_dialog; +#line 525 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_chooser_set_do_overwrite_confirmation (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), TRUE); +#line 526 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp52_ = save_as_dialog; +#line 526 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_file_chooser_set_local_only (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), FALSE); +#line 528 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp53_ = save_as_dialog; +#line 528 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp54_ = gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_dialog_get_type (), GtkDialog)); +#line 528 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + response = _tmp54_; +#line 529 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp55_ = response; +#line 529 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp55_ == ((gint) GTK_RESPONSE_OK)) { +#line 4756 "DirectPhotoPage.c" + GtkFileChooserDialog* _tmp56_ = NULL; + gchar* _tmp57_ = NULL; + gchar* _tmp58_ = NULL; + GFile* _tmp59_ = NULL; + GFile* _tmp60_ = NULL; + gint _tmp61_ = 0; + ScaleConstraint _tmp62_ = 0; + ExportFormatParameters _tmp63_ = {0}; + JpegQuality _tmp64_ = 0; + PhotoFileFormat _tmp65_ = 0; + ExportFormatParameters _tmp66_ = {0}; + ExportFormatMode _tmp67_ = 0; + ExportFormatParameters _tmp68_ = {0}; + gboolean _tmp69_ = FALSE; + GtkFileChooserDialog* _tmp70_ = NULL; + gchar* _tmp71_ = NULL; + gchar* _tmp72_ = NULL; + GFile* _tmp73_ = NULL; +#line 532 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->drop_if_dirty = TRUE; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp56_ = save_as_dialog; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp57_ = gtk_file_chooser_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser)); +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp58_ = _tmp57_; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp59_ = g_file_new_for_uri (_tmp58_); +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp60_ = _tmp59_; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp61_ = scale; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp62_ = constraint; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp63_ = export_params; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp64_ = _tmp63_.quality; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp65_ = effective_export_format; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp66_ = export_params; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp67_ = _tmp66_.mode; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp68_ = export_params; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp69_ = _tmp68_.export_metadata; +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_save (self, _tmp60_, _tmp61_, _tmp62_, _tmp64_, _tmp65_, _tmp67_ == EXPORT_FORMAT_MODE_UNMODIFIED, _tmp69_); +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp60_); +#line 533 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp58_); +#line 536 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->drop_if_dirty = FALSE; +#line 538 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp70_ = save_as_dialog; +#line 538 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp71_ = gtk_file_chooser_get_current_folder (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser)); +#line 538 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp72_ = _tmp71_; +#line 538 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp73_ = g_file_new_for_path (_tmp72_); +#line 538 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (self->priv->current_save_dir); +#line 538 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->current_save_dir = _tmp73_; +#line 538 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (_tmp72_); +#line 4827 "DirectPhotoPage.c" + } +#line 541 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp74_ = save_as_dialog; +#line 541 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, gtk_widget_get_type (), GtkWidget)); +#line 496 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (save_as_dialog); +#line 496 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (output_format_filter); +#line 496 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + output_format_extensions = (_vala_array_free (output_format_extensions, output_format_extensions_length1, (GDestroyNotify) g_free), NULL); +#line 496 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_free0 (filename); +#line 496 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (export_dialog); +#line 4843 "DirectPhotoPage.c" +} + + +static void direct_photo_page_on_send_to (DirectPhotoPage* self) { + gboolean _tmp0_ = FALSE; +#line 544 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 545 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 545 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp0_) { +#line 4855 "DirectPhotoPage.c" + ViewCollection* _tmp1_ = NULL; + ViewCollection* _tmp2_ = NULL; + GeeList* _tmp3_ = NULL; + GeeCollection* _tmp4_ = NULL; +#line 546 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 546 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = _tmp1_; +#line 546 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = view_collection_get_selected_sources (_tmp2_); +#line 546 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection); +#line 546 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + desktop_integration_send_to (_tmp4_); +#line 546 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp4_); +#line 546 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data_collection_unref0 (_tmp2_); +#line 4874 "DirectPhotoPage.c" + } +} + + +static gboolean direct_photo_page_real_on_app_key_pressed (Page* base, GdkEventKey* event) { + DirectPhotoPage * self; + gboolean result = FALSE; + gboolean handled = FALSE; + GdkEventKey* _tmp0_ = NULL; + guint _tmp1_ = 0U; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + GQuark _tmp5_ = 0U; +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + static GQuark _tmp4_label0 = 0; +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + static GQuark _tmp4_label1 = 0; +#line 4892 "DirectPhotoPage.c" + gboolean _tmp6_ = FALSE; + gboolean _tmp7_ = FALSE; +#line 549 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 549 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 550 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + handled = TRUE; +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = event; +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = _tmp0_->keyval; +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = gdk_keyval_name (_tmp1_); +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _tmp2_; +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_); +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("bracketright")))) { +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + switch (0) { +#line 4915 "DirectPhotoPage.c" + default: + { +#line 554 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise"); +#line 555 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + break; +#line 4922 "DirectPhotoPage.c" + } + } + } else if (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("bracketleft")))) { +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + switch (0) { +#line 4928 "DirectPhotoPage.c" + default: + { +#line 558 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise"); +#line 559 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + break; +#line 4935 "DirectPhotoPage.c" + } + } + } else { +#line 552 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + switch (0) { +#line 4941 "DirectPhotoPage.c" + default: + { +#line 562 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + handled = FALSE; +#line 563 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + break; +#line 4948 "DirectPhotoPage.c" + } + } + } +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = handled; +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp7_) { +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = TRUE; +#line 4958 "DirectPhotoPage.c" + } else { + GdkEventKey* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = event; +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = PAGE_CLASS (direct_photo_page_parent_class)->on_app_key_pressed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp8_); +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = _tmp9_; +#line 4968 "DirectPhotoPage.c" + } +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = _tmp6_; +#line 566 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 4974 "DirectPhotoPage.c" +} + + +static void direct_photo_page_on_print (DirectPhotoPage* self) { + ViewCollection* _tmp0_ = NULL; + ViewCollection* _tmp1_ = NULL; + gint _tmp2_ = 0; + gboolean _tmp3_ = FALSE; +#line 569 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 570 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 570 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = _tmp0_; +#line 570 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp2_ = view_collection_get_selected_count (_tmp1_); +#line 570 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp3_ = _tmp2_ > 0; +#line 570 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data_collection_unref0 (_tmp1_); +#line 570 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (_tmp3_) { +#line 4997 "DirectPhotoPage.c" + PrintManager* _tmp4_ = NULL; + PrintManager* _tmp5_ = NULL; + ViewCollection* _tmp6_ = NULL; + ViewCollection* _tmp7_ = NULL; + GeeList* _tmp8_ = NULL; + GeeCollection* _tmp9_ = NULL; +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp4_ = print_manager_get_instance (); +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp5_ = _tmp4_; +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp7_ = _tmp6_; +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp8_ = view_collection_get_selected_sources_of_type (_tmp7_, TYPE_PHOTO); +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection); +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + print_manager_spool_photo (_tmp5_, _tmp9_); +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (_tmp9_); +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data_collection_unref0 (_tmp7_); +#line 571 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _print_manager_unref0 (_tmp5_); +#line 5024 "DirectPhotoPage.c" + } +} + + +static Block6Data* block6_data_ref (Block6Data* _data6_) { +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_atomic_int_inc (&_data6_->_ref_count_); +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return _data6_; +#line 5034 "DirectPhotoPage.c" +} + + +static void block6_data_unref (void * _userdata_) { + Block6Data* _data6_; + _data6_ = (Block6Data*) _userdata_; +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) { +#line 5043 "DirectPhotoPage.c" + DirectPhotoPage* self; +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = _data6_->self; +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (self); +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_slice_free (Block6Data, _data6_); +#line 5051 "DirectPhotoPage.c" + } +} + + +static gboolean __lambda14_ (Block6Data* _data6_) { + DirectPhotoPage* self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; +#line 580 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = _data6_->self; +#line 581 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = _data6_->should_allow_rotation; +#line 581 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + editing_host_page_enable_rotate (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp0_); +#line 583 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = FALSE; +#line 583 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 5070 "DirectPhotoPage.c" +} + + +static gboolean ___lambda14__gsource_func (gpointer self) { + gboolean result; + result = __lambda14_ (self); +#line 580 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 5079 "DirectPhotoPage.c" +} + + +static void direct_photo_page_on_dphoto_can_rotate_changed (DirectPhotoPage* self, gboolean should_allow_rotation) { + Block6Data* _data6_; + gboolean _tmp0_ = FALSE; +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self)); +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data6_ = g_slice_new0 (Block6Data); +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data6_->_ref_count_ = 1; +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data6_->self = g_object_ref (self); +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = should_allow_rotation; +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data6_->should_allow_rotation = _tmp0_; +#line 580 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda14__gsource_func, block6_data_ref (_data6_), block6_data_unref); +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + block6_data_unref (_data6_); +#line 576 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data6_ = NULL; +#line 5104 "DirectPhotoPage.c" +} + + +static DataView* direct_photo_page_real_create_photo_view (EditingHostPage* base, DataSource* source) { + DirectPhotoPage * self; + DataView* result = NULL; + DataSource* _tmp0_ = NULL; + DirectView* _tmp1_ = NULL; +#line 587 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 587 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); +#line 588 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = source; +#line 588 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp1_ = direct_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_PHOTO, DirectPhoto)); +#line 588 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); +#line 588 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return result; +#line 5125 "DirectPhotoPage.c" +} + + +static void direct_photo_page_class_init (DirectPhotoPageClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_photo_page_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_type_class_add_private (klass, sizeof (DirectPhotoPagePrivate)); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((PageClass *) klass)->init_collect_ui_filenames = direct_photo_page_real_init_collect_ui_filenames; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((PageClass *) klass)->init_collect_action_entries = direct_photo_page_real_init_collect_action_entries; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((PageClass *) klass)->init_collect_injection_groups = direct_photo_page_real_init_collect_injection_groups; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((GtkWidgetClass *) klass)->realize = direct_photo_page_real_realize; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((EditingHostPageClass *) klass)->photo_changing = direct_photo_page_real_photo_changing; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((PageClass *) klass)->on_context_buttonpress = direct_photo_page_real_on_context_buttonpress; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((EditingHostPageClass *) klass)->on_increase_size = direct_photo_page_real_on_increase_size; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((EditingHostPageClass *) klass)->on_decrease_size = direct_photo_page_real_on_decrease_size; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((EditingHostPageClass *) klass)->on_double_click = direct_photo_page_real_on_double_click; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((EditingHostPageClass *) klass)->update_ui = direct_photo_page_real_update_ui; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((PageClass *) klass)->update_actions = direct_photo_page_real_update_actions; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((EditingHostPageClass *) klass)->confirm_replace_photo = direct_photo_page_real_confirm_replace_photo; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((PageClass *) klass)->on_app_key_pressed = direct_photo_page_real_on_app_key_pressed; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((EditingHostPageClass *) klass)->create_photo_view = direct_photo_page_real_create_photo_view; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + G_OBJECT_CLASS (klass)->finalize = direct_photo_page_finalize; +#line 5164 "DirectPhotoPage.c" +} + + +static void direct_photo_page_instance_init (DirectPhotoPage * self) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv = DIRECT_PHOTO_PAGE_GET_PRIVATE (self); +#line 9 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->view_controller = NULL; +#line 11 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self->priv->drop_if_dirty = FALSE; +#line 5175 "DirectPhotoPage.c" +} + + +static void direct_photo_page_finalize (GObject* obj) { + DirectPhotoPage * self; + DirectPhotoSourceCollection* _tmp0_ = NULL; + guint _tmp1_ = 0U; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = direct_photo_global; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE); +#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _direct_photo_page_on_photos_altered_data_collection_items_altered, self); +#line 8 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (self->priv->initial_file); +#line 9 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _data_collection_unref0 (self->priv->view_controller); +#line 10 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _g_object_unref0 (self->priv->current_save_dir); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + G_OBJECT_CLASS (direct_photo_page_parent_class)->finalize (obj); +#line 5199 "DirectPhotoPage.c" +} + + +GType direct_photo_page_get_type (void) { + static volatile gsize direct_photo_page_type_id__volatile = 0; + if (g_once_init_enter (&direct_photo_page_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectPhotoPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_photo_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectPhotoPage), 0, (GInstanceInitFunc) direct_photo_page_instance_init, NULL }; + GType direct_photo_page_type_id; + direct_photo_page_type_id = g_type_register_static (TYPE_EDITING_HOST_PAGE, "DirectPhotoPage", &g_define_type_info, 0); + g_once_init_leave (&direct_photo_page_type_id__volatile, direct_photo_page_type_id); + } + return direct_photo_page_type_id__volatile; +} + + +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_construct (GType object_type, GFile* file) { + DirectFullscreenPhotoPage * self = NULL; + GFile* _tmp0_ = NULL; +#line 593 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_val_if_fail (G_IS_FILE (file), NULL); +#line 594 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = file; +#line 594 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = (DirectFullscreenPhotoPage*) direct_photo_page_construct (object_type, _tmp0_); +#line 593 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return self; +#line 5226 "DirectPhotoPage.c" +} + + +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_new (GFile* file) { +#line 593 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + return direct_fullscreen_photo_page_construct (TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, file); +#line 5233 "DirectPhotoPage.c" +} + + +static void direct_fullscreen_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames) { + DirectFullscreenPhotoPage * self; + GeeList* _tmp0_ = NULL; +#line 597 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPage); +#line 597 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + g_return_if_fail (GEE_IS_LIST (ui_filenames)); +#line 600 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + _tmp0_ = ui_filenames; +#line 600 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), "direct_context.ui"); +#line 5248 "DirectPhotoPage.c" +} + + +static void direct_fullscreen_photo_page_class_init (DirectFullscreenPhotoPageClass * klass) { +#line 592 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + direct_fullscreen_photo_page_parent_class = g_type_class_peek_parent (klass); +#line 592 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala" + ((PageClass *) klass)->init_collect_ui_filenames = direct_fullscreen_photo_page_real_init_collect_ui_filenames; +#line 5257 "DirectPhotoPage.c" +} + + +static void direct_fullscreen_photo_page_instance_init (DirectFullscreenPhotoPage * self) { +} + + +GType direct_fullscreen_photo_page_get_type (void) { + static volatile gsize direct_fullscreen_photo_page_type_id__volatile = 0; + if (g_once_init_enter (&direct_fullscreen_photo_page_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectFullscreenPhotoPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_fullscreen_photo_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectFullscreenPhotoPage), 0, (GInstanceInitFunc) direct_fullscreen_photo_page_instance_init, NULL }; + GType direct_fullscreen_photo_page_type_id; + direct_fullscreen_photo_page_type_id = g_type_register_static (TYPE_DIRECT_PHOTO_PAGE, "DirectFullscreenPhotoPage", &g_define_type_info, 0); + g_once_init_leave (&direct_fullscreen_photo_page_type_id__volatile, direct_fullscreen_photo_page_type_id); + } + return direct_fullscreen_photo_page_type_id__volatile; +} + + +static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { + if ((array != NULL) && (destroy_func != NULL)) { + int i; + for (i = 0; i < array_length; i = i + 1) { + if (((gpointer*) array)[i] != NULL) { + destroy_func (((gpointer*) array)[i]); + } + } + } +} + + +static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { + _vala_array_destroy (array, array_length, destroy_func); + g_free (array); +} + + + diff --git a/src/direct/DirectView.c b/src/direct/DirectView.c new file mode 100644 index 0000000..e3cebb7 --- /dev/null +++ b/src/direct/DirectView.c @@ -0,0 +1,827 @@ +/* DirectView.c generated by valac 0.32.1, the Vala compiler + * generated from DirectView.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 <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <gee.h> + + +#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; +typedef struct _DataObjectPrivate DataObjectPrivate; + +#define TYPE_ALTERATION (alteration_get_type ()) +#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) +#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) +#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) +#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) +#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) + +typedef struct _Alteration Alteration; +typedef struct _AlterationClass AlterationClass; + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; + +#define TYPE_DATA_VIEW (data_view_get_type ()) +#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) +#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) +#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) +#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) +#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) + +typedef struct _DataView DataView; +typedef struct _DataViewClass DataViewClass; +typedef struct _DataViewPrivate DataViewPrivate; + +#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_DIRECT_VIEW (direct_view_get_type ()) +#define DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW, DirectView)) +#define DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW, DirectViewClass)) +#define IS_DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW)) +#define IS_DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW)) +#define DIRECT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW, DirectViewClass)) + +typedef struct _DirectView DirectView; +typedef struct _DirectViewClass DirectViewClass; +typedef struct _DirectViewPrivate DirectViewPrivate; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +#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_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 TYPE_DIRECT_PHOTO (direct_photo_get_type ()) +#define DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO, DirectPhoto)) +#define DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO, DirectPhotoClass)) +#define IS_DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO)) +#define IS_DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO)) +#define DIRECT_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO, DirectPhotoClass)) + +typedef struct _DirectPhoto DirectPhoto; +typedef struct _DirectPhotoClass DirectPhotoClass; +typedef struct _DataCollectionPrivate DataCollectionPrivate; + +#define TYPE_MARKER (marker_get_type ()) +#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) +#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) +#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) + +typedef struct _Marker Marker; +typedef struct _MarkerIface MarkerIface; + +#define TYPE_VIEW_COLLECTION (view_collection_get_type ()) +#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection)) +#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass)) +#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION)) +#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION)) +#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass)) + +typedef struct _ViewCollection ViewCollection; +typedef struct _ViewCollectionClass ViewCollectionClass; +typedef struct _ViewCollectionPrivate ViewCollectionPrivate; + +#define TYPE_VIEW_FILTER (view_filter_get_type ()) +#define VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_FILTER, ViewFilter)) +#define VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_FILTER, ViewFilterClass)) +#define IS_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_FILTER)) +#define IS_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_FILTER)) +#define VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_FILTER, ViewFilterClass)) + +typedef struct _ViewFilter ViewFilter; +typedef struct _ViewFilterClass ViewFilterClass; + +#define TYPE_DIRECT_VIEW_COLLECTION (direct_view_collection_get_type ()) +#define DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollection)) +#define DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass)) +#define IS_DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW_COLLECTION)) +#define IS_DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW_COLLECTION)) +#define DIRECT_VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass)) + +typedef struct _DirectViewCollection DirectViewCollection; +typedef struct _DirectViewCollectionClass DirectViewCollectionClass; +typedef struct _DirectViewCollectionPrivate DirectViewCollectionPrivate; + +#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) +#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) +#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) +#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) +#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) +#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) + +typedef struct _SourceCollection SourceCollection; +typedef struct _SourceCollectionClass SourceCollectionClass; + +#define TYPE_VIEW_MANAGER (view_manager_get_type ()) +#define VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_MANAGER, ViewManager)) +#define VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_MANAGER, ViewManagerClass)) +#define IS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_MANAGER)) +#define IS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_MANAGER)) +#define VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_MANAGER, ViewManagerClass)) + +typedef struct _ViewManager ViewManager; +typedef struct _ViewManagerClass ViewManagerClass; + +#define VIEW_COLLECTION_TYPE_MONITOR (view_collection_monitor_get_type ()) +#define VIEW_COLLECTION_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor)) +#define VIEW_COLLECTION_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) +#define VIEW_COLLECTION_IS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_MONITOR)) +#define VIEW_COLLECTION_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_MONITOR)) +#define VIEW_COLLECTION_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) + +typedef struct _ViewCollectionMonitor ViewCollectionMonitor; +typedef struct _ViewCollectionMonitorClass ViewCollectionMonitorClass; + +#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) +#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) +#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) +#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) +#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) +#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) + +typedef struct _DatabaseSourceCollection DatabaseSourceCollection; +typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; + +#define TYPE_DIRECT_PHOTO_SOURCE_COLLECTION (direct_photo_source_collection_get_type ()) +#define DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection)) +#define DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass)) +#define IS_DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION)) +#define IS_DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION)) +#define DIRECT_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass)) + +typedef struct _DirectPhotoSourceCollection DirectPhotoSourceCollection; +typedef struct _DirectPhotoSourceCollectionClass DirectPhotoSourceCollectionClass; + +#define DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER (direct_view_collection_direct_view_manager_get_type ()) +#define DIRECT_VIEW_COLLECTION_DIRECT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManager)) +#define DIRECT_VIEW_COLLECTION_DIRECT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManagerClass)) +#define DIRECT_VIEW_COLLECTION_IS_DIRECT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER)) +#define DIRECT_VIEW_COLLECTION_IS_DIRECT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER)) +#define DIRECT_VIEW_COLLECTION_DIRECT_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManagerClass)) + +typedef struct _DirectViewCollectionDirectViewManager DirectViewCollectionDirectViewManager; +typedef struct _DirectViewCollectionDirectViewManagerClass DirectViewCollectionDirectViewManagerClass; +#define _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL))) +#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL))) +typedef struct _ViewManagerPrivate ViewManagerPrivate; +typedef struct _DirectViewCollectionDirectViewManagerPrivate DirectViewCollectionDirectViewManagerPrivate; + +struct _DataObject { + GObject parent_instance; + DataObjectPrivate * priv; +}; + +struct _DataObjectClass { + GObjectClass parent_class; + void (*notify_altered) (DataObject* self, Alteration* alteration); + void (*notify_membership_changed) (DataObject* self, DataCollection* collection); + void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); + void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); + gchar* (*get_name) (DataObject* self); + gchar* (*to_string) (DataObject* self); +}; + +struct _DataView { + DataObject parent_instance; + DataViewPrivate * priv; +}; + +struct _DataViewClass { + DataObjectClass parent_class; + void (*notify_view_altered) (DataView* self); + void (*notify_geometry_altered) (DataView* self); + void (*notify_unsubscribed) (DataView* self, DataSource* source); + void (*state_changed) (DataView* self, gboolean selected); + void (*visibility_changed) (DataView* self, gboolean visible); + void (*view_altered) (DataView* self); + void (*geometry_altered) (DataView* self); + void (*unsubscribed) (DataView* self, DataSource* source); +}; + +struct _DirectView { + DataView parent_instance; + DirectViewPrivate * priv; +}; + +struct _DirectViewClass { + DataViewClass parent_class; +}; + +struct _DirectViewPrivate { + GFile* file; + gchar* collate_key; +}; + +typedef gint64 (*Comparator) (void* a, void* b, void* user_data); +typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); +typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); +struct _MarkerIface { + GTypeInterface parent_iface; + void (*mark) (Marker* self, DataObject* object); + void (*unmark) (Marker* self, DataObject* object); + gboolean (*toggle) (Marker* self, DataObject* object); + void (*mark_many) (Marker* self, GeeCollection* list); + void (*unmark_many) (Marker* self, GeeCollection* list); + void (*mark_all) (Marker* self); + gint (*get_count) (Marker* self); + GeeCollection* (*get_all) (Marker* self); +}; + +struct _DataCollection { + GTypeInstance parent_instance; + volatile int ref_count; + DataCollectionPrivate * priv; +}; + +struct _DataCollectionClass { + GTypeClass parent_class; + void (*finalize) (DataCollection *self); + gchar* (*to_string) (DataCollection* self); + void (*notify_items_added) (DataCollection* self, GeeIterable* added); + void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); + void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); + void (*notify_items_altered) (DataCollection* self, GeeMap* items); + void (*notify_ordering_changed) (DataCollection* self); + void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); + void (*notify_property_cleared) (DataCollection* self, const gchar* name); + gboolean (*valid_type) (DataCollection* self, DataObject* object); + void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); + void (*reset_comparator) (DataCollection* self); + GeeCollection* (*get_all) (DataCollection* self); + gint (*get_count) (DataCollection* self); + DataObject* (*get_at) (DataCollection* self, gint index); + gint (*index_of) (DataCollection* self, DataObject* object); + gboolean (*contains) (DataCollection* self, DataObject* object); + gboolean (*add) (DataCollection* self, DataObject* object); + GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); + void (*remove_marked) (DataCollection* self, Marker* m); + void (*clear) (DataCollection* self); + void (*close) (DataCollection* self); + void (*notify_frozen) (DataCollection* self); + void (*notify_thawed) (DataCollection* self); + void (*items_added) (DataCollection* self, GeeIterable* added); + void (*items_removed) (DataCollection* self, GeeIterable* removed); + void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); + void (*items_altered) (DataCollection* self, GeeMap* items); + void (*ordering_changed) (DataCollection* self); + void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); + void (*property_cleared) (DataCollection* self, const gchar* name); + void (*frozen) (DataCollection* self); + void (*thawed) (DataCollection* self); +}; + +struct _ViewCollection { + DataCollection parent_instance; + ViewCollectionPrivate * priv; +}; + +struct _ViewCollectionClass { + DataCollectionClass parent_class; + void (*notify_items_selected_unselected) (ViewCollection* self, GeeCollection* selected, GeeCollection* unselected); + void (*notify_selection_group_altered) (ViewCollection* self); + void (*notify_item_view_altered) (ViewCollection* self, DataView* view); + void (*notify_views_altered) (ViewCollection* self, GeeCollection* views); + void (*notify_item_geometry_altered) (ViewCollection* self, DataView* view); + void (*notify_geometries_altered) (ViewCollection* self, GeeCollection* views); + void (*notify_items_shown) (ViewCollection* self, GeeCollection* shown); + void (*notify_items_hidden) (ViewCollection* self, GeeCollection* hidden); + void (*notify_items_visibility_changed) (ViewCollection* self, GeeCollection* changed); + void (*notify_view_filter_installed) (ViewCollection* self, ViewFilter* filter); + void (*notify_view_filter_removed) (ViewCollection* self, ViewFilter* filter); + DataView* (*get_first) (ViewCollection* self); + DataView* (*get_first_unrejected) (ViewCollection* self); + DataView* (*get_last) (ViewCollection* self); + DataView* (*get_next) (ViewCollection* self, DataView* view); + DataView* (*get_previous) (ViewCollection* self, DataView* view); + void (*items_selected) (ViewCollection* self, GeeIterable* selected); + void (*items_unselected) (ViewCollection* self, GeeIterable* unselected); + void (*items_state_changed) (ViewCollection* self, GeeIterable* changed); + void (*selection_group_altered) (ViewCollection* self); + void (*items_shown) (ViewCollection* self, GeeCollection* visible); + void (*items_hidden) (ViewCollection* self, GeeCollection* hidden); + void (*items_visibility_changed) (ViewCollection* self, GeeCollection* changed); + void (*item_view_altered) (ViewCollection* self, DataView* view); + void (*item_geometry_altered) (ViewCollection* self, DataView* view); + void (*views_altered) (ViewCollection* self, GeeCollection* views); + void (*geometries_altered) (ViewCollection* self, GeeCollection* views); + void (*view_filter_installed) (ViewCollection* self, ViewFilter* filer); + void (*view_filter_removed) (ViewCollection* self, ViewFilter* filer); +}; + +struct _DirectViewCollection { + ViewCollection parent_instance; + DirectViewCollectionPrivate * priv; +}; + +struct _DirectViewCollectionClass { + ViewCollectionClass parent_class; +}; + +struct _ViewManager { + GTypeInstance parent_instance; + volatile int ref_count; + ViewManagerPrivate * priv; +}; + +struct _ViewManagerClass { + GTypeClass parent_class; + void (*finalize) (ViewManager *self); + gboolean (*include_in_view) (ViewManager* self, DataSource* source); + DataView* (*create_view) (ViewManager* self, DataSource* source); +}; + +struct _DirectViewCollectionDirectViewManager { + ViewManager parent_instance; + DirectViewCollectionDirectViewManagerPrivate * priv; +}; + +struct _DirectViewCollectionDirectViewManagerClass { + ViewManagerClass parent_class; +}; + + +static gpointer direct_view_parent_class = NULL; +static gpointer direct_view_collection_parent_class = NULL; +extern DirectPhotoSourceCollection* direct_photo_global; +static gpointer direct_view_collection_direct_view_manager_parent_class = NULL; + +GType data_object_get_type (void) G_GNUC_CONST; +gpointer alteration_ref (gpointer instance); +void alteration_unref (gpointer instance); +GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_alteration (GValue* value, gpointer v_object); +void value_take_alteration (GValue* value, gpointer v_object); +gpointer value_get_alteration (const GValue* value); +GType alteration_get_type (void) G_GNUC_CONST; +gpointer data_collection_ref (gpointer instance); +void data_collection_unref (gpointer instance); +GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_data_collection (GValue* value, gpointer v_object); +void value_take_data_collection (GValue* value, gpointer v_object); +gpointer value_get_data_collection (const GValue* value); +GType data_collection_get_type (void) G_GNUC_CONST; +GType data_view_get_type (void) G_GNUC_CONST; +GType data_source_get_type (void) G_GNUC_CONST; +GType direct_view_get_type (void) G_GNUC_CONST; +#define DIRECT_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECT_VIEW, DirectViewPrivate)) +enum { + DIRECT_VIEW_DUMMY_PROPERTY +}; +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType media_source_get_type (void) G_GNUC_CONST; +GType photo_source_get_type (void) G_GNUC_CONST; +GType photo_get_type (void) G_GNUC_CONST; +GType direct_photo_get_type (void) G_GNUC_CONST; +DirectView* direct_view_new (DirectPhoto* source); +DirectView* direct_view_construct (GType object_type, DirectPhoto* source); +DataView* data_view_new (DataSource* source); +DataView* data_view_construct (GType object_type, DataSource* source); +GFile* media_source_get_file (MediaSource* self); +GFile* direct_view_get_file (DirectView* self); +gchar* direct_view_get_collate_key (DirectView* self); +static void direct_view_finalize (GObject* obj); +GType marker_get_type (void) G_GNUC_CONST; +GType view_collection_get_type (void) G_GNUC_CONST; +gpointer view_filter_ref (gpointer instance); +void view_filter_unref (gpointer instance); +GParamSpec* param_spec_view_filter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_view_filter (GValue* value, gpointer v_object); +void value_take_view_filter (GValue* value, gpointer v_object); +gpointer value_get_view_filter (const GValue* value); +GType view_filter_get_type (void) G_GNUC_CONST; +GType direct_view_collection_get_type (void) G_GNUC_CONST; +enum { + DIRECT_VIEW_COLLECTION_DUMMY_PROPERTY +}; +DirectViewCollection* direct_view_collection_new (void); +DirectViewCollection* direct_view_collection_construct (GType object_type); +ViewCollection* view_collection_new (const gchar* name); +ViewCollection* view_collection_construct (GType object_type, const gchar* name); +void data_collection_set_comparator (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); +static gint64 direct_view_collection_filename_comparator (void* a, void* b); +static gint64 _direct_view_collection_filename_comparator_comparator (void* a, void* b, gpointer self); +GType source_collection_get_type (void) G_GNUC_CONST; +gpointer view_manager_ref (gpointer instance); +void view_manager_unref (gpointer instance); +GParamSpec* param_spec_view_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_view_manager (GValue* value, gpointer v_object); +void value_take_view_manager (GValue* value, gpointer v_object); +gpointer value_get_view_manager (const GValue* value); +GType view_manager_get_type (void) G_GNUC_CONST; +gpointer view_collection_monitor_ref (gpointer instance); +void view_collection_monitor_unref (gpointer instance); +GParamSpec* view_collection_param_spec_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void view_collection_value_set_monitor (GValue* value, gpointer v_object); +void view_collection_value_take_monitor (GValue* value, gpointer v_object); +gpointer view_collection_value_get_monitor (const GValue* value); +GType view_collection_monitor_get_type (void) G_GNUC_CONST; +ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, SourceCollection* sources, ViewManager* manager, Alteration* prereq, GeeCollection* initial, ProgressMonitor progress_monitor, void* progress_monitor_target); +GType database_source_collection_get_type (void) G_GNUC_CONST; +GType direct_photo_source_collection_get_type (void) G_GNUC_CONST; +static DirectViewCollectionDirectViewManager* direct_view_collection_direct_view_manager_new (void); +static DirectViewCollectionDirectViewManager* direct_view_collection_direct_view_manager_construct (GType object_type); +static GType direct_view_collection_direct_view_manager_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +enum { + DIRECT_VIEW_COLLECTION_DIRECT_VIEW_MANAGER_DUMMY_PROPERTY +}; +static DataView* direct_view_collection_direct_view_manager_real_create_view (ViewManager* base, DataSource* source); +ViewManager* view_manager_construct (GType object_type); + + +DirectView* direct_view_construct (GType object_type, DirectPhoto* source) { + DirectView * self = NULL; + DirectPhoto* _tmp0_ = NULL; + DirectPhoto* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; +#line 11 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + g_return_val_if_fail (IS_DIRECT_PHOTO (source), NULL); +#line 12 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp0_ = source; +#line 12 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self = (DirectView*) data_view_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource)); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp1_ = source; +#line 14 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp2_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO, Photo), TYPE_MEDIA_SOURCE, MediaSource)); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _g_object_unref0 (self->priv->file); +#line 14 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self->priv->file = _tmp2_; +#line 11 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return self; +#line 522 "DirectView.c" +} + + +DirectView* direct_view_new (DirectPhoto* source) { +#line 11 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return direct_view_construct (TYPE_DIRECT_VIEW, source); +#line 529 "DirectView.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 18 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return self ? g_object_ref (self) : NULL; +#line 536 "DirectView.c" +} + + +GFile* direct_view_get_file (DirectView* self) { + GFile* result = NULL; + GFile* _tmp0_ = NULL; + GFile* _tmp1_ = NULL; +#line 17 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + g_return_val_if_fail (IS_DIRECT_VIEW (self), NULL); +#line 18 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp0_ = self->priv->file; +#line 18 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 18 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + result = _tmp1_; +#line 18 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return result; +#line 554 "DirectView.c" +} + + +gchar* direct_view_get_collate_key (DirectView* self) { + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + const gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 21 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + g_return_val_if_fail (IS_DIRECT_VIEW (self), NULL); +#line 22 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp0_ = self->priv->collate_key; +#line 22 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + if (_tmp0_ == NULL) { +#line 569 "DirectView.c" + GFile* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#line 23 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp1_ = self->priv->file; +#line 23 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp2_ = g_file_get_basename (_tmp1_); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp3_ = _tmp2_; +#line 23 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp4_ = g_utf8_collate_key_for_filename (_tmp3_, (gssize) -1); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _g_free0 (self->priv->collate_key); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self->priv->collate_key = _tmp4_; +#line 23 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _g_free0 (_tmp3_); +#line 588 "DirectView.c" + } +#line 25 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp5_ = self->priv->collate_key; +#line 25 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp6_ = g_strdup (_tmp5_); +#line 25 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + result = _tmp6_; +#line 25 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return result; +#line 598 "DirectView.c" +} + + +static void direct_view_class_init (DirectViewClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + direct_view_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + g_type_class_add_private (klass, sizeof (DirectViewPrivate)); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + G_OBJECT_CLASS (klass)->finalize = direct_view_finalize; +#line 609 "DirectView.c" +} + + +static void direct_view_instance_init (DirectView * self) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self->priv = DIRECT_VIEW_GET_PRIVATE (self); +#line 9 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self->priv->collate_key = NULL; +#line 618 "DirectView.c" +} + + +static void direct_view_finalize (GObject* obj) { + DirectView * self; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_VIEW, DirectView); +#line 8 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _g_object_unref0 (self->priv->file); +#line 9 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _g_free0 (self->priv->collate_key); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + G_OBJECT_CLASS (direct_view_parent_class)->finalize (obj); +#line 632 "DirectView.c" +} + + +GType direct_view_get_type (void) { + static volatile gsize direct_view_type_id__volatile = 0; + if (g_once_init_enter (&direct_view_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectView), 0, (GInstanceInitFunc) direct_view_instance_init, NULL }; + GType direct_view_type_id; + direct_view_type_id = g_type_register_static (TYPE_DATA_VIEW, "DirectView", &g_define_type_info, 0); + g_once_init_leave (&direct_view_type_id__volatile, direct_view_type_id); + } + return direct_view_type_id__volatile; +} + + +static gint64 _direct_view_collection_filename_comparator_comparator (void* a, void* b, gpointer self) { + gint64 result; + result = direct_view_collection_filename_comparator (a, b); +#line 39 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return result; +#line 653 "DirectView.c" +} + + +DirectViewCollection* direct_view_collection_construct (GType object_type) { + DirectViewCollection* self = NULL; + DirectPhotoSourceCollection* _tmp0_ = NULL; + DirectViewCollectionDirectViewManager* _tmp1_ = NULL; + DirectViewCollectionDirectViewManager* _tmp2_ = NULL; + ViewCollectionMonitor* _tmp3_ = NULL; + ViewCollectionMonitor* _tmp4_ = NULL; +#line 37 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self = (DirectViewCollection*) view_collection_construct (object_type, "DirectViewCollection"); +#line 39 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + data_collection_set_comparator (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _direct_view_collection_filename_comparator_comparator, NULL, NULL, NULL); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp0_ = direct_photo_global; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp1_ = direct_view_collection_direct_view_manager_new (); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp2_ = _tmp1_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp3_ = view_collection_monitor_source_collection (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_VIEW_COLLECTION, ViewCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_VIEW_MANAGER, ViewManager), NULL, NULL, NULL, NULL); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp4_ = _tmp3_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _view_collection_monitor_unref0 (_tmp4_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _view_manager_unref0 (_tmp2_); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return self; +#line 684 "DirectView.c" +} + + +DirectViewCollection* direct_view_collection_new (void) { +#line 36 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return direct_view_collection_construct (TYPE_DIRECT_VIEW_COLLECTION); +#line 691 "DirectView.c" +} + + +static gint64 direct_view_collection_filename_comparator (void* a, void* b) { + gint64 result = 0LL; + DirectView* aview = NULL; + void* _tmp0_ = NULL; + DirectView* bview = NULL; + void* _tmp1_ = NULL; + GCompareFunc _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gint _tmp7_ = 0; + gint64 _tmp8_ = 0LL; +#line 44 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp0_ = a; +#line 44 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + aview = (DirectView*) _tmp0_; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp1_ = b; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + bview = (DirectView*) _tmp1_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp2_ = g_strcmp0; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp3_ = direct_view_get_collate_key (G_TYPE_CHECK_INSTANCE_CAST (aview, TYPE_DIRECT_VIEW, DirectView)); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp4_ = _tmp3_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp5_ = direct_view_get_collate_key (G_TYPE_CHECK_INSTANCE_CAST (bview, TYPE_DIRECT_VIEW, DirectView)); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp6_ = _tmp5_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp7_ = _tmp2_ (_tmp4_, _tmp6_); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp8_ = (gint64) _tmp7_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _g_free0 (_tmp6_); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _g_free0 (_tmp4_); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + result = _tmp8_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return result; +#line 738 "DirectView.c" +} + + +static DataView* direct_view_collection_direct_view_manager_real_create_view (ViewManager* base, DataSource* source) { + DirectViewCollectionDirectViewManager * self; + DataView* result = NULL; + DataSource* _tmp0_ = NULL; + DirectView* _tmp1_ = NULL; +#line 31 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER, DirectViewCollectionDirectViewManager); +#line 31 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); +#line 32 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp0_ = source; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + _tmp1_ = direct_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_PHOTO, DirectPhoto)); +#line 32 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); +#line 32 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return result; +#line 759 "DirectView.c" +} + + +static DirectViewCollectionDirectViewManager* direct_view_collection_direct_view_manager_construct (GType object_type) { + DirectViewCollectionDirectViewManager* self = NULL; +#line 30 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + self = (DirectViewCollectionDirectViewManager*) view_manager_construct (object_type); +#line 30 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return self; +#line 769 "DirectView.c" +} + + +static DirectViewCollectionDirectViewManager* direct_view_collection_direct_view_manager_new (void) { +#line 30 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + return direct_view_collection_direct_view_manager_construct (DIRECT_VIEW_COLLECTION_TYPE_DIRECT_VIEW_MANAGER); +#line 776 "DirectView.c" +} + + +static void direct_view_collection_direct_view_manager_class_init (DirectViewCollectionDirectViewManagerClass * klass) { +#line 30 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + direct_view_collection_direct_view_manager_parent_class = g_type_class_peek_parent (klass); +#line 30 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + ((ViewManagerClass *) klass)->create_view = direct_view_collection_direct_view_manager_real_create_view; +#line 785 "DirectView.c" +} + + +static void direct_view_collection_direct_view_manager_instance_init (DirectViewCollectionDirectViewManager * self) { +} + + +static GType direct_view_collection_direct_view_manager_get_type (void) { + static volatile gsize direct_view_collection_direct_view_manager_type_id__volatile = 0; + if (g_once_init_enter (&direct_view_collection_direct_view_manager_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectViewCollectionDirectViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_view_collection_direct_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectViewCollectionDirectViewManager), 0, (GInstanceInitFunc) direct_view_collection_direct_view_manager_instance_init, NULL }; + GType direct_view_collection_direct_view_manager_type_id; + direct_view_collection_direct_view_manager_type_id = g_type_register_static (TYPE_VIEW_MANAGER, "DirectViewCollectionDirectViewManager", &g_define_type_info, 0); + g_once_init_leave (&direct_view_collection_direct_view_manager_type_id__volatile, direct_view_collection_direct_view_manager_type_id); + } + return direct_view_collection_direct_view_manager_type_id__volatile; +} + + +static void direct_view_collection_class_init (DirectViewCollectionClass * klass) { +#line 29 "/home/jens/Source/shotwell/src/direct/DirectView.vala" + direct_view_collection_parent_class = g_type_class_peek_parent (klass); +#line 808 "DirectView.c" +} + + +static void direct_view_collection_instance_init (DirectViewCollection * self) { +} + + +GType direct_view_collection_get_type (void) { + static volatile gsize direct_view_collection_type_id__volatile = 0; + if (g_once_init_enter (&direct_view_collection_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectViewCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_view_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectViewCollection), 0, (GInstanceInitFunc) direct_view_collection_instance_init, NULL }; + GType direct_view_collection_type_id; + direct_view_collection_type_id = g_type_register_static (TYPE_VIEW_COLLECTION, "DirectViewCollection", &g_define_type_info, 0); + g_once_init_leave (&direct_view_collection_type_id__volatile, direct_view_collection_type_id); + } + return direct_view_collection_type_id__volatile; +} + + + diff --git a/src/direct/DirectWindow.c b/src/direct/DirectWindow.c new file mode 100644 index 0000000..dcba026 --- /dev/null +++ b/src/direct/DirectWindow.c @@ -0,0 +1,935 @@ +/* DirectWindow.c generated by valac 0.32.1, the Vala compiler + * generated from DirectWindow.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU LGPL (version 2.1 or later). + * See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <gtk/gtk.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <gee.h> +#include <glib/gi18n-lib.h> +#include <gdk/gdk.h> + + +#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; +typedef struct _PageWindowPrivate PageWindowPrivate; + +#define TYPE_PAGE (page_get_type ()) +#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) +#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) +#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) +#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) +#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) + +typedef struct _Page Page; +typedef struct _PageClass PageClass; + +#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 _AppWindowPrivate AppWindowPrivate; + +#define TYPE_DIMENSIONS (dimensions_get_type ()) +typedef struct _Dimensions Dimensions; + +#define TYPE_DIRECT_WINDOW (direct_window_get_type ()) +#define DIRECT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_WINDOW, DirectWindow)) +#define DIRECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_WINDOW, DirectWindowClass)) +#define IS_DIRECT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_WINDOW)) +#define IS_DIRECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_WINDOW)) +#define DIRECT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_WINDOW, DirectWindowClass)) + +typedef struct _DirectWindow DirectWindow; +typedef struct _DirectWindowClass DirectWindowClass; +typedef struct _DirectWindowPrivate DirectWindowPrivate; + +#define TYPE_SINGLE_PHOTO_PAGE (single_photo_page_get_type ()) +#define SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)) +#define SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass)) +#define IS_SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_PAGE)) +#define IS_SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_PAGE)) +#define SINGLE_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass)) + +typedef struct _SinglePhotoPage SinglePhotoPage; +typedef struct _SinglePhotoPageClass SinglePhotoPageClass; + +#define TYPE_EDITING_HOST_PAGE (editing_host_page_get_type ()) +#define EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPage)) +#define EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDITING_HOST_PAGE, EditingHostPageClass)) +#define IS_EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDITING_HOST_PAGE)) +#define IS_EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDITING_HOST_PAGE)) +#define EDITING_HOST_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPageClass)) + +typedef struct _EditingHostPage EditingHostPage; +typedef struct _EditingHostPageClass EditingHostPageClass; + +#define TYPE_DIRECT_PHOTO_PAGE (direct_photo_page_get_type ()) +#define DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage)) +#define DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass)) +#define IS_DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_PAGE)) +#define IS_DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_PAGE)) +#define DIRECT_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass)) + +typedef struct _DirectPhotoPage DirectPhotoPage; +typedef struct _DirectPhotoPageClass DirectPhotoPageClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; + +#define TYPE_VIEW_COLLECTION (view_collection_get_type ()) +#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection)) +#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass)) +#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION)) +#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION)) +#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass)) + +typedef struct _ViewCollection ViewCollection; +typedef struct _ViewCollectionClass ViewCollectionClass; + +#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_ALTERATION (alteration_get_type ()) +#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) +#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) +#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) +#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) +#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) + +typedef struct _Alteration Alteration; +typedef struct _AlterationClass AlterationClass; +#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) + +#define TYPE_DATA_VIEW (data_view_get_type ()) +#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) +#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) +#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) +#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) +#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) + +typedef struct _DataView DataView; +typedef struct _DataViewClass DataViewClass; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE (direct_fullscreen_photo_page_get_type ()) +#define DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPage)) +#define DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass)) +#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE)) +#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE)) +#define DIRECT_FULLSCREEN_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass)) + +typedef struct _DirectFullscreenPhotoPage DirectFullscreenPhotoPage; +typedef struct _DirectFullscreenPhotoPageClass DirectFullscreenPhotoPageClass; + +#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_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 TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; + +struct _PageWindow { + GtkWindow parent_instance; + PageWindowPrivate * priv; + GtkUIManager* ui; +}; + +struct _PageWindowClass { + GtkWindowClass parent_class; + void (*switched_pages) (PageWindow* self, Page* old_page, Page* new_page); + void (*set_current_page) (PageWindow* self, Page* page); + void (*clear_current_page) (PageWindow* self); +}; + +struct _Dimensions { + gint width; + gint height; +}; + +struct _AppWindow { + PageWindow parent_instance; + AppWindowPrivate * priv; + GtkActionGroup** common_action_groups; + gint common_action_groups_length1; + gboolean maximized; + Dimensions dimensions; + gint pos_x; + gint pos_y; +}; + +struct _AppWindowClass { + PageWindowClass parent_class; + void (*on_fullscreen) (AppWindow* self); + gchar* (*get_app_role) (AppWindow* self); + void (*on_quit) (AppWindow* self); + GtkActionGroup** (*create_common_action_groups) (AppWindow* self, int* result_length1); + void (*replace_common_placeholders) (AppWindow* self, GtkUIManager* ui); + void (*update_common_action_availability) (AppWindow* self, Page* old_page, Page* new_page); + void (*update_common_actions) (AppWindow* self, Page* page, gint selected_count, gint count); +}; + +struct _DirectWindow { + AppWindow parent_instance; + DirectWindowPrivate * priv; +}; + +struct _DirectWindowClass { + AppWindowClass parent_class; +}; + +struct _DirectWindowPrivate { + DirectPhotoPage* direct_photo_page; +}; + + +static gpointer direct_window_parent_class = NULL; +extern AppWindow* app_window_instance; + +GType page_window_get_type (void) G_GNUC_CONST; +GType page_get_type (void) G_GNUC_CONST; +GType app_window_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); +GType direct_window_get_type (void) G_GNUC_CONST; +GType single_photo_page_get_type (void) G_GNUC_CONST; +GType editing_host_page_get_type (void) G_GNUC_CONST; +GType direct_photo_page_get_type (void) G_GNUC_CONST; +#define DIRECT_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECT_WINDOW, DirectWindowPrivate)) +enum { + DIRECT_WINDOW_DUMMY_PROPERTY +}; +DirectWindow* direct_window_new (GFile* file); +DirectWindow* direct_window_construct (GType object_type, GFile* file); +AppWindow* app_window_construct (GType object_type); +DirectPhotoPage* direct_photo_page_new (GFile* file); +DirectPhotoPage* direct_photo_page_construct (GType object_type, GFile* file); +gpointer data_collection_ref (gpointer instance); +void data_collection_unref (gpointer instance); +GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_data_collection (GValue* value, gpointer v_object); +void value_take_data_collection (GValue* value, gpointer v_object); +gpointer value_get_data_collection (const GValue* value); +GType data_collection_get_type (void) G_GNUC_CONST; +GType view_collection_get_type (void) G_GNUC_CONST; +ViewCollection* page_get_view (Page* self); +static void direct_window_on_photo_changed (DirectWindow* self); +GType data_object_get_type (void) G_GNUC_CONST; +gpointer alteration_ref (gpointer instance); +void alteration_unref (gpointer instance); +GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_alteration (GValue* value, gpointer v_object); +void value_take_alteration (GValue* value, gpointer v_object); +gpointer value_get_alteration (const GValue* value); +GType alteration_get_type (void) G_GNUC_CONST; +static void _direct_window_on_photo_changed_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self); +GType data_view_get_type (void) G_GNUC_CONST; +static void _direct_window_on_photo_changed_view_collection_items_state_changed (ViewCollection* _sender, GeeIterable* changed, gpointer self); +void page_window_set_current_page (PageWindow* self, Page* page); +void direct_window_update_title (DirectWindow* self, GFile* file, gboolean modified); +void page_switched_to (Page* self); +GtkMenuBar* page_get_menubar (Page* self); +GtkToolbar* page_get_toolbar (Page* self); +DirectWindow* direct_window_get_app (void); +DirectPhotoPage* direct_window_get_direct_page (DirectWindow* self); +Page* page_window_get_current_page (PageWindow* self); +gchar* get_display_pathname (GFile* file); +#define RESOURCES_APP_TITLE "Shotwell" +static void direct_window_real_on_fullscreen (AppWindow* base); +GFile* direct_photo_page_get_current_file (DirectPhotoPage* self); +void app_window_go_fullscreen (AppWindow* self, Page* page); +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_new (GFile* file); +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_construct (GType object_type, GFile* file); +GType direct_fullscreen_photo_page_get_type (void) G_GNUC_CONST; +static gchar* direct_window_real_get_app_role (AppWindow* base); +#define RESOURCES_APP_DIRECT_ROLE _ ("Photo Viewer") +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 photo_source_get_type (void) G_GNUC_CONST; +GType photo_get_type (void) G_GNUC_CONST; +Photo* editing_host_page_get_photo (EditingHostPage* self); +GFile* media_source_get_file (MediaSource* self); +gboolean photo_has_alterations (Photo* self); +static void direct_window_real_on_quit (AppWindow* base); +gboolean direct_photo_page_check_quit (DirectPhotoPage* self); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +void configuration_facade_set_direct_window_state (ConfigurationFacade* self, gboolean maximize, Dimensions* dimensions); +void app_window_on_quit (AppWindow* self); +static gboolean direct_window_real_delete_event (GtkWidget* base, GdkEventAny* event); +static gboolean direct_window_real_button_press_event (GtkWidget* base, GdkEventButton* event); +void app_window_on_fullscreen (AppWindow* self); +static gboolean direct_window_real_key_press_event (GtkWidget* base, GdkEventKey* event); +static void direct_window_finalize (GObject* obj); + + +static void _direct_window_on_photo_changed_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_on_photo_changed ((DirectWindow*) self); +#line 371 "DirectWindow.c" +} + + +static void _direct_window_on_photo_changed_view_collection_items_state_changed (ViewCollection* _sender, GeeIterable* changed, gpointer self) { +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_on_photo_changed ((DirectWindow*) self); +#line 378 "DirectWindow.c" +} + + +DirectWindow* direct_window_construct (GType object_type, GFile* file) { + DirectWindow * self = NULL; + GFile* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + DirectPhotoPage* _tmp2_ = NULL; + ViewCollection* _tmp3_ = NULL; + ViewCollection* _tmp4_ = NULL; + DirectPhotoPage* _tmp5_ = NULL; + ViewCollection* _tmp6_ = NULL; + ViewCollection* _tmp7_ = NULL; + DirectPhotoPage* _tmp8_ = NULL; + GFile* _tmp9_ = NULL; + DirectPhotoPage* _tmp10_ = NULL; + GtkBox* layout = NULL; + GtkBox* _tmp11_ = NULL; + DirectPhotoPage* _tmp12_ = NULL; + GtkMenuBar* _tmp13_ = NULL; + GtkMenuBar* _tmp14_ = NULL; + DirectPhotoPage* _tmp15_ = NULL; + DirectPhotoPage* _tmp16_ = NULL; + GtkToolbar* _tmp17_ = NULL; + GtkToolbar* _tmp18_ = NULL; +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (G_IS_FILE (file), NULL); +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = (DirectWindow*) app_window_construct (object_type); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = file; +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = direct_photo_page_new (_tmp0_); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_object_ref_sink (_tmp1_); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (self->priv->direct_photo_page); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self->priv->direct_photo_page = _tmp1_; +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = self->priv->direct_photo_page; +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PAGE, Page)); +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = _tmp3_; +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _direct_window_on_photo_changed_data_collection_items_altered, self, 0); +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _data_collection_unref0 (_tmp4_); +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = self->priv->direct_photo_page; +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PAGE, Page)); +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = _tmp6_; +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_signal_connect_object (_tmp7_, "items-state-changed", (GCallback) _direct_window_on_photo_changed_view_collection_items_state_changed, self, 0); +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _data_collection_unref0 (_tmp7_); +#line 15 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp8_ = self->priv->direct_photo_page; +#line 15 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + page_window_set_current_page (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE_WINDOW, PageWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PAGE, Page)); +#line 17 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp9_ = file; +#line 17 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_update_title (self, _tmp9_, FALSE); +#line 19 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp10_ = self->priv->direct_photo_page; +#line 19 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + page_switched_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_PAGE, Page)); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_object_ref_sink (_tmp11_); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + layout = _tmp11_; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp12_ = self->priv->direct_photo_page; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp13_ = page_get_menubar (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PAGE, Page)); +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp14_ = _tmp13_; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_box_pack_start (layout, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp14_); +#line 25 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp15_ = self->priv->direct_photo_page; +#line 25 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_box_pack_start (layout, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0); +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp16_ = self->priv->direct_photo_page; +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp17_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_PAGE, Page)); +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp18_ = _tmp17_; +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_box_pack_end (layout, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp18_); +#line 28 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (layout, gtk_widget_get_type (), GtkWidget)); +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (layout); +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return self; +#line 486 "DirectWindow.c" +} + + +DirectWindow* direct_window_new (GFile* file) { +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return direct_window_construct (TYPE_DIRECT_WINDOW, file); +#line 493 "DirectWindow.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return self ? g_object_ref (self) : NULL; +#line 500 "DirectWindow.c" +} + + +DirectWindow* direct_window_get_app (void) { + DirectWindow* result = NULL; + AppWindow* _tmp0_ = NULL; + DirectWindow* _tmp1_ = NULL; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = app_window_instance; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_WINDOW, DirectWindow)); +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp1_; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 516 "DirectWindow.c" +} + + +DirectPhotoPage* direct_window_get_direct_page (DirectWindow* self) { + DirectPhotoPage* result = NULL; + Page* _tmp0_ = NULL; +#line 35 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (IS_DIRECT_WINDOW (self), NULL); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE_WINDOW, PageWindow)); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 531 "DirectWindow.c" +} + + +void direct_window_update_title (DirectWindow* self, GFile* file, gboolean modified) { + const gchar* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + GFile* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + GFile* _tmp6_ = NULL; + GFile* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; +#line 39 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_if_fail (IS_DIRECT_WINDOW (self)); +#line 39 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_if_fail (G_IS_FILE (file)); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = modified; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp1_) { +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = "*"; +#line 558 "DirectWindow.c" + } else { +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = ""; +#line 562 "DirectWindow.c" + } +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = file; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = g_file_get_basename (_tmp2_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = _tmp3_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = file; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = g_file_get_parent (_tmp5_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = _tmp6_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp8_ = get_display_pathname (_tmp7_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp9_ = _tmp8_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp10_ = g_strdup_printf ("%s%s (%s) - %s", _tmp0_, _tmp4_, _tmp9_, RESOURCES_APP_TITLE); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp11_ = _tmp10_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp11_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_free0 (_tmp11_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_free0 (_tmp9_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp7_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_free0 (_tmp4_); +#line 594 "DirectWindow.c" +} + + +static void direct_window_real_on_fullscreen (AppWindow* base) { + DirectWindow * self; + GFile* file = NULL; + DirectPhotoPage* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; + GFile* _tmp3_ = NULL; + DirectFullscreenPhotoPage* _tmp4_ = NULL; + DirectFullscreenPhotoPage* _tmp5_ = NULL; +#line 44 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = direct_window_get_direct_page (self); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = direct_photo_page_get_current_file (_tmp1_); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = _tmp2_; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp1_); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + file = _tmp3_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = direct_fullscreen_photo_page_new (file); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_object_ref_sink (_tmp4_); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = _tmp4_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + app_window_go_fullscreen (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PAGE, Page)); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp5_); +#line 44 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (file); +#line 633 "DirectWindow.c" +} + + +static gchar* direct_window_real_get_app_role (AppWindow* base) { + DirectWindow * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 50 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 51 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = g_strdup (RESOURCES_APP_DIRECT_ROLE); +#line 51 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp0_; +#line 51 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 649 "DirectWindow.c" +} + + +static void direct_window_on_photo_changed (DirectWindow* self) { + Photo* photo = NULL; + DirectPhotoPage* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; +#line 54 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_if_fail (IS_DIRECT_WINDOW (self)); +#line 55 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = self->priv->direct_photo_page; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 55 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + photo = _tmp1_; +#line 56 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = photo; +#line 56 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp2_ != NULL) { +#line 670 "DirectWindow.c" + Photo* _tmp3_ = NULL; + GFile* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + Photo* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = photo; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = _tmp4_; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = photo; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = photo_has_alterations (_tmp6_); +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_update_title (self, _tmp5_, _tmp7_); +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp5_); +#line 690 "DirectWindow.c" + } +#line 54 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (photo); +#line 694 "DirectWindow.c" +} + + +static void direct_window_real_on_quit (AppWindow* base) { + DirectWindow * self; + DirectPhotoPage* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + ConfigFacade* _tmp4_ = NULL; + ConfigFacade* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + Dimensions _tmp7_ = {0}; +#line 60 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = direct_window_get_direct_page (self); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = direct_photo_page_check_quit (_tmp1_); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = !_tmp2_; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp1_); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp3_) { +#line 62 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return; +#line 724 "DirectWindow.c" + } +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = config_facade_get_instance (); +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = _tmp4_; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)->maximized; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)->dimensions; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + configuration_facade_set_direct_window_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp6_, &_tmp7_); +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp5_); +#line 66 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + APP_WINDOW_CLASS (direct_window_parent_class)->on_quit (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)); +#line 740 "DirectWindow.c" +} + + +static gboolean direct_window_real_delete_event (GtkWidget* base, GdkEventAny* event) { + DirectWindow * self; + gboolean result = FALSE; + DirectPhotoPage* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_ = FALSE; +#line 69 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 69 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = direct_window_get_direct_page (self); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = direct_photo_page_check_quit (_tmp1_); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = !_tmp2_; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp1_); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp3_) { +#line 71 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = TRUE; +#line 71 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 772 "DirectWindow.c" + } +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (GTK_WIDGET_CLASS (direct_window_parent_class)->delete_event != NULL) { +#line 776 "DirectWindow.c" + GdkEventAny* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = event; +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = GTK_WIDGET_CLASS (direct_window_parent_class)->delete_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow), gtk_widget_get_type (), GtkWidget), _tmp5_); +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = _tmp6_; +#line 785 "DirectWindow.c" + } else { +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = FALSE; +#line 789 "DirectWindow.c" + } +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp4_; +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 795 "DirectWindow.c" +} + + +static gboolean direct_window_real_button_press_event (GtkWidget* base, GdkEventButton* event) { + DirectWindow * self; + gboolean result = FALSE; + GdkEventButton* _tmp0_ = NULL; + GdkEventType _tmp1_ = 0; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 76 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 77 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = event; +#line 77 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_->type; +#line 77 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp1_ == GDK_2BUTTON_PRESS) { +#line 78 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + app_window_on_fullscreen (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)); +#line 80 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = TRUE; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 820 "DirectWindow.c" + } +#line 83 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = FALSE; +#line 83 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 826 "DirectWindow.c" +} + + +static gboolean direct_window_real_key_press_event (GtkWidget* base, GdkEventKey* event) { + DirectWindow * self; + gboolean result = FALSE; + GdkEventKey* _tmp0_ = NULL; + guint _tmp1_ = 0U; + const gchar* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; +#line 86 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 86 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = event; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_->keyval; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = gdk_keyval_name (_tmp1_); +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (g_strcmp0 (_tmp2_, "Escape") == 0) { +#line 89 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + app_window_on_quit (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)); +#line 91 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = TRUE; +#line 91 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 855 "DirectWindow.c" + } +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (GTK_WIDGET_CLASS (direct_window_parent_class)->key_press_event != NULL) { +#line 859 "DirectWindow.c" + GdkEventKey* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = event; +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = GTK_WIDGET_CLASS (direct_window_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow), gtk_widget_get_type (), GtkWidget), _tmp4_); +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = _tmp5_; +#line 868 "DirectWindow.c" + } else { +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = FALSE; +#line 872 "DirectWindow.c" + } +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp3_; +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 878 "DirectWindow.c" +} + + +static void direct_window_class_init (DirectWindowClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_type_class_add_private (klass, sizeof (DirectWindowPrivate)); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((AppWindowClass *) klass)->on_fullscreen = direct_window_real_on_fullscreen; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((AppWindowClass *) klass)->get_app_role = direct_window_real_get_app_role; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((AppWindowClass *) klass)->on_quit = direct_window_real_on_quit; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((GtkWidgetClass *) klass)->delete_event = direct_window_real_delete_event; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((GtkWidgetClass *) klass)->button_press_event = direct_window_real_button_press_event; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((GtkWidgetClass *) klass)->key_press_event = direct_window_real_key_press_event; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + G_OBJECT_CLASS (klass)->finalize = direct_window_finalize; +#line 901 "DirectWindow.c" +} + + +static void direct_window_instance_init (DirectWindow * self) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self->priv = DIRECT_WINDOW_GET_PRIVATE (self); +#line 908 "DirectWindow.c" +} + + +static void direct_window_finalize (GObject* obj) { + DirectWindow * self; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_WINDOW, DirectWindow); +#line 8 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (self->priv->direct_photo_page); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + G_OBJECT_CLASS (direct_window_parent_class)->finalize (obj); +#line 920 "DirectWindow.c" +} + + +GType direct_window_get_type (void) { + static volatile gsize direct_window_type_id__volatile = 0; + if (g_once_init_enter (&direct_window_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectWindow), 0, (GInstanceInitFunc) direct_window_instance_init, NULL }; + GType direct_window_type_id; + direct_window_type_id = g_type_register_static (TYPE_APP_WINDOW, "DirectWindow", &g_define_type_info, 0); + g_once_init_leave (&direct_window_type_id__volatile, direct_window_type_id); + } + return direct_window_type_id__volatile; +} + + + diff --git a/src/direct/mk/direct.mk b/src/direct/mk/direct.mk deleted file mode 100644 index 4c0f226..0000000 --- a/src/direct/mk/direct.mk +++ /dev/null @@ -1,36 +0,0 @@ - -# UNIT_NAME is the Vala namespace. A file named UNIT_NAME.vala must be in this directory with -# a init() and terminate() function declared in the namespace. -UNIT_NAME := Direct - -# UNIT_DIR should match the subdirectory the files are located in. Generally UNIT_NAME in all -# lowercase. The name of this file should be UNIT_DIR.mk. -UNIT_DIR := direct - -# All Vala files in the unit should be listed here with no subdirectory prefix. -# -# NOTE: Do *not* include the unit's master file, i.e. UNIT_NAME.vala. -UNIT_FILES := \ - DirectWindow.vala \ - DirectPhoto.vala \ - DirectPhotoPage.vala \ - DirectView.vala - -# Any unit this unit relies upon (and should be initialized before it's initialized) should -# be listed here using its Vala namespace. -# -# NOTE: All units are assumed to rely upon the unit-unit. Do not include that here. -UNIT_USES := \ - Db \ - Util \ - Photos \ - Slideshow \ - Core - -# List any additional files that are used in the build process as a part of this unit that should -# be packaged in the tarball. File names should be relative to the unit's home directory. -UNIT_RC := - -# unitize.mk must be called at the end of each UNIT_DIR.mk file. -include unitize.mk - |