/* PhotoPage.c generated by valac 0.34.7, the Vala compiler
 * generated from PhotoPage.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 <gdk-pixbuf/gdk-pixbuf.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <cairo.h>
#include <string.h>
#include <stdlib.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <time.h>


#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;
typedef struct _ZoomBufferPrivate ZoomBufferPrivate;

#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 ZOOM_BUFFER_TYPE_OBJECT_STATE (zoom_buffer_object_state_get_type ())

#define TYPE_ZOOM_STATE (zoom_state_get_type ())

#define TYPE_DIMENSIONS (dimensions_get_type ())
typedef struct _Dimensions Dimensions;
typedef struct _ZoomState ZoomState;

#define TYPE_BACKGROUND_JOB (background_job_get_type ())
#define BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKGROUND_JOB, BackgroundJob))
#define BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKGROUND_JOB, BackgroundJobClass))
#define IS_BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKGROUND_JOB))
#define IS_BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKGROUND_JOB))
#define BACKGROUND_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKGROUND_JOB, BackgroundJobClass))

typedef struct _BackgroundJob BackgroundJob;
typedef struct _BackgroundJobClass BackgroundJobClass;

#define ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB (zoom_buffer_transformation_job_get_type ())
#define ZOOM_BUFFER_TRANSFORMATION_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJob))
#define ZOOM_BUFFER_TRANSFORMATION_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJobClass))
#define ZOOM_BUFFER_IS_TRANSFORMATION_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB))
#define ZOOM_BUFFER_IS_TRANSFORMATION_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB))
#define ZOOM_BUFFER_TRANSFORMATION_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJobClass))

typedef struct _ZoomBufferTransformationJob ZoomBufferTransformationJob;
typedef struct _ZoomBufferTransformationJobClass ZoomBufferTransformationJobClass;

#define TYPE_WORKERS (workers_get_type ())
#define WORKERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WORKERS, Workers))
#define WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WORKERS, WorkersClass))
#define IS_WORKERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WORKERS))
#define IS_WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WORKERS))
#define WORKERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WORKERS, WorkersClass))

typedef struct _Workers Workers;
typedef struct _WorkersClass WorkersClass;

#define 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_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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _background_job_unref0(var) ((var == NULL) ? NULL : (var = (background_job_unref (var), NULL)))
#define _workers_unref0(var) ((var == NULL) ? NULL : (var = (workers_unref (var), NULL)))

#define ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB (zoom_buffer_iso_source_fetch_job_get_type ())
#define ZOOM_BUFFER_ISO_SOURCE_FETCH_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, ZoomBufferIsoSourceFetchJob))
#define ZOOM_BUFFER_ISO_SOURCE_FETCH_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, ZoomBufferIsoSourceFetchJobClass))
#define ZOOM_BUFFER_IS_ISO_SOURCE_FETCH_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB))
#define ZOOM_BUFFER_IS_ISO_SOURCE_FETCH_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB))
#define ZOOM_BUFFER_ISO_SOURCE_FETCH_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, ZoomBufferIsoSourceFetchJobClass))

typedef struct _ZoomBufferIsoSourceFetchJob ZoomBufferIsoSourceFetchJob;
typedef struct _ZoomBufferIsoSourceFetchJobClass ZoomBufferIsoSourceFetchJobClass;
typedef struct _BackgroundJobPrivate BackgroundJobPrivate;

#define BACKGROUND_JOB_TYPE_JOB_PRIORITY (background_job_job_priority_get_type ())
typedef struct _ZoomBufferIsoSourceFetchJobPrivate ZoomBufferIsoSourceFetchJobPrivate;

#define TYPE_DIRECTION (direction_get_type ())

#define TYPE_PIXEL_TRANSFORMER (pixel_transformer_get_type ())
#define PIXEL_TRANSFORMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIXEL_TRANSFORMER, PixelTransformer))
#define PIXEL_TRANSFORMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIXEL_TRANSFORMER, PixelTransformerClass))
#define IS_PIXEL_TRANSFORMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIXEL_TRANSFORMER))
#define IS_PIXEL_TRANSFORMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIXEL_TRANSFORMER))
#define PIXEL_TRANSFORMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIXEL_TRANSFORMER, PixelTransformerClass))

typedef struct _PixelTransformer PixelTransformer;
typedef struct _PixelTransformerClass PixelTransformerClass;
#define _pixel_transformer_unref0(var) ((var == NULL) ? NULL : (var = (pixel_transformer_unref (var), NULL)))
typedef struct _ZoomBufferTransformationJobPrivate ZoomBufferTransformationJobPrivate;

#define TYPE_ABSTRACT_SEMAPHORE (abstract_semaphore_get_type ())
#define ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore))
#define ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass))
#define IS_ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ABSTRACT_SEMAPHORE))
#define IS_ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ABSTRACT_SEMAPHORE))
#define ABSTRACT_SEMAPHORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass))

typedef struct _AbstractSemaphore AbstractSemaphore;
typedef struct _AbstractSemaphoreClass AbstractSemaphoreClass;

#define TYPE_SCALING (scaling_get_type ())

#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ())
typedef struct _Scaling Scaling;

#define PHOTO_TYPE_EXCEPTION (photo_exception_get_type ())

#define TYPE_BACKING_FETCH_MODE (backing_fetch_mode_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
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;
typedef struct _SinglePhotoPagePrivate SinglePhotoPagePrivate;

#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_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_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_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_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 EDITING_TOOLS_TYPE_EDITING_TOOL (editing_tools_editing_tool_get_type ())
#define EDITING_TOOLS_EDITING_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingTool))
#define EDITING_TOOLS_EDITING_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingToolClass))
#define EDITING_TOOLS_IS_EDITING_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL))
#define EDITING_TOOLS_IS_EDITING_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL))
#define EDITING_TOOLS_EDITING_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL, EditingToolsEditingToolClass))

typedef struct _EditingToolsEditingTool EditingToolsEditingTool;
typedef struct _EditingToolsEditingToolClass EditingToolsEditingToolClass;

#define TYPE_PIXBUF_CACHE (pixbuf_cache_get_type ())
#define PIXBUF_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIXBUF_CACHE, PixbufCache))
#define PIXBUF_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIXBUF_CACHE, PixbufCacheClass))
#define IS_PIXBUF_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIXBUF_CACHE))
#define IS_PIXBUF_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIXBUF_CACHE))
#define PIXBUF_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIXBUF_CACHE, PixbufCacheClass))

typedef struct _PixbufCache PixbufCache;
typedef struct _PixbufCacheClass PixbufCacheClass;

#define TYPE_DRAG_AND_DROP_HANDLER (drag_and_drop_handler_get_type ())
#define DRAG_AND_DROP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DRAG_AND_DROP_HANDLER, DragAndDropHandler))
#define DRAG_AND_DROP_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DRAG_AND_DROP_HANDLER, DragAndDropHandlerClass))
#define IS_DRAG_AND_DROP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DRAG_AND_DROP_HANDLER))
#define IS_DRAG_AND_DROP_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DRAG_AND_DROP_HANDLER))
#define DRAG_AND_DROP_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DRAG_AND_DROP_HANDLER, DragAndDropHandlerClass))

typedef struct _DragAndDropHandler DragAndDropHandler;
typedef struct _DragAndDropHandlerClass DragAndDropHandlerClass;

#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 _editing_tools_editing_tool_unref0(var) ((var == NULL) ? NULL : (var = (editing_tools_editing_tool_unref (var), NULL)))
#define _drag_and_drop_handler_unref0(var) ((var == NULL) ? NULL : (var = (drag_and_drop_handler_unref (var), NULL)))

#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())

#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_COMMAND (command_get_type ())
#define COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND, Command))
#define COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND, CommandClass))
#define IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND))
#define IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND))
#define COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND, CommandClass))

typedef struct _Command Command;
typedef struct _CommandClass CommandClass;
#define _g_free0(var) (var = (g_free (var), NULL))

#define PIXBUF_CACHE_TYPE_PHOTO_TYPE (pixbuf_cache_photo_type_get_type ())

#define PIXBUF_CACHE_TYPE_PIXBUF_CACHE_BATCH (pixbuf_cache_pixbuf_cache_batch_get_type ())
#define PIXBUF_CACHE_PIXBUF_CACHE_BATCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIXBUF_CACHE_TYPE_PIXBUF_CACHE_BATCH, PixbufCachePixbufCacheBatch))
#define PIXBUF_CACHE_PIXBUF_CACHE_BATCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIXBUF_CACHE_TYPE_PIXBUF_CACHE_BATCH, PixbufCachePixbufCacheBatchClass))
#define PIXBUF_CACHE_IS_PIXBUF_CACHE_BATCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIXBUF_CACHE_TYPE_PIXBUF_CACHE_BATCH))
#define PIXBUF_CACHE_IS_PIXBUF_CACHE_BATCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIXBUF_CACHE_TYPE_PIXBUF_CACHE_BATCH))
#define PIXBUF_CACHE_PIXBUF_CACHE_BATCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIXBUF_CACHE_TYPE_PIXBUF_CACHE_BATCH, PixbufCachePixbufCacheBatchClass))

typedef struct _PixbufCachePixbufCacheBatch PixbufCachePixbufCacheBatch;
typedef struct _PixbufCachePixbufCacheBatchClass PixbufCachePixbufCacheBatchClass;

#define TYPE_THUMBNAIL_VIEW (thumbnail_view_get_type ())
#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView))
#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))
#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW))
#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW))
#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))

typedef struct _ThumbnailView ThumbnailView;
typedef struct _ThumbnailViewClass ThumbnailViewClass;

#define TYPE_PHOTO_VIEW (photo_view_get_type ())
#define PHOTO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_VIEW, PhotoView))
#define PHOTO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_VIEW, PhotoViewClass))
#define IS_PHOTO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_VIEW))
#define IS_PHOTO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_VIEW))
#define PHOTO_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_VIEW, PhotoViewClass))

typedef struct _PhotoView PhotoView;
typedef struct _PhotoViewClass PhotoViewClass;

#define TYPE_ORIENTATION (orientation_get_type ())

#define EDITING_TOOLS_TYPE_PHOTO_CANVAS (editing_tools_photo_canvas_get_type ())
#define EDITING_TOOLS_PHOTO_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvas))
#define EDITING_TOOLS_PHOTO_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvasClass))
#define EDITING_TOOLS_IS_PHOTO_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_PHOTO_CANVAS))
#define EDITING_TOOLS_IS_PHOTO_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_PHOTO_CANVAS))
#define EDITING_TOOLS_PHOTO_CANVAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvasClass))

typedef struct _EditingToolsPhotoCanvas EditingToolsPhotoCanvas;
typedef struct _EditingToolsPhotoCanvasClass EditingToolsPhotoCanvasClass;

#define EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS (editing_host_page_editing_host_canvas_get_type ())
#define EDITING_HOST_PAGE_EDITING_HOST_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS, EditingHostPageEditingHostCanvas))
#define EDITING_HOST_PAGE_EDITING_HOST_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS, EditingHostPageEditingHostCanvasClass))
#define EDITING_HOST_PAGE_IS_EDITING_HOST_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS))
#define EDITING_HOST_PAGE_IS_EDITING_HOST_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS))
#define EDITING_HOST_PAGE_EDITING_HOST_CANVAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS, EditingHostPageEditingHostCanvasClass))

typedef struct _EditingHostPageEditingHostCanvas EditingHostPageEditingHostCanvas;
typedef struct _EditingHostPageEditingHostCanvasClass EditingHostPageEditingHostCanvasClass;
#define _editing_tools_photo_canvas_unref0(var) ((var == NULL) ? NULL : (var = (editing_tools_photo_canvas_unref (var), NULL)))

#define EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW (editing_tools_editing_tool_window_get_type ())
#define EDITING_TOOLS_EDITING_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindow))
#define EDITING_TOOLS_EDITING_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindowClass))
#define EDITING_TOOLS_IS_EDITING_TOOL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW))
#define EDITING_TOOLS_IS_EDITING_TOOL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW))
#define EDITING_TOOLS_EDITING_TOOL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_EDITING_TOOL_WINDOW, EditingToolsEditingToolWindowClass))

typedef struct _EditingToolsEditingToolWindow EditingToolsEditingToolWindow;
typedef struct _EditingToolsEditingToolWindowClass EditingToolsEditingToolWindowClass;
typedef struct _EditingToolsEditingToolPrivate EditingToolsEditingToolPrivate;

#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_ROTATION (rotation_get_type ())

#define TYPE_PAGE_COMMAND (page_command_get_type ())
#define PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_COMMAND, PageCommand))
#define PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_COMMAND, PageCommandClass))
#define IS_PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_COMMAND))
#define IS_PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_COMMAND))
#define PAGE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_COMMAND, PageCommandClass))

typedef struct _PageCommand PageCommand;
typedef struct _PageCommandClass PageCommandClass;

#define TYPE_SINGLE_DATA_SOURCE_COMMAND (single_data_source_command_get_type ())
#define SINGLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand))
#define SINGLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommandClass))
#define IS_SINGLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND))
#define IS_SINGLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_DATA_SOURCE_COMMAND))
#define SINGLE_DATA_SOURCE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommandClass))

typedef struct _SingleDataSourceCommand SingleDataSourceCommand;
typedef struct _SingleDataSourceCommandClass SingleDataSourceCommandClass;

#define TYPE_ROTATE_SINGLE_COMMAND (rotate_single_command_get_type ())
#define ROTATE_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommand))
#define ROTATE_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommandClass))
#define IS_ROTATE_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ROTATE_SINGLE_COMMAND))
#define IS_ROTATE_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ROTATE_SINGLE_COMMAND))
#define ROTATE_SINGLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommandClass))

typedef struct _RotateSingleCommand RotateSingleCommand;
typedef struct _RotateSingleCommandClass RotateSingleCommandClass;

#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_GENERIC_PHOTO_TRANSFORMATION_COMMAND (generic_photo_transformation_command_get_type ())
#define GENERIC_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand))
#define GENERIC_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommandClass))
#define IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND))
#define IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND))
#define GENERIC_PHOTO_TRANSFORMATION_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommandClass))

typedef struct _GenericPhotoTransformationCommand GenericPhotoTransformationCommand;
typedef struct _GenericPhotoTransformationCommandClass GenericPhotoTransformationCommandClass;

#define TYPE_REVERT_SINGLE_COMMAND (revert_single_command_get_type ())
#define REVERT_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REVERT_SINGLE_COMMAND, RevertSingleCommand))
#define REVERT_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REVERT_SINGLE_COMMAND, RevertSingleCommandClass))
#define IS_REVERT_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REVERT_SINGLE_COMMAND))
#define IS_REVERT_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REVERT_SINGLE_COMMAND))
#define REVERT_SINGLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REVERT_SINGLE_COMMAND, RevertSingleCommandClass))

typedef struct _RevertSingleCommand RevertSingleCommand;
typedef struct _RevertSingleCommandClass RevertSingleCommandClass;

#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))

typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;

#define TYPE_TEXT_ENTRY_DIALOG_MEDIATOR (text_entry_dialog_mediator_get_type ())
#define TEXT_ENTRY_DIALOG_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEXT_ENTRY_DIALOG_MEDIATOR, TextEntryDialogMediator))
#define TEXT_ENTRY_DIALOG_MEDIATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEXT_ENTRY_DIALOG_MEDIATOR, TextEntryDialogMediatorClass))
#define IS_TEXT_ENTRY_DIALOG_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEXT_ENTRY_DIALOG_MEDIATOR))
#define IS_TEXT_ENTRY_DIALOG_MEDIATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEXT_ENTRY_DIALOG_MEDIATOR))
#define TEXT_ENTRY_DIALOG_MEDIATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEXT_ENTRY_DIALOG_MEDIATOR, TextEntryDialogMediatorClass))

typedef struct _TextEntryDialogMediator TextEntryDialogMediator;
typedef struct _TextEntryDialogMediatorClass TextEntryDialogMediatorClass;

#define TYPE_EDIT_TITLE_DIALOG (edit_title_dialog_get_type ())
#define EDIT_TITLE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDIT_TITLE_DIALOG, EditTitleDialog))
#define EDIT_TITLE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDIT_TITLE_DIALOG, EditTitleDialogClass))
#define IS_EDIT_TITLE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDIT_TITLE_DIALOG))
#define IS_EDIT_TITLE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDIT_TITLE_DIALOG))
#define EDIT_TITLE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDIT_TITLE_DIALOG, EditTitleDialogClass))

typedef struct _EditTitleDialog EditTitleDialog;
typedef struct _EditTitleDialogClass EditTitleDialogClass;
#define _text_entry_dialog_mediator_unref0(var) ((var == NULL) ? NULL : (var = (text_entry_dialog_mediator_unref (var), NULL)))

#define TYPE_EDIT_TITLE_COMMAND (edit_title_command_get_type ())
#define EDIT_TITLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDIT_TITLE_COMMAND, EditTitleCommand))
#define EDIT_TITLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDIT_TITLE_COMMAND, EditTitleCommandClass))
#define IS_EDIT_TITLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDIT_TITLE_COMMAND))
#define IS_EDIT_TITLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDIT_TITLE_COMMAND))
#define EDIT_TITLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDIT_TITLE_COMMAND, EditTitleCommandClass))

typedef struct _EditTitleCommand EditTitleCommand;
typedef struct _EditTitleCommandClass EditTitleCommandClass;

#define TYPE_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR (multi_text_entry_dialog_mediator_get_type ())
#define MULTI_TEXT_ENTRY_DIALOG_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR, MultiTextEntryDialogMediator))
#define MULTI_TEXT_ENTRY_DIALOG_MEDIATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR, MultiTextEntryDialogMediatorClass))
#define IS_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR))
#define IS_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR))
#define MULTI_TEXT_ENTRY_DIALOG_MEDIATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTI_TEXT_ENTRY_DIALOG_MEDIATOR, MultiTextEntryDialogMediatorClass))

typedef struct _MultiTextEntryDialogMediator MultiTextEntryDialogMediator;
typedef struct _MultiTextEntryDialogMediatorClass MultiTextEntryDialogMediatorClass;

#define TYPE_EDIT_COMMENT_DIALOG (edit_comment_dialog_get_type ())
#define EDIT_COMMENT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDIT_COMMENT_DIALOG, EditCommentDialog))
#define EDIT_COMMENT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDIT_COMMENT_DIALOG, EditCommentDialogClass))
#define IS_EDIT_COMMENT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDIT_COMMENT_DIALOG))
#define IS_EDIT_COMMENT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDIT_COMMENT_DIALOG))
#define EDIT_COMMENT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDIT_COMMENT_DIALOG, EditCommentDialogClass))

typedef struct _EditCommentDialog EditCommentDialog;
typedef struct _EditCommentDialogClass EditCommentDialogClass;
#define _multi_text_entry_dialog_mediator_unref0(var) ((var == NULL) ? NULL : (var = (multi_text_entry_dialog_mediator_unref (var), NULL)))

#define TYPE_EDIT_COMMENT_COMMAND (edit_comment_command_get_type ())
#define EDIT_COMMENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDIT_COMMENT_COMMAND, EditCommentCommand))
#define EDIT_COMMENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDIT_COMMENT_COMMAND, EditCommentCommandClass))
#define IS_EDIT_COMMENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDIT_COMMENT_COMMAND))
#define IS_EDIT_COMMENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDIT_COMMENT_COMMAND))
#define EDIT_COMMENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDIT_COMMENT_COMMAND, EditCommentCommandClass))

typedef struct _EditCommentCommand EditCommentCommand;
typedef struct _EditCommentCommandClass EditCommentCommandClass;

#define TYPE_ADJUST_DATE_TIME_DIALOG (adjust_date_time_dialog_get_type ())
#define ADJUST_DATE_TIME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialog))
#define ADJUST_DATE_TIME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialogClass))
#define IS_ADJUST_DATE_TIME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_DATE_TIME_DIALOG))
#define IS_ADJUST_DATE_TIME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_DATE_TIME_DIALOG))
#define ADJUST_DATE_TIME_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialogClass))

typedef struct _AdjustDateTimeDialog AdjustDateTimeDialog;
typedef struct _AdjustDateTimeDialogClass AdjustDateTimeDialogClass;

#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_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 TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND (adjust_date_time_photo_command_get_type ())
#define ADJUST_DATE_TIME_PHOTO_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, AdjustDateTimePhotoCommand))
#define ADJUST_DATE_TIME_PHOTO_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, AdjustDateTimePhotoCommandClass))
#define IS_ADJUST_DATE_TIME_PHOTO_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND))
#define IS_ADJUST_DATE_TIME_PHOTO_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND))
#define ADJUST_DATE_TIME_PHOTO_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, AdjustDateTimePhotoCommandClass))

typedef struct _AdjustDateTimePhotoCommand AdjustDateTimePhotoCommand;
typedef struct _AdjustDateTimePhotoCommandClass AdjustDateTimePhotoCommandClass;

#define TYPE_SET_BACKGROUND_PHOTO_DIALOG (set_background_photo_dialog_get_type ())
#define SET_BACKGROUND_PHOTO_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_BACKGROUND_PHOTO_DIALOG, SetBackgroundPhotoDialog))
#define SET_BACKGROUND_PHOTO_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_BACKGROUND_PHOTO_DIALOG, SetBackgroundPhotoDialogClass))
#define IS_SET_BACKGROUND_PHOTO_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_BACKGROUND_PHOTO_DIALOG))
#define IS_SET_BACKGROUND_PHOTO_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_BACKGROUND_PHOTO_DIALOG))
#define SET_BACKGROUND_PHOTO_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_BACKGROUND_PHOTO_DIALOG, SetBackgroundPhotoDialogClass))

typedef struct _SetBackgroundPhotoDialog SetBackgroundPhotoDialog;
typedef struct _SetBackgroundPhotoDialogClass SetBackgroundPhotoDialogClass;

#define EDITING_TOOLS_TYPE_STRAIGHTEN_TOOL (editing_tools_straighten_tool_get_type ())
#define EDITING_TOOLS_STRAIGHTEN_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_STRAIGHTEN_TOOL, EditingToolsStraightenTool))
#define EDITING_TOOLS_STRAIGHTEN_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_STRAIGHTEN_TOOL, EditingToolsStraightenToolClass))
#define EDITING_TOOLS_IS_STRAIGHTEN_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_STRAIGHTEN_TOOL))
#define EDITING_TOOLS_IS_STRAIGHTEN_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_STRAIGHTEN_TOOL))
#define EDITING_TOOLS_STRAIGHTEN_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_STRAIGHTEN_TOOL, EditingToolsStraightenToolClass))

typedef struct _EditingToolsStraightenTool EditingToolsStraightenTool;
typedef struct _EditingToolsStraightenToolClass EditingToolsStraightenToolClass;

#define EDITING_TOOLS_TYPE_CROP_TOOL (editing_tools_crop_tool_get_type ())
#define EDITING_TOOLS_CROP_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropTool))
#define EDITING_TOOLS_CROP_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropToolClass))
#define EDITING_TOOLS_IS_CROP_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_CROP_TOOL))
#define EDITING_TOOLS_IS_CROP_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_CROP_TOOL))
#define EDITING_TOOLS_CROP_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_CROP_TOOL, EditingToolsCropToolClass))

typedef struct _EditingToolsCropTool EditingToolsCropTool;
typedef struct _EditingToolsCropToolClass EditingToolsCropToolClass;

#define EDITING_TOOLS_TYPE_REDEYE_TOOL (editing_tools_redeye_tool_get_type ())
#define EDITING_TOOLS_REDEYE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeTool))
#define EDITING_TOOLS_REDEYE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeToolClass))
#define EDITING_TOOLS_IS_REDEYE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_REDEYE_TOOL))
#define EDITING_TOOLS_IS_REDEYE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_REDEYE_TOOL))
#define EDITING_TOOLS_REDEYE_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_REDEYE_TOOL, EditingToolsRedeyeToolClass))

typedef struct _EditingToolsRedeyeTool EditingToolsRedeyeTool;
typedef struct _EditingToolsRedeyeToolClass EditingToolsRedeyeToolClass;

#define EDITING_TOOLS_TYPE_ADJUST_TOOL (editing_tools_adjust_tool_get_type ())
#define EDITING_TOOLS_ADJUST_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustTool))
#define EDITING_TOOLS_ADJUST_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustToolClass))
#define EDITING_TOOLS_IS_ADJUST_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITING_TOOLS_TYPE_ADJUST_TOOL))
#define EDITING_TOOLS_IS_ADJUST_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITING_TOOLS_TYPE_ADJUST_TOOL))
#define EDITING_TOOLS_ADJUST_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EDITING_TOOLS_TYPE_ADJUST_TOOL, EditingToolsAdjustToolClass))

typedef struct _EditingToolsAdjustTool EditingToolsAdjustTool;
typedef struct _EditingToolsAdjustToolClass EditingToolsAdjustToolClass;

#define TYPE_ENHANCE_SINGLE_COMMAND (enhance_single_command_get_type ())
#define ENHANCE_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommand))
#define ENHANCE_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommandClass))
#define IS_ENHANCE_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ENHANCE_SINGLE_COMMAND))
#define IS_ENHANCE_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ENHANCE_SINGLE_COMMAND))
#define ENHANCE_SINGLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommandClass))

typedef struct _EnhanceSingleCommand EnhanceSingleCommand;
typedef struct _EnhanceSingleCommandClass EnhanceSingleCommandClass;

#define TYPE_PIXEL_TRANSFORMATION_BUNDLE (pixel_transformation_bundle_get_type ())
#define PIXEL_TRANSFORMATION_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIXEL_TRANSFORMATION_BUNDLE, PixelTransformationBundle))
#define PIXEL_TRANSFORMATION_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIXEL_TRANSFORMATION_BUNDLE, PixelTransformationBundleClass))
#define IS_PIXEL_TRANSFORMATION_BUNDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIXEL_TRANSFORMATION_BUNDLE))
#define IS_PIXEL_TRANSFORMATION_BUNDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIXEL_TRANSFORMATION_BUNDLE))
#define PIXEL_TRANSFORMATION_BUNDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIXEL_TRANSFORMATION_BUNDLE, PixelTransformationBundleClass))

typedef struct _PixelTransformationBundle PixelTransformationBundle;
typedef struct _PixelTransformationBundleClass PixelTransformationBundleClass;
#define _pixel_transformation_bundle_unref0(var) ((var == NULL) ? NULL : (var = (pixel_transformation_bundle_unref (var), NULL)))

#define TYPE_ADJUST_COLORS_SINGLE_COMMAND (adjust_colors_single_command_get_type ())
#define ADJUST_COLORS_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommand))
#define ADJUST_COLORS_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommandClass))
#define IS_ADJUST_COLORS_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_COLORS_SINGLE_COMMAND))
#define IS_ADJUST_COLORS_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_COLORS_SINGLE_COMMAND))
#define ADJUST_COLORS_SINGLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommandClass))

typedef struct _AdjustColorsSingleCommand AdjustColorsSingleCommand;
typedef struct _AdjustColorsSingleCommandClass AdjustColorsSingleCommandClass;
typedef struct _EditingToolsPhotoCanvasPrivate EditingToolsPhotoCanvasPrivate;
typedef struct _EditingHostPageEditingHostCanvasPrivate EditingHostPageEditingHostCanvasPrivate;
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))

#define TYPE_LIBRARY_PHOTO_PAGE (library_photo_page_get_type ())
#define LIBRARY_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage))
#define LIBRARY_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPageClass))
#define IS_LIBRARY_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO_PAGE))
#define IS_LIBRARY_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO_PAGE))
#define LIBRARY_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPageClass))

typedef struct _LibraryPhotoPage LibraryPhotoPage;
typedef struct _LibraryPhotoPageClass LibraryPhotoPageClass;
typedef struct _LibraryPhotoPagePrivate LibraryPhotoPagePrivate;

#define TYPE_RAW_DEVELOPER (raw_developer_get_type ())

#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ())
#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage))
#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))
#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE))
#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE))
#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))

typedef struct _CheckerboardPage CheckerboardPage;
typedef struct _CheckerboardPageClass CheckerboardPageClass;

#define TYPE_MEDIA_PAGE (media_page_get_type ())
#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage))
#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass))
#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE))
#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE))
#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass))

typedef struct _MediaPage MediaPage;
typedef struct _MediaPageClass MediaPageClass;

#define TYPE_COLLECTION_PAGE (collection_page_get_type ())
#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage))
#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass))
#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE))
#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE))
#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass))

typedef struct _CollectionPage CollectionPage;
typedef struct _CollectionPageClass CollectionPageClass;

#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 LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER (library_photo_page_library_photo_page_view_filter_get_type ())
#define LIBRARY_PHOTO_PAGE_LIBRARY_PHOTO_PAGE_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER, LibraryPhotoPageLibraryPhotoPageViewFilter))
#define LIBRARY_PHOTO_PAGE_LIBRARY_PHOTO_PAGE_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER, LibraryPhotoPageLibraryPhotoPageViewFilterClass))
#define LIBRARY_PHOTO_PAGE_IS_LIBRARY_PHOTO_PAGE_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER))
#define LIBRARY_PHOTO_PAGE_IS_LIBRARY_PHOTO_PAGE_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER))
#define LIBRARY_PHOTO_PAGE_LIBRARY_PHOTO_PAGE_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER, LibraryPhotoPageLibraryPhotoPageViewFilterClass))

typedef struct _LibraryPhotoPageLibraryPhotoPageViewFilter LibraryPhotoPageLibraryPhotoPageViewFilter;
typedef struct _LibraryPhotoPageLibraryPhotoPageViewFilterClass LibraryPhotoPageLibraryPhotoPageViewFilterClass;

#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_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ())
#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection))
#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))
#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION))
#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION))
#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))

typedef struct _MediaSourceCollection MediaSourceCollection;
typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass;

#define TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION (library_photo_source_collection_get_type ())
#define LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollection))
#define LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass))
#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION))
#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION))
#define LIBRARY_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass))

typedef struct _LibraryPhotoSourceCollection LibraryPhotoSourceCollection;
typedef struct _LibraryPhotoSourceCollectionClass LibraryPhotoSourceCollectionClass;

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

typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;

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

typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;
#define _view_filter_unref0(var) ((var == NULL) ? NULL : (var = (view_filter_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _injection_group_unref0(var) ((var == NULL) ? NULL : (var = (injection_group_unref (var), NULL)))

#define TYPE_MULTIPLE_DATA_SOURCE_COMMAND (multiple_data_source_command_get_type ())
#define MULTIPLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand))
#define MULTIPLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommandClass))
#define IS_MULTIPLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTIPLE_DATA_SOURCE_COMMAND))
#define IS_MULTIPLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTIPLE_DATA_SOURCE_COMMAND))
#define MULTIPLE_DATA_SOURCE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommandClass))

typedef struct _MultipleDataSourceCommand MultipleDataSourceCommand;
typedef struct _MultipleDataSourceCommandClass MultipleDataSourceCommandClass;

#define TYPE_SET_RAW_DEVELOPER_COMMAND (set_raw_developer_command_get_type ())
#define SET_RAW_DEVELOPER_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommand))
#define SET_RAW_DEVELOPER_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommandClass))
#define IS_SET_RAW_DEVELOPER_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_RAW_DEVELOPER_COMMAND))
#define IS_SET_RAW_DEVELOPER_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_RAW_DEVELOPER_COMMAND))
#define SET_RAW_DEVELOPER_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommandClass))

typedef struct _SetRawDeveloperCommand SetRawDeveloperCommand;
typedef struct _SetRawDeveloperCommandClass SetRawDeveloperCommandClass;

#define TYPE_RATING (rating_get_type ())

#define TYPE_FLAGGABLE (flaggable_get_type ())
#define FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLAGGABLE, Flaggable))
#define IS_FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLAGGABLE))
#define FLAGGABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FLAGGABLE, FlaggableIface))

typedef struct _Flaggable Flaggable;
typedef struct _FlaggableIface FlaggableIface;

#define TYPE_SLIDESHOW_PAGE (slideshow_page_get_type ())
#define SLIDESHOW_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SLIDESHOW_PAGE, SlideshowPage))
#define SLIDESHOW_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SLIDESHOW_PAGE, SlideshowPageClass))
#define IS_SLIDESHOW_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SLIDESHOW_PAGE))
#define IS_SLIDESHOW_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SLIDESHOW_PAGE))
#define SLIDESHOW_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SLIDESHOW_PAGE, SlideshowPageClass))

typedef struct _SlideshowPage SlideshowPage;
typedef struct _SlideshowPageClass SlideshowPageClass;

#define TYPE_LIBRARY_WINDOW (library_window_get_type ())
#define LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_WINDOW, LibraryWindow))
#define LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_WINDOW, LibraryWindowClass))
#define IS_LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_WINDOW))
#define IS_LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_WINDOW))
#define LIBRARY_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_WINDOW, LibraryWindowClass))

typedef struct _LibraryWindow LibraryWindow;
typedef struct _LibraryWindowClass LibraryWindowClass;

#define TYPE_EVENT_PAGE (event_page_get_type ())
#define EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_PAGE, EventPage))
#define EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_PAGE, EventPageClass))
#define IS_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_PAGE))
#define IS_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_PAGE))
#define EVENT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_PAGE, EventPageClass))

typedef struct _EventPage EventPage;
typedef struct _EventPageClass EventPageClass;

#define TYPE_TRASH_UNTRASH_PHOTOS_COMMAND (trash_untrash_photos_command_get_type ())
#define TRASH_UNTRASH_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommand))
#define TRASH_UNTRASH_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommandClass))
#define IS_TRASH_UNTRASH_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRASH_UNTRASH_PHOTOS_COMMAND))
#define IS_TRASH_UNTRASH_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRASH_UNTRASH_PHOTOS_COMMAND))
#define TRASH_UNTRASH_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommandClass))

typedef struct _TrashUntrashPhotosCommand TrashUntrashPhotosCommand;
typedef struct _TrashUntrashPhotosCommandClass TrashUntrashPhotosCommandClass;

#define TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND (multiple_data_source_at_once_command_get_type ())
#define MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommand))
#define MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommandClass))
#define IS_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND))
#define IS_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND))
#define MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommandClass))

typedef struct _MultipleDataSourceAtOnceCommand MultipleDataSourceAtOnceCommand;
typedef struct _MultipleDataSourceAtOnceCommandClass MultipleDataSourceAtOnceCommandClass;

#define TYPE_FLAG_UNFLAG_COMMAND (flag_unflag_command_get_type ())
#define FLAG_UNFLAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLAG_UNFLAG_COMMAND, FlagUnflagCommand))
#define FLAG_UNFLAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FLAG_UNFLAG_COMMAND, FlagUnflagCommandClass))
#define IS_FLAG_UNFLAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLAG_UNFLAG_COMMAND))
#define IS_FLAG_UNFLAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FLAG_UNFLAG_COMMAND))
#define FLAG_UNFLAG_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FLAG_UNFLAG_COMMAND, FlagUnflagCommandClass))

typedef struct _FlagUnflagCommand FlagUnflagCommand;
typedef struct _FlagUnflagCommandClass FlagUnflagCommandClass;

#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)))

#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 ())

#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
typedef struct _ExportFormatParameters ExportFormatParameters;

#define TYPE_SET_RATING_SINGLE_COMMAND (set_rating_single_command_get_type ())
#define SET_RATING_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommand))
#define SET_RATING_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommandClass))
#define IS_SET_RATING_SINGLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_RATING_SINGLE_COMMAND))
#define IS_SET_RATING_SINGLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_RATING_SINGLE_COMMAND))
#define SET_RATING_SINGLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommandClass))

typedef struct _SetRatingSingleCommand SetRatingSingleCommand;
typedef struct _SetRatingSingleCommandClass SetRatingSingleCommandClass;
#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL)))

#define TYPE_TAGS_DIALOG (tags_dialog_get_type ())
#define TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAGS_DIALOG, TagsDialog))
#define TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAGS_DIALOG, TagsDialogClass))
#define IS_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAGS_DIALOG))
#define IS_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAGS_DIALOG))
#define TAGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAGS_DIALOG, TagsDialogClass))

typedef struct _TagsDialog TagsDialog;
typedef struct _TagsDialogClass TagsDialogClass;

#define TYPE_ADD_TAGS_DIALOG (add_tags_dialog_get_type ())
#define ADD_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADD_TAGS_DIALOG, AddTagsDialog))
#define ADD_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADD_TAGS_DIALOG, AddTagsDialogClass))
#define IS_ADD_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADD_TAGS_DIALOG))
#define IS_ADD_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADD_TAGS_DIALOG))
#define ADD_TAGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADD_TAGS_DIALOG, AddTagsDialogClass))

typedef struct _AddTagsDialog AddTagsDialog;
typedef struct _AddTagsDialogClass AddTagsDialogClass;

#define TYPE_HIERARCHICAL_TAG_INDEX (hierarchical_tag_index_get_type ())
#define HIERARCHICAL_TAG_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndex))
#define HIERARCHICAL_TAG_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndexClass))
#define IS_HIERARCHICAL_TAG_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HIERARCHICAL_TAG_INDEX))
#define IS_HIERARCHICAL_TAG_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HIERARCHICAL_TAG_INDEX))
#define HIERARCHICAL_TAG_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndexClass))

typedef struct _HierarchicalTagIndex HierarchicalTagIndex;
typedef struct _HierarchicalTagIndexClass HierarchicalTagIndexClass;

#define TYPE_ADD_TAGS_COMMAND (add_tags_command_get_type ())
#define ADD_TAGS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADD_TAGS_COMMAND, AddTagsCommand))
#define ADD_TAGS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADD_TAGS_COMMAND, AddTagsCommandClass))
#define IS_ADD_TAGS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADD_TAGS_COMMAND))
#define IS_ADD_TAGS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADD_TAGS_COMMAND))
#define ADD_TAGS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADD_TAGS_COMMAND, AddTagsCommandClass))

typedef struct _AddTagsCommand AddTagsCommand;
typedef struct _AddTagsCommandClass AddTagsCommandClass;
#define _hierarchical_tag_index_unref0(var) ((var == NULL) ? NULL : (var = (hierarchical_tag_index_unref (var), NULL)))

#define TYPE_MODIFY_TAGS_DIALOG (modify_tags_dialog_get_type ())
#define MODIFY_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MODIFY_TAGS_DIALOG, ModifyTagsDialog))
#define MODIFY_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MODIFY_TAGS_DIALOG, ModifyTagsDialogClass))
#define IS_MODIFY_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MODIFY_TAGS_DIALOG))
#define IS_MODIFY_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MODIFY_TAGS_DIALOG))
#define MODIFY_TAGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MODIFY_TAGS_DIALOG, ModifyTagsDialogClass))

typedef struct _ModifyTagsDialog ModifyTagsDialog;
typedef struct _ModifyTagsDialogClass ModifyTagsDialogClass;

#define TYPE_TAG (tag_get_type ())
#define TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG, Tag))
#define TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG, TagClass))
#define IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG))
#define IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG))
#define TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG, TagClass))

typedef struct _Tag Tag;
typedef struct _TagClass TagClass;

#define TYPE_MODIFY_TAGS_COMMAND (modify_tags_command_get_type ())
#define MODIFY_TAGS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MODIFY_TAGS_COMMAND, ModifyTagsCommand))
#define MODIFY_TAGS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MODIFY_TAGS_COMMAND, ModifyTagsCommandClass))
#define IS_MODIFY_TAGS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MODIFY_TAGS_COMMAND))
#define IS_MODIFY_TAGS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MODIFY_TAGS_COMMAND))
#define MODIFY_TAGS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MODIFY_TAGS_COMMAND, ModifyTagsCommandClass))

typedef struct _ModifyTagsCommand ModifyTagsCommand;
typedef struct _ModifyTagsCommandClass ModifyTagsCommandClass;
typedef struct _ViewFilterPrivate ViewFilterPrivate;
typedef struct _LibraryPhotoPageLibraryPhotoPageViewFilterPrivate LibraryPhotoPageLibraryPhotoPageViewFilterPrivate;
#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 _ZoomBuffer {
	GObject parent_instance;
	ZoomBufferPrivate * priv;
};

struct _ZoomBufferClass {
	GObjectClass parent_class;
};

typedef enum  {
	ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_LOADED,
	ZOOM_BUFFER_OBJECT_STATE_SOURCE_LOAD_IN_PROGRESS,
	ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_TRANSFORMED,
	ZOOM_BUFFER_OBJECT_STATE_TRANSFORMED_READY
} ZoomBufferObjectState;

struct _Dimensions {
	gint width;
	gint height;
};

struct _ZoomState {
	Dimensions content_dimensions;
	Dimensions viewport_dimensions;
	gdouble zoom_factor;
	gdouble interpolation_factor;
	gdouble min_factor;
	gdouble max_factor;
	GdkPoint viewport_center;
};

struct _ZoomBufferPrivate {
	GdkPixbuf* iso_source_image;
	GdkPixbuf* reduced_source_image;
	GdkPixbuf* iso_transformed_image;
	GdkPixbuf* reduced_transformed_image;
	GdkPixbuf* preview_image;
	Photo* backing_photo;
	ZoomBufferObjectState object_state;
	GdkPixbuf* demand_transform_cached_pixbuf;
	ZoomState demand_transform_zoom_state;
	ZoomBufferTransformationJob* demand_transform_job;
	Workers* workers;
	SinglePhotoPage* parent_page;
	gboolean is_interactive_redraw_in_progress;
};

typedef enum  {
	BACKGROUND_JOB_JOB_PRIORITY_HIGHEST = 100,
	BACKGROUND_JOB_JOB_PRIORITY_HIGH = 75,
	BACKGROUND_JOB_JOB_PRIORITY_NORMAL = 50,
	BACKGROUND_JOB_JOB_PRIORITY_LOW = 25,
	BACKGROUND_JOB_JOB_PRIORITY_LOWEST = 0
} BackgroundJobJobPriority;

struct _BackgroundJob {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BackgroundJobPrivate * priv;
};

struct _BackgroundJobClass {
	GTypeClass parent_class;
	void (*finalize) (BackgroundJob *self);
	void (*execute) (BackgroundJob* self);
	BackgroundJobJobPriority (*get_priority) (BackgroundJob* self);
};

struct _ZoomBufferIsoSourceFetchJob {
	BackgroundJob parent_instance;
	ZoomBufferIsoSourceFetchJobPrivate * priv;
	GdkPixbuf* fetched;
};

struct _ZoomBufferIsoSourceFetchJobClass {
	BackgroundJobClass parent_class;
};

typedef enum  {
	DIRECTION_FORWARD,
	DIRECTION_BACKWARD
} Direction;

typedef void (*CompletionCallback) (BackgroundJob* job, void* user_data);
struct _ZoomBufferTransformationJob {
	BackgroundJob parent_instance;
	ZoomBufferTransformationJobPrivate * priv;
	GdkPixbuf* transformed;
};

struct _ZoomBufferTransformationJobClass {
	BackgroundJobClass parent_class;
};

struct _ZoomBufferIsoSourceFetchJobPrivate {
	Photo* to_fetch;
};

typedef void (*CancellationCallback) (BackgroundJob* job, void* user_data);
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  {
	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;

typedef enum  {
	BACKING_FETCH_MODE_SOURCE,
	BACKING_FETCH_MODE_BASELINE,
	BACKING_FETCH_MODE_MASTER,
	BACKING_FETCH_MODE_UNMODIFIED
} BackingFetchMode;

struct _ZoomBufferTransformationJobPrivate {
	GdkPixbuf* to_transform;
	PixelTransformer* transformer;
	GCancellable* cancellable;
};

struct _Page {
	GtkScrolledWindow parent_instance;
	PagePrivate * priv;
	GtkBuilder* builder;
	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);
	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 (*add_actions) (Page* self, GActionMap* map);
	void (*remove_actions) (Page* self, GActionMap* map);
	void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames);
	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);
};

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 _EditingHostPagePrivate {
	SourceCollection* sources;
	ViewCollection* parent_view;
	GdkPixbuf* swapped;
	gboolean pixbuf_dirty;
	GtkToolButton* rotate_button;
	GtkToggleToolButton* crop_button;
	GtkToggleToolButton* redeye_button;
	GtkToggleToolButton* adjust_button;
	GtkToggleToolButton* straighten_button;
	GtkToolButton* enhance_button;
	GtkScale* zoom_slider;
	GtkToolButton* prev_button;
	GtkToolButton* next_button;
	EditingToolsEditingTool* current_tool;
	GtkToggleToolButton* current_editing_toggle;
	GdkPixbuf* cancel_editing_pixbuf;
	gboolean photo_missing;
	PixbufCache* cache;
	PixbufCache* master_cache;
	DragAndDropHandler* dnd_handler;
	gboolean enable_interactive_zoom_refresh;
	GdkPoint zoom_pan_start_point;
	gboolean is_pan_in_progress;
	gdouble saved_slider_val;
	ZoomBuffer* zoom_buffer;
	GeeHashMap* last_locations;
};

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 _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);
};

typedef enum  {
	PIXBUF_CACHE_PHOTO_TYPE_BASELINE,
	PIXBUF_CACHE_PHOTO_TYPE_MASTER
} PixbufCachePhotoType;

typedef gboolean (*PixbufCacheCacheFilter) (Photo* photo, void* user_data);
typedef DataView* (*CreateView) (DataSource* source, void* user_data);
typedef gboolean (*CreateViewPredicate) (DataSource* source, void* user_data);
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 _EditingToolsEditingTool {
	GTypeInstance parent_instance;
	volatile int ref_count;
	EditingToolsEditingToolPrivate * priv;
	EditingToolsPhotoCanvas* canvas;
	cairo_surface_t* surface;
	gchar* name;
};

struct _EditingToolsEditingToolClass {
	GTypeClass parent_class;
	void (*finalize) (EditingToolsEditingTool *self);
	void (*activate) (EditingToolsEditingTool* self, EditingToolsPhotoCanvas* canvas);
	void (*deactivate) (EditingToolsEditingTool* self);
	EditingToolsEditingToolWindow* (*get_tool_window) (EditingToolsEditingTool* self);
	GdkPixbuf* (*get_display_pixbuf) (EditingToolsEditingTool* self, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error);
	void (*on_left_click) (EditingToolsEditingTool* self, gint x, gint y);
	void (*on_left_released) (EditingToolsEditingTool* self, gint x, gint y);
	void (*on_motion) (EditingToolsEditingTool* self, gint x, gint y, GdkModifierType mask);
	gboolean (*on_leave_notify_event) (EditingToolsEditingTool* self);
	gboolean (*on_keypress) (EditingToolsEditingTool* self, GdkEventKey* event);
	void (*paint) (EditingToolsEditingTool* self, cairo_t* ctx);
};

typedef enum  {
	ROTATION_CLOCKWISE,
	ROTATION_COUNTERCLOCKWISE,
	ROTATION_MIRROR,
	ROTATION_UPSIDE_DOWN
} Rotation;

struct _DateableIface {
	GTypeInterface parent_iface;
	void (*set_exposure_time) (Dateable* self, time_t target_time);
	time_t (*get_exposure_time) (Dateable* self);
};

typedef EditingToolsEditingTool* (*EditingToolsEditingToolFactory) ();
struct _EditingToolsPhotoCanvas {
	GTypeInstance parent_instance;
	volatile int ref_count;
	EditingToolsPhotoCanvasPrivate * priv;
};

struct _EditingToolsPhotoCanvasClass {
	GTypeClass parent_class;
	void (*finalize) (EditingToolsPhotoCanvas *self);
	void (*repaint) (EditingToolsPhotoCanvas* self);
};

struct _EditingHostPageEditingHostCanvas {
	EditingToolsPhotoCanvas parent_instance;
	EditingHostPageEditingHostCanvasPrivate * priv;
};

struct _EditingHostPageEditingHostCanvasClass {
	EditingToolsPhotoCanvasClass parent_class;
};

struct _EditingHostPageEditingHostCanvasPrivate {
	EditingHostPage* host_page;
};

typedef enum  {
	RAW_DEVELOPER_SHOTWELL = 0,
	RAW_DEVELOPER_CAMERA,
	RAW_DEVELOPER_EMBEDDED
} RawDeveloper;

struct _LibraryPhotoPage {
	EditingHostPage parent_instance;
	LibraryPhotoPagePrivate * priv;
};

struct _LibraryPhotoPageClass {
	EditingHostPageClass parent_class;
	void (*developer_changed) (LibraryPhotoPage* self, RawDeveloper rd);
};

struct _LibraryPhotoPagePrivate {
	CollectionPage* return_page;
	gboolean return_to_collection_on_release;
	LibraryPhotoPageLibraryPhotoPageViewFilter* filter;
	GtkMenu* context_menu;
};

typedef enum  {
	RATING_REJECTED = -1,
	RATING_UNRATED = 0,
	RATING_ONE = 1,
	RATING_TWO = 2,
	RATING_THREE = 3,
	RATING_FOUR = 4,
	RATING_FIVE = 5
} Rating;

struct _FlaggableIface {
	GTypeInterface parent_iface;
	gboolean (*is_flagged) (Flaggable* self);
	void (*mark_flagged) (Flaggable* self);
	void (*mark_unflagged) (Flaggable* self);
};

typedef enum  {
	EXPORT_FORMAT_MODE_UNMODIFIED,
	EXPORT_FORMAT_MODE_CURRENT,
	EXPORT_FORMAT_MODE_SPECIFIED,
	EXPORT_FORMAT_MODE_LAST
} ExportFormatMode;

typedef enum  {
	JPEG_QUALITY_LOW = 50,
	JPEG_QUALITY_MEDIUM = 75,
	JPEG_QUALITY_HIGH = 90,
	JPEG_QUALITY_MAXIMUM = 100
} JpegQuality;

struct _ExportFormatParameters {
	ExportFormatMode mode;
	PhotoFileFormat specified_format;
	JpegQuality quality;
	gboolean export_metadata;
};

struct _ViewFilter {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ViewFilterPrivate * priv;
};

struct _ViewFilterClass {
	GTypeClass parent_class;
	void (*finalize) (ViewFilter *self);
	gboolean (*predicate) (ViewFilter* self, DataView* view);
	void (*refresh) (ViewFilter* self);
};

struct _LibraryPhotoPageLibraryPhotoPageViewFilter {
	ViewFilter parent_instance;
	LibraryPhotoPageLibraryPhotoPageViewFilterPrivate * priv;
};

struct _LibraryPhotoPageLibraryPhotoPageViewFilterClass {
	ViewFilterClass parent_class;
};


static gpointer zoom_buffer_parent_class = NULL;
static gpointer zoom_buffer_iso_source_fetch_job_parent_class = NULL;
static gpointer zoom_buffer_transformation_job_parent_class = NULL;
static gpointer editing_host_page_parent_class = NULL;
static gpointer editing_host_page_editing_host_canvas_parent_class = NULL;
static gpointer library_photo_page_parent_class = NULL;
extern LibraryPhotoSourceCollection* library_photo_global;
static gpointer library_photo_page_library_photo_page_view_filter_parent_class = NULL;

GType zoom_buffer_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;
static GType zoom_buffer_object_state_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
GType zoom_state_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);
ZoomState* zoom_state_dup (const ZoomState* self);
void zoom_state_free (ZoomState* self);
gpointer background_job_ref (gpointer instance);
void background_job_unref (gpointer instance);
GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_background_job (GValue* value, gpointer v_object);
void value_take_background_job (GValue* value, gpointer v_object);
gpointer value_get_background_job (const GValue* value);
GType background_job_get_type (void) G_GNUC_CONST;
static GType zoom_buffer_transformation_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
gpointer workers_ref (gpointer instance);
void workers_unref (gpointer instance);
GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_workers (GValue* value, gpointer v_object);
void value_take_workers (GValue* value, gpointer v_object);
gpointer value_get_workers (const GValue* value);
GType workers_get_type (void) G_GNUC_CONST;
GType page_get_type (void) G_GNUC_CONST;
GType single_photo_page_get_type (void) G_GNUC_CONST;
#define ZOOM_BUFFER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ZOOM_BUFFER, ZoomBufferPrivate))
enum  {
	ZOOM_BUFFER_DUMMY_PROPERTY
};
#define ZOOM_BUFFER_MEGAPIXEL 1048576
#define ZOOM_BUFFER_USE_REDUCED_THRESHOLD (((gint) 2.0) * ZOOM_BUFFER_MEGAPIXEL)
ZoomBuffer* zoom_buffer_new (SinglePhotoPage* parent_page, Photo* backing_photo, GdkPixbuf* preview_image);
ZoomBuffer* zoom_buffer_construct (GType object_type, SinglePhotoPage* parent_page, Photo* backing_photo, GdkPixbuf* preview_image);
Workers* workers_new (guint max_threads, gboolean exclusive);
Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive);
static void zoom_buffer_on_iso_source_fetch_complete (ZoomBuffer* self, BackgroundJob* job);
static GType zoom_buffer_iso_source_fetch_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
GType background_job_job_priority_get_type (void) G_GNUC_CONST;
GType direction_get_type (void) G_GNUC_CONST;
void single_photo_page_repaint (SinglePhotoPage* self, Direction* direction);
gpointer pixel_transformer_ref (gpointer instance);
void pixel_transformer_unref (gpointer instance);
GParamSpec* param_spec_pixel_transformer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_pixel_transformer (GValue* value, gpointer v_object);
void value_take_pixel_transformer (GValue* value, gpointer v_object);
gpointer value_get_pixel_transformer (const GValue* value);
GType pixel_transformer_get_type (void) G_GNUC_CONST;
PixelTransformer* photo_get_pixel_transformer (Photo* self);
static void zoom_buffer_on_iso_transformation_complete (ZoomBuffer* self, BackgroundJob* job);
static void _zoom_buffer_on_iso_transformation_complete_completion_callback (BackgroundJob* job, gpointer self);
static ZoomBufferTransformationJob* zoom_buffer_transformation_job_new (ZoomBuffer* owner, GdkPixbuf* to_transform, PixelTransformer* transformer, CompletionCallback completion_callback, void* completion_callback_target, GCancellable* cancellable);
static ZoomBufferTransformationJob* zoom_buffer_transformation_job_construct (GType object_type, ZoomBuffer* owner, GdkPixbuf* to_transform, PixelTransformer* transformer, CompletionCallback completion_callback, void* completion_callback_target, GCancellable* cancellable);
void workers_enqueue (Workers* self, BackgroundJob* job);
static void zoom_buffer_on_demand_transform_complete (ZoomBuffer* self, BackgroundJob* job);
static GdkPixbuf* zoom_buffer_get_view_projection_pixbuf (ZoomBuffer* self, ZoomState* zoom_state, GdkPixbuf* iso_pixbuf, GdkPixbuf* reduced_pixbuf);
void zoom_state_get_viewing_rectangle_wrt_content (ZoomState *self, GdkRectangle* result);
void zoom_state_get_viewing_rectangle_projection (ZoomState *self, GdkPixbuf* for_pixbuf, GdkRectangle* result);
gdouble zoom_state_get_zoom_factor (ZoomState *self);
static GdkPixbuf* zoom_buffer_get_zoomed_image_source_not_transformed (ZoomBuffer* self, ZoomState* zoom_state);
gboolean zoom_state_equals (ZoomState *self, ZoomState* other);
GdkPixbuf* zoom_buffer_get_zoom_preview_image_internal (ZoomBuffer* self, ZoomState* zoom_state);
void background_job_cancel (BackgroundJob* self);
static void _zoom_buffer_on_demand_transform_complete_completion_callback (BackgroundJob* job, gpointer self);
static void _zoom_buffer_on_iso_source_fetch_complete_completion_callback (BackgroundJob* job, gpointer self);
static ZoomBufferIsoSourceFetchJob* zoom_buffer_iso_source_fetch_job_new (ZoomBuffer* owner, Photo* to_fetch, CompletionCallback completion_callback, void* completion_callback_target);
static ZoomBufferIsoSourceFetchJob* zoom_buffer_iso_source_fetch_job_construct (GType object_type, ZoomBuffer* owner, Photo* to_fetch, CompletionCallback completion_callback, void* completion_callback_target);
Photo* zoom_buffer_get_backing_photo (ZoomBuffer* self);
void zoom_buffer_update_preview_image (ZoomBuffer* self, GdkPixbuf* preview_image);
void zoom_buffer_flush_demand_cache (ZoomBuffer* self, ZoomState* initial_zoom_state);
GdkPixbuf* zoom_buffer_get_zoomed_image (ZoomBuffer* self, ZoomState* zoom_state);
gdouble zoom_state_get_interpolation_factor (ZoomState *self);
GdkPixbuf* zoom_buffer_get_zoom_preview_image (ZoomBuffer* self, ZoomState* zoom_state);
#define ZOOM_BUFFER_ISO_SOURCE_FETCH_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, ZoomBufferIsoSourceFetchJobPrivate))
enum  {
	ZOOM_BUFFER_ISO_SOURCE_FETCH_JOB_DUMMY_PROPERTY
};
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_abstract_semaphore (GValue* value, gpointer v_object);
void value_take_abstract_semaphore (GValue* value, gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
BackgroundJob* background_job_construct (GType object_type, GObject* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, AbstractSemaphore* completion_semaphore);
static void zoom_buffer_iso_source_fetch_job_real_execute (BackgroundJob* base);
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 photo_exception_get_type (void) G_GNUC_CONST;
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);
static void zoom_buffer_iso_source_fetch_job_finalize (BackgroundJob* obj);
#define ZOOM_BUFFER_TRANSFORMATION_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJobPrivate))
enum  {
	ZOOM_BUFFER_TRANSFORMATION_JOB_DUMMY_PROPERTY
};
static void zoom_buffer_transformation_job_real_execute (BackgroundJob* base);
void pixel_transformer_transform_to_other_pixbuf (PixelTransformer* self, GdkPixbuf* source, GdkPixbuf* dest, GCancellable* cancellable);
static void zoom_buffer_transformation_job_finalize (BackgroundJob* obj);
static void zoom_buffer_finalize (GObject* obj);
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_update_reason_get_type (void) G_GNUC_CONST;
GType editing_host_page_get_type (void) G_GNUC_CONST;
GType data_view_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 source_collection_get_type (void) G_GNUC_CONST;
GType view_collection_get_type (void) G_GNUC_CONST;
gpointer editing_tools_editing_tool_ref (gpointer instance);
void editing_tools_editing_tool_unref (gpointer instance);
GParamSpec* editing_tools_param_spec_editing_tool (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void editing_tools_value_set_editing_tool (GValue* value, gpointer v_object);
void editing_tools_value_take_editing_tool (GValue* value, gpointer v_object);
gpointer editing_tools_value_get_editing_tool (const GValue* value);
GType editing_tools_editing_tool_get_type (void) G_GNUC_CONST;
GType pixbuf_cache_get_type (void) G_GNUC_CONST;
gpointer drag_and_drop_handler_ref (gpointer instance);
void drag_and_drop_handler_unref (gpointer instance);
GParamSpec* param_spec_drag_and_drop_handler (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_drag_and_drop_handler (GValue* value, gpointer v_object);
void value_take_drag_and_drop_handler (GValue* value, gpointer v_object);
gpointer value_get_drag_and_drop_handler (const GValue* value);
GType drag_and_drop_handler_get_type (void) G_GNUC_CONST;
#define EDITING_HOST_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EDITING_HOST_PAGE, EditingHostPagePrivate))
enum  {
	EDITING_HOST_PAGE_DUMMY_PROPERTY
};
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 editing_host_page_on_photos_altered (EditingHostPage* self, GeeMap* map);
static void _editing_host_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self);
ViewCollection* page_get_view (Page* self);
static void editing_host_page_on_view_contents_ordering_altered (EditingHostPage* self);
static void _editing_host_page_on_view_contents_ordering_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self);
static void _editing_host_page_on_view_contents_ordering_altered_data_collection_ordering_changed (DataCollection* _sender, gpointer self);
#define RESOURCES_PREVIOUS_LABEL _ ("_Previous")
#define RESOURCES_NEXT_LABEL _ ("_Next")
#define EDITING_HOST_PAGE_TRINKET_SCALE 20
#define EDITING_HOST_PAGE_TRINKET_PADDING 1
#define EDITING_HOST_PAGE_ZOOM_INCREMENT_SIZE 0.1
#define EDITING_HOST_PAGE_PAN_INCREMENT_SIZE 64
#define EDITING_HOST_PAGE_TOOL_WINDOW_SEPARATOR 8
#define EDITING_HOST_PAGE_PIXBUF_CACHE_COUNT 5
#define EDITING_HOST_PAGE_ORIGINAL_PIXBUF_CACHE_COUNT 5
EditingHostPage* editing_host_page_construct (GType object_type, SourceCollection* sources, const gchar* name);
SinglePhotoPage* single_photo_page_construct (GType object_type, const gchar* page_name, gboolean scale_up_to_viewport);
static void editing_host_page_on_viewport_resized (EditingHostPage* self);
static void _editing_host_page_on_viewport_resized_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self);
GtkToolbar* page_get_toolbar (Page* self);
#define RESOURCES_ROTATE_CW_LABEL _ ("Rotate")
#define RESOURCES_CLOCKWISE "object-rotate-right"
#define RESOURCES_ROTATE_CW_TOOLTIP _ ("Rotate the photos right (press Ctrl to rotate left)")
void editing_host_page_on_rotate_clockwise (EditingHostPage* self);
static void _editing_host_page_on_rotate_clockwise_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
#define RESOURCES_CROP_LABEL _ ("Crop")
#define RESOURCES_CROP_TOOLTIP _ ("Crop the photo’s size")
static void editing_host_page_on_crop_toggled (EditingHostPage* self);
static void _editing_host_page_on_crop_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self);
#define RESOURCES_STRAIGHTEN_LABEL _ ("Straighten")
#define RESOURCES_STRAIGHTEN_TOOLTIP _ ("Straighten the photo")
static void editing_host_page_on_straighten_toggled (EditingHostPage* self);
static void _editing_host_page_on_straighten_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self);
#define RESOURCES_RED_EYE_LABEL _ ("Red-eye")
#define RESOURCES_RED_EYE_TOOLTIP _ ("Reduce or eliminate any red-eye effects in the photo")
static void editing_host_page_on_redeye_toggled (EditingHostPage* self);
static void _editing_host_page_on_redeye_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self);
#define RESOURCES_ADJUST "image-adjust"
#define RESOURCES_ADJUST_LABEL _ ("Adjust")
#define RESOURCES_ADJUST_TOOLTIP _ ("Adjust the photo’s color and tone")
static void editing_host_page_on_adjust_toggled (EditingHostPage* self);
static void _editing_host_page_on_adjust_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self);
#define RESOURCES_ENHANCE_LABEL _ ("Enhance")
#define RESOURCES_ENHANCE "shotwell-auto-enhance"
#define RESOURCES_ENHANCE_TOOLTIP _ ("Automatically improve the photo’s appearance")
void editing_host_page_on_enhance (EditingHostPage* self);
static void _editing_host_page_on_enhance_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
GdkPixbuf* resources_load_icon (const gchar* name, gint scale);
#define RESOURCES_ICON_ZOOM_OUT "zoom-out.png"
#define RESOURCES_ICON_ZOOM_SCALE 16
static gboolean editing_host_page_on_zoom_out_pressed (EditingHostPage* self, GdkEventButton* event);
static gboolean _editing_host_page_on_zoom_out_pressed_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static void editing_host_page_on_zoom_slider_value_changed (EditingHostPage* self);
static void _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed (GtkRange* _sender, gpointer self);
static gboolean editing_host_page_on_zoom_slider_drag_begin (EditingHostPage* self, GdkEventButton* event);
static gboolean _editing_host_page_on_zoom_slider_drag_begin_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static gboolean editing_host_page_on_zoom_slider_drag_end (EditingHostPage* self, GdkEventButton* event);
static gboolean _editing_host_page_on_zoom_slider_drag_end_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
gboolean editing_host_page_on_zoom_slider_key_press (EditingHostPage* self, GdkEventKey* event);
static gboolean _editing_host_page_on_zoom_slider_key_press_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
#define RESOURCES_ICON_ZOOM_IN "zoom-in.png"
static gboolean editing_host_page_on_zoom_in_pressed (EditingHostPage* self, GdkEventButton* event);
static gboolean _editing_host_page_on_zoom_in_pressed_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
void single_photo_page_on_previous_photo (SinglePhotoPage* self);
static void _single_photo_page_on_previous_photo_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
void single_photo_page_on_next_photo (SinglePhotoPage* self);
static void _single_photo_page_on_next_photo_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
void single_photo_page_get_zoom_state (SinglePhotoPage* self, ZoomState* result);
void zoom_state_init_rescale (ZoomState *self, ZoomState* existing, gdouble new_slider_val);
void single_photo_page_on_interactive_zoom (SinglePhotoPage* self, ZoomState* interactive_zoom_state);
gboolean zoom_state_is_default (ZoomState *self);
void single_photo_page_set_zoom_state (SinglePhotoPage* self, ZoomState* zoom_state);
void single_photo_page_cancel_zoom (SinglePhotoPage* self);
static void editing_host_page_update_cursor_for_zoom_context (EditingHostPage* self);
GtkWindow* page_get_container (Page* self);
void fullscreen_window_disable_toolbar_dismissal (FullscreenWindow* self);
void fullscreen_window_update_toolbar_dismissal (FullscreenWindow* self);
void editing_host_page_snap_zoom_to_min (EditingHostPage* self);
void editing_host_page_snap_zoom_to_max (EditingHostPage* self);
static void editing_host_page_get_cursor_wrt_viewport (EditingHostPage* self, GdkEventScroll* event, GdkPoint* result);
void zoom_state_get_viewing_rectangle_wrt_screen (ZoomState *self, GdkRectangle* result);
static void editing_host_page_get_cursor_wrt_viewport_center (EditingHostPage* self, GdkEventScroll* event, GdkPoint* result);
void subtract_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result);
static void editing_host_page_get_iso_pixel_under_cursor (EditingHostPage* self, GdkEventScroll* event, GdkPoint* result);
void scale_point (GdkPoint* p, gdouble factor, GdkPoint* result);
void zoom_state_get_viewport_center (ZoomState *self, GdkPoint* result);
void add_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result);
static gdouble editing_host_page_snap_interpolation_factor (EditingHostPage* self, gdouble interp);
static gdouble editing_host_page_adjust_interpolation_factor (EditingHostPage* self, gdouble adjustment);
static void editing_host_page_zoom_about_event_cursor_point (EditingHostPage* self, GdkEventScroll* event, gdouble zoom_increment);
gboolean zoom_state_is_min (ZoomState *self);
void zoom_state_init_pan (ZoomState *self, ZoomState* existing, GdkPoint* new_viewport_center);
void editing_host_page_snap_zoom_to_isomorphic (EditingHostPage* self);
void zoom_state_init_rescale_to_isomorphic (ZoomState *self, ZoomState* existing);
static gboolean editing_host_page_real_on_zoom_slider_key_press (EditingHostPage* self, GdkEventKey* event);
void page_activate_action (Page* self, const gchar* name);
void editing_host_page_on_increase_size (EditingHostPage* self);
static void editing_host_page_real_on_increase_size (EditingHostPage* self);
void editing_host_page_on_decrease_size (EditingHostPage* self);
static void editing_host_page_real_on_decrease_size (EditingHostPage* self);
static void editing_host_page_real_save_zoom_state (SinglePhotoPage* base);
void single_photo_page_save_zoom_state (SinglePhotoPage* self);
static ZoomBuffer* editing_host_page_real_get_zoom_buffer (SinglePhotoPage* base);
static gboolean editing_host_page_real_on_mousewheel_up (Page* base, GdkEventScroll* event);
gboolean zoom_state_is_max (ZoomState *self);
static gboolean editing_host_page_real_on_mousewheel_down (Page* base, GdkEventScroll* event);
static void editing_host_page_real_restore_zoom_state (SinglePhotoPage* base);
void single_photo_page_restore_zoom_state (SinglePhotoPage* self);
static gboolean editing_host_page_real_is_zoom_supported (SinglePhotoPage* base);
static void editing_host_page_real_set_container (Page* base, GtkWindow* container);
void page_set_container (Page* self, GtkWindow* container);
DragAndDropHandler* drag_and_drop_handler_new (Page* page);
DragAndDropHandler* drag_and_drop_handler_construct (GType object_type, Page* page);
ViewCollection* editing_host_page_get_parent_view (EditingHostPage* self);
gboolean editing_host_page_has_photo (EditingHostPage* self);
Photo* editing_host_page_get_photo (EditingHostPage* self);
gint view_collection_get_selected_count (ViewCollection* self);
DataView* view_collection_get_selected_at (ViewCollection* self, gint index);
DataSource* data_view_get_source (DataView* self);
void editing_host_page_photo_changing (EditingHostPage* self, Photo* new_photo);
static void editing_host_page_real_photo_changing (EditingHostPage* self, Photo* new_photo);
GType photo_file_format_get_type (void) G_GNUC_CONST;
PhotoFileFormat photo_get_file_format (Photo* self);
void editing_host_page_set_photo_missing (EditingHostPage* self, gboolean missing);
GFile* media_source_get_file (MediaSource* self);
void editing_host_page_update_ui (EditingHostPage* self, gboolean missing);
static void editing_host_page_set_photo (EditingHostPage* self, Photo* photo);
DataView* view_collection_get_view_for_source (ViewCollection* self, DataSource* source);
void view_collection_unselect_all (ViewCollection* self);
GType marker_get_type (void) G_GNUC_CONST;
Marker* data_collection_mark (DataCollection* self, DataObject* object);
void view_collection_select_marked (ViewCollection* self, Marker* marker);
DataView* view_collection_get_view_for_source_filtered (ViewCollection* self, DataSource* source);
static void editing_host_page_real_realize (GtkWidget* base);
static void editing_host_page_rebuild_caches (EditingHostPage* self, const gchar* caller);
static void editing_host_page_real_switched_to (Page* base);
void page_switched_to (Page* self);
static void editing_host_page_replace_photo (EditingHostPage* self, Photo* new_photo);
static void editing_host_page_real_switching_from (Page* base);
void page_switching_from (Page* self);
GType command_get_type (void) G_GNUC_CONST;
static void editing_host_page_deactivate_tool (EditingHostPage* self, Command* command, GdkPixbuf* new_pixbuf, Dimensions* new_max_dim, gboolean needs_improvement);
void dimensions_init (Dimensions *self, gint width, gint height);
void data_collection_clear (DataCollection* self);
static void editing_host_page_real_switching_to_fullscreen (Page* base, FullscreenWindow* fsw);
void page_switching_to_fullscreen (Page* self, FullscreenWindow* fsw);
Page* page_window_get_current_page (PageWindow* self);
static void editing_host_page_on_selection_changed (EditingHostPage* self, GeeIterable* selected);
static void _editing_host_page_on_selection_changed_view_collection_items_selected (ViewCollection* _sender, GeeIterable* selected, gpointer self);
static void editing_host_page_real_returning_from_fullscreen (Page* base, FullscreenWindow* fsw);
void page_returning_from_fullscreen (Page* self, FullscreenWindow* fsw);
void editing_host_page_enable_rotate (EditingHostPage* self, gboolean should_enable);
void single_photo_page_get_canvas_scaling (SinglePhotoPage* self, Scaling* result);
void pixbuf_cache_get_scaling (PixbufCache* self, Scaling* result);
gboolean scaling_equals (Scaling *self, Scaling* scaling);
gchar* scaling_to_string (Scaling *self);
static void editing_host_page_on_pixbuf_fetched (EditingHostPage* self, Photo* photo, GdkPixbuf* pixbuf, GError* err);
static void _editing_host_page_on_pixbuf_fetched_pixbuf_cache_fetched (PixbufCache* _sender, Photo* photo, GdkPixbuf* pixbuf, GError* err, gpointer self);
void pixbuf_cache_cancel_all (PixbufCache* self);
GType pixbuf_cache_photo_type_get_type (void) G_GNUC_CONST;
PixbufCache* pixbuf_cache_new (SourceCollection* sources, PixbufCachePhotoType type, Scaling* scaling, gint max_count, PixbufCacheCacheFilter filter, void* filter_target);
PixbufCache* pixbuf_cache_construct (GType object_type, SourceCollection* sources, PixbufCachePhotoType type, Scaling* scaling, gint max_count, PixbufCacheCacheFilter filter, void* filter_target);
static gboolean editing_host_page_master_cache_filter (EditingHostPage* self, Photo* photo);
static gboolean _editing_host_page_master_cache_filter_pixbuf_cache_cache_filter (Photo* photo, gpointer self);
static void editing_host_page_refresh_caches (EditingHostPage* self, const gchar* caller);
gchar* data_object_to_string (DataObject* self);
static void editing_host_page_prefetch_neighbors (EditingHostPage* self, ViewCollection* controller, Photo* photo);
gboolean photo_has_transformations (Photo* self);
gboolean photo_has_editable (Photo* self);
gboolean data_source_equals (DataSource* self, DataSource* source);
void media_source_get_dimensions (MediaSource* self, PhotoException disallowed_steps, Dimensions* result);
GdkPixbuf* editing_tools_editing_tool_get_display_pixbuf (EditingToolsEditingTool* self, Scaling* scaling, Photo* photo, Dimensions* max_dim, GError** error);
void single_photo_page_set_pixbuf (SinglePhotoPage* self, GdkPixbuf* unscaled, Dimensions* max_dim, Direction* direction);
void editing_host_page_notify_photo_backing_missing (EditingHostPage* self, Photo* photo, gboolean missing);
GType pixbuf_cache_pixbuf_cache_batch_get_type (void) G_GNUC_CONST;
PixbufCachePixbufCacheBatch* pixbuf_cache_pixbuf_cache_batch_new (void);
PixbufCachePixbufCacheBatch* pixbuf_cache_pixbuf_cache_batch_construct (GType object_type);
gboolean view_collection_get_immediate_neighbors (ViewCollection* self, DataSource* home, DataSource** next, DataSource** prev, const gchar* type_selector);
#define PHOTO_TYPENAME "thumb"
GeeSet* view_collection_get_extended_neighbors (ViewCollection* self, DataSource* home, const gchar* typename);
void pixbuf_cache_prefetch_batch (PixbufCache* self, PixbufCachePixbufCacheBatch* batch, gboolean force);
static void editing_host_page_cancel_prefetch_neighbors (EditingHostPage* self, ViewCollection* old_controller, Photo* old_photo, ViewCollection* new_controller, Photo* new_photo);
void pixbuf_cache_drop (PixbufCache* self, Photo* photo);
DataView* editing_host_page_create_photo_view (EditingHostPage* self, DataSource* source);
static DataView* editing_host_page_real_create_photo_view (EditingHostPage* self, DataSource* source);
PhotoView* photo_view_new (PhotoSource* source);
PhotoView* photo_view_construct (GType object_type, PhotoSource* source);
GType thumbnail_view_get_type (void) G_GNUC_CONST;
GType photo_view_get_type (void) G_GNUC_CONST;
static gboolean editing_host_page_is_photo (EditingHostPage* self, DataSource* source);
void editing_host_page_display_copy_of (EditingHostPage* self, ViewCollection* controller, Photo* starting_photo);
void view_collection_copy_into (ViewCollection* self, ViewCollection* to_copy, CreateView copying_ctor, void* copying_ctor_target, CreateViewPredicate should_copy, void* should_copy_target);
static DataView* _editing_host_page_create_photo_view_create_view (DataSource* source, gpointer self);
static gboolean _editing_host_page_is_photo_create_view_predicate (DataSource* source, gpointer self);
void editing_host_page_display_mirror_of (EditingHostPage* self, ViewCollection* controller, Photo* starting_photo);
void view_collection_mirror (ViewCollection* self, ViewCollection* to_mirror, CreateView mirroring_ctor, void* mirroring_ctor_target, CreateViewPredicate should_mirror, void* should_mirror_target);
static void editing_host_page_real_update_ui (EditingHostPage* self, gboolean missing);
static void editing_host_page_real_notify_photo_backing_missing (EditingHostPage* self, Photo* photo, gboolean missing);
static void editing_host_page_draw_message (EditingHostPage* self, const gchar* message);
void single_photo_page_paint_text (SinglePhotoPage* self, PangoLayout* pango_layout, gint x, gint y);
GdkPixbuf* media_source_get_preview_pixbuf (MediaSource* self, Scaling* scaling, GError** error);
gboolean editing_host_page_get_photo_missing (EditingHostPage* self);
gboolean editing_host_page_confirm_replace_photo (EditingHostPage* self, Photo* old_photo, Photo* new_photo);
static gboolean editing_host_page_real_confirm_replace_photo (EditingHostPage* self, Photo* old_photo, Photo* new_photo);
static GdkPixbuf* editing_host_page_get_zoom_pixbuf (EditingHostPage* self, Photo* new_photo);
GdkPixbuf* pixbuf_cache_get_ready_pixbuf (PixbufCache* self, Photo* photo);
GdkPixbuf* get_placeholder_pixbuf (void);
GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self, GdkPixbuf* pixbuf, GdkInterpType interp, gboolean scale_up);
void page_set_page_name (Page* self, const gchar* page_name);
gchar* data_object_get_name (DataObject* self);
static void editing_host_page_quick_update_pixbuf (EditingHostPage* self);
static void editing_host_page_real_cancel_zoom (SinglePhotoPage* base);
void single_photo_page_get_surface_dim (SinglePhotoPage* self, Dimensions* result);
void zoom_state_init (ZoomState *self, Dimensions* content_dimensions, Dimensions* viewport_dimensions, gdouble slider_val, GdkPoint* viewport_center);
void page_set_page_cursor (Page* self, GdkCursorType cursor_type);
void pixbuf_cache_prefetch (PixbufCache* self, Photo* photo, BackgroundJobJobPriority priority, gboolean force);
static gboolean editing_host_page_update_pixbuf (EditingHostPage* self);
static void editing_host_page_real_on_resize (Page* base, GdkRectangle* rect);
void page_on_resize (Page* self, GdkRectangle* rect);
static void editing_host_page_track_tool_window (EditingHostPage* self);
static void editing_host_page_real_on_resize_finished (Page* base, GdkRectangle* rect);
static void editing_host_page_real_update_actions (Page* base, gint selected_count, gint count);
gint view_collection_get_sources_of_type_count (ViewCollection* self, GType t);
gboolean photo_check_can_rotate (Photo* self);
gboolean editing_host_page_is_rotate_available (EditingHostPage* self, Photo* photo);
gboolean editing_tools_crop_tool_is_available (Photo* photo, Scaling* scaling);
gboolean editing_tools_redeye_tool_is_available (Photo* photo, Scaling* scaling);
gboolean editing_tools_adjust_tool_is_available (Photo* photo, Scaling* scaling);
gboolean editing_host_page_is_enhance_available (EditingHostPage* self, Photo* photo);
gboolean editing_tools_straighten_tool_is_available (Photo* photo, Scaling* scaling);
void page_update_actions (Page* self, gint selected_count, gint count);
static gboolean editing_host_page_real_on_shift_pressed (Page* base, GdkEventKey* event);
gboolean page_get_ctrl_pressed (Page* self);
gboolean page_get_alt_pressed (Page* self);
static void editing_host_page_swap_in_original (EditingHostPage* self);
gboolean page_on_shift_pressed (Page* self, GdkEventKey* event);
static gboolean editing_host_page_real_on_shift_released (Page* base, GdkEventKey* event);
static void editing_host_page_swap_out_original (EditingHostPage* self);
gboolean page_on_shift_released (Page* self, GdkEventKey* event);
static gboolean editing_host_page_real_on_alt_pressed (Page* base, GdkEventKey* event);
gboolean page_on_alt_pressed (Page* self, GdkEventKey* event);
static gboolean editing_host_page_real_on_alt_released (Page* base, GdkEventKey* event);
gboolean page_get_shift_pressed (Page* self);
gboolean page_on_alt_released (Page* self, GdkEventKey* event);
GdkPixbuf* photo_get_prefetched_copy (Photo* self, GError** error);
GType orientation_get_type (void) G_GNUC_CONST;
Orientation photo_get_original_orientation (Photo* self);
GdkPixbuf* orientation_rotate_pixbuf (Orientation self, GdkPixbuf* pixbuf);
GdkPixbuf* single_photo_page_get_unscaled_pixbuf (SinglePhotoPage* self);
void photo_get_master_dimensions (Photo* self, Dimensions* result);
static void editing_host_page_activate_tool (EditingHostPage* self, EditingToolsEditingTool* tool);
gpointer editing_tools_photo_canvas_ref (gpointer instance);
void editing_tools_photo_canvas_unref (gpointer instance);
GParamSpec* editing_tools_param_spec_photo_canvas (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void editing_tools_value_set_photo_canvas (GValue* value, gpointer v_object);
void editing_tools_value_take_photo_canvas (GValue* value, gpointer v_object);
gpointer editing_tools_value_get_photo_canvas (const GValue* value);
GType editing_tools_photo_canvas_get_type (void) G_GNUC_CONST;
static EditingHostPageEditingHostCanvas* editing_host_page_editing_host_canvas_new (EditingHostPage* host_page);
static EditingHostPageEditingHostCanvas* editing_host_page_editing_host_canvas_construct (GType object_type, EditingHostPage* host_page);
static GType editing_host_page_editing_host_canvas_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
void editing_tools_editing_tool_activate (EditingToolsEditingTool* self, EditingToolsPhotoCanvas* canvas);
static void editing_host_page_place_tool_window (EditingHostPage* self);
GType editing_tools_editing_tool_window_get_type (void) G_GNUC_CONST;
EditingToolsEditingToolWindow* editing_tools_editing_tool_get_tool_window (EditingToolsEditingTool* self);
gboolean editing_tools_editing_tool_window_has_user_moved (EditingToolsEditingToolWindow* self);
void editing_tools_editing_tool_deactivate (EditingToolsEditingTool* self);
static void editing_host_page_on_tool_activated (EditingHostPage* self);
static void _editing_host_page_on_tool_activated_editing_tools_editing_tool_activated (EditingToolsEditingTool* _sender, gpointer self);
static void editing_host_page_on_tool_deactivated (EditingHostPage* self);
static void _editing_host_page_on_tool_deactivated_editing_tools_editing_tool_deactivated (EditingToolsEditingTool* _sender, gpointer self);
static void editing_host_page_on_tool_applied (EditingHostPage* self, Command* command, GdkPixbuf* new_pixbuf, Dimensions* new_max_dim, gboolean needs_improvement);
static void _editing_host_page_on_tool_applied_editing_tools_editing_tool_applied (EditingToolsEditingTool* _sender, Command* command, GdkPixbuf* new_pixbuf, Dimensions* new_max_dim, gboolean needs_improvement, gpointer self);
static void editing_host_page_on_tool_cancelled (EditingHostPage* self);
static void _editing_host_page_on_tool_cancelled_editing_tools_editing_tool_cancelled (EditingToolsEditingTool* _sender, gpointer self);
static void editing_host_page_on_tool_aborted (EditingHostPage* self);
static void _editing_host_page_on_tool_aborted_editing_tools_editing_tool_aborted (EditingToolsEditingTool* _sender, gpointer self);
void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result);
static gboolean _editing_host_page_update_pixbuf_gsource_func (gpointer 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_execute (CommandManager* self, Command* command);
gboolean editing_host_page_on_double_click (EditingHostPage* self, GdkEventButton* event);
static gboolean editing_host_page_real_on_double_click (EditingHostPage* self, GdkEventButton* event);
static gboolean editing_host_page_real_on_left_click (Page* base, GdkEventButton* event);
void page_suspend_cursor_hiding (Page* self);
gboolean single_photo_page_is_inside_pixbuf (SinglePhotoPage* self, gint x, gint y);
void editing_tools_editing_tool_on_left_click (EditingToolsEditingTool* self, gint x, gint y);
static gboolean editing_host_page_real_on_left_released (Page* base, GdkEventButton* event);
ZoomBuffer* single_photo_page_get_zoom_buffer (SinglePhotoPage* self);
void page_restore_cursor_hiding (Page* self);
void editing_tools_editing_tool_on_left_released (EditingToolsEditingTool* self, gint x, gint y);
static gboolean editing_host_page_real_on_right_click (Page* base, GdkEventButton* event);
gboolean page_on_context_buttonpress (Page* self, GdkEventButton* event);
static gboolean editing_host_page_on_fetch_original (EditingHostPage* self);
static gboolean _editing_host_page_on_fetch_original_gsource_func (gpointer self);
gint data_collection_get_count (DataCollection* self);
static gboolean editing_host_page_is_panning_possible (EditingHostPage* self);
gint zoom_state_get_zoomed_width (ZoomState *self);
gint zoom_state_get_zoomed_height (ZoomState *self);
static gboolean editing_host_page_real_on_motion (Page* base, GdkEventMotion* event, gint x, gint y, GdkModifierType mask);
void editing_tools_editing_tool_on_motion (EditingToolsEditingTool* self, gint x, gint y, GdkModifierType mask);
void single_photo_page_on_interactive_pan (SinglePhotoPage* self, ZoomState* interactive_zoom_state);
gboolean page_on_motion (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask);
static gboolean editing_host_page_real_on_leave_notify_event (Page* base);
gboolean editing_tools_editing_tool_on_leave_notify_event (EditingToolsEditingTool* self);
gboolean page_on_leave_notify_event (Page* self);
static void editing_host_page_real_on_move (Page* base, GdkRectangle* rect);
void page_on_move (Page* self, GdkRectangle* rect);
static void editing_host_page_real_on_move_finished (Page* base, GdkRectangle* rect);
void page_on_move_finished (Page* self, GdkRectangle* rect);
static gboolean editing_host_page_on_keyboard_pan_event (EditingHostPage* self, GdkEventKey* event);
static gboolean editing_host_page_real_key_press_event (GtkWidget* base, GdkEventKey* event);
gboolean editing_tools_editing_tool_on_keypress (EditingToolsEditingTool* self, GdkEventKey* event);
static void editing_host_page_real_new_surface (SinglePhotoPage* base, cairo_t* default_ctx, Dimensions* dim);
void editing_tools_photo_canvas_set_surface (EditingToolsPhotoCanvas* self, cairo_t* default_ctx, Dimensions* surface_dim);
static void editing_host_page_real_updated_pixbuf (SinglePhotoPage* base, GdkPixbuf* pixbuf, SinglePhotoPageUpdateReason reason, Dimensions* old_dim);
void editing_tools_photo_canvas_resized_pixbuf (EditingToolsPhotoCanvas* self, Dimensions* old_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position);
void single_photo_page_get_scaled_pixbuf_position (SinglePhotoPage* self, GdkRectangle* result);
GdkPixbuf* editing_host_page_get_bottom_left_trinket (EditingHostPage* self, gint scale);
static GdkPixbuf* editing_host_page_real_get_bottom_left_trinket (EditingHostPage* self, gint scale);
GdkPixbuf* editing_host_page_get_top_left_trinket (EditingHostPage* self, gint scale);
static GdkPixbuf* editing_host_page_real_get_top_left_trinket (EditingHostPage* self, gint scale);
GdkPixbuf* editing_host_page_get_top_right_trinket (EditingHostPage* self, gint scale);
static GdkPixbuf* editing_host_page_real_get_top_right_trinket (EditingHostPage* self, gint scale);
GdkPixbuf* editing_host_page_get_bottom_right_trinket (EditingHostPage* self, gint scale);
static GdkPixbuf* editing_host_page_real_get_bottom_right_trinket (EditingHostPage* self, gint scale);
static void editing_host_page_real_paint (SinglePhotoPage* base, cairo_t* ctx, Dimensions* ctx_dim);
void editing_tools_editing_tool_paint (EditingToolsEditingTool* self, cairo_t* ctx);
void set_source_color_from_string (cairo_t* ctx, const gchar* spec);
void single_photo_page_paint (SinglePhotoPage* self, cairo_t* ctx, Dimensions* ctx_dim);
GType rotation_get_type (void) G_GNUC_CONST;
static void editing_host_page_rotate (EditingHostPage* self, Rotation rotation, const gchar* name, const gchar* description);
GType page_command_get_type (void) G_GNUC_CONST;
GType single_data_source_command_get_type (void) G_GNUC_CONST;
GType rotate_single_command_get_type (void) G_GNUC_CONST;
RotateSingleCommand* rotate_single_command_new (Photo* photo, Rotation rotation, const gchar* name, const gchar* explanation);
RotateSingleCommand* rotate_single_command_construct (GType object_type, Photo* photo, Rotation rotation, const gchar* name, const gchar* explanation);
#define RESOURCES_ROTATE_CW_FULL_LABEL _ ("Rotate Right")
void editing_host_page_on_rotate_counterclockwise (EditingHostPage* self);
#define RESOURCES_ROTATE_CCW_FULL_LABEL _ ("Rotate Left")
#define RESOURCES_ROTATE_CCW_TOOLTIP _ ("Rotate the photos left")
void editing_host_page_on_flip_horizontally (EditingHostPage* self);
#define RESOURCES_HFLIP_LABEL _ ("Flip Horizontally")
void editing_host_page_on_flip_vertically (EditingHostPage* self);
#define RESOURCES_VFLIP_LABEL _ ("Flip Vertically")
void editing_host_page_on_revert (EditingHostPage* self);
gboolean revert_editable_dialog (GtkWindow* owner, GeeCollection* photos);
GType app_window_get_type (void) G_GNUC_CONST;
AppWindow* app_window_get_instance (void);
GeeCollection* view_collection_get_sources (ViewCollection* self);
void photo_revert_to_master (Photo* self, gboolean notify);
GType generic_photo_transformation_command_get_type (void) G_GNUC_CONST;
GType revert_single_command_get_type (void) G_GNUC_CONST;
RevertSingleCommand* revert_single_command_new (Photo* photo);
RevertSingleCommand* revert_single_command_construct (GType object_type, Photo* photo);
void editing_host_page_on_edit_title (EditingHostPage* self);
GType library_photo_get_type (void) G_GNUC_CONST;
gpointer text_entry_dialog_mediator_ref (gpointer instance);
void text_entry_dialog_mediator_unref (gpointer instance);
GParamSpec* param_spec_text_entry_dialog_mediator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_text_entry_dialog_mediator (GValue* value, gpointer v_object);
void value_take_text_entry_dialog_mediator (GValue* value, gpointer v_object);
gpointer value_get_text_entry_dialog_mediator (const GValue* value);
GType text_entry_dialog_mediator_get_type (void) G_GNUC_CONST;
GType edit_title_dialog_get_type (void) G_GNUC_CONST;
gchar* media_source_get_title (MediaSource* self);
EditTitleDialog* edit_title_dialog_new (const gchar* photo_title);
EditTitleDialog* edit_title_dialog_construct (GType object_type, const gchar* photo_title);
gchar* edit_title_dialog_execute (EditTitleDialog* self);
GType edit_title_command_get_type (void) G_GNUC_CONST;
EditTitleCommand* edit_title_command_new (MediaSource* source, const gchar* new_title);
EditTitleCommand* edit_title_command_construct (GType object_type, MediaSource* source, const gchar* new_title);
void editing_host_page_on_edit_comment (EditingHostPage* self);
gpointer multi_text_entry_dialog_mediator_ref (gpointer instance);
void multi_text_entry_dialog_mediator_unref (gpointer instance);
GParamSpec* param_spec_multi_text_entry_dialog_mediator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_multi_text_entry_dialog_mediator (GValue* value, gpointer v_object);
void value_take_multi_text_entry_dialog_mediator (GValue* value, gpointer v_object);
gpointer value_get_multi_text_entry_dialog_mediator (const GValue* value);
GType multi_text_entry_dialog_mediator_get_type (void) G_GNUC_CONST;
GType edit_comment_dialog_get_type (void) G_GNUC_CONST;
gchar* media_source_get_comment (MediaSource* self);
EditCommentDialog* edit_comment_dialog_new (const gchar* comment, gboolean is_event);
EditCommentDialog* edit_comment_dialog_construct (GType object_type, const gchar* comment, gboolean is_event);
gchar* edit_comment_dialog_execute (EditCommentDialog* self);
GType edit_comment_command_get_type (void) G_GNUC_CONST;
EditCommentCommand* edit_comment_command_new (MediaSource* source, const gchar* new_comment);
EditCommentCommand* edit_comment_command_construct (GType object_type, MediaSource* source, const gchar* new_comment);
void editing_host_page_on_adjust_date_time (EditingHostPage* self);
GType adjust_date_time_dialog_get_type (void) G_GNUC_CONST;
GType dateable_get_type (void) G_GNUC_CONST;
GType direct_photo_page_get_type (void) G_GNUC_CONST;
AdjustDateTimeDialog* adjust_date_time_dialog_new (Dateable* source, gint photo_count, gboolean display_options, gboolean contains_video, gboolean only_video);
AdjustDateTimeDialog* adjust_date_time_dialog_construct (GType object_type, Dateable* source, gint photo_count, gboolean display_options, gboolean contains_video, gboolean only_video);
gboolean adjust_date_time_dialog_execute (AdjustDateTimeDialog* self, gint64* time_shift, gboolean* keep_relativity, gboolean* modify_originals);
GeeList* view_collection_get_selected (ViewCollection* self);
GType adjust_date_time_photo_command_get_type (void) G_GNUC_CONST;
AdjustDateTimePhotoCommand* adjust_date_time_photo_command_new (Dateable* dateable, gint64 time_shift, gboolean modify_original);
AdjustDateTimePhotoCommand* adjust_date_time_photo_command_construct (GType object_type, Dateable* dateable, gint64 time_shift, gboolean modify_original);
void editing_host_page_on_set_background (EditingHostPage* self);
GType set_background_photo_dialog_get_type (void) G_GNUC_CONST;
SetBackgroundPhotoDialog* set_background_photo_dialog_new (void);
SetBackgroundPhotoDialog* set_background_photo_dialog_construct (GType object_type);
gboolean set_background_photo_dialog_execute (SetBackgroundPhotoDialog* self, gboolean* desktop_background, gboolean* screensaver);
void page_window_set_busy_cursor (PageWindow* self);
void desktop_integration_set_background (Photo* photo, gboolean desktop, gboolean screensaver);
void page_window_set_normal_cursor (PageWindow* self);
static gboolean editing_host_page_real_on_ctrl_pressed (Page* base, GdkEventKey* event);
#define RESOURCES_COUNTERCLOCKWISE "object-rotate-left"
#define RESOURCES_ROTATE_CCW_LABEL _ ("Rotate")
static void _editing_host_page_on_rotate_counterclockwise_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
gboolean page_on_ctrl_pressed (Page* self, GdkEventKey* event);
static gboolean editing_host_page_real_on_ctrl_released (Page* base, GdkEventKey* event);
gboolean page_on_ctrl_released (Page* self, GdkEventKey* event);
void editing_host_page_on_tool_button_toggled (EditingHostPage* self, GtkToggleToolButton* toggle, EditingToolsEditingToolFactory factory);
void editing_host_page_toggle_crop (EditingHostPage* self);
void editing_host_page_toggle_straighten (EditingHostPage* self);
void editing_host_page_toggle_redeye (EditingHostPage* self);
void editing_host_page_toggle_adjust (EditingHostPage* self);
GType editing_tools_straighten_tool_get_type (void) G_GNUC_CONST;
EditingToolsStraightenTool* editing_tools_straighten_tool_factory (void);
static EditingToolsEditingTool* _editing_tools_straighten_tool_factory_editing_tools_editing_tool_factory (void);
GType editing_tools_crop_tool_get_type (void) G_GNUC_CONST;
EditingToolsCropTool* editing_tools_crop_tool_factory (void);
static EditingToolsEditingTool* _editing_tools_crop_tool_factory_editing_tools_editing_tool_factory (void);
GType editing_tools_redeye_tool_get_type (void) G_GNUC_CONST;
EditingToolsRedeyeTool* editing_tools_redeye_tool_factory (void);
static EditingToolsEditingTool* _editing_tools_redeye_tool_factory_editing_tools_editing_tool_factory (void);
GType editing_tools_adjust_tool_get_type (void) G_GNUC_CONST;
EditingToolsAdjustTool* editing_tools_adjust_tool_factory (void);
static EditingToolsEditingTool* _editing_tools_adjust_tool_factory_editing_tools_editing_tool_factory (void);
gboolean editing_tools_adjust_tool_enhance (EditingToolsAdjustTool* self);
GType enhance_single_command_get_type (void) G_GNUC_CONST;
EnhanceSingleCommand* enhance_single_command_new (Photo* photo);
EnhanceSingleCommand* enhance_single_command_construct (GType object_type, Photo* photo);
void editing_host_page_on_copy_adjustments (EditingHostPage* self);
gpointer pixel_transformation_bundle_ref (gpointer instance);
void pixel_transformation_bundle_unref (gpointer instance);
GParamSpec* param_spec_pixel_transformation_bundle (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_pixel_transformation_bundle (GValue* value, gpointer v_object);
void value_take_pixel_transformation_bundle (GValue* value, gpointer v_object);
gpointer value_get_pixel_transformation_bundle (const GValue* value);
GType pixel_transformation_bundle_get_type (void) G_GNUC_CONST;
void pixel_transformation_bundle_set_copied_color_adjustments (PixelTransformationBundle* adjustments);
PixelTransformationBundle* photo_get_color_adjustments (Photo* self);
void page_set_action_sensitive (Page* self, const gchar* name, gboolean sensitive);
void editing_host_page_on_paste_adjustments (EditingHostPage* self);
PixelTransformationBundle* pixel_transformation_bundle_get_copied_color_adjustments (void);
GType adjust_colors_single_command_get_type (void) G_GNUC_CONST;
#define RESOURCES_PASTE_ADJUSTMENTS_LABEL _ ("Paste Color Adjustments")
#define RESOURCES_PASTE_ADJUSTMENTS_TOOLTIP _ ("Apply copied color adjustments to the selected photos")
AdjustColorsSingleCommand* adjust_colors_single_command_new (Photo* photo, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation);
AdjustColorsSingleCommand* adjust_colors_single_command_construct (GType object_type, Photo* photo, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation);
static void editing_host_page_real_on_next_photo (SinglePhotoPage* base);
DataView* view_collection_get_next (ViewCollection* self, DataView* view);
static void editing_host_page_real_on_previous_photo (SinglePhotoPage* base);
DataView* view_collection_get_previous (ViewCollection* self, DataView* view);
gboolean editing_host_page_has_current_tool (EditingHostPage* self);
void editing_host_page_unset_view_collection (EditingHostPage* self);
#define EDITING_HOST_PAGE_EDITING_HOST_CANVAS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS, EditingHostPageEditingHostCanvasPrivate))
enum  {
	EDITING_HOST_PAGE_EDITING_HOST_CANVAS_DUMMY_PROPERTY
};
cairo_t* single_photo_page_get_cairo_context (SinglePhotoPage* self);
GdkPixbuf* single_photo_page_get_scaled_pixbuf (SinglePhotoPage* self);
EditingToolsPhotoCanvas* editing_tools_photo_canvas_construct (GType object_type, GtkWindow* container, GdkWindow* drawing_window, Photo* photo, cairo_t* default_ctx, Dimensions* surface_dim, GdkPixbuf* scaled, GdkRectangle* scaled_position);
static void editing_host_page_editing_host_canvas_real_repaint (EditingToolsPhotoCanvas* base);
static void editing_host_page_editing_host_canvas_finalize (EditingToolsPhotoCanvas* obj);
static void editing_host_page_finalize (GObject* obj);
GType library_photo_page_get_type (void) G_GNUC_CONST;
GType raw_developer_get_type (void) G_GNUC_CONST;
GType checkerboard_page_get_type (void) G_GNUC_CONST;
GType media_page_get_type (void) G_GNUC_CONST;
GType collection_page_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;
static GType library_photo_page_library_photo_page_view_filter_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define LIBRARY_PHOTO_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPagePrivate))
enum  {
	LIBRARY_PHOTO_PAGE_DUMMY_PROPERTY
};
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType media_source_collection_get_type (void) G_GNUC_CONST;
GType library_photo_source_collection_get_type (void) G_GNUC_CONST;
static void library_photo_page_on_photo_destroyed (LibraryPhotoPage* self, DataSource* source);
static void _library_photo_page_on_photo_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
static void library_photo_page_on_metadata_altered (LibraryPhotoPage* self, GeeMap* map);
static void _library_photo_page_on_metadata_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer 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);
static void library_photo_page_on_external_app_changed (LibraryPhotoPage* self);
static void _library_photo_page_on_external_app_changed_configuration_facade_external_app_changed (ConfigurationFacade* _sender, gpointer self);
static LibraryPhotoPageLibraryPhotoPageViewFilter* library_photo_page_library_photo_page_view_filter_new (void);
static LibraryPhotoPageLibraryPhotoPageViewFilter* library_photo_page_library_photo_page_view_filter_construct (GType object_type);
static void library_photo_page_on_export (LibraryPhotoPage* self);
static void _library_photo_page_on_export_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_print (LibraryPhotoPage* self);
static void _library_photo_page_on_print_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_publish (LibraryPhotoPage* self);
static void _library_photo_page_on_publish_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_remove_from_library (LibraryPhotoPage* self);
static void _library_photo_page_on_remove_from_library_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_move_to_trash (LibraryPhotoPage* self);
static void _library_photo_page_on_move_to_trash_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _single_photo_page_on_previous_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _single_photo_page_on_next_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_rotate_clockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_rotate_counterclockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_flip_horizontally_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_flip_vertically_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_enhance_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_copy_adjustments_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_paste_adjustments_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_toggle_crop_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_toggle_straighten_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_toggle_redeye_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_toggle_adjust_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_revert_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_edit_title_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_edit_comment_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_adjust_date_time_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_external_edit (LibraryPhotoPage* self);
static void _library_photo_page_on_external_edit_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_external_edit_raw (LibraryPhotoPage* self);
static void _library_photo_page_on_external_edit_raw_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_send_to (LibraryPhotoPage* self);
static void _library_photo_page_on_send_to_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_set_background_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_flag_unflag (LibraryPhotoPage* self);
static void _library_photo_page_on_flag_unflag_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_increase_rating (LibraryPhotoPage* self);
static void _library_photo_page_on_increase_rating_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_decrease_rating (LibraryPhotoPage* self);
static void _library_photo_page_on_decrease_rating_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_rate_rejected (LibraryPhotoPage* self);
static void _library_photo_page_on_rate_rejected_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_rate_unrated (LibraryPhotoPage* self);
static void _library_photo_page_on_rate_unrated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_rate_one (LibraryPhotoPage* self);
static void _library_photo_page_on_rate_one_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_rate_two (LibraryPhotoPage* self);
static void _library_photo_page_on_rate_two_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_rate_three (LibraryPhotoPage* self);
static void _library_photo_page_on_rate_three_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_rate_four (LibraryPhotoPage* self);
static void _library_photo_page_on_rate_four_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_rate_five (LibraryPhotoPage* self);
static void _library_photo_page_on_rate_five_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_increase_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_on_decrease_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_snap_zoom_to_min_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_snap_zoom_to_isomorphic_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void _editing_host_page_snap_zoom_to_max_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_add_tags (LibraryPhotoPage* self);
static void _library_photo_page_on_add_tags_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_modify_tags (LibraryPhotoPage* self);
static void _library_photo_page_on_modify_tags_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_slideshow (LibraryPhotoPage* self);
static void _library_photo_page_on_slideshow_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void page_on_action_toggle (Page* self, GAction* action, GVariant* value);
static void _page_on_action_toggle_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void library_photo_page_on_display_ratings (LibraryPhotoPage* self, GSimpleAction* action, GVariant* value);
static void _library_photo_page_on_display_ratings_gsimple_action_change_state_callback (GSimpleAction* action, GVariant* value, gpointer self);
LibraryPhotoPage* library_photo_page_new (void);
LibraryPhotoPage* library_photo_page_construct (GType object_type);
static void library_photo_page_on_photos_altered (LibraryPhotoPage* self);
static void _library_photo_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self);
void view_collection_install_view_filter (ViewCollection* self, ViewFilter* f);
static void library_photo_page_on_photo_unlinking (LibraryPhotoPage* self, GeeCollection* unlinking);
static void _library_photo_page_on_photo_unlinking_source_collection_items_unlinking (SourceCollection* _sender, GeeCollection* unlinking, gpointer self);
static void library_photo_page_on_photo_relinked (LibraryPhotoPage* self, GeeCollection* relinked);
static void _library_photo_page_on_photo_relinked_source_collection_items_relinked (SourceCollection* _sender, GeeCollection* relinked, gpointer self);
gboolean library_photo_page_not_trashed_view_filter (LibraryPhotoPage* self, DataView* view);
gboolean media_source_is_trashed (MediaSource* self);
static void library_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames);
void page_init_collect_ui_filenames (Page* self, GeeList* ui_filenames);
static void library_photo_page_real_add_actions (Page* base, GActionMap* map);
void page_add_actions (Page* self, GActionMap* map);
GAction* page_get_action (Page* self, const gchar* name);
gboolean configuration_facade_get_display_photo_ratings (ConfigurationFacade* self);
static GVariant* _variant_new16 (gboolean value);
RawDeveloper configuration_facade_get_default_raw_developer (ConfigurationFacade* self);
static GVariant* _variant_new17 (const gchar* value);
static void library_photo_page_on_raw_developer_changed (LibraryPhotoPage* self, GSimpleAction* action, GVariant* value);
static void _library_photo_page_on_raw_developer_changed_g_simple_action_change_state (GSimpleAction* _sender, GVariant* value, gpointer self);
static void library_photo_page_real_remove_actions (Page* base, GActionMap* map);
void page_remove_actions (Page* self, GActionMap* map);
static InjectionGroup** library_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, const gchar* accellerator);
static void _vala_array_add82 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value);
static void _vala_array_add83 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value);
static void _vala_array_add84 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value);
static void library_photo_page_set_display_ratings (LibraryPhotoPage* self, gboolean display);
void configuration_facade_set_display_photo_ratings (ConfigurationFacade* self, gboolean display);
static void library_photo_page_real_update_actions (Page* base, gint selected_count, gint count);
PhotoFileFormat photo_get_master_file_format (Photo* self);
gchar* configuration_facade_get_external_photo_app (ConfigurationFacade* self);
static void library_photo_page_update_rating_menu_item_sensitivity (LibraryPhotoPage* self);
static void library_photo_page_update_development_menu_item_sensitivity (LibraryPhotoPage* self);
gboolean photo_has_color_adjustments (Photo* self);
gboolean pixel_transformation_bundle_has_copied_color_adjustments (void);
static void library_photo_page_update_flag_action (LibraryPhotoPage* self);
gchar* configuration_facade_get_external_raw_app (ConfigurationFacade* self);
void page_set_action_visible (Page* self, const gchar* name, gboolean visible);
void library_photo_page_developer_changed (LibraryPhotoPage* self, RawDeveloper rd);
static void library_photo_page_real_developer_changed (LibraryPhotoPage* self, RawDeveloper rd);
gboolean raw_developer_is_equivalent (RawDeveloper self, RawDeveloper d);
RawDeveloper photo_get_raw_developer (Photo* self);
gboolean dialogs_confirm_warn_developer_changed (gint number);
GType multiple_data_source_command_get_type (void) G_GNUC_CONST;
GType set_raw_developer_command_get_type (void) G_GNUC_CONST;
SetRawDeveloperCommand* set_raw_developer_command_new (GeeIterable* iter, RawDeveloper developer);
SetRawDeveloperCommand* set_raw_developer_command_construct (GType object_type, GeeIterable* iter, RawDeveloper developer);
void library_photo_page_display_for_collection (LibraryPhotoPage* self, CollectionPage* return_page, Photo* photo, ViewCollection* view);
void library_photo_page_on_page_destroyed (LibraryPhotoPage* self);
static void _library_photo_page_on_page_destroyed_gtk_widget_destroy (GtkWidget* _sender, gpointer self);
CollectionPage* library_photo_page_get_controller_page (LibraryPhotoPage* self);
static void library_photo_page_real_switched_to (Page* base);
static void library_photo_page_update_zoom_menu_item_sensitivity (LibraryPhotoPage* self);
static void library_photo_page_real_switching_from (Page* base);
static GdkPixbuf* library_photo_page_real_get_bottom_left_trinket (EditingHostPage* base, gint scale);
GType rating_get_type (void) G_GNUC_CONST;
GdkPixbuf* resources_get_rating_trinket (Rating rating, gint scale);
Rating media_source_get_rating (MediaSource* self);
static GdkPixbuf* library_photo_page_real_get_top_right_trinket (EditingHostPage* base, gint scale);
GType flaggable_get_type (void) G_GNUC_CONST;
gboolean flaggable_is_flagged (Flaggable* self);
GdkPixbuf* resources_get_icon (const gchar* name, gint scale);
#define RESOURCES_ICON_FLAGGED_TRINKET "flag-trinket.png"
#define RESOURCES_DEFAULT_ICON_SCALE 24
void app_window_go_fullscreen (AppWindow* self, Page* page);
SlideshowPage* slideshow_page_new (SourceCollection* sources, ViewCollection* controller, Photo* start);
SlideshowPage* slideshow_page_construct (GType object_type, SourceCollection* sources, ViewCollection* controller, Photo* start);
GType slideshow_page_get_type (void) G_GNUC_CONST;
static void library_photo_page_real_on_increase_size (EditingHostPage* base);
static void library_photo_page_real_on_decrease_size (EditingHostPage* base);
static gboolean library_photo_page_real_on_zoom_slider_key_press (EditingHostPage* base, GdkEventKey* event);
static void library_photo_page_return_to_collection (LibraryPhotoPage* self);
static void library_photo_page_real_update_ui (EditingHostPage* base, gboolean missing);
static void library_photo_page_real_notify_photo_backing_missing (EditingHostPage* base, Photo* photo, gboolean missing);
void media_source_mark_offline (MediaSource* self);
void media_source_mark_online (MediaSource* self);
static gboolean library_photo_page_real_key_press_event (GtkWidget* base, GdkEventKey* event);
static gboolean library_photo_page_real_on_double_click (EditingHostPage* base, GdkEventButton* event);
void fullscreen_window_close (FullscreenWindow* self);
static gboolean library_photo_page_real_on_left_released (Page* base, GdkEventButton* event);
gboolean page_on_left_released (Page* self, GdkEventButton* event);
static GtkMenu* library_photo_page_get_context_menu (LibraryPhotoPage* self);
static gboolean library_photo_page_real_on_context_buttonpress (Page* base, GdkEventButton* event);
gboolean page_popup_context_menu (Page* self, GtkMenu* context_menu, GdkEventButton* event);
static gboolean library_photo_page_real_on_context_keypress (Page* base);
GType library_window_get_type (void) G_GNUC_CONST;
LibraryWindow* library_window_get_app (void);
void library_window_switch_to_page (LibraryWindow* self, Page* page);
void library_window_switch_to_library_page (LibraryWindow* self);
void remove_from_app (GeeCollection* sources, const gchar* dialog_title, const gchar* progress_dialog_text);
GType event_page_get_type (void) G_GNUC_CONST;
void library_window_set_page_switching_enabled (LibraryWindow* self, gboolean should_enable);
TrashUntrashPhotosCommand* trash_untrash_photos_command_new (GeeCollection* sources, gboolean to_trash);
TrashUntrashPhotosCommand* trash_untrash_photos_command_construct (GType object_type, GeeCollection* sources, gboolean to_trash);
GType trash_untrash_photos_command_get_type (void) G_GNUC_CONST;
FlagUnflagCommand* flag_unflag_command_new (GeeCollection* sources, gboolean flag);
FlagUnflagCommand* flag_unflag_command_construct (GType object_type, GeeCollection* sources, gboolean flag);
GType multiple_data_source_at_once_command_get_type (void) G_GNUC_CONST;
GType flag_unflag_command_get_type (void) G_GNUC_CONST;
static void library_photo_page_on_photo_removed (LibraryPhotoPage* self, LibraryPhoto* photo);
void data_collection_remove_marked (DataCollection* self, Marker* m);
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);
void photo_open_with_external_editor (Photo* self, GError** error);
void open_external_editor_error_dialog (GError* err, Photo* photo);
void photo_open_with_raw_external_editor (Photo* self, GError** error);
void app_window_error_message (const gchar* message, GtkWindow* parent);
gchar* resources_launch_editor_failed (GError* err);
void desktop_integration_send_to (GeeCollection* media);
GeeList* view_collection_get_selected_sources (ViewCollection* self);
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;
GType jpeg_quality_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);
GFile* export_ui_choose_file (const gchar* current_file_basename);
gchar* photo_get_export_basename_for_parameters (Photo* self, ExportFormatParameters* params);
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);
PhotoFileFormat photo_get_export_format_for_parameters (Photo* self, ExportFormatParameters* params);
void publishing_ui_publishing_dialog_go (GeeCollection* to_publish);
GType set_rating_single_command_get_type (void) G_GNUC_CONST;
SetRatingSingleCommand* set_rating_single_command_new_inc_dec (DataSource* source, gboolean is_incrementing);
SetRatingSingleCommand* set_rating_single_command_construct_inc_dec (GType object_type, DataSource* source, gboolean is_incrementing);
static void library_photo_page_on_set_rating (LibraryPhotoPage* self, Rating rating);
SetRatingSingleCommand* set_rating_single_command_new (DataSource* source, Rating rating);
SetRatingSingleCommand* set_rating_single_command_construct (GType object_type, DataSource* source, Rating rating);
gboolean rating_can_increase (Rating self);
gboolean rating_can_decrease (Rating self);
static GVariant* _variant_new18 (const gchar* value);
static GVariant* _variant_new19 (const gchar* value);
gboolean alteration_has_subject (Alteration* self, const gchar* subject);
GType tags_dialog_get_type (void) G_GNUC_CONST;
GType add_tags_dialog_get_type (void) G_GNUC_CONST;
AddTagsDialog* add_tags_dialog_new (void);
AddTagsDialog* add_tags_dialog_construct (GType object_type);
gchar** add_tags_dialog_execute (AddTagsDialog* self, int* result_length1);
gpointer hierarchical_tag_index_ref (gpointer instance);
void hierarchical_tag_index_unref (gpointer instance);
GParamSpec* param_spec_hierarchical_tag_index (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_hierarchical_tag_index (GValue* value, gpointer v_object);
void value_take_hierarchical_tag_index (GValue* value, gpointer v_object);
gpointer value_get_hierarchical_tag_index (const GValue* value);
GType hierarchical_tag_index_get_type (void) G_GNUC_CONST;
HierarchicalTagIndex* hierarchical_tag_index_get_global_index (void);
gchar** hierarchical_tag_index_get_paths_for_names_array (HierarchicalTagIndex* self, gchar** names, int names_length1, int* result_length1);
AddTagsCommand* add_tags_command_new (gchar** paths, int paths_length1, GeeCollection* sources);
AddTagsCommand* add_tags_command_construct (GType object_type, gchar** paths, int paths_length1, GeeCollection* sources);
GType add_tags_command_get_type (void) G_GNUC_CONST;
GType modify_tags_dialog_get_type (void) G_GNUC_CONST;
ModifyTagsDialog* modify_tags_dialog_new (MediaSource* source);
ModifyTagsDialog* modify_tags_dialog_construct (GType object_type, MediaSource* source);
GType tag_get_type (void) G_GNUC_CONST;
GeeArrayList* modify_tags_dialog_execute (ModifyTagsDialog* self);
ModifyTagsCommand* modify_tags_command_new (MediaSource* media, GeeCollection* new_tag_list);
ModifyTagsCommand* modify_tags_command_construct (GType object_type, MediaSource* media, GeeCollection* new_tag_list);
GType modify_tags_command_get_type (void) G_GNUC_CONST;
enum  {
	LIBRARY_PHOTO_PAGE_LIBRARY_PHOTO_PAGE_VIEW_FILTER_DUMMY_PROPERTY
};
static gboolean library_photo_page_library_photo_page_view_filter_real_predicate (ViewFilter* base, DataView* view);
ViewFilter* view_filter_construct (GType object_type);
static void library_photo_page_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);

static const GActionEntry LIBRARY_PHOTO_PAGE_entries[45] = {{"Export", _library_photo_page_on_export_gsimple_action_activate_callback}, {"Print", _library_photo_page_on_print_gsimple_action_activate_callback}, {"Publish", _library_photo_page_on_publish_gsimple_action_activate_callback}, {"RemoveFromLibrary", _library_photo_page_on_remove_from_library_gsimple_action_activate_callback}, {"MoveToTrash", _library_photo_page_on_move_to_trash_gsimple_action_activate_callback}, {"PrevPhoto", _single_photo_page_on_previous_photo_gsimple_action_activate_callback}, {"NextPhoto", _single_photo_page_on_next_photo_gsimple_action_activate_callback}, {"RotateClockwise", _editing_host_page_on_rotate_clockwise_gsimple_action_activate_callback}, {"RotateCounterclockwise", _editing_host_page_on_rotate_counterclockwise_gsimple_action_activate_callback}, {"FlipHorizontally", _editing_host_page_on_flip_horizontally_gsimple_action_activate_callback}, {"FlipVertically", _editing_host_page_on_flip_vertically_gsimple_action_activate_callback}, {"Enhance", _editing_host_page_on_enhance_gsimple_action_activate_callback}, {"CopyColorAdjustments", _editing_host_page_on_copy_adjustments_gsimple_action_activate_callback}, {"PasteColorAdjustments", _editing_host_page_on_paste_adjustments_gsimple_action_activate_callback}, {"Crop", _editing_host_page_toggle_crop_gsimple_action_activate_callback}, {"Straighten", _editing_host_page_toggle_straighten_gsimple_action_activate_callback}, {"RedEye", _editing_host_page_toggle_redeye_gsimple_action_activate_callback}, {"Adjust", _editing_host_page_toggle_adjust_gsimple_action_activate_callback}, {"Revert", _editing_host_page_on_revert_gsimple_action_activate_callback}, {"EditTitle", _editing_host_page_on_edit_title_gsimple_action_activate_callback}, {"EditComment", _editing_host_page_on_edit_comment_gsimple_action_activate_callback}, {"AdjustDateTime", _editing_host_page_on_adjust_date_time_gsimple_action_activate_callback}, {"ExternalEdit", _library_photo_page_on_external_edit_gsimple_action_activate_callback}, {"ExternalEditRAW", _library_photo_page_on_external_edit_raw_gsimple_action_activate_callback}, {"SendTo", _library_photo_page_on_send_to_gsimple_action_activate_callback}, {"SetBackground", _editing_host_page_on_set_background_gsimple_action_activate_callback}, {"Flag", _library_photo_page_on_flag_unflag_gsimple_action_activate_callback}, {"IncreaseRating", _library_photo_page_on_increase_rating_gsimple_action_activate_callback}, {"DecreaseRating", _library_photo_page_on_decrease_rating_gsimple_action_activate_callback}, {"RateRejected", _library_photo_page_on_rate_rejected_gsimple_action_activate_callback}, {"RateUnrated", _library_photo_page_on_rate_unrated_gsimple_action_activate_callback}, {"RateOne", _library_photo_page_on_rate_one_gsimple_action_activate_callback}, {"RateTwo", _library_photo_page_on_rate_two_gsimple_action_activate_callback}, {"RateThree", _library_photo_page_on_rate_three_gsimple_action_activate_callback}, {"RateFour", _library_photo_page_on_rate_four_gsimple_action_activate_callback}, {"RateFive", _library_photo_page_on_rate_five_gsimple_action_activate_callback}, {"IncreaseSize", _editing_host_page_on_increase_size_gsimple_action_activate_callback}, {"DecreaseSize", _editing_host_page_on_decrease_size_gsimple_action_activate_callback}, {"ZoomFit", _editing_host_page_snap_zoom_to_min_gsimple_action_activate_callback}, {"Zoom100", _editing_host_page_snap_zoom_to_isomorphic_gsimple_action_activate_callback}, {"Zoom200", _editing_host_page_snap_zoom_to_max_gsimple_action_activate_callback}, {"AddTags", _library_photo_page_on_add_tags_gsimple_action_activate_callback}, {"ModifyTags", _library_photo_page_on_modify_tags_gsimple_action_activate_callback}, {"Slideshow", _library_photo_page_on_slideshow_gsimple_action_activate_callback}, {"ViewRatings", _page_on_action_toggle_gsimple_action_activate_callback, NULL, "false", _library_photo_page_on_display_ratings_gsimple_action_change_state_callback}};

static GType zoom_buffer_object_state_get_type (void) {
	static volatile gsize zoom_buffer_object_state_type_id__volatile = 0;
	if (g_once_init_enter (&zoom_buffer_object_state_type_id__volatile)) {
		static const GEnumValue values[] = {{ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_LOADED, "ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_LOADED", "source-not-loaded"}, {ZOOM_BUFFER_OBJECT_STATE_SOURCE_LOAD_IN_PROGRESS, "ZOOM_BUFFER_OBJECT_STATE_SOURCE_LOAD_IN_PROGRESS", "source-load-in-progress"}, {ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_TRANSFORMED, "ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_TRANSFORMED", "source-not-transformed"}, {ZOOM_BUFFER_OBJECT_STATE_TRANSFORMED_READY, "ZOOM_BUFFER_OBJECT_STATE_TRANSFORMED_READY", "transformed-ready"}, {0, NULL, NULL}};
		GType zoom_buffer_object_state_type_id;
		zoom_buffer_object_state_type_id = g_enum_register_static ("ZoomBufferObjectState", values);
		g_once_init_leave (&zoom_buffer_object_state_type_id__volatile, zoom_buffer_object_state_type_id);
	}
	return zoom_buffer_object_state_type_id__volatile;
}


static gpointer _g_object_ref0 (gpointer self) {
#line 86 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self ? g_object_ref (self) : NULL;
#line 2420 "PhotoPage.c"
}


ZoomBuffer* zoom_buffer_construct (GType object_type, SinglePhotoPage* parent_page, Photo* backing_photo, GdkPixbuf* preview_image) {
	ZoomBuffer * self = NULL;
	SinglePhotoPage* _tmp0_ = NULL;
	SinglePhotoPage* _tmp1_ = NULL;
	GdkPixbuf* _tmp2_ = NULL;
	GdkPixbuf* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	Photo* _tmp5_ = NULL;
	Workers* _tmp6_ = NULL;
#line 84 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_SINGLE_PHOTO_PAGE (parent_page), NULL);
#line 84 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (backing_photo), NULL);
#line 84 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (GDK_IS_PIXBUF (preview_image), NULL);
#line 84 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = (ZoomBuffer*) g_object_new (object_type, NULL);
#line 86 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = parent_page;
#line 86 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 86 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->parent_page);
#line 86 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->parent_page = _tmp1_;
#line 87 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = preview_image;
#line 87 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 87 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->preview_image);
#line 87 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->preview_image = _tmp3_;
#line 88 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = backing_photo;
#line 88 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 88 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->backing_photo);
#line 88 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->backing_photo = _tmp5_;
#line 89 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = workers_new ((guint) 2, FALSE);
#line 89 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_workers_unref0 (self->priv->workers);
#line 89 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->workers = _tmp6_;
#line 84 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self;
#line 2473 "PhotoPage.c"
}


ZoomBuffer* zoom_buffer_new (SinglePhotoPage* parent_page, Photo* backing_photo, GdkPixbuf* preview_image) {
#line 84 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return zoom_buffer_construct (TYPE_ZOOM_BUFFER, parent_page, backing_photo, preview_image);
#line 2480 "PhotoPage.c"
}


static gpointer _background_job_ref0 (gpointer self) {
#line 93 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self ? background_job_ref (self) : NULL;
#line 2487 "PhotoPage.c"
}


static void _zoom_buffer_on_iso_transformation_complete_completion_callback (BackgroundJob* job, gpointer self) {
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_buffer_on_iso_transformation_complete ((ZoomBuffer*) self, job);
#line 2494 "PhotoPage.c"
}


static void zoom_buffer_on_iso_source_fetch_complete (ZoomBuffer* self, BackgroundJob* job) {
	ZoomBufferIsoSourceFetchJob* fetch_job = NULL;
	BackgroundJob* _tmp0_ = NULL;
	ZoomBufferIsoSourceFetchJob* _tmp1_ = NULL;
	ZoomBufferIsoSourceFetchJob* _tmp2_ = NULL;
	GdkPixbuf* _tmp3_ = NULL;
	ZoomBufferIsoSourceFetchJob* _tmp4_ = NULL;
	GdkPixbuf* _tmp5_ = NULL;
	GdkPixbuf* _tmp6_ = NULL;
	GdkPixbuf* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	GdkPixbuf* _tmp10_ = NULL;
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
	gboolean _tmp21_ = FALSE;
	BackgroundJob* transformation_job = NULL;
	GdkPixbuf* _tmp23_ = NULL;
	Photo* _tmp24_ = NULL;
	PixelTransformer* _tmp25_ = NULL;
	PixelTransformer* _tmp26_ = NULL;
	GCancellable* _tmp27_ = NULL;
	GCancellable* _tmp28_ = NULL;
	ZoomBufferTransformationJob* _tmp29_ = NULL;
	BackgroundJob* _tmp30_ = NULL;
	Workers* _tmp31_ = NULL;
	BackgroundJob* _tmp32_ = NULL;
#line 92 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_ZOOM_BUFFER (self));
#line 92 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (job));
#line 93 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = job;
#line 93 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, ZoomBufferIsoSourceFetchJob));
#line 93 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	fetch_job = _tmp1_;
#line 94 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = fetch_job;
#line 94 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_->fetched;
#line 94 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ == NULL) {
#line 95 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_critical ("PhotoPage.vala:95: ZoomBuffer: iso_source_fetch_complete( ): fetch job" \
" has null image member");
#line 96 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_background_job_unref0 (fetch_job);
#line 96 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 2547 "PhotoPage.c"
	}
#line 99 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = fetch_job;
#line 99 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_->fetched;
#line 99 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 99 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->iso_source_image);
#line 99 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->iso_source_image = _tmp6_;
#line 100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = self->priv->iso_source_image;
#line 100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = gdk_pixbuf_get_width (_tmp7_);
#line 100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = self->priv->iso_source_image;
#line 100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = gdk_pixbuf_get_height (_tmp10_);
#line 100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if ((_tmp9_ * _tmp12_) > ZOOM_BUFFER_USE_REDUCED_THRESHOLD) {
#line 2573 "PhotoPage.c"
		GdkPixbuf* _tmp13_ = NULL;
		GdkPixbuf* _tmp14_ = NULL;
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
		GdkPixbuf* _tmp17_ = NULL;
		gint _tmp18_ = 0;
		gint _tmp19_ = 0;
		GdkPixbuf* _tmp20_ = NULL;
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = self->priv->iso_source_image;
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = self->priv->iso_source_image;
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = gdk_pixbuf_get_width (_tmp14_);
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_;
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = self->priv->iso_source_image;
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = gdk_pixbuf_get_height (_tmp17_);
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_;
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = gdk_pixbuf_scale_simple (_tmp13_, _tmp16_ / 2, _tmp19_ / 2, GDK_INTERP_BILINEAR);
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (self->priv->reduced_source_image);
#line 101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->reduced_source_image = _tmp20_;
#line 2602 "PhotoPage.c"
	}
#line 104 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->object_state = ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_TRANSFORMED;
#line 106 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = self->priv->is_interactive_redraw_in_progress;
#line 106 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp21_) {
#line 2610 "PhotoPage.c"
		SinglePhotoPage* _tmp22_ = NULL;
#line 107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = self->priv->parent_page;
#line 107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_repaint (_tmp22_, NULL);
#line 2616 "PhotoPage.c"
	}
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = self->priv->iso_source_image;
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = self->priv->backing_photo;
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = photo_get_pixel_transformer (_tmp24_);
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = _tmp25_;
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = g_cancellable_new ();
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = _tmp27_;
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = zoom_buffer_transformation_job_new (self, _tmp23_, _tmp26_, _zoom_buffer_on_iso_transformation_complete_completion_callback, self, _tmp28_);
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp30_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_BACKGROUND_JOB, BackgroundJob);
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp28_);
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_pixel_transformer_unref0 (_tmp26_);
#line 109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	transformation_job = _tmp30_;
#line 112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp31_ = self->priv->workers;
#line 112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp32_ = transformation_job;
#line 112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	workers_enqueue (_tmp31_, _tmp32_);
#line 92 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_background_job_unref0 (transformation_job);
#line 92 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_background_job_unref0 (fetch_job);
#line 2650 "PhotoPage.c"
}


static void zoom_buffer_on_iso_transformation_complete (ZoomBuffer* self, BackgroundJob* job) {
	ZoomBufferTransformationJob* transform_job = NULL;
	BackgroundJob* _tmp0_ = NULL;
	ZoomBufferTransformationJob* _tmp1_ = NULL;
	ZoomBufferTransformationJob* _tmp2_ = NULL;
	GdkPixbuf* _tmp3_ = NULL;
	ZoomBufferTransformationJob* _tmp4_ = NULL;
	GdkPixbuf* _tmp5_ = NULL;
	GdkPixbuf* _tmp6_ = NULL;
	GdkPixbuf* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	GdkPixbuf* _tmp10_ = NULL;
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
#line 115 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_ZOOM_BUFFER (self));
#line 115 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (job));
#line 116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = job;
#line 116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJob));
#line 116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	transform_job = _tmp1_;
#line 117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = transform_job;
#line 117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_->transformed;
#line 117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ == NULL) {
#line 118 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_critical ("PhotoPage.vala:118: %s", "ZoomBuffer: on_iso_transformation_complete( ): completed job has null " "image");
#line 120 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_background_job_unref0 (transform_job);
#line 120 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 2691 "PhotoPage.c"
	}
#line 123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = transform_job;
#line 123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_->transformed;
#line 123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->iso_transformed_image);
#line 123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->iso_transformed_image = _tmp6_;
#line 124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = self->priv->iso_transformed_image;
#line 124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = gdk_pixbuf_get_width (_tmp7_);
#line 124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = self->priv->iso_transformed_image;
#line 124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = gdk_pixbuf_get_height (_tmp10_);
#line 124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if ((_tmp9_ * _tmp12_) > ZOOM_BUFFER_USE_REDUCED_THRESHOLD) {
#line 2717 "PhotoPage.c"
		GdkPixbuf* _tmp13_ = NULL;
		GdkPixbuf* _tmp14_ = NULL;
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
		GdkPixbuf* _tmp17_ = NULL;
		gint _tmp18_ = 0;
		gint _tmp19_ = 0;
		GdkPixbuf* _tmp20_ = NULL;
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = self->priv->iso_transformed_image;
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = self->priv->iso_transformed_image;
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = gdk_pixbuf_get_width (_tmp14_);
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_;
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = self->priv->iso_transformed_image;
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = gdk_pixbuf_get_height (_tmp17_);
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_;
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = gdk_pixbuf_scale_simple (_tmp13_, _tmp16_ / 2, _tmp19_ / 2, GDK_INTERP_BILINEAR);
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (self->priv->reduced_transformed_image);
#line 125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->reduced_transformed_image = _tmp20_;
#line 2746 "PhotoPage.c"
	}
#line 129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->object_state = ZOOM_BUFFER_OBJECT_STATE_TRANSFORMED_READY;
#line 115 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_background_job_unref0 (transform_job);
#line 2752 "PhotoPage.c"
}


static void zoom_buffer_on_demand_transform_complete (ZoomBuffer* self, BackgroundJob* job) {
	ZoomBufferTransformationJob* transform_job = NULL;
	BackgroundJob* _tmp0_ = NULL;
	ZoomBufferTransformationJob* _tmp1_ = NULL;
	ZoomBufferTransformationJob* _tmp2_ = NULL;
	GdkPixbuf* _tmp3_ = NULL;
	ZoomBufferTransformationJob* _tmp4_ = NULL;
	GdkPixbuf* _tmp5_ = NULL;
	GdkPixbuf* _tmp6_ = NULL;
	SinglePhotoPage* _tmp7_ = NULL;
#line 132 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_ZOOM_BUFFER (self));
#line 132 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (job));
#line 133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = job;
#line 133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJob));
#line 133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	transform_job = _tmp1_;
#line 134 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = transform_job;
#line 134 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_->transformed;
#line 134 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ == NULL) {
#line 135 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_critical ("PhotoPage.vala:135: %s", "ZoomBuffer: on_demand_transform_complete( ): completed job has null " "image");
#line 137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_background_job_unref0 (transform_job);
#line 137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 2788 "PhotoPage.c"
	}
#line 140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = transform_job;
#line 140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_->transformed;
#line 140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->demand_transform_cached_pixbuf);
#line 140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->demand_transform_cached_pixbuf = _tmp6_;
#line 141 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_background_job_unref0 (self->priv->demand_transform_job);
#line 141 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->demand_transform_job = NULL;
#line 143 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = self->priv->parent_page;
#line 143 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (_tmp7_, NULL);
#line 132 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_background_job_unref0 (transform_job);
#line 2810 "PhotoPage.c"
}


static GdkPixbuf* zoom_buffer_get_view_projection_pixbuf (ZoomBuffer* self, ZoomState* zoom_state, GdkPixbuf* iso_pixbuf, GdkPixbuf* reduced_pixbuf) {
	GdkPixbuf* result = NULL;
	GdkRectangle view_rect = {0};
	GdkRectangle _tmp0_ = {0};
	GdkRectangle view_rect_proj = {0};
	GdkPixbuf* _tmp1_ = NULL;
	GdkRectangle _tmp2_ = {0};
	GdkPixbuf* sample_source_pixbuf = NULL;
	GdkPixbuf* _tmp3_ = NULL;
	GdkPixbuf* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	GdkPixbuf* _tmp6_ = NULL;
	GdkRectangle _tmp14_ = {0};
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	GdkRectangle _tmp17_ = {0};
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
	GdkRectangle _tmp20_ = {0};
	gint _tmp21_ = 0;
	gint _tmp22_ = 0;
	GdkRectangle _tmp23_ = {0};
	gint _tmp24_ = 0;
	gint _tmp25_ = 0;
	GdkPixbuf* proj_subpixbuf = NULL;
	GdkPixbuf* _tmp26_ = NULL;
	GdkRectangle _tmp27_ = {0};
	gint _tmp28_ = 0;
	GdkRectangle _tmp29_ = {0};
	gint _tmp30_ = 0;
	GdkRectangle _tmp31_ = {0};
	gint _tmp32_ = 0;
	GdkRectangle _tmp33_ = {0};
	gint _tmp34_ = 0;
	GdkPixbuf* _tmp35_ = NULL;
	GdkPixbuf* zoomed = NULL;
	GdkRectangle _tmp36_ = {0};
	gint _tmp37_ = 0;
	GdkRectangle _tmp38_ = {0};
	gint _tmp39_ = 0;
	GdkPixbuf* _tmp40_ = NULL;
#line 149 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (self), NULL);
#line 149 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (zoom_state != NULL, NULL);
#line 149 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (GDK_IS_PIXBUF (iso_pixbuf), NULL);
#line 149 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail ((reduced_pixbuf == NULL) || GDK_IS_PIXBUF (reduced_pixbuf), NULL);
#line 151 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewing_rectangle_wrt_content (zoom_state, &_tmp0_);
#line 151 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect = _tmp0_;
#line 152 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = iso_pixbuf;
#line 152 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewing_rectangle_projection (zoom_state, _tmp1_, &_tmp2_);
#line 152 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect_proj = _tmp2_;
#line 154 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = iso_pixbuf;
#line 154 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 154 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	sample_source_pixbuf = _tmp4_;
#line 156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = reduced_pixbuf;
#line 156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_ != NULL) {
#line 2883 "PhotoPage.c"
		gdouble _tmp7_ = 0.0;
#line 156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = zoom_state_get_zoom_factor (zoom_state);
#line 156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = _tmp7_ < 0.5;
#line 2889 "PhotoPage.c"
	} else {
#line 156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = FALSE;
#line 2893 "PhotoPage.c"
	}
#line 156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_) {
#line 2897 "PhotoPage.c"
		GdkPixbuf* _tmp8_ = NULL;
		GdkPixbuf* _tmp9_ = NULL;
		gint _tmp10_ = 0;
		gint _tmp11_ = 0;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
#line 157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = reduced_pixbuf;
#line 157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = _g_object_ref0 (_tmp8_);
#line 157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (sample_source_pixbuf);
#line 157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		sample_source_pixbuf = _tmp9_;
#line 158 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = view_rect_proj.x;
#line 158 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_rect_proj.x = _tmp10_ / 2;
#line 159 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = view_rect_proj.y;
#line 159 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_rect_proj.y = _tmp11_ / 2;
#line 160 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = view_rect_proj.width;
#line 160 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_rect_proj.width = _tmp12_ / 2;
#line 161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = view_rect_proj.height;
#line 161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_rect_proj.height = _tmp13_ / 2;
#line 2928 "PhotoPage.c"
	}
#line 167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = view_rect_proj;
#line 167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = _tmp14_.width;
#line 167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = CLAMP (_tmp15_, 1, G_MAXINT);
#line 167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect_proj.width = _tmp16_;
#line 168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = view_rect_proj;
#line 168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = _tmp17_.height;
#line 168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = CLAMP (_tmp18_, 1, G_MAXINT);
#line 168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect_proj.height = _tmp19_;
#line 170 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = view_rect;
#line 170 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = _tmp20_.width;
#line 170 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = CLAMP (_tmp21_, 1, G_MAXINT);
#line 170 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect.width = _tmp22_;
#line 171 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = view_rect;
#line 171 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = _tmp23_.height;
#line 171 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = CLAMP (_tmp24_, 1, G_MAXINT);
#line 171 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect.height = _tmp25_;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = sample_source_pixbuf;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = view_rect_proj;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = _tmp27_.x;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = view_rect_proj;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp30_ = _tmp29_.y;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp31_ = view_rect_proj;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp32_ = _tmp31_.width;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp33_ = view_rect_proj;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp34_ = _tmp33_.height;
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp35_ = gdk_pixbuf_new_subpixbuf (_tmp26_, _tmp28_, _tmp30_, _tmp32_, _tmp34_);
#line 173 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	proj_subpixbuf = _tmp35_;
#line 176 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp36_ = view_rect;
#line 176 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp37_ = _tmp36_.width;
#line 176 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp38_ = view_rect;
#line 176 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp39_ = _tmp38_.height;
#line 176 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp40_ = gdk_pixbuf_scale_simple (proj_subpixbuf, _tmp37_, _tmp39_, GDK_INTERP_BILINEAR);
#line 176 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoomed = _tmp40_;
#line 179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (zoomed != NULL, "zoomed != null");
#line 181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = zoomed;
#line 181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (proj_subpixbuf);
#line 181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (sample_source_pixbuf);
#line 181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 3006 "PhotoPage.c"
}


static void _zoom_buffer_on_demand_transform_complete_completion_callback (BackgroundJob* job, gpointer self) {
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_buffer_on_demand_transform_complete ((ZoomBuffer*) self, job);
#line 3013 "PhotoPage.c"
}


static GdkPixbuf* zoom_buffer_get_zoomed_image_source_not_transformed (ZoomBuffer* self, ZoomState* zoom_state) {
	GdkPixbuf* result = NULL;
	GdkPixbuf* _tmp0_ = NULL;
	ZoomBufferTransformationJob* _tmp97_ = NULL;
	ZoomBufferTransformationJob* _tmp119_ = NULL;
	ZoomState _tmp136_ = {0};
	GdkPixbuf* _tmp137_ = NULL;
#line 184 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (self), NULL);
#line 184 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (zoom_state != NULL, NULL);
#line 185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->demand_transform_cached_pixbuf;
#line 185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 3032 "PhotoPage.c"
		ZoomState _tmp1_ = {0};
		gboolean _tmp2_ = FALSE;
#line 186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->demand_transform_zoom_state;
#line 186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = zoom_state_equals (zoom_state, &_tmp1_);
#line 186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp2_) {
#line 3041 "PhotoPage.c"
			GdkPixbuf* _tmp3_ = NULL;
			GdkPixbuf* _tmp4_ = NULL;
#line 190 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp3_ = self->priv->demand_transform_cached_pixbuf;
#line 190 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp4_ = _g_object_ref0 (_tmp3_);
#line 190 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = _tmp4_;
#line 190 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 3052 "PhotoPage.c"
		} else {
			gdouble _tmp5_ = 0.0;
			gdouble _tmp6_ = 0.0;
#line 191 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp5_ = zoom_state_get_zoom_factor (zoom_state);
#line 191 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = zoom_state_get_zoom_factor (&self->priv->demand_transform_zoom_state);
#line 191 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp5_ == _tmp6_) {
#line 3062 "PhotoPage.c"
				GdkRectangle curr_rect = {0};
				GdkRectangle _tmp7_ = {0};
				GdkRectangle pre_rect = {0};
				GdkRectangle _tmp8_ = {0};
				GdkRectangle transfer_src_rect = {0};
				GdkRectangle transfer_dest_rect = {0};
				GdkRectangle _tmp9_ = {0};
				gint _tmp10_ = 0;
				GdkRectangle _tmp11_ = {0};
				gint _tmp12_ = 0;
				GdkRectangle _tmp13_ = {0};
				gint _tmp14_ = 0;
				gint _tmp15_ = 0;
				GdkRectangle _tmp16_ = {0};
				gint _tmp17_ = 0;
				GdkRectangle _tmp18_ = {0};
				gint _tmp19_ = 0;
				GdkRectangle _tmp20_ = {0};
				gint _tmp21_ = 0;
				gint _tmp22_ = 0;
				gint transfer_src_right = 0;
				GdkRectangle _tmp23_ = {0};
				gint _tmp24_ = 0;
				GdkRectangle _tmp25_ = {0};
				gint _tmp26_ = 0;
				GdkRectangle _tmp27_ = {0};
				gint _tmp28_ = 0;
				GdkRectangle _tmp29_ = {0};
				gint _tmp30_ = 0;
				gint _tmp31_ = 0;
				gint _tmp32_ = 0;
				GdkRectangle _tmp33_ = {0};
				gint _tmp34_ = 0;
				gint transfer_src_bottom = 0;
				GdkRectangle _tmp35_ = {0};
				gint _tmp36_ = 0;
				GdkRectangle _tmp37_ = {0};
				gint _tmp38_ = 0;
				GdkRectangle _tmp39_ = {0};
				gint _tmp40_ = 0;
				GdkRectangle _tmp41_ = {0};
				gint _tmp42_ = 0;
				gint _tmp43_ = 0;
				gint _tmp44_ = 0;
				GdkRectangle _tmp45_ = {0};
				gint _tmp46_ = 0;
				GdkRectangle _tmp47_ = {0};
				gint _tmp48_ = 0;
				GdkRectangle _tmp49_ = {0};
				gint _tmp50_ = 0;
				GdkRectangle _tmp51_ = {0};
				gint _tmp52_ = 0;
				gint _tmp53_ = 0;
				GdkRectangle _tmp54_ = {0};
				gint _tmp55_ = 0;
				GdkRectangle _tmp56_ = {0};
				gint _tmp57_ = 0;
				GdkRectangle _tmp58_ = {0};
				gint _tmp59_ = 0;
				gint _tmp60_ = 0;
				gint transfer_dest_right = 0;
				GdkRectangle _tmp61_ = {0};
				gint _tmp62_ = 0;
				GdkRectangle _tmp63_ = {0};
				gint _tmp64_ = 0;
				GdkRectangle _tmp65_ = {0};
				gint _tmp66_ = 0;
				gint _tmp67_ = 0;
				gint _tmp68_ = 0;
				GdkRectangle _tmp69_ = {0};
				gint _tmp70_ = 0;
				gint transfer_dest_bottom = 0;
				GdkRectangle _tmp71_ = {0};
				gint _tmp72_ = 0;
				GdkRectangle _tmp73_ = {0};
				gint _tmp74_ = 0;
				GdkRectangle _tmp75_ = {0};
				gint _tmp76_ = 0;
				gint _tmp77_ = 0;
				gint _tmp78_ = 0;
				GdkRectangle _tmp79_ = {0};
				gint _tmp80_ = 0;
				GdkPixbuf* composited_result = NULL;
				ZoomState _tmp81_ = {0};
				GdkPixbuf* _tmp82_ = NULL;
				GdkPixbuf* _tmp83_ = NULL;
				GdkRectangle _tmp84_ = {0};
				gint _tmp85_ = 0;
				GdkRectangle _tmp86_ = {0};
				gint _tmp87_ = 0;
				GdkRectangle _tmp88_ = {0};
				gint _tmp89_ = 0;
				GdkRectangle _tmp90_ = {0};
				gint _tmp91_ = 0;
				GdkPixbuf* _tmp92_ = NULL;
				GdkRectangle _tmp93_ = {0};
				gint _tmp94_ = 0;
				GdkRectangle _tmp95_ = {0};
				gint _tmp96_ = 0;
#line 202 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				zoom_state_get_viewing_rectangle_wrt_content (zoom_state, &_tmp7_);
#line 202 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				curr_rect = _tmp7_;
#line 203 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				zoom_state_get_viewing_rectangle_wrt_content (&self->priv->demand_transform_zoom_state, &_tmp8_);
#line 203 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				pre_rect = _tmp8_;
#line 205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				memset (&transfer_src_rect, 0, sizeof (GdkRectangle));
#line 206 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				memset (&transfer_dest_rect, 0, sizeof (GdkRectangle));
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp9_ = curr_rect;
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp10_ = _tmp9_.x;
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp11_ = pre_rect;
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp12_ = _tmp11_.x;
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp13_ = pre_rect;
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp14_ = _tmp13_.width;
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp15_ = CLAMP (_tmp10_ - _tmp12_, 0, _tmp14_);
#line 208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_src_rect.x = _tmp15_;
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp16_ = curr_rect;
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp17_ = _tmp16_.y;
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp18_ = pre_rect;
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp19_ = _tmp18_.y;
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp20_ = pre_rect;
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp21_ = _tmp20_.height;
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp22_ = CLAMP (_tmp17_ - _tmp19_, 0, _tmp21_);
#line 209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_src_rect.y = _tmp22_;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp23_ = curr_rect;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp24_ = _tmp23_.x;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp25_ = curr_rect;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp26_ = _tmp25_.width;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp27_ = pre_rect;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp28_ = _tmp27_.width;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp29_ = pre_rect;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp30_ = _tmp29_.width;
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp31_ = CLAMP ((_tmp24_ + _tmp26_) - _tmp28_, 0, _tmp30_);
#line 210 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_src_right = _tmp31_;
#line 212 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp32_ = transfer_src_right;
#line 212 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp33_ = transfer_src_rect;
#line 212 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp34_ = _tmp33_.x;
#line 212 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_src_rect.width = _tmp32_ - _tmp34_;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp35_ = curr_rect;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp36_ = _tmp35_.y;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp37_ = curr_rect;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp38_ = _tmp37_.height;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp39_ = pre_rect;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp40_ = _tmp39_.width;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp41_ = pre_rect;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp42_ = _tmp41_.height;
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp43_ = CLAMP ((_tmp36_ + _tmp38_) - _tmp40_, 0, _tmp42_);
#line 213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_src_bottom = _tmp43_;
#line 215 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp44_ = transfer_src_bottom;
#line 215 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp45_ = transfer_src_rect;
#line 215 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp46_ = _tmp45_.y;
#line 215 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_src_rect.height = _tmp44_ - _tmp46_;
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp47_ = pre_rect;
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp48_ = _tmp47_.x;
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp49_ = curr_rect;
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp50_ = _tmp49_.x;
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp51_ = curr_rect;
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp52_ = _tmp51_.width;
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp53_ = CLAMP (_tmp48_ - _tmp50_, 0, _tmp52_);
#line 217 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_dest_rect.x = _tmp53_;
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp54_ = pre_rect;
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp55_ = _tmp54_.y;
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp56_ = curr_rect;
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp57_ = _tmp56_.y;
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp58_ = curr_rect;
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp59_ = _tmp58_.height;
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp60_ = CLAMP (_tmp55_ - _tmp57_, 0, _tmp59_);
#line 218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_dest_rect.y = _tmp60_;
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp61_ = transfer_dest_rect;
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp62_ = _tmp61_.x;
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp63_ = transfer_src_rect;
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp64_ = _tmp63_.width;
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp65_ = curr_rect;
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp66_ = _tmp65_.width;
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp67_ = CLAMP (_tmp62_ + _tmp64_, 0, _tmp66_);
#line 219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_dest_right = _tmp67_;
#line 221 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp68_ = transfer_dest_right;
#line 221 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp69_ = transfer_dest_rect;
#line 221 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp70_ = _tmp69_.x;
#line 221 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_dest_rect.width = _tmp68_ - _tmp70_;
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp71_ = transfer_dest_rect;
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp72_ = _tmp71_.y;
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp73_ = transfer_src_rect;
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp74_ = _tmp73_.height;
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp75_ = curr_rect;
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp76_ = _tmp75_.height;
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp77_ = CLAMP (_tmp72_ + _tmp74_, 0, _tmp76_);
#line 222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_dest_bottom = _tmp77_;
#line 224 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp78_ = transfer_dest_bottom;
#line 224 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp79_ = transfer_dest_rect;
#line 224 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp80_ = _tmp79_.y;
#line 224 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				transfer_dest_rect.height = _tmp78_ - _tmp80_;
#line 226 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp81_ = *zoom_state;
#line 226 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp82_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp81_);
#line 226 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				composited_result = _tmp82_;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp83_ = self->priv->demand_transform_cached_pixbuf;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp84_ = transfer_src_rect;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp85_ = _tmp84_.x;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp86_ = transfer_src_rect;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp87_ = _tmp86_.y;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp88_ = transfer_dest_rect;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp89_ = _tmp88_.width;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp90_ = transfer_dest_rect;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp91_ = _tmp90_.height;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp92_ = composited_result;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp93_ = transfer_dest_rect;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp94_ = _tmp93_.x;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp95_ = transfer_dest_rect;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp96_ = _tmp95_.y;
#line 227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				gdk_pixbuf_copy_area (_tmp83_, _tmp85_, _tmp87_, _tmp89_, _tmp91_, _tmp92_, _tmp94_, _tmp96_);
#line 231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				result = composited_result;
#line 231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return result;
#line 3382 "PhotoPage.c"
			}
		}
	}
#line 242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp97_ = self->priv->demand_transform_job;
#line 242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp97_ != NULL) {
#line 3390 "PhotoPage.c"
		ZoomState _tmp98_ = {0};
		gboolean _tmp99_ = FALSE;
#line 243 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp98_ = self->priv->demand_transform_zoom_state;
#line 243 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp99_ = zoom_state_equals (zoom_state, &_tmp98_);
#line 243 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp99_) {
#line 3399 "PhotoPage.c"
			ZoomState _tmp100_ = {0};
			GdkPixbuf* _tmp101_ = NULL;
#line 244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp100_ = *zoom_state;
#line 244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp101_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp100_);
#line 244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = _tmp101_;
#line 244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 3410 "PhotoPage.c"
		} else {
			ZoomBufferTransformationJob* _tmp102_ = NULL;
			GdkPixbuf* zoomed = NULL;
			ZoomState _tmp103_ = {0};
			GdkPixbuf* _tmp104_ = NULL;
			GdkPixbuf* _tmp105_ = NULL;
			GdkPixbuf* _tmp106_ = NULL;
			GdkPixbuf* _tmp107_ = NULL;
			Photo* _tmp108_ = NULL;
			PixelTransformer* _tmp109_ = NULL;
			PixelTransformer* _tmp110_ = NULL;
			GCancellable* _tmp111_ = NULL;
			GCancellable* _tmp112_ = NULL;
			ZoomBufferTransformationJob* _tmp113_ = NULL;
			ZoomState _tmp114_ = {0};
			Workers* _tmp115_ = NULL;
			ZoomBufferTransformationJob* _tmp116_ = NULL;
			ZoomState _tmp117_ = {0};
			GdkPixbuf* _tmp118_ = NULL;
#line 246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp102_ = self->priv->demand_transform_job;
#line 246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			background_job_cancel (G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 247 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_background_job_unref0 (self->priv->demand_transform_job);
#line 247 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			self->priv->demand_transform_job = NULL;
#line 249 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp103_ = *zoom_state;
#line 249 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp104_ = self->priv->iso_source_image;
#line 249 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp105_ = self->priv->reduced_source_image;
#line 249 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp106_ = zoom_buffer_get_view_projection_pixbuf (self, &_tmp103_, _tmp104_, _tmp105_);
#line 249 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			zoomed = _tmp106_;
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp107_ = zoomed;
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp108_ = self->priv->backing_photo;
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp109_ = photo_get_pixel_transformer (_tmp108_);
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp110_ = _tmp109_;
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp111_ = g_cancellable_new ();
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp112_ = _tmp111_;
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp113_ = zoom_buffer_transformation_job_new (self, _tmp107_, _tmp110_, _zoom_buffer_on_demand_transform_complete_completion_callback, self, _tmp112_);
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_background_job_unref0 (self->priv->demand_transform_job);
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			self->priv->demand_transform_job = _tmp113_;
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp112_);
#line 252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_pixel_transformer_unref0 (_tmp110_);
#line 255 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp114_ = *zoom_state;
#line 255 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			self->priv->demand_transform_zoom_state = _tmp114_;
#line 256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp115_ = self->priv->workers;
#line 256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp116_ = self->priv->demand_transform_job;
#line 256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			workers_enqueue (_tmp115_, G_TYPE_CHECK_INSTANCE_CAST (_tmp116_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 258 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp117_ = *zoom_state;
#line 258 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp118_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp117_);
#line 258 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = _tmp118_;
#line 258 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (zoomed);
#line 258 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 3490 "PhotoPage.c"
		}
	}
#line 263 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp119_ = self->priv->demand_transform_job;
#line 263 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp119_ == NULL) {
#line 3497 "PhotoPage.c"
		GdkPixbuf* zoomed = NULL;
		ZoomState _tmp120_ = {0};
		GdkPixbuf* _tmp121_ = NULL;
		GdkPixbuf* _tmp122_ = NULL;
		GdkPixbuf* _tmp123_ = NULL;
		GdkPixbuf* _tmp124_ = NULL;
		Photo* _tmp125_ = NULL;
		PixelTransformer* _tmp126_ = NULL;
		PixelTransformer* _tmp127_ = NULL;
		GCancellable* _tmp128_ = NULL;
		GCancellable* _tmp129_ = NULL;
		ZoomBufferTransformationJob* _tmp130_ = NULL;
		ZoomState _tmp131_ = {0};
		Workers* _tmp132_ = NULL;
		ZoomBufferTransformationJob* _tmp133_ = NULL;
		ZoomState _tmp134_ = {0};
		GdkPixbuf* _tmp135_ = NULL;
#line 264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp120_ = *zoom_state;
#line 264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp121_ = self->priv->iso_source_image;
#line 264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp122_ = self->priv->reduced_source_image;
#line 264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp123_ = zoom_buffer_get_view_projection_pixbuf (self, &_tmp120_, _tmp121_, _tmp122_);
#line 264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		zoomed = _tmp123_;
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp124_ = zoomed;
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp125_ = self->priv->backing_photo;
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp126_ = photo_get_pixel_transformer (_tmp125_);
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp127_ = _tmp126_;
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp128_ = g_cancellable_new ();
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp129_ = _tmp128_;
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp130_ = zoom_buffer_transformation_job_new (self, _tmp124_, _tmp127_, _zoom_buffer_on_demand_transform_complete_completion_callback, self, _tmp129_);
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_background_job_unref0 (self->priv->demand_transform_job);
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->demand_transform_job = _tmp130_;
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp129_);
#line 267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_pixel_transformer_unref0 (_tmp127_);
#line 271 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp131_ = *zoom_state;
#line 271 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->demand_transform_zoom_state = _tmp131_;
#line 273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp132_ = self->priv->workers;
#line 273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp133_ = self->priv->demand_transform_job;
#line 273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		workers_enqueue (_tmp132_, G_TYPE_CHECK_INSTANCE_CAST (_tmp133_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp134_ = *zoom_state;
#line 275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp135_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp134_);
#line 275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = _tmp135_;
#line 275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (zoomed);
#line 275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 3567 "PhotoPage.c"
	}
#line 283 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_critical ("PhotoPage.vala:283: %s", "ZoomBuffer: get_zoomed_image( ): in SOURCE-NOT-TRANSFORMED but can't t" \
"ransform " "on-screen projection on-demand; using preview image");
#line 285 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp136_ = *zoom_state;
#line 285 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp137_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp136_);
#line 285 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp137_;
#line 285 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 3579 "PhotoPage.c"
}


static void _zoom_buffer_on_iso_source_fetch_complete_completion_callback (BackgroundJob* job, gpointer self) {
#line 290 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_buffer_on_iso_source_fetch_complete ((ZoomBuffer*) self, job);
#line 3586 "PhotoPage.c"
}


GdkPixbuf* zoom_buffer_get_zoom_preview_image_internal (ZoomBuffer* self, ZoomState* zoom_state) {
	GdkPixbuf* result = NULL;
	ZoomBufferObjectState _tmp0_ = 0;
	GdkRectangle view_rect = {0};
	GdkRectangle _tmp5_ = {0};
	GdkRectangle view_rect_proj = {0};
	GdkPixbuf* _tmp6_ = NULL;
	GdkRectangle _tmp7_ = {0};
	GdkRectangle _tmp8_ = {0};
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	GdkRectangle _tmp11_ = {0};
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	GdkPixbuf* proj_subpixbuf = NULL;
	GdkPixbuf* _tmp14_ = NULL;
	GdkRectangle _tmp15_ = {0};
	gint _tmp16_ = 0;
	GdkRectangle _tmp17_ = {0};
	gint _tmp18_ = 0;
	GdkRectangle _tmp19_ = {0};
	gint _tmp20_ = 0;
	GdkRectangle _tmp21_ = {0};
	gint _tmp22_ = 0;
	GdkPixbuf* _tmp23_ = NULL;
	GdkPixbuf* zoomed = NULL;
	GdkRectangle _tmp24_ = {0};
	gint _tmp25_ = 0;
	GdkRectangle _tmp26_ = {0};
	gint _tmp27_ = 0;
	GdkPixbuf* _tmp28_ = NULL;
#line 288 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (self), NULL);
#line 288 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (zoom_state != NULL, NULL);
#line 289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->object_state;
#line 289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_LOADED) {
#line 3629 "PhotoPage.c"
		BackgroundJob* iso_source_fetch_job = NULL;
		Photo* _tmp1_ = NULL;
		ZoomBufferIsoSourceFetchJob* _tmp2_ = NULL;
		Workers* _tmp3_ = NULL;
		BackgroundJob* _tmp4_ = NULL;
#line 290 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->backing_photo;
#line 290 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = zoom_buffer_iso_source_fetch_job_new (self, _tmp1_, _zoom_buffer_on_iso_source_fetch_complete_completion_callback, self);
#line 290 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		iso_source_fetch_job = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_BACKGROUND_JOB, BackgroundJob);
#line 292 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->workers;
#line 292 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = iso_source_fetch_job;
#line 292 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		workers_enqueue (_tmp3_, _tmp4_);
#line 294 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->object_state = ZOOM_BUFFER_OBJECT_STATE_SOURCE_LOAD_IN_PROGRESS;
#line 289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_background_job_unref0 (iso_source_fetch_job);
#line 3651 "PhotoPage.c"
	}
#line 296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewing_rectangle_wrt_content (zoom_state, &_tmp5_);
#line 296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect = _tmp5_;
#line 297 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->preview_image;
#line 297 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewing_rectangle_projection (zoom_state, _tmp6_, &_tmp7_);
#line 297 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect_proj = _tmp7_;
#line 300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = view_rect_proj;
#line 300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_.width;
#line 300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = CLAMP (_tmp9_, 1, G_MAXINT);
#line 300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect_proj.width = _tmp10_;
#line 301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = view_rect_proj;
#line 301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_.height;
#line 301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = CLAMP (_tmp12_, 1, G_MAXINT);
#line 301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_rect_proj.height = _tmp13_;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = self->priv->preview_image;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = view_rect_proj;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = _tmp15_.x;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = view_rect_proj;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = _tmp17_.y;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = view_rect_proj;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = _tmp19_.width;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = view_rect_proj;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = _tmp21_.height;
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = gdk_pixbuf_new_subpixbuf (_tmp14_, _tmp16_, _tmp18_, _tmp20_, _tmp22_);
#line 303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	proj_subpixbuf = _tmp23_;
#line 306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = view_rect;
#line 306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = _tmp24_.width;
#line 306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = view_rect;
#line 306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = _tmp26_.height;
#line 306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = gdk_pixbuf_scale_simple (proj_subpixbuf, _tmp25_, _tmp27_, GDK_INTERP_BILINEAR);
#line 306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoomed = _tmp28_;
#line 309 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = zoomed;
#line 309 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (proj_subpixbuf);
#line 309 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 3719 "PhotoPage.c"
}


Photo* zoom_buffer_get_backing_photo (ZoomBuffer* self) {
	Photo* result = NULL;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
#line 312 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (self), NULL);
#line 313 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->backing_photo;
#line 313 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 313 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp1_;
#line 313 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 3737 "PhotoPage.c"
}


void zoom_buffer_update_preview_image (ZoomBuffer* self, GdkPixbuf* preview_image) {
	GdkPixbuf* _tmp0_ = NULL;
	GdkPixbuf* _tmp1_ = NULL;
#line 316 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_ZOOM_BUFFER (self));
#line 316 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GDK_IS_PIXBUF (preview_image));
#line 317 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = preview_image;
#line 317 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 317 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->preview_image);
#line 317 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->preview_image = _tmp1_;
#line 3756 "PhotoPage.c"
}


void zoom_buffer_flush_demand_cache (ZoomBuffer* self, ZoomState* initial_zoom_state) {
	ZoomState* _tmp0_ = NULL;
#line 322 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_ZOOM_BUFFER (self));
#line 323 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->demand_transform_cached_pixbuf);
#line 323 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->demand_transform_cached_pixbuf = NULL;
#line 324 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = initial_zoom_state;
#line 324 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 3772 "PhotoPage.c"
		ZoomState* _tmp1_ = NULL;
		ZoomState _tmp2_ = {0};
		GdkPixbuf* _tmp3_ = NULL;
		GdkPixbuf* _tmp4_ = NULL;
#line 325 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = initial_zoom_state;
#line 325 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = *_tmp1_;
#line 325 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = zoom_buffer_get_zoomed_image (self, &_tmp2_);
#line 325 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 325 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 3787 "PhotoPage.c"
	}
}


GdkPixbuf* zoom_buffer_get_zoomed_image (ZoomBuffer* self, ZoomState* zoom_state) {
	GdkPixbuf* result = NULL;
	gdouble _tmp0_ = 0.0;
	ZoomBufferObjectState _tmp3_ = 0;
#line 328 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (self), NULL);
#line 328 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (zoom_state != NULL, NULL);
#line 329 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->is_interactive_redraw_in_progress = FALSE;
#line 333 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = zoom_state_get_interpolation_factor (zoom_state);
#line 333 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == 0.0) {
#line 3806 "PhotoPage.c"
		ZoomState _tmp1_ = {0};
		GdkPixbuf* _tmp2_ = NULL;
#line 334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = *zoom_state;
#line 334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp1_);
#line 334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = _tmp2_;
#line 334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 3817 "PhotoPage.c"
	}
#line 337 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->object_state;
#line 337 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	switch (_tmp3_) {
#line 337 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		case ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_LOADED:
#line 337 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		case ZOOM_BUFFER_OBJECT_STATE_SOURCE_LOAD_IN_PROGRESS:
#line 3827 "PhotoPage.c"
		{
			ZoomState _tmp4_ = {0};
			GdkPixbuf* _tmp5_ = NULL;
#line 340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp4_ = *zoom_state;
#line 340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp5_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp4_);
#line 340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = _tmp5_;
#line 340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 3839 "PhotoPage.c"
		}
#line 337 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		case ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_TRANSFORMED:
#line 3843 "PhotoPage.c"
		{
			ZoomState _tmp6_ = {0};
			GdkPixbuf* _tmp7_ = NULL;
#line 343 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = *zoom_state;
#line 343 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp7_ = zoom_buffer_get_zoomed_image_source_not_transformed (self, &_tmp6_);
#line 343 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = _tmp7_;
#line 343 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 3855 "PhotoPage.c"
		}
#line 337 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		case ZOOM_BUFFER_OBJECT_STATE_TRANSFORMED_READY:
#line 3859 "PhotoPage.c"
		{
			ZoomState _tmp8_ = {0};
			GdkPixbuf* _tmp9_ = NULL;
			GdkPixbuf* _tmp10_ = NULL;
			GdkPixbuf* _tmp11_ = NULL;
#line 348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp8_ = *zoom_state;
#line 348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = self->priv->iso_transformed_image;
#line 348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp10_ = self->priv->reduced_transformed_image;
#line 348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp11_ = zoom_buffer_get_view_projection_pixbuf (self, &_tmp8_, _tmp9_, _tmp10_);
#line 348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = _tmp11_;
#line 348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 3877 "PhotoPage.c"
		}
		default:
		{
			ZoomState _tmp12_ = {0};
			GdkPixbuf* _tmp13_ = NULL;
#line 352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			g_critical ("PhotoPage.vala:352: ZoomBuffer: get_zoomed_image( ): object is an inco" \
"nsistent state");
#line 353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp12_ = *zoom_state;
#line 353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp13_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp12_);
#line 353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = _tmp13_;
#line 353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 3893 "PhotoPage.c"
		}
	}
}


GdkPixbuf* zoom_buffer_get_zoom_preview_image (ZoomBuffer* self, ZoomState* zoom_state) {
	GdkPixbuf* result = NULL;
	ZoomState _tmp0_ = {0};
	GdkPixbuf* _tmp1_ = NULL;
#line 357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (self), NULL);
#line 357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (zoom_state != NULL, NULL);
#line 358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->is_interactive_redraw_in_progress = TRUE;
#line 360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = *zoom_state;
#line 360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = zoom_buffer_get_zoom_preview_image_internal (self, &_tmp0_);
#line 360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp1_;
#line 360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 3917 "PhotoPage.c"
}


static ZoomBufferIsoSourceFetchJob* zoom_buffer_iso_source_fetch_job_construct (GType object_type, ZoomBuffer* owner, Photo* to_fetch, CompletionCallback completion_callback, void* completion_callback_target) {
	ZoomBufferIsoSourceFetchJob* self = NULL;
	ZoomBuffer* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
#line 20 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (owner), NULL);
#line 20 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (to_fetch), NULL);
#line 22 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = owner;
#line 22 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = completion_callback;
#line 22 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1__target = completion_callback_target;
#line 22 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = (ZoomBufferIsoSourceFetchJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _tmp1_, _tmp1__target, NULL, NULL, NULL, NULL);
#line 24 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = to_fetch;
#line 24 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 24 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->to_fetch);
#line 24 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->to_fetch = _tmp3_;
#line 20 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self;
#line 3950 "PhotoPage.c"
}


static ZoomBufferIsoSourceFetchJob* zoom_buffer_iso_source_fetch_job_new (ZoomBuffer* owner, Photo* to_fetch, CompletionCallback completion_callback, void* completion_callback_target) {
#line 20 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return zoom_buffer_iso_source_fetch_job_construct (ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, owner, to_fetch, completion_callback, completion_callback_target);
#line 3957 "PhotoPage.c"
}


static void zoom_buffer_iso_source_fetch_job_real_execute (BackgroundJob* base) {
	ZoomBufferIsoSourceFetchJob * self;
	GError * _inner_error_ = NULL;
#line 27 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, ZoomBufferIsoSourceFetchJob);
#line 3966 "PhotoPage.c"
	{
		GdkPixbuf* _tmp0_ = NULL;
		Photo* _tmp1_ = NULL;
		Scaling _tmp2_ = {0};
		GdkPixbuf* _tmp3_ = NULL;
		GdkPixbuf* _tmp4_ = NULL;
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->to_fetch;
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		scaling_for_original (&_tmp2_);
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = photo_get_pixbuf_with_options (_tmp1_, &_tmp2_, PHOTO_EXCEPTION_ADJUST, BACKING_FETCH_MODE_BASELINE, &_inner_error_);
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp3_;
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3983 "PhotoPage.c"
			goto __catch243_g_error;
		}
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp0_;
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = NULL;
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (self->fetched);
#line 29 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->fetched = _tmp4_;
#line 28 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp0_);
#line 3996 "PhotoPage.c"
	}
	goto __finally243;
	__catch243_g_error:
	{
		GError* fetch_error = NULL;
#line 28 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		fetch_error = _inner_error_;
#line 28 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 32 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_critical ("PhotoPage.vala:32: IsoSourceFetchJob: execute( ): can't get pixbuf fro" \
"m backing photo");
#line 28 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (fetch_error);
#line 4010 "PhotoPage.c"
	}
	__finally243:
#line 28 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 28 "/home/jens/Source/shotwell/src/PhotoPage.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 28 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 28 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 4021 "PhotoPage.c"
	}
}


static void zoom_buffer_iso_source_fetch_job_class_init (ZoomBufferIsoSourceFetchJobClass * klass) {
#line 15 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_buffer_iso_source_fetch_job_parent_class = g_type_class_peek_parent (klass);
#line 15 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((BackgroundJobClass *) klass)->finalize = zoom_buffer_iso_source_fetch_job_finalize;
#line 15 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_type_class_add_private (klass, sizeof (ZoomBufferIsoSourceFetchJobPrivate));
#line 15 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((BackgroundJobClass *) klass)->execute = (void (*)(BackgroundJob*)) zoom_buffer_iso_source_fetch_job_real_execute;
#line 4035 "PhotoPage.c"
}


static void zoom_buffer_iso_source_fetch_job_instance_init (ZoomBufferIsoSourceFetchJob * self) {
#line 15 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv = ZOOM_BUFFER_ISO_SOURCE_FETCH_JOB_GET_PRIVATE (self);
#line 18 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->fetched = NULL;
#line 4044 "PhotoPage.c"
}


static void zoom_buffer_iso_source_fetch_job_finalize (BackgroundJob* obj) {
	ZoomBufferIsoSourceFetchJob * self;
#line 15 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ZOOM_BUFFER_TYPE_ISO_SOURCE_FETCH_JOB, ZoomBufferIsoSourceFetchJob);
#line 16 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->to_fetch);
#line 18 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->fetched);
#line 15 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	BACKGROUND_JOB_CLASS (zoom_buffer_iso_source_fetch_job_parent_class)->finalize (obj);
#line 4058 "PhotoPage.c"
}


static GType zoom_buffer_iso_source_fetch_job_get_type (void) {
	static volatile gsize zoom_buffer_iso_source_fetch_job_type_id__volatile = 0;
	if (g_once_init_enter (&zoom_buffer_iso_source_fetch_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ZoomBufferIsoSourceFetchJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) zoom_buffer_iso_source_fetch_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ZoomBufferIsoSourceFetchJob), 0, (GInstanceInitFunc) zoom_buffer_iso_source_fetch_job_instance_init, NULL };
		GType zoom_buffer_iso_source_fetch_job_type_id;
		zoom_buffer_iso_source_fetch_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "ZoomBufferIsoSourceFetchJob", &g_define_type_info, 0);
		g_once_init_leave (&zoom_buffer_iso_source_fetch_job_type_id__volatile, zoom_buffer_iso_source_fetch_job_type_id);
	}
	return zoom_buffer_iso_source_fetch_job_type_id__volatile;
}


static gpointer _pixel_transformer_ref0 (gpointer self) {
#line 55 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self ? pixel_transformer_ref (self) : NULL;
#line 4077 "PhotoPage.c"
}


static ZoomBufferTransformationJob* zoom_buffer_transformation_job_construct (GType object_type, ZoomBuffer* owner, GdkPixbuf* to_transform, PixelTransformer* transformer, CompletionCallback completion_callback, void* completion_callback_target, GCancellable* cancellable) {
	ZoomBufferTransformationJob* self = NULL;
	ZoomBuffer* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	GCancellable* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
	GCancellable* _tmp4_ = NULL;
	GdkPixbuf* _tmp5_ = NULL;
	GdkPixbuf* _tmp6_ = NULL;
	PixelTransformer* _tmp7_ = NULL;
	PixelTransformer* _tmp8_ = NULL;
	GdkPixbuf* _tmp9_ = NULL;
	GdkPixbuf* _tmp10_ = NULL;
#line 49 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_ZOOM_BUFFER (owner), NULL);
#line 49 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (GDK_IS_PIXBUF (to_transform), NULL);
#line 49 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail ((transformer == NULL) || IS_PIXEL_TRANSFORMER (transformer), NULL);
#line 49 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 51 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = owner;
#line 51 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = completion_callback;
#line 51 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1__target = completion_callback_target;
#line 51 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = cancellable;
#line 51 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = (ZoomBufferTransformationJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _tmp1_, _tmp1__target, _tmp2_, NULL, NULL, NULL);
#line 53 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = cancellable;
#line 53 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 53 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->cancellable);
#line 53 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->cancellable = _tmp4_;
#line 54 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = to_transform;
#line 54 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 54 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->to_transform);
#line 54 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->to_transform = _tmp6_;
#line 55 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = transformer;
#line 55 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _pixel_transformer_ref0 (_tmp7_);
#line 55 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_pixel_transformer_unref0 (self->priv->transformer);
#line 55 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->transformer = _tmp8_;
#line 56 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = to_transform;
#line 56 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = gdk_pixbuf_copy (_tmp9_);
#line 56 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->transformed);
#line 56 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->transformed = _tmp10_;
#line 49 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self;
#line 4147 "PhotoPage.c"
}


static ZoomBufferTransformationJob* zoom_buffer_transformation_job_new (ZoomBuffer* owner, GdkPixbuf* to_transform, PixelTransformer* transformer, CompletionCallback completion_callback, void* completion_callback_target, GCancellable* cancellable) {
#line 49 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return zoom_buffer_transformation_job_construct (ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, owner, to_transform, transformer, completion_callback, completion_callback_target, cancellable);
#line 4154 "PhotoPage.c"
}


static void zoom_buffer_transformation_job_real_execute (BackgroundJob* base) {
	ZoomBufferTransformationJob * self;
	PixelTransformer* _tmp0_ = NULL;
#line 59 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJob);
#line 60 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->transformer;
#line 60 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 4167 "PhotoPage.c"
		PixelTransformer* _tmp1_ = NULL;
		GdkPixbuf* _tmp2_ = NULL;
		GdkPixbuf* _tmp3_ = NULL;
		GCancellable* _tmp4_ = NULL;
#line 61 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->transformer;
#line 61 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = self->priv->to_transform;
#line 61 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->transformed;
#line 61 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = self->priv->cancellable;
#line 61 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		pixel_transformer_transform_to_other_pixbuf (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 4182 "PhotoPage.c"
	}
}


static void zoom_buffer_transformation_job_class_init (ZoomBufferTransformationJobClass * klass) {
#line 42 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_buffer_transformation_job_parent_class = g_type_class_peek_parent (klass);
#line 42 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((BackgroundJobClass *) klass)->finalize = zoom_buffer_transformation_job_finalize;
#line 42 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_type_class_add_private (klass, sizeof (ZoomBufferTransformationJobPrivate));
#line 42 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((BackgroundJobClass *) klass)->execute = (void (*)(BackgroundJob*)) zoom_buffer_transformation_job_real_execute;
#line 4196 "PhotoPage.c"
}


static void zoom_buffer_transformation_job_instance_init (ZoomBufferTransformationJob * self) {
#line 42 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv = ZOOM_BUFFER_TRANSFORMATION_JOB_GET_PRIVATE (self);
#line 47 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->transformed = NULL;
#line 4205 "PhotoPage.c"
}


static void zoom_buffer_transformation_job_finalize (BackgroundJob* obj) {
	ZoomBufferTransformationJob * self;
#line 42 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ZOOM_BUFFER_TYPE_TRANSFORMATION_JOB, ZoomBufferTransformationJob);
#line 43 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->to_transform);
#line 44 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_pixel_transformer_unref0 (self->priv->transformer);
#line 45 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->cancellable);
#line 47 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->transformed);
#line 42 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	BACKGROUND_JOB_CLASS (zoom_buffer_transformation_job_parent_class)->finalize (obj);
#line 4223 "PhotoPage.c"
}


static GType zoom_buffer_transformation_job_get_type (void) {
	static volatile gsize zoom_buffer_transformation_job_type_id__volatile = 0;
	if (g_once_init_enter (&zoom_buffer_transformation_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ZoomBufferTransformationJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) zoom_buffer_transformation_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ZoomBufferTransformationJob), 0, (GInstanceInitFunc) zoom_buffer_transformation_job_instance_init, NULL };
		GType zoom_buffer_transformation_job_type_id;
		zoom_buffer_transformation_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "ZoomBufferTransformationJob", &g_define_type_info, 0);
		g_once_init_leave (&zoom_buffer_transformation_job_type_id__volatile, zoom_buffer_transformation_job_type_id);
	}
	return zoom_buffer_transformation_job_type_id__volatile;
}


static void zoom_buffer_class_init (ZoomBufferClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_buffer_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_type_class_add_private (klass, sizeof (ZoomBufferPrivate));
#line 7 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	G_OBJECT_CLASS (klass)->finalize = zoom_buffer_finalize;
#line 4246 "PhotoPage.c"
}


static void zoom_buffer_instance_init (ZoomBuffer * self) {
#line 7 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv = ZOOM_BUFFER_GET_PRIVATE (self);
#line 69 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->iso_source_image = NULL;
#line 70 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->reduced_source_image = NULL;
#line 71 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->iso_transformed_image = NULL;
#line 72 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->reduced_transformed_image = NULL;
#line 73 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->preview_image = NULL;
#line 74 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->backing_photo = NULL;
#line 75 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->object_state = ZOOM_BUFFER_OBJECT_STATE_SOURCE_NOT_LOADED;
#line 76 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->demand_transform_cached_pixbuf = NULL;
#line 78 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->demand_transform_job = NULL;
#line 80 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->workers = NULL;
#line 82 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->is_interactive_redraw_in_progress = FALSE;
#line 4275 "PhotoPage.c"
}


static void zoom_buffer_finalize (GObject* obj) {
	ZoomBuffer * self;
#line 7 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ZOOM_BUFFER, ZoomBuffer);
#line 69 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->iso_source_image);
#line 70 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->reduced_source_image);
#line 71 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->iso_transformed_image);
#line 72 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->reduced_transformed_image);
#line 73 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->preview_image);
#line 74 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->backing_photo);
#line 76 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->demand_transform_cached_pixbuf);
#line 78 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_background_job_unref0 (self->priv->demand_transform_job);
#line 80 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_workers_unref0 (self->priv->workers);
#line 81 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->parent_page);
#line 7 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	G_OBJECT_CLASS (zoom_buffer_parent_class)->finalize (obj);
#line 4305 "PhotoPage.c"
}


GType zoom_buffer_get_type (void) {
	static volatile gsize zoom_buffer_type_id__volatile = 0;
	if (g_once_init_enter (&zoom_buffer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ZoomBufferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) zoom_buffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ZoomBuffer), 0, (GInstanceInitFunc) zoom_buffer_instance_init, NULL };
		GType zoom_buffer_type_id;
		zoom_buffer_type_id = g_type_register_static (G_TYPE_OBJECT, "ZoomBuffer", &g_define_type_info, 0);
		g_once_init_leave (&zoom_buffer_type_id__volatile, zoom_buffer_type_id);
	}
	return zoom_buffer_type_id__volatile;
}


static void _editing_host_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) {
#line 551 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_photos_altered ((EditingHostPage*) self, items);
#line 4324 "PhotoPage.c"
}


static void _editing_host_page_on_view_contents_ordering_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) {
#line 553 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_view_contents_ordering_altered ((EditingHostPage*) self);
#line 4331 "PhotoPage.c"
}


static void _editing_host_page_on_view_contents_ordering_altered_data_collection_ordering_changed (DataCollection* _sender, gpointer self) {
#line 554 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_view_contents_ordering_altered ((EditingHostPage*) self);
#line 4338 "PhotoPage.c"
}


static gpointer _data_collection_ref0 (gpointer self) {
#line 420 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self ? data_collection_ref (self) : NULL;
#line 4345 "PhotoPage.c"
}


static void _editing_host_page_on_viewport_resized_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self) {
#line 431 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_viewport_resized ((EditingHostPage*) self);
#line 4352 "PhotoPage.c"
}


static void _editing_host_page_on_rotate_clockwise_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 440 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_rotate_clockwise ((EditingHostPage*) self);
#line 4359 "PhotoPage.c"
}


static void _editing_host_page_on_crop_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self) {
#line 452 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_crop_toggled ((EditingHostPage*) self);
#line 4366 "PhotoPage.c"
}


static void _editing_host_page_on_straighten_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self) {
#line 461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_straighten_toggled ((EditingHostPage*) self);
#line 4373 "PhotoPage.c"
}


static void _editing_host_page_on_redeye_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self) {
#line 470 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_redeye_toggled ((EditingHostPage*) self);
#line 4380 "PhotoPage.c"
}


static void _editing_host_page_on_adjust_toggled_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self) {
#line 479 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_adjust_toggled ((EditingHostPage*) self);
#line 4387 "PhotoPage.c"
}


static void _editing_host_page_on_enhance_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_enhance ((EditingHostPage*) self);
#line 4394 "PhotoPage.c"
}


static gboolean _editing_host_page_on_zoom_out_pressed_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = editing_host_page_on_zoom_out_pressed ((EditingHostPage*) self, event);
#line 506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 4403 "PhotoPage.c"
}


static void _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed (GtkRange* _sender, gpointer self) {
#line 514 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_zoom_slider_value_changed ((EditingHostPage*) self);
#line 4410 "PhotoPage.c"
}


static gboolean _editing_host_page_on_zoom_slider_drag_begin_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = editing_host_page_on_zoom_slider_drag_begin ((EditingHostPage*) self, event);
#line 515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 4419 "PhotoPage.c"
}


static gboolean _editing_host_page_on_zoom_slider_drag_end_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = editing_host_page_on_zoom_slider_drag_end ((EditingHostPage*) self, event);
#line 516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 4428 "PhotoPage.c"
}


static gboolean _editing_host_page_on_zoom_slider_key_press_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = editing_host_page_on_zoom_slider_key_press ((EditingHostPage*) self, event);
#line 517 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 4437 "PhotoPage.c"
}


static gboolean _editing_host_page_on_zoom_in_pressed_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = editing_host_page_on_zoom_in_pressed ((EditingHostPage*) self, event);
#line 528 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 4446 "PhotoPage.c"
}


static void _single_photo_page_on_previous_photo_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_on_previous_photo ((SinglePhotoPage*) self);
#line 4453 "PhotoPage.c"
}


static void _single_photo_page_on_next_photo_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 546 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_on_next_photo ((SinglePhotoPage*) self);
#line 4460 "PhotoPage.c"
}


EditingHostPage* editing_host_page_construct (GType object_type, SourceCollection* sources, const gchar* name) {
	EditingHostPage * self = NULL;
	const gchar* _tmp0_ = NULL;
	SourceCollection* _tmp1_ = NULL;
	SourceCollection* _tmp2_ = NULL;
	SourceCollection* _tmp3_ = NULL;
	ViewCollection* _tmp4_ = NULL;
	ViewCollection* _tmp5_ = NULL;
	ViewCollection* _tmp6_ = NULL;
	ViewCollection* _tmp7_ = NULL;
	GtkViewport* _tmp8_ = NULL;
	GtkToolbar* toolbar = NULL;
	GtkToolbar* _tmp9_ = NULL;
	GtkToolButton* _tmp10_ = NULL;
	GtkToolButton* _tmp11_ = NULL;
	GtkToolButton* _tmp12_ = NULL;
	GtkToolButton* _tmp13_ = NULL;
	GtkToolButton* _tmp14_ = NULL;
	GtkToolButton* _tmp15_ = NULL;
	GtkBindingSet* binding_set = NULL;
	GtkToolButton* _tmp16_ = NULL;
	GObjectClass* _tmp17_ = NULL;
	GtkBindingSet* _tmp18_ = NULL;
	GtkToggleToolButton* _tmp19_ = NULL;
	GtkToggleToolButton* _tmp20_ = NULL;
	GtkToggleToolButton* _tmp21_ = NULL;
	GtkToggleToolButton* _tmp22_ = NULL;
	GtkToggleToolButton* _tmp23_ = NULL;
	GtkToggleToolButton* _tmp24_ = NULL;
	GtkToggleToolButton* _tmp25_ = NULL;
	GtkToggleToolButton* _tmp26_ = NULL;
	GtkToggleToolButton* _tmp27_ = NULL;
	GtkToggleToolButton* _tmp28_ = NULL;
	GtkToggleToolButton* _tmp29_ = NULL;
	GtkToggleToolButton* _tmp30_ = NULL;
	GtkToggleToolButton* _tmp31_ = NULL;
	GtkToggleToolButton* _tmp32_ = NULL;
	GtkToggleToolButton* _tmp33_ = NULL;
	GtkToggleToolButton* _tmp34_ = NULL;
	GtkToggleToolButton* _tmp35_ = NULL;
	GtkToggleToolButton* _tmp36_ = NULL;
	GtkToggleToolButton* _tmp37_ = NULL;
	GtkToggleToolButton* _tmp38_ = NULL;
	GtkToggleToolButton* _tmp39_ = NULL;
	GtkToggleToolButton* _tmp40_ = NULL;
	GtkToggleToolButton* _tmp41_ = NULL;
	GtkToggleToolButton* _tmp42_ = NULL;
	GtkToggleToolButton* _tmp43_ = NULL;
	GtkToggleToolButton* _tmp44_ = NULL;
	GtkToggleToolButton* _tmp45_ = NULL;
	GtkToggleToolButton* _tmp46_ = NULL;
	GtkToolButton* _tmp47_ = NULL;
	GtkToolButton* _tmp48_ = NULL;
	GtkToolButton* _tmp49_ = NULL;
	GtkToolButton* _tmp50_ = NULL;
	GtkToolButton* _tmp51_ = NULL;
	GtkToolButton* _tmp52_ = NULL;
	GtkSeparatorToolItem* separator = NULL;
	GtkSeparatorToolItem* _tmp53_ = NULL;
	GtkBox* zoom_group = NULL;
	GtkBox* _tmp54_ = NULL;
	GtkImage* zoom_out = NULL;
	GdkPixbuf* _tmp55_ = NULL;
	GdkPixbuf* _tmp56_ = NULL;
	GtkImage* _tmp57_ = NULL;
	GtkImage* _tmp58_ = NULL;
	GtkEventBox* zoom_out_box = NULL;
	GtkEventBox* _tmp59_ = NULL;
	GtkAdjustment* _tmp60_ = NULL;
	GtkAdjustment* _tmp61_ = NULL;
	GtkScale* _tmp62_ = NULL;
	GtkScale* _tmp63_ = NULL;
	GtkScale* _tmp64_ = NULL;
	GtkScale* _tmp65_ = NULL;
	GtkScale* _tmp66_ = NULL;
	GtkScale* _tmp67_ = NULL;
	GtkScale* _tmp68_ = NULL;
	GtkScale* _tmp69_ = NULL;
	GtkImage* zoom_in = NULL;
	GdkPixbuf* _tmp70_ = NULL;
	GdkPixbuf* _tmp71_ = NULL;
	GtkImage* _tmp72_ = NULL;
	GtkImage* _tmp73_ = NULL;
	GtkEventBox* zoom_in_box = NULL;
	GtkEventBox* _tmp74_ = NULL;
	GtkToolItem* group_wrapper = NULL;
	GtkToolItem* _tmp75_ = NULL;
	GtkToolButton* _tmp76_ = NULL;
	const gchar* _tmp77_ = NULL;
	GtkToolButton* _tmp78_ = NULL;
	GtkToolButton* _tmp79_ = NULL;
	GtkToolButton* _tmp80_ = NULL;
	GtkToolButton* _tmp81_ = NULL;
	const gchar* _tmp82_ = NULL;
	GtkToolButton* _tmp83_ = NULL;
	GtkToolButton* _tmp84_ = NULL;
	GtkToolButton* _tmp85_ = NULL;
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_SOURCE_COLLECTION (sources), NULL);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = name;
#line 418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = (EditingHostPage*) single_photo_page_construct (object_type, _tmp0_, FALSE);
#line 420 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = sources;
#line 420 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _data_collection_ref0 (_tmp1_);
#line 420 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (self->priv->sources);
#line 420 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->sources = _tmp2_;
#line 423 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = sources;
#line 423 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _editing_host_page_on_photos_altered_data_collection_items_altered, self, 0);
#line 426 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 426 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 426 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _editing_host_page_on_view_contents_ordering_altered_data_collection_contents_altered, self, 0);
#line 426 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp5_);
#line 427 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 427 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 427 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_COLLECTION, DataCollection), "ordering-changed", (GCallback) _editing_host_page_on_view_contents_ordering_altered_data_collection_ordering_changed, self, 0);
#line 427 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp7_);
#line 431 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)->viewport;
#line 431 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), "size-allocate", (GCallback) _editing_host_page_on_viewport_resized_gtk_widget_size_allocate, self, 0);
#line 434 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 434 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	toolbar = _tmp9_;
#line 437 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = (GtkToolButton*) gtk_tool_button_new (NULL, RESOURCES_ROTATE_CW_LABEL);
#line 437 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp10_);
#line 437 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->rotate_button);
#line 437 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->rotate_button = _tmp10_;
#line 438 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = self->priv->rotate_button;
#line 438 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (_tmp11_, RESOURCES_CLOCKWISE);
#line 439 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = self->priv->rotate_button;
#line 439 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_ROTATE_CW_TOOLTIP);
#line 440 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = self->priv->rotate_button;
#line 440 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp13_, "clicked", (GCallback) _editing_host_page_on_rotate_clockwise_gtk_tool_button_clicked, self, 0);
#line 441 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = self->priv->rotate_button;
#line 441 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_is_important (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_tool_item_get_type (), GtkToolItem), TRUE);
#line 442 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = self->priv->rotate_button;
#line 442 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = self->priv->rotate_button;
#line 443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = G_OBJECT_GET_CLASS (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, G_TYPE_OBJECT, GObject));
#line 443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = gtk_binding_set_by_class (_tmp17_);
#line 443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	binding_set = _tmp18_;
#line 444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_binding_entry_add_signal (binding_set, (guint) GDK_KEY_KP_Space, GDK_CONTROL_MASK, "clicked", (guint) 0, NULL);
#line 445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_binding_entry_add_signal (binding_set, (guint) GDK_KEY_space, GDK_CONTROL_MASK, "clicked", (guint) 0, NULL);
#line 448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new ();
#line 448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp19_);
#line 448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->crop_button);
#line 448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->crop_button = _tmp19_;
#line 449 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = self->priv->crop_button;
#line 449 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_tool_button_get_type (), GtkToolButton), "crop");
#line 450 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = self->priv->crop_button;
#line 450 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_tool_button_get_type (), GtkToolButton), RESOURCES_CROP_LABEL);
#line 451 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = self->priv->crop_button;
#line 451 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_CROP_TOOLTIP);
#line 452 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = self->priv->crop_button;
#line 452 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp23_, "toggled", (GCallback) _editing_host_page_on_crop_toggled_gtk_toggle_tool_button_toggled, self, 0);
#line 453 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = self->priv->crop_button;
#line 453 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_is_important (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_tool_item_get_type (), GtkToolItem), TRUE);
#line 454 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = self->priv->crop_button;
#line 454 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 457 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new ();
#line 457 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp26_);
#line 457 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->straighten_button);
#line 457 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->straighten_button = _tmp26_;
#line 458 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = self->priv->straighten_button;
#line 458 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_tool_button_get_type (), GtkToolButton), "straighten");
#line 459 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = self->priv->straighten_button;
#line 459 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_tool_button_get_type (), GtkToolButton), RESOURCES_STRAIGHTEN_LABEL);
#line 460 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = self->priv->straighten_button;
#line 460 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_STRAIGHTEN_TOOLTIP);
#line 461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp30_ = self->priv->straighten_button;
#line 461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp30_, "toggled", (GCallback) _editing_host_page_on_straighten_toggled_gtk_toggle_tool_button_toggled, self, 0);
#line 462 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp31_ = self->priv->straighten_button;
#line 462 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_is_important (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_tool_item_get_type (), GtkToolItem), TRUE);
#line 463 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp32_ = self->priv->straighten_button;
#line 463 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp33_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new ();
#line 466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp33_);
#line 466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->redeye_button);
#line 466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->redeye_button = _tmp33_;
#line 467 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp34_ = self->priv->redeye_button;
#line 467 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_tool_button_get_type (), GtkToolButton), "redeye");
#line 468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp35_ = self->priv->redeye_button;
#line 468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_tool_button_get_type (), GtkToolButton), RESOURCES_RED_EYE_LABEL);
#line 469 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp36_ = self->priv->redeye_button;
#line 469 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_RED_EYE_TOOLTIP);
#line 470 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp37_ = self->priv->redeye_button;
#line 470 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp37_, "toggled", (GCallback) _editing_host_page_on_redeye_toggled_gtk_toggle_tool_button_toggled, self, 0);
#line 471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp38_ = self->priv->redeye_button;
#line 471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_is_important (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_tool_item_get_type (), GtkToolItem), TRUE);
#line 472 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp39_ = self->priv->redeye_button;
#line 472 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 475 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp40_ = (GtkToggleToolButton*) gtk_toggle_tool_button_new ();
#line 475 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp40_);
#line 475 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->adjust_button);
#line 475 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->adjust_button = _tmp40_;
#line 476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp41_ = self->priv->adjust_button;
#line 476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, gtk_tool_button_get_type (), GtkToolButton), RESOURCES_ADJUST);
#line 477 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp42_ = self->priv->adjust_button;
#line 477 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_label (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_tool_button_get_type (), GtkToolButton), RESOURCES_ADJUST_LABEL);
#line 478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp43_ = self->priv->adjust_button;
#line 478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_ADJUST_TOOLTIP);
#line 479 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp44_ = self->priv->adjust_button;
#line 479 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp44_, "toggled", (GCallback) _editing_host_page_on_adjust_toggled_gtk_toggle_tool_button_toggled, self, 0);
#line 480 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp45_ = self->priv->adjust_button;
#line 480 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_is_important (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, gtk_tool_item_get_type (), GtkToolItem), TRUE);
#line 481 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp46_ = self->priv->adjust_button;
#line 481 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 484 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp47_ = (GtkToolButton*) gtk_tool_button_new (NULL, RESOURCES_ENHANCE_LABEL);
#line 484 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp47_);
#line 484 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->enhance_button);
#line 484 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->enhance_button = _tmp47_;
#line 485 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp48_ = self->priv->enhance_button;
#line 485 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (_tmp48_, RESOURCES_ENHANCE);
#line 486 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp49_ = self->priv->enhance_button;
#line 486 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_ENHANCE_TOOLTIP);
#line 487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp50_ = self->priv->enhance_button;
#line 487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp50_, "clicked", (GCallback) _editing_host_page_on_enhance_gtk_tool_button_clicked, self, 0);
#line 488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp51_ = self->priv->enhance_button;
#line 488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_is_important (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, gtk_tool_item_get_type (), GtkToolItem), TRUE);
#line 489 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp52_ = self->priv->enhance_button;
#line 489 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp53_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
#line 492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp53_);
#line 492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	separator = _tmp53_;
#line 493 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_expand (G_TYPE_CHECK_INSTANCE_CAST (separator, gtk_tool_item_get_type (), GtkToolItem), TRUE);
#line 494 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_separator_tool_item_set_draw (separator, FALSE);
#line 495 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (separator, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 497 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp54_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
#line 497 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp54_);
#line 497 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_group = _tmp54_;
#line 499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp55_ = resources_load_icon (RESOURCES_ICON_ZOOM_OUT, RESOURCES_ICON_ZOOM_SCALE);
#line 499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp56_ = _tmp55_;
#line 499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp57_ = (GtkImage*) gtk_image_new_from_pixbuf (_tmp56_);
#line 499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp57_);
#line 499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp58_ = _tmp57_;
#line 499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp56_);
#line 499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_out = _tmp58_;
#line 501 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp59_ = (GtkEventBox*) gtk_event_box_new ();
#line 501 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp59_);
#line 501 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_out_box = _tmp59_;
#line 502 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_event_box_set_above_child (zoom_out_box, TRUE);
#line 503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_event_box_set_visible_window (zoom_out_box, FALSE);
#line 504 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (zoom_out_box, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (zoom_out, gtk_widget_get_type (), GtkWidget));
#line 506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (zoom_out_box, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_host_page_on_zoom_out_pressed_gtk_widget_button_press_event, self, 0);
#line 508 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_box_pack_start (zoom_group, G_TYPE_CHECK_INSTANCE_CAST (zoom_out_box, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp60_ = gtk_adjustment_new (0.0, 0.0, 1.1, 0.1, 0.1, 0.1);
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp60_);
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp61_ = _tmp60_;
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp62_ = (GtkScale*) gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, _tmp61_);
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp62_);
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->zoom_slider);
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->zoom_slider = _tmp62_;
#line 511 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp61_);
#line 512 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp63_ = self->priv->zoom_slider;
#line 512 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_scale_set_draw_value (_tmp63_, FALSE);
#line 513 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp64_ = self->priv->zoom_slider;
#line 513 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_size_request (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, gtk_widget_get_type (), GtkWidget), 120, -1);
#line 514 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp65_ = self->priv->zoom_slider;
#line 514 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self, 0);
#line 515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp66_ = self->priv->zoom_slider;
#line 515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_host_page_on_zoom_slider_drag_begin_gtk_widget_button_press_event, self, 0);
#line 516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp67_ = self->priv->zoom_slider;
#line 516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, gtk_widget_get_type (), GtkWidget), "button-release-event", (GCallback) _editing_host_page_on_zoom_slider_drag_end_gtk_widget_button_release_event, self, 0);
#line 517 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp68_ = self->priv->zoom_slider;
#line 517 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, gtk_widget_get_type (), GtkWidget), "key-press-event", (GCallback) _editing_host_page_on_zoom_slider_key_press_gtk_widget_key_press_event, self, 0);
#line 519 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp69_ = self->priv->zoom_slider;
#line 519 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_box_pack_start (zoom_group, G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp70_ = resources_load_icon (RESOURCES_ICON_ZOOM_IN, RESOURCES_ICON_ZOOM_SCALE);
#line 521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp71_ = _tmp70_;
#line 521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp72_ = (GtkImage*) gtk_image_new_from_pixbuf (_tmp71_);
#line 521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp72_);
#line 521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp73_ = _tmp72_;
#line 521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp71_);
#line 521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_in = _tmp73_;
#line 523 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp74_ = (GtkEventBox*) gtk_event_box_new ();
#line 523 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp74_);
#line 523 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_in_box = _tmp74_;
#line 524 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_event_box_set_above_child (zoom_in_box, TRUE);
#line 525 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_event_box_set_visible_window (zoom_in_box, FALSE);
#line 526 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (zoom_in_box, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (zoom_in, gtk_widget_get_type (), GtkWidget));
#line 528 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (zoom_in_box, gtk_widget_get_type (), GtkWidget), "button-press-event", (GCallback) _editing_host_page_on_zoom_in_pressed_gtk_widget_button_press_event, self, 0);
#line 530 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_box_pack_start (zoom_group, G_TYPE_CHECK_INSTANCE_CAST (zoom_in_box, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0);
#line 532 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp75_ = gtk_tool_item_new ();
#line 532 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp75_);
#line 532 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	group_wrapper = _tmp75_;
#line 533 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (group_wrapper, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (zoom_group, gtk_widget_get_type (), GtkWidget));
#line 535 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, group_wrapper, -1);
#line 538 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp76_ = self->priv->prev_button;
#line 538 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp77_ = _ ("Previous photo");
#line 538 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, gtk_tool_item_get_type (), GtkToolItem), _tmp77_);
#line 539 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp78_ = self->priv->prev_button;
#line 539 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (_tmp78_, "go-previous");
#line 540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp79_ = self->priv->prev_button;
#line 540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp79_, "clicked", (GCallback) _single_photo_page_on_previous_photo_gtk_tool_button_clicked, G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), 0);
#line 541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp80_ = self->priv->prev_button;
#line 541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 544 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp81_ = self->priv->next_button;
#line 544 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp82_ = _ ("Next photo");
#line 544 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, gtk_tool_item_get_type (), GtkToolItem), _tmp82_);
#line 545 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp83_ = self->priv->next_button;
#line 545 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (_tmp83_, "go-next");
#line 546 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp84_ = self->priv->next_button;
#line 546 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp84_, "clicked", (GCallback) _single_photo_page_on_next_photo_gtk_tool_button_clicked, G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), 0);
#line 547 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp85_ = self->priv->next_button;
#line 547 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (group_wrapper);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (zoom_in_box);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (zoom_in);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (zoom_out_box);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (zoom_out);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (zoom_group);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (separator);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (toolbar);
#line 417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self;
#line 4987 "PhotoPage.c"
}


static void editing_host_page_on_zoom_slider_value_changed (EditingHostPage* self) {
	ZoomState new_zoom_state = {0};
	ZoomState _tmp0_ = {0};
	GtkScale* _tmp1_ = NULL;
	gdouble _tmp2_ = 0.0;
	gboolean _tmp3_ = FALSE;
#line 557 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 558 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp0_);
#line 558 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->zoom_slider;
#line 558 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange));
#line 558 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_init_rescale (&new_zoom_state, &_tmp0_, _tmp2_);
#line 560 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->enable_interactive_zoom_refresh;
#line 560 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_) {
#line 5011 "PhotoPage.c"
		ZoomState _tmp4_ = {0};
		gboolean _tmp5_ = FALSE;
#line 561 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = new_zoom_state;
#line 561 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_on_interactive_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp4_);
#line 563 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = zoom_state_is_default (&new_zoom_state);
#line 563 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp5_) {
#line 5022 "PhotoPage.c"
			ZoomState _tmp6_ = {0};
#line 564 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = new_zoom_state;
#line 564 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_set_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp6_);
#line 5028 "PhotoPage.c"
		}
	} else {
		gboolean _tmp7_ = FALSE;
#line 566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = zoom_state_is_default (&new_zoom_state);
#line 566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp7_) {
#line 567 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 5038 "PhotoPage.c"
		} else {
			ZoomState _tmp8_ = {0};
#line 569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp8_ = new_zoom_state;
#line 569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_set_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp8_);
#line 5045 "PhotoPage.c"
		}
#line 571 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 5049 "PhotoPage.c"
	}
#line 574 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_update_cursor_for_zoom_context (self);
#line 5053 "PhotoPage.c"
}


static gboolean editing_host_page_on_zoom_slider_drag_begin (EditingHostPage* self, GdkEventButton* event) {
	gboolean result = FALSE;
	GtkWindow* _tmp0_ = NULL;
	GtkWindow* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 577 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 577 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 578 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->enable_interactive_zoom_refresh = TRUE;
#line 580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_FULLSCREEN_WINDOW);
#line 580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 5078 "PhotoPage.c"
		GtkWindow* _tmp3_ = NULL;
		FullscreenWindow* _tmp4_ = NULL;
#line 581 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 581 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_FULLSCREEN_WINDOW, FullscreenWindow);
#line 581 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		fullscreen_window_disable_toolbar_dismissal (_tmp4_);
#line 581 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 5089 "PhotoPage.c"
	}
#line 583 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 583 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5095 "PhotoPage.c"
}


static gboolean editing_host_page_on_zoom_slider_drag_end (EditingHostPage* self, GdkEventButton* event) {
	gboolean result = FALSE;
	GtkWindow* _tmp0_ = NULL;
	GtkWindow* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	ZoomState zoom_state = {0};
	ZoomState _tmp5_ = {0};
	GtkScale* _tmp6_ = NULL;
	gdouble _tmp7_ = 0.0;
	ZoomState _tmp8_ = {0};
#line 586 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 586 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 587 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->enable_interactive_zoom_refresh = FALSE;
#line 589 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 589 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 589 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_FULLSCREEN_WINDOW);
#line 589 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 589 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 5125 "PhotoPage.c"
		GtkWindow* _tmp3_ = NULL;
		FullscreenWindow* _tmp4_ = NULL;
#line 590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_FULLSCREEN_WINDOW, FullscreenWindow);
#line 590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		fullscreen_window_update_toolbar_dismissal (_tmp4_);
#line 590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 5136 "PhotoPage.c"
	}
#line 592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp5_);
#line 592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->zoom_slider;
#line 592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_range_get_type (), GtkRange));
#line 592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_init_rescale (&zoom_state, &_tmp5_, _tmp7_);
#line 593 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = zoom_state;
#line 593 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_set_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp8_);
#line 595 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5156 "PhotoPage.c"
}


static gboolean editing_host_page_on_zoom_out_pressed (EditingHostPage* self, GdkEventButton* event) {
	gboolean result = FALSE;
#line 600 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 600 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 601 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_snap_zoom_to_min (self);
#line 602 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 602 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5172 "PhotoPage.c"
}


static gboolean editing_host_page_on_zoom_in_pressed (EditingHostPage* self, GdkEventButton* event) {
	gboolean result = FALSE;
#line 605 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 605 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 606 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_snap_zoom_to_max (self);
#line 607 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 607 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5188 "PhotoPage.c"
}


static void editing_host_page_get_cursor_wrt_viewport (EditingHostPage* self, GdkEventScroll* event, GdkPoint* result) {
	GdkPoint cursor_wrt_canvas = {0};
	GdkPoint _tmp0_ = {0};
	GdkEventScroll* _tmp1_ = NULL;
	gdouble _tmp2_ = 0.0;
	GdkEventScroll* _tmp3_ = NULL;
	gdouble _tmp4_ = 0.0;
	GdkRectangle viewport_wrt_canvas = {0};
	ZoomState _tmp5_ = {0};
	GdkRectangle _tmp6_ = {0};
	GdkPoint _result_ = {0};
	GdkPoint _tmp7_ = {0};
	GdkPoint _tmp8_ = {0};
	gint _tmp9_ = 0;
	GdkRectangle _tmp10_ = {0};
	gint _tmp11_ = 0;
	GdkPoint _tmp12_ = {0};
	gint _tmp13_ = 0;
	GdkRectangle _tmp14_ = {0};
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	GdkPoint _tmp17_ = {0};
	gint _tmp18_ = 0;
	GdkRectangle _tmp19_ = {0};
	gint _tmp20_ = 0;
	GdkPoint _tmp21_ = {0};
	gint _tmp22_ = 0;
	GdkRectangle _tmp23_ = {0};
	gint _tmp24_ = 0;
	gint _tmp25_ = 0;
#line 610 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 610 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (event != NULL);
#line 611 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_.x = 0;
#line 611 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	cursor_wrt_canvas = _tmp0_;
#line 612 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = event;
#line 612 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_->x;
#line 612 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	cursor_wrt_canvas.x = (gint) _tmp2_;
#line 613 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = event;
#line 613 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_->y;
#line 613 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	cursor_wrt_canvas.y = (gint) _tmp4_;
#line 615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp5_);
#line 615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewing_rectangle_wrt_screen (&_tmp5_, &_tmp6_);
#line 615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	viewport_wrt_canvas = _tmp6_;
#line 616 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_.x = 0;
#line 616 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_result_ = _tmp7_;
#line 617 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = cursor_wrt_canvas;
#line 617 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_.x;
#line 617 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = viewport_wrt_canvas;
#line 617 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = _tmp10_.x;
#line 617 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_result_.x = _tmp9_ - _tmp11_;
#line 618 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _result_;
#line 618 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = _tmp12_.x;
#line 618 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = viewport_wrt_canvas;
#line 618 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = _tmp14_.width;
#line 618 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = CLAMP (_tmp13_, 0, _tmp15_);
#line 618 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_result_.x = _tmp16_;
#line 619 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = cursor_wrt_canvas;
#line 619 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = _tmp17_.y;
#line 619 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = viewport_wrt_canvas;
#line 619 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = _tmp19_.y;
#line 619 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_result_.y = _tmp18_ - _tmp20_;
#line 620 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = _result_;
#line 620 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = _tmp21_.y;
#line 620 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = viewport_wrt_canvas;
#line 620 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = _tmp23_.height;
#line 620 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = CLAMP (_tmp22_, 0, _tmp24_);
#line 620 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_result_.y = _tmp25_;
#line 622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	*result = _result_;
#line 622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return;
#line 5300 "PhotoPage.c"
}


static void editing_host_page_get_cursor_wrt_viewport_center (EditingHostPage* self, GdkEventScroll* event, GdkPoint* result) {
	GdkPoint cursor_wrt_viewport = {0};
	GdkEventScroll* _tmp0_ = NULL;
	GdkPoint _tmp1_ = {0};
	GdkRectangle viewport_wrt_canvas = {0};
	ZoomState _tmp2_ = {0};
	GdkRectangle _tmp3_ = {0};
	GdkPoint viewport_center = {0};
	GdkPoint _tmp4_ = {0};
	GdkRectangle _tmp5_ = {0};
	gint _tmp6_ = 0;
	GdkRectangle _tmp7_ = {0};
	gint _tmp8_ = 0;
	GdkPoint _tmp9_ = {0};
	GdkPoint _tmp10_ = {0};
	GdkPoint _tmp11_ = {0};
#line 625 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 625 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (event != NULL);
#line 626 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = event;
#line 626 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_get_cursor_wrt_viewport (self, _tmp0_, &_tmp1_);
#line 626 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	cursor_wrt_viewport = _tmp1_;
#line 627 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp2_);
#line 627 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewing_rectangle_wrt_screen (&_tmp2_, &_tmp3_);
#line 627 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	viewport_wrt_canvas = _tmp3_;
#line 629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_.x = 0;
#line 629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	viewport_center = _tmp4_;
#line 630 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = viewport_wrt_canvas;
#line 630 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_.width;
#line 630 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	viewport_center.x = _tmp6_ / 2;
#line 631 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = viewport_wrt_canvas;
#line 631 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_.height;
#line 631 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	viewport_center.y = _tmp8_ / 2;
#line 633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = cursor_wrt_viewport;
#line 633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = viewport_center;
#line 633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	subtract_points (&_tmp9_, &_tmp10_, &_tmp11_);
#line 633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	*result = _tmp11_;
#line 633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return;
#line 5362 "PhotoPage.c"
}


static void editing_host_page_get_iso_pixel_under_cursor (EditingHostPage* self, GdkEventScroll* event, GdkPoint* result) {
	GdkPoint viewport_center_iso = {0};
	ZoomState _tmp0_ = {0};
	GdkPoint _tmp1_ = {0};
	ZoomState _tmp2_ = {0};
	gdouble _tmp3_ = 0.0;
	GdkPoint _tmp4_ = {0};
	GdkPoint cursor_wrt_center_iso = {0};
	GdkEventScroll* _tmp5_ = NULL;
	GdkPoint _tmp6_ = {0};
	ZoomState _tmp7_ = {0};
	gdouble _tmp8_ = 0.0;
	GdkPoint _tmp9_ = {0};
	GdkPoint _tmp10_ = {0};
	GdkPoint _tmp11_ = {0};
	GdkPoint _tmp12_ = {0};
#line 636 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 636 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (event != NULL);
#line 637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp0_);
#line 637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewport_center (&_tmp0_, &_tmp1_);
#line 637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp2_);
#line 637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = zoom_state_get_zoom_factor (&_tmp2_);
#line 637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scale_point (&_tmp1_, 1.0 / _tmp3_, &_tmp4_);
#line 637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	viewport_center_iso = _tmp4_;
#line 640 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = event;
#line 640 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_get_cursor_wrt_viewport_center (self, _tmp5_, &_tmp6_);
#line 640 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp7_);
#line 640 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = zoom_state_get_zoom_factor (&_tmp7_);
#line 640 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scale_point (&_tmp6_, 1.0 / _tmp8_, &_tmp9_);
#line 640 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	cursor_wrt_center_iso = _tmp9_;
#line 643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = viewport_center_iso;
#line 643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = cursor_wrt_center_iso;
#line 643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	add_points (&_tmp10_, &_tmp11_, &_tmp12_);
#line 643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	*result = _tmp12_;
#line 643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return;
#line 5420 "PhotoPage.c"
}


static gdouble editing_host_page_snap_interpolation_factor (EditingHostPage* self, gdouble interp) {
	gdouble result = 0.0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp2_ = 0.0;
#line 646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), 0.0);
#line 647 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = interp;
#line 647 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ < 0.03) {
#line 648 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		interp = 0.0;
#line 5436 "PhotoPage.c"
	} else {
		gdouble _tmp1_ = 0.0;
#line 649 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = interp;
#line 649 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp1_ > 0.97) {
#line 650 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			interp = 1.0;
#line 5445 "PhotoPage.c"
		}
	}
#line 652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = interp;
#line 652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp2_;
#line 652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5454 "PhotoPage.c"
}


static gdouble editing_host_page_adjust_interpolation_factor (EditingHostPage* self, gdouble adjustment) {
	gdouble result = 0.0;
	ZoomState _tmp0_ = {0};
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
#line 655 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), 0.0);
#line 656 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp0_);
#line 656 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = zoom_state_get_interpolation_factor (&_tmp0_);
#line 656 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = adjustment;
#line 656 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_snap_interpolation_factor (self, _tmp1_ + _tmp2_);
#line 656 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp3_;
#line 656 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5478 "PhotoPage.c"
}


static void editing_host_page_zoom_about_event_cursor_point (EditingHostPage* self, GdkEventScroll* event, gdouble zoom_increment) {
	gboolean _tmp0_ = FALSE;
	GdkPoint cursor_wrt_viewport_center = {0};
	GdkEventScroll* _tmp1_ = NULL;
	GdkPoint _tmp2_ = {0};
	GdkPoint iso_pixel_under_cursor = {0};
	GdkEventScroll* _tmp3_ = NULL;
	GdkPoint _tmp4_ = {0};
	gdouble interp = 0.0;
	gdouble _tmp5_ = 0.0;
	gdouble _tmp6_ = 0.0;
	GtkScale* _tmp7_ = NULL;
	guint _tmp8_ = 0U;
	GtkScale* _tmp9_ = NULL;
	gdouble _tmp10_ = 0.0;
	GtkScale* _tmp11_ = NULL;
	ZoomState new_zoom_state = {0};
	ZoomState _tmp12_ = {0};
	gdouble _tmp13_ = 0.0;
	gboolean _tmp14_ = FALSE;
	GdkPoint new_zoomed_old_cursor = {0};
	GdkPoint _tmp15_ = {0};
	gdouble _tmp16_ = 0.0;
	GdkPoint _tmp17_ = {0};
	GdkPoint desired_new_viewport_center = {0};
	GdkPoint _tmp18_ = {0};
	GdkPoint _tmp19_ = {0};
	GdkPoint _tmp20_ = {0};
	ZoomState _tmp21_ = {0};
	GdkPoint _tmp22_ = {0};
	ZoomState _tmp23_ = {0};
#line 659 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 659 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (event != NULL);
#line 660 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->photo_missing;
#line 660 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 661 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 5523 "PhotoPage.c"
	}
#line 663 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = event;
#line 663 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_get_cursor_wrt_viewport_center (self, _tmp1_, &_tmp2_);
#line 663 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	cursor_wrt_viewport_center = _tmp2_;
#line 664 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = event;
#line 664 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_get_iso_pixel_under_cursor (self, _tmp3_, &_tmp4_);
#line 664 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	iso_pixel_under_cursor = _tmp4_;
#line 666 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = zoom_increment;
#line 666 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = editing_host_page_adjust_interpolation_factor (self, _tmp5_);
#line 666 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	interp = _tmp6_;
#line 667 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = self->priv->zoom_slider;
#line 667 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp8_, NULL, FALSE);
#line 667 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self);
#line 668 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = self->priv->zoom_slider;
#line 668 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = interp;
#line 668 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_range_get_type (), GtkRange), _tmp10_);
#line 669 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = self->priv->zoom_slider;
#line 669 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self, 0);
#line 671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp12_);
#line 671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = interp;
#line 671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_init_rescale (&new_zoom_state, &_tmp12_, _tmp13_);
#line 673 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = zoom_state_is_min (&new_zoom_state);
#line 673 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp14_) {
#line 674 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 675 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_update_cursor_for_zoom_context (self);
#line 676 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 5577 "PhotoPage.c"
	}
#line 680 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = iso_pixel_under_cursor;
#line 680 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = zoom_state_get_zoom_factor (&new_zoom_state);
#line 680 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scale_point (&_tmp15_, _tmp16_, &_tmp17_);
#line 680 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	new_zoomed_old_cursor = _tmp17_;
#line 682 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = new_zoomed_old_cursor;
#line 682 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = cursor_wrt_viewport_center;
#line 682 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	subtract_points (&_tmp18_, &_tmp19_, &_tmp20_);
#line 682 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	desired_new_viewport_center = _tmp20_;
#line 685 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = new_zoom_state;
#line 685 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = desired_new_viewport_center;
#line 685 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_init_pan (&new_zoom_state, &_tmp21_, &_tmp22_);
#line 687 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = new_zoom_state;
#line 687 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_set_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp23_);
#line 688 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 690 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_update_cursor_for_zoom_context (self);
#line 5609 "PhotoPage.c"
}


void editing_host_page_snap_zoom_to_min (EditingHostPage* self) {
	GtkScale* _tmp0_ = NULL;
#line 693 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 694 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 694 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange), 0.0);
#line 5621 "PhotoPage.c"
}


void editing_host_page_snap_zoom_to_max (EditingHostPage* self) {
	GtkScale* _tmp0_ = NULL;
#line 697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 698 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 698 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange), 1.0);
#line 5633 "PhotoPage.c"
}


void editing_host_page_snap_zoom_to_isomorphic (EditingHostPage* self) {
	ZoomState iso_state = {0};
	ZoomState _tmp0_ = {0};
	GtkScale* _tmp1_ = NULL;
	gdouble _tmp2_ = 0.0;
#line 701 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 702 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp0_);
#line 702 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_init_rescale_to_isomorphic (&iso_state, &_tmp0_);
#line 703 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->zoom_slider;
#line 703 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = zoom_state_get_interpolation_factor (&iso_state);
#line 703 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_range_get_type (), GtkRange), _tmp2_);
#line 5654 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_zoom_slider_key_press (EditingHostPage* self, GdkEventKey* event) {
	gboolean result = FALSE;
	GdkEventKey* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GQuark _tmp5_ = 0U;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label0 = 0;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label1 = 0;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label2 = 0;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label3 = 0;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label4 = 0;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label5 = 0;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label6 = 0;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp4_label7 = 0;
#line 706 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = event;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_->keyval;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gdk_keyval_name (_tmp1_);
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (((_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("equal")))) || (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("plus"))))) || (_tmp5_ == ((0 != _tmp4_label2) ? _tmp4_label2 : (_tmp4_label2 = g_quark_from_static_string ("KP_Add"))))) {
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 5697 "PhotoPage.c"
			default:
			{
#line 711 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize");
#line 712 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				result = TRUE;
#line 712 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return result;
#line 5706 "PhotoPage.c"
			}
		}
	} else if (((_tmp5_ == ((0 != _tmp4_label3) ? _tmp4_label3 : (_tmp4_label3 = g_quark_from_static_string ("minus")))) || (_tmp5_ == ((0 != _tmp4_label4) ? _tmp4_label4 : (_tmp4_label4 = g_quark_from_static_string ("underscore"))))) || (_tmp5_ == ((0 != _tmp4_label5) ? _tmp4_label5 : (_tmp4_label5 = g_quark_from_static_string ("KP_Subtract"))))) {
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 5712 "PhotoPage.c"
			default:
			{
#line 717 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize");
#line 718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				result = TRUE;
#line 718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return result;
#line 5721 "PhotoPage.c"
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label6) ? _tmp4_label6 : (_tmp4_label6 = g_quark_from_static_string ("KP_Divide")))) {
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 5727 "PhotoPage.c"
			default:
			{
#line 721 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Zoom100");
#line 722 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				result = TRUE;
#line 722 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return result;
#line 5736 "PhotoPage.c"
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label7) ? _tmp4_label7 : (_tmp4_label7 = g_quark_from_static_string ("KP_Multiply")))) {
#line 707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 5742 "PhotoPage.c"
			default:
			{
#line 725 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ZoomFit");
#line 726 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				result = TRUE;
#line 726 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return result;
#line 5751 "PhotoPage.c"
			}
		}
	}
#line 729 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 729 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5759 "PhotoPage.c"
}


gboolean editing_host_page_on_zoom_slider_key_press (EditingHostPage* self, GdkEventKey* event) {
#line 706 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 706 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->on_zoom_slider_key_press (self, event);
#line 5768 "PhotoPage.c"
}


static void editing_host_page_real_on_increase_size (EditingHostPage* self) {
	GtkScale* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
#line 733 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 733 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_adjust_interpolation_factor (self, EDITING_HOST_PAGE_ZOOM_INCREMENT_SIZE);
#line 733 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange), _tmp1_);
#line 5781 "PhotoPage.c"
}


void editing_host_page_on_increase_size (EditingHostPage* self) {
#line 732 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 732 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_GET_CLASS (self)->on_increase_size (self);
#line 5790 "PhotoPage.c"
}


static void editing_host_page_real_on_decrease_size (EditingHostPage* self) {
	GtkScale* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
#line 737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_adjust_interpolation_factor (self, -EDITING_HOST_PAGE_ZOOM_INCREMENT_SIZE);
#line 737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange), _tmp1_);
#line 5803 "PhotoPage.c"
}


void editing_host_page_on_decrease_size (EditingHostPage* self) {
#line 736 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 736 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_GET_CLASS (self)->on_decrease_size (self);
#line 5812 "PhotoPage.c"
}


static void editing_host_page_real_save_zoom_state (SinglePhotoPage* base) {
	EditingHostPage * self;
	GtkScale* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
#line 740 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	SINGLE_PHOTO_PAGE_CLASS (editing_host_page_parent_class)->save_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 742 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 742 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange));
#line 742 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->saved_slider_val = _tmp1_;
#line 5830 "PhotoPage.c"
}


static ZoomBuffer* editing_host_page_real_get_zoom_buffer (SinglePhotoPage* base) {
	EditingHostPage * self;
	ZoomBuffer* result = NULL;
	ZoomBuffer* _tmp0_ = NULL;
	ZoomBuffer* _tmp1_ = NULL;
#line 745 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 746 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_buffer;
#line 746 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 746 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp1_;
#line 746 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5849 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_mousewheel_up (Page* base, GdkEventScroll* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	ZoomState _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	GdkEventScroll* _tmp5_ = NULL;
#line 749 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 749 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp1_);
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = zoom_state_is_max (&_tmp1_);
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 5872 "PhotoPage.c"
	} else {
		GtkScale* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->zoom_slider;
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = gtk_widget_get_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp4_;
#line 5882 "PhotoPage.c"
	}
#line 750 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 751 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = FALSE;
#line 751 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 5890 "PhotoPage.c"
	}
#line 753 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = event;
#line 753 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_zoom_about_event_cursor_point (self, _tmp5_, EDITING_HOST_PAGE_ZOOM_INCREMENT_SIZE);
#line 754 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 754 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5900 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_mousewheel_down (Page* base, GdkEventScroll* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	ZoomState _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	GdkEventScroll* _tmp5_ = NULL;
#line 757 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 757 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp1_);
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = zoom_state_is_min (&_tmp1_);
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 5923 "PhotoPage.c"
	} else {
		GtkScale* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->zoom_slider;
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = gtk_widget_get_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp4_;
#line 5933 "PhotoPage.c"
	}
#line 758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 759 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = FALSE;
#line 759 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 5941 "PhotoPage.c"
	}
#line 761 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = event;
#line 761 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_zoom_about_event_cursor_point (self, _tmp5_, -EDITING_HOST_PAGE_ZOOM_INCREMENT_SIZE);
#line 762 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 762 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5951 "PhotoPage.c"
}


static void editing_host_page_real_restore_zoom_state (SinglePhotoPage* base) {
	EditingHostPage * self;
	GtkScale* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	GtkScale* _tmp2_ = NULL;
	gdouble _tmp3_ = 0.0;
	GtkScale* _tmp4_ = NULL;
#line 765 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 766 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	SINGLE_PHOTO_PAGE_CLASS (editing_host_page_parent_class)->restore_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 768 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 768 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp1_, NULL, FALSE);
#line 768 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self);
#line 769 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->zoom_slider;
#line 769 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->saved_slider_val;
#line 769 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_range_get_type (), GtkRange), _tmp3_);
#line 770 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = self->priv->zoom_slider;
#line 770 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self, 0);
#line 5982 "PhotoPage.c"
}


static gboolean editing_host_page_real_is_zoom_supported (SinglePhotoPage* base) {
	EditingHostPage * self;
	gboolean result = FALSE;
#line 773 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 774 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 774 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 5995 "PhotoPage.c"
}


static void editing_host_page_real_set_container (Page* base, GtkWindow* container) {
	EditingHostPage * self;
	GtkWindow* _tmp0_ = NULL;
	GtkWindow* _tmp1_ = NULL;
#line 777 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 777 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GTK_IS_WINDOW (container));
#line 778 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = container;
#line 778 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->set_container (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp0_);
#line 781 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = container;
#line 781 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_FULLSCREEN_WINDOW)) {
#line 6015 "PhotoPage.c"
		DragAndDropHandler* _tmp2_ = NULL;
#line 782 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = drag_and_drop_handler_new (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 782 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_drag_and_drop_handler_unref0 (self->priv->dnd_handler);
#line 782 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->dnd_handler = _tmp2_;
#line 6023 "PhotoPage.c"
	}
}


ViewCollection* editing_host_page_get_parent_view (EditingHostPage* self) {
	ViewCollection* result = NULL;
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
#line 785 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 786 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->parent_view;
#line 786 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _data_collection_ref0 (_tmp0_);
#line 786 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp1_;
#line 786 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 6042 "PhotoPage.c"
}


gboolean editing_host_page_has_photo (EditingHostPage* self) {
	gboolean result = FALSE;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 789 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 790 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (self);
#line 790 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 790 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_ != NULL;
#line 790 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 790 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp2_;
#line 790 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 6065 "PhotoPage.c"
}


Photo* editing_host_page_get_photo (EditingHostPage* self) {
	Photo* result = NULL;
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
	ViewCollection* _tmp4_ = NULL;
	ViewCollection* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	ViewCollection* _tmp7_ = NULL;
	ViewCollection* _tmp8_ = NULL;
	DataView* _tmp9_ = NULL;
	DataView* _tmp10_ = NULL;
	DataSource* _tmp11_ = NULL;
	Photo* _tmp12_ = NULL;
#line 793 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 795 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 795 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 795 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_selected_count (_tmp1_);
#line 795 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_ == 0;
#line 795 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 795 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_) {
#line 796 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = NULL;
#line 796 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 6102 "PhotoPage.c"
	}
#line 800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = view_collection_get_selected_count (_tmp5_);
#line 800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp6_ == 1, "get_view().get_selected_count() == 1");
#line 800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp5_);
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = view_collection_get_selected_at (_tmp8_, 0);
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = data_view_get_source (_tmp10_);
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PHOTO, Photo);
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp10_);
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp8_);
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp12_;
#line 801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 6134 "PhotoPage.c"
}


static void editing_host_page_real_photo_changing (EditingHostPage* self, Photo* new_photo) {
	Photo* _tmp0_ = NULL;
	PhotoFileFormat _tmp1_ = 0;
	gboolean _tmp6_ = FALSE;
#line 805 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (new_photo));
#line 808 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = new_photo;
#line 808 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = photo_get_file_format (_tmp0_);
#line 808 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ == PHOTO_FILE_FORMAT_RAW) {
#line 809 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_set_photo_missing (self, FALSE);
#line 6152 "PhotoPage.c"
	} else {
		Photo* _tmp2_ = NULL;
		GFile* _tmp3_ = NULL;
		GFile* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
#line 811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = new_photo;
#line 811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE, MediaSource));
#line 811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = g_file_query_exists (_tmp4_, NULL);
#line 811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_set_photo_missing (self, !_tmp5_);
#line 811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 6170 "PhotoPage.c"
	}
#line 813 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->photo_missing;
#line 813 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_update_ui (self, _tmp6_);
#line 6176 "PhotoPage.c"
}


void editing_host_page_photo_changing (EditingHostPage* self, Photo* new_photo) {
#line 805 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 805 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_GET_CLASS (self)->photo_changing (self, new_photo);
#line 6185 "PhotoPage.c"
}


static void editing_host_page_set_photo (EditingHostPage* self, Photo* photo) {
	GtkScale* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	GtkScale* _tmp2_ = NULL;
	GtkScale* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	DataView* view = NULL;
	ViewCollection* _tmp5_ = NULL;
	ViewCollection* _tmp6_ = NULL;
	Photo* _tmp7_ = NULL;
	DataView* _tmp8_ = NULL;
	DataView* _tmp9_ = NULL;
	DataView* _tmp10_ = NULL;
	ViewCollection* _tmp11_ = NULL;
	ViewCollection* _tmp12_ = NULL;
	Marker* marker = NULL;
	ViewCollection* _tmp13_ = NULL;
	ViewCollection* _tmp14_ = NULL;
	DataView* _tmp15_ = NULL;
	Marker* _tmp16_ = NULL;
	Marker* _tmp17_ = NULL;
	ViewCollection* _tmp18_ = NULL;
	ViewCollection* _tmp19_ = NULL;
	Marker* _tmp20_ = NULL;
	ViewCollection* _tmp21_ = NULL;
#line 816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp1_, NULL, FALSE);
#line 817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self);
#line 818 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->zoom_slider;
#line 818 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_range_get_type (), GtkRange), 0.0);
#line 819 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->zoom_slider;
#line 819 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self, 0);
#line 821 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = photo;
#line 821 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_photo_changing (self, _tmp4_);
#line 822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = photo;
#line 822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = view_collection_get_view_for_source (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource));
#line 822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp6_);
#line 822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view = _tmp9_;
#line 823 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = view;
#line 823 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp10_ != NULL, "view != null");
#line 826 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 826 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 826 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_collection_unselect_all (_tmp12_);
#line 826 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp12_);
#line 827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = _tmp13_;
#line 827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = view;
#line 827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_DATA_OBJECT, DataObject));
#line 827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = _tmp16_;
#line 827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp14_);
#line 827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	marker = _tmp17_;
#line 828 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 828 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = _tmp18_;
#line 828 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = marker;
#line 828 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_collection_select_marked (_tmp19_, _tmp20_);
#line 828 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp19_);
#line 832 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = self->priv->parent_view;
#line 832 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp21_ != NULL) {
#line 6290 "PhotoPage.c"
		ViewCollection* _tmp22_ = NULL;
		DataView* view_in_parent = NULL;
		ViewCollection* _tmp23_ = NULL;
		Photo* _tmp24_ = NULL;
		DataView* _tmp25_ = NULL;
		DataView* _tmp26_ = NULL;
#line 833 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = self->priv->parent_view;
#line 833 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_collection_unselect_all (_tmp22_);
#line 834 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = self->priv->parent_view;
#line 834 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = photo;
#line 834 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp25_ = view_collection_get_view_for_source_filtered (_tmp23_, G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_DATA_SOURCE, DataSource));
#line 834 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_in_parent = _tmp25_;
#line 835 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = view_in_parent;
#line 835 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (NULL != _tmp26_) {
#line 6313 "PhotoPage.c"
			ViewCollection* _tmp27_ = NULL;
			ViewCollection* _tmp28_ = NULL;
			DataView* _tmp29_ = NULL;
			Marker* _tmp30_ = NULL;
			Marker* _tmp31_ = NULL;
#line 836 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp27_ = self->priv->parent_view;
#line 836 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp28_ = self->priv->parent_view;
#line 836 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp29_ = view_in_parent;
#line 836 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp30_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_OBJECT, DataObject));
#line 836 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp31_ = _tmp30_;
#line 836 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			view_collection_select_marked (_tmp27_, _tmp31_);
#line 836 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp31_);
#line 6333 "PhotoPage.c"
		}
#line 832 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (view_in_parent);
#line 6337 "PhotoPage.c"
	}
#line 816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (marker);
#line 816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (view);
#line 6343 "PhotoPage.c"
}


static void editing_host_page_real_realize (GtkWidget* base) {
	EditingHostPage * self;
#line 840 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 841 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	GTK_WIDGET_CLASS (editing_host_page_parent_class)->realize (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), gtk_widget_get_type (), GtkWidget));
#line 843 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rebuild_caches (self, "realize");
#line 6355 "PhotoPage.c"
}


static void editing_host_page_real_switched_to (Page* base) {
	EditingHostPage * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
#line 846 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 847 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->switched_to (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page));
#line 849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rebuild_caches (self, "switched_to");
#line 852 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (self);
#line 852 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 6373 "PhotoPage.c"
		gboolean _tmp2_ = FALSE;
#line 852 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = self->priv->pixbuf_dirty;
#line 852 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp2_;
#line 6379 "PhotoPage.c"
	} else {
#line 852 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 6383 "PhotoPage.c"
	}
#line 852 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 6387 "PhotoPage.c"
		Photo* _tmp3_ = NULL;
		Photo* _tmp4_ = NULL;
#line 853 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (self);
#line 853 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 853 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_replace_photo (self, _tmp4_);
#line 853 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 6398 "PhotoPage.c"
	}
}


static void editing_host_page_real_switching_from (Page* base) {
	EditingHostPage * self;
	Dimensions _tmp0_ = {0};
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	ViewCollection* _tmp13_ = NULL;
	ViewCollection* _tmp14_ = NULL;
#line 856 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 857 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->switching_from (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page));
#line 859 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 860 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->is_pan_in_progress = FALSE;
#line 862 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp0_, 0, 0);
#line 862 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp0_, FALSE);
#line 869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_has_photo (self);
#line 869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 6426 "PhotoPage.c"
		ViewCollection* _tmp3_ = NULL;
#line 869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->parent_view;
#line 869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = _tmp3_ != NULL;
#line 6432 "PhotoPage.c"
	} else {
#line 869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = FALSE;
#line 6436 "PhotoPage.c"
	}
#line 869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 6440 "PhotoPage.c"
		ViewCollection* _tmp4_ = NULL;
		ViewCollection* _tmp5_ = NULL;
		ViewCollection* _tmp6_ = NULL;
		Photo* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		DataView* _tmp9_ = NULL;
		DataView* _tmp10_ = NULL;
		Marker* _tmp11_ = NULL;
		Marker* _tmp12_ = NULL;
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = self->priv->parent_view;
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = self->priv->parent_view;
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = self->priv->parent_view;
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo (self);
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = view_collection_get_view_for_source (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_SOURCE, DataSource));
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = _tmp9_;
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_OBJECT, DataObject));
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_collection_select_marked (_tmp4_, _tmp12_);
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp12_);
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp10_);
#line 870 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 6476 "PhotoPage.c"
	}
#line 873 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (self->priv->parent_view);
#line 873 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->parent_view = NULL;
#line 874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = _tmp13_;
#line 874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	data_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection));
#line 874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp14_);
#line 6490 "PhotoPage.c"
}


static void _editing_host_page_on_selection_changed_view_collection_items_selected (ViewCollection* _sender, GeeIterable* selected, gpointer self) {
#line 887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_selection_changed ((EditingHostPage*) self, selected);
#line 6497 "PhotoPage.c"
}


static void editing_host_page_real_switching_to_fullscreen (Page* base, FullscreenWindow* fsw) {
	EditingHostPage * self;
	FullscreenWindow* _tmp0_ = NULL;
	Dimensions _tmp1_ = {0};
	Page* page = NULL;
	FullscreenWindow* _tmp2_ = NULL;
	Page* _tmp3_ = NULL;
	Page* _tmp4_ = NULL;
#line 877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_FULLSCREEN_WINDOW (fsw));
#line 878 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = fsw;
#line 878 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->switching_to_fullscreen (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp0_);
#line 880 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp1_, 0, 0);
#line 880 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp1_, FALSE);
#line 882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 883 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->is_pan_in_progress = FALSE;
#line 885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = fsw;
#line 885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PAGE_WINDOW, PageWindow));
#line 885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page = _tmp3_;
#line 886 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = page;
#line 886 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_ != NULL) {
#line 6535 "PhotoPage.c"
		Page* _tmp5_ = NULL;
		ViewCollection* _tmp6_ = NULL;
		ViewCollection* _tmp7_ = NULL;
#line 887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = page;
#line 887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = page_get_view (_tmp5_);
#line 887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_signal_connect_object (_tmp7_, "items-selected", (GCallback) _editing_host_page_on_selection_changed_view_collection_items_selected, self, 0);
#line 887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp7_);
#line 6549 "PhotoPage.c"
	}
#line 877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (page);
#line 6553 "PhotoPage.c"
}


static void editing_host_page_real_returning_from_fullscreen (Page* base, FullscreenWindow* fsw) {
	EditingHostPage * self;
	FullscreenWindow* _tmp0_ = NULL;
	Page* page = NULL;
	FullscreenWindow* _tmp1_ = NULL;
	Page* _tmp2_ = NULL;
	Page* _tmp3_ = NULL;
#line 890 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 890 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_FULLSCREEN_WINDOW (fsw));
#line 891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = fsw;
#line 891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->returning_from_fullscreen (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp0_);
#line 893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 895 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = fsw;
#line 895 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
#line 895 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page = _tmp2_;
#line 896 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = page;
#line 896 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ != NULL) {
#line 6584 "PhotoPage.c"
		Page* _tmp4_ = NULL;
		ViewCollection* _tmp5_ = NULL;
		ViewCollection* _tmp6_ = NULL;
		guint _tmp7_ = 0U;
#line 897 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = page;
#line 897 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = page_get_view (_tmp4_);
#line 897 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_;
#line 897 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_signal_parse_name ("items-selected", TYPE_VIEW_COLLECTION, &_tmp7_, NULL, FALSE);
#line 897 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _editing_host_page_on_selection_changed_view_collection_items_selected, self);
#line 897 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp6_);
#line 6601 "PhotoPage.c"
	}
#line 890 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (page);
#line 6605 "PhotoPage.c"
}


static void editing_host_page_on_selection_changed (EditingHostPage* self, GeeIterable* selected) {
#line 900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GEE_IS_ITERABLE (selected));
#line 6614 "PhotoPage.c"
	{
		GeeIterator* _view_it = NULL;
		GeeIterable* _tmp0_ = NULL;
		GeeIterator* _tmp1_ = NULL;
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = selected;
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = gee_iterable_iterator (_tmp0_);
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_view_it = _tmp1_;
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		while (TRUE) {
#line 6627 "PhotoPage.c"
			gboolean _tmp2_ = FALSE;
			DataView* view = NULL;
			gpointer _tmp3_ = NULL;
			DataView* _tmp4_ = NULL;
			DataSource* _tmp5_ = NULL;
			Photo* _tmp6_ = NULL;
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp2_ = gee_iterator_next (_view_it);
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (!_tmp2_) {
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 6640 "PhotoPage.c"
			}
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp3_ = gee_iterator_get (_view_it);
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			view = (DataView*) _tmp3_;
#line 902 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp4_ = view;
#line 902 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp5_ = data_view_get_source (_tmp4_);
#line 902 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PHOTO, Photo);
#line 902 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			editing_host_page_replace_photo (self, _tmp6_);
#line 902 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp6_);
#line 903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (view);
#line 903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			break;
#line 6660 "PhotoPage.c"
		}
#line 901 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_view_it);
#line 6664 "PhotoPage.c"
	}
}


void editing_host_page_enable_rotate (EditingHostPage* self, gboolean should_enable) {
	GtkToolButton* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 907 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->rotate_button;
#line 908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = should_enable;
#line 908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), _tmp1_);
#line 6680 "PhotoPage.c"
}


static void _editing_host_page_on_pixbuf_fetched_pixbuf_cache_fetched (PixbufCache* _sender, Photo* photo, GdkPixbuf* pixbuf, GError* err, gpointer self) {
#line 926 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_pixbuf_fetched ((EditingHostPage*) self, photo, pixbuf, err);
#line 6687 "PhotoPage.c"
}


static gboolean _editing_host_page_master_cache_filter_pixbuf_cache_cache_filter (Photo* photo, gpointer self) {
	gboolean result;
	result = editing_host_page_master_cache_filter ((EditingHostPage*) self, photo);
#line 933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 6696 "PhotoPage.c"
}


static void editing_host_page_rebuild_caches (EditingHostPage* self, const gchar* caller) {
	Scaling scaling = {0};
	Scaling _tmp0_ = {0};
	gboolean _tmp1_ = FALSE;
	PixbufCache* _tmp2_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	PixbufCache* _tmp10_ = NULL;
	SourceCollection* _tmp14_ = NULL;
	Scaling _tmp15_ = {0};
	PixbufCache* _tmp16_ = NULL;
	PixbufCache* _tmp17_ = NULL;
	SourceCollection* _tmp18_ = NULL;
	Scaling _tmp19_ = {0};
	PixbufCache* _tmp20_ = NULL;
	const gchar* _tmp21_ = NULL;
#line 914 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 914 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (caller != NULL);
#line 915 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp0_);
#line 915 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scaling = _tmp0_;
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->cache;
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_ != NULL) {
#line 6729 "PhotoPage.c"
		PixbufCache* _tmp3_ = NULL;
		Scaling _tmp4_ = {0};
		Scaling _tmp5_ = {0};
		gboolean _tmp6_ = FALSE;
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->cache;
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		pixbuf_cache_get_scaling (_tmp3_, &_tmp4_);
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = scaling;
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = scaling_equals (&_tmp4_, &_tmp5_);
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = _tmp6_;
#line 6744 "PhotoPage.c"
	} else {
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = FALSE;
#line 6748 "PhotoPage.c"
	}
#line 918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 6754 "PhotoPage.c"
	}
#line 921 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = caller;
#line 921 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = scaling_to_string (&scaling);
#line 921 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 921 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_debug ("PhotoPage.vala:921: Rebuild pixbuf caches: %s (%s)", _tmp7_, _tmp9_);
#line 921 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp9_);
#line 925 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = self->priv->cache;
#line 925 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp10_ != NULL) {
#line 6770 "PhotoPage.c"
		PixbufCache* _tmp11_ = NULL;
		guint _tmp12_ = 0U;
		PixbufCache* _tmp13_ = NULL;
#line 926 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = self->priv->cache;
#line 926 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_signal_parse_name ("fetched", TYPE_PIXBUF_CACHE, &_tmp12_, NULL, FALSE);
#line 926 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_signal_handlers_disconnect_matched (_tmp11_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _editing_host_page_on_pixbuf_fetched_pixbuf_cache_fetched, self);
#line 927 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = self->priv->cache;
#line 927 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		pixbuf_cache_cancel_all (_tmp13_);
#line 6784 "PhotoPage.c"
	}
#line 930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = self->priv->sources;
#line 930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = scaling;
#line 930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = pixbuf_cache_new (_tmp14_, PIXBUF_CACHE_PHOTO_TYPE_BASELINE, &_tmp15_, EDITING_HOST_PAGE_PIXBUF_CACHE_COUNT, NULL, NULL);
#line 930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->cache);
#line 930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->cache = _tmp16_;
#line 931 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = self->priv->cache;
#line 931 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp17_, "fetched", (GCallback) _editing_host_page_on_pixbuf_fetched_pixbuf_cache_fetched, self, 0);
#line 933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = self->priv->sources;
#line 933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = scaling;
#line 933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = pixbuf_cache_new (_tmp18_, PIXBUF_CACHE_PHOTO_TYPE_MASTER, &_tmp19_, EDITING_HOST_PAGE_ORIGINAL_PIXBUF_CACHE_COUNT, _editing_host_page_master_cache_filter_pixbuf_cache_cache_filter, self);
#line 933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->master_cache);
#line 933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->master_cache = _tmp20_;
#line 936 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = caller;
#line 936 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_refresh_caches (self, _tmp21_);
#line 6814 "PhotoPage.c"
}


static void editing_host_page_refresh_caches (EditingHostPage* self, const gchar* caller) {
	gboolean _tmp0_ = FALSE;
#line 940 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 940 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (caller != NULL);
#line 941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (self);
#line 941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 6828 "PhotoPage.c"
		const gchar* _tmp1_ = NULL;
		Photo* _tmp2_ = NULL;
		Photo* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		ViewCollection* _tmp6_ = NULL;
		ViewCollection* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		Photo* _tmp9_ = NULL;
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = caller;
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_host_page_get_photo (self);
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp2_;
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject));
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = _tmp4_;
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_debug ("PhotoPage.vala:942: Refresh pixbuf caches (%s): prefetching neighbors " \
"of %s", _tmp1_, _tmp5_);
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp5_);
#line 942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp3_);
#line 944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = editing_host_page_get_photo (self);
#line 944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = _tmp8_;
#line 944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_prefetch_neighbors (self, _tmp7_, _tmp9_);
#line 944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp9_);
#line 944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp7_);
#line 6868 "PhotoPage.c"
	} else {
		const gchar* _tmp10_ = NULL;
#line 946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = caller;
#line 946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_debug ("PhotoPage.vala:946: Refresh pixbuf caches (%s): (no photo)", _tmp10_);
#line 6875 "PhotoPage.c"
	}
}


static gboolean editing_host_page_master_cache_filter (EditingHostPage* self, Photo* photo) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	Photo* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 950 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 950 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (photo), FALSE);
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = photo;
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = photo_has_transformations (_tmp1_);
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 6897 "PhotoPage.c"
	} else {
		Photo* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = photo;
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = photo_has_editable (_tmp3_);
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp4_;
#line 6907 "PhotoPage.c"
	}
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp0_;
#line 951 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 6913 "PhotoPage.c"
}


static void editing_host_page_on_pixbuf_fetched (EditingHostPage* self, Photo* photo, GdkPixbuf* pixbuf, GError* err) {
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	Photo* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	GdkPixbuf* _tmp5_ = NULL;
	GError * _inner_error_ = NULL;
#line 954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail ((pixbuf == NULL) || GDK_IS_PIXBUF (pixbuf));
#line 956 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = photo;
#line 956 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_get_photo (self);
#line 956 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 956 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource));
#line 956 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = !_tmp3_;
#line 956 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 956 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_) {
#line 957 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 6947 "PhotoPage.c"
	}
#line 959 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = pixbuf;
#line 959 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_ != NULL) {
#line 6953 "PhotoPage.c"
		gboolean _tmp6_ = FALSE;
		ZoomBuffer* _tmp7_ = NULL;
		Dimensions max_dim = {0};
		Photo* _tmp15_ = NULL;
		Dimensions _tmp16_ = {0};
		EditingToolsEditingTool* _tmp17_ = NULL;
		GdkPixbuf* _tmp31_ = NULL;
		Dimensions _tmp32_ = {0};
		Photo* _tmp33_ = NULL;
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = self->priv->zoom_buffer;
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp7_ != NULL) {
#line 6967 "PhotoPage.c"
			ZoomBuffer* _tmp8_ = NULL;
			Photo* _tmp9_ = NULL;
			Photo* _tmp10_ = NULL;
			Photo* _tmp11_ = NULL;
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp8_ = self->priv->zoom_buffer;
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = zoom_buffer_get_backing_photo (_tmp8_);
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp10_ = _tmp9_;
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp11_ = photo;
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = _tmp10_ == _tmp11_;
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp10_);
#line 6984 "PhotoPage.c"
		} else {
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = FALSE;
#line 6988 "PhotoPage.c"
		}
#line 961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp6_) {
#line 6992 "PhotoPage.c"
			Photo* _tmp12_ = NULL;
			GdkPixbuf* _tmp13_ = NULL;
			ZoomBuffer* _tmp14_ = NULL;
#line 962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp12_ = photo;
#line 962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp13_ = pixbuf;
#line 962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp14_ = zoom_buffer_new (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp12_, _tmp13_);
#line 962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (self->priv->zoom_buffer);
#line 962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			self->priv->zoom_buffer = _tmp14_;
#line 7006 "PhotoPage.c"
		}
#line 966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = photo;
#line 966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp16_);
#line 966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		max_dim = _tmp16_;
#line 967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = self->priv->current_tool;
#line 967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp17_ != NULL) {
#line 7018 "PhotoPage.c"
			{
				Dimensions tool_pixbuf_dim = {0};
				GdkPixbuf* tool_pixbuf = NULL;
				EditingToolsEditingTool* _tmp18_ = NULL;
				Scaling _tmp19_ = {0};
				Photo* _tmp20_ = NULL;
				Dimensions _tmp21_ = {0};
				GdkPixbuf* _tmp22_ = NULL;
				GdkPixbuf* _tmp23_ = NULL;
#line 970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp18_ = self->priv->current_tool;
#line 970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp19_);
#line 970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp20_ = photo;
#line 970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp22_ = editing_tools_editing_tool_get_display_pixbuf (_tmp18_, &_tmp19_, _tmp20_, &_tmp21_, &_inner_error_);
#line 970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				tool_pixbuf_dim = _tmp21_;
#line 970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				tool_pixbuf = _tmp22_;
#line 970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 7042 "PhotoPage.c"
					goto __catch244_g_error;
				}
#line 973 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp23_ = tool_pixbuf;
#line 973 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				if (_tmp23_ != NULL) {
#line 7049 "PhotoPage.c"
					GdkPixbuf* _tmp24_ = NULL;
					Dimensions _tmp25_ = {0};
#line 974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
					_tmp24_ = tool_pixbuf;
#line 974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
					pixbuf = _tmp24_;
#line 975 "/home/jens/Source/shotwell/src/PhotoPage.vala"
					_tmp25_ = tool_pixbuf_dim;
#line 975 "/home/jens/Source/shotwell/src/PhotoPage.vala"
					max_dim = _tmp25_;
#line 7060 "PhotoPage.c"
				}
#line 968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (tool_pixbuf);
#line 7064 "PhotoPage.c"
			}
			goto __finally244;
			__catch244_g_error:
			{
				GError* err = NULL;
				Photo* _tmp26_ = NULL;
				gchar* _tmp27_ = NULL;
				gchar* _tmp28_ = NULL;
				GError* _tmp29_ = NULL;
				const gchar* _tmp30_ = NULL;
#line 968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				err = _inner_error_;
#line 968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_inner_error_ = NULL;
#line 978 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp26_ = photo;
#line 978 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp27_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATA_OBJECT, DataObject));
#line 978 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp28_ = _tmp27_;
#line 978 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp29_ = err;
#line 978 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp30_ = _tmp29_->message;
#line 978 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				g_warning ("PhotoPage.vala:978: Unable to fetch tool pixbuf for %s: %s", _tmp28_, _tmp30_);
#line 978 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_free0 (_tmp28_);
#line 979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				editing_host_page_set_photo_missing (self, TRUE);
#line 981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_error_free0 (err);
#line 981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return;
#line 7099 "PhotoPage.c"
			}
			__finally244:
#line 968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 968 "/home/jens/Source/shotwell/src/PhotoPage.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 968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				g_clear_error (&_inner_error_);
#line 968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return;
#line 7110 "PhotoPage.c"
			}
		}
#line 985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = pixbuf;
#line 985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = max_dim;
#line 985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp31_, &_tmp32_, NULL);
#line 986 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->pixbuf_dirty = FALSE;
#line 988 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp33_ = photo;
#line 988 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_notify_photo_backing_missing (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_PHOTO, Photo), FALSE);
#line 7125 "PhotoPage.c"
	} else {
		GError* _tmp34_ = NULL;
#line 989 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp34_ = err;
#line 989 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp34_ != NULL) {
#line 7132 "PhotoPage.c"
			Photo* _tmp35_ = NULL;
#line 992 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			editing_host_page_set_photo_missing (self, TRUE);
#line 995 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp35_ = photo;
#line 995 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			editing_host_page_notify_photo_backing_missing (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_PHOTO, Photo), TRUE);
#line 7140 "PhotoPage.c"
		}
	}
}


static void editing_host_page_prefetch_neighbors (EditingHostPage* self, ViewCollection* controller, Photo* photo) {
	PixbufCachePixbufCacheBatch* normal_batch = NULL;
	PixbufCachePixbufCacheBatch* _tmp0_ = NULL;
	PixbufCachePixbufCacheBatch* master_batch = NULL;
	PixbufCachePixbufCacheBatch* _tmp1_ = NULL;
	PixbufCachePixbufCacheBatch* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	PixbufCachePixbufCacheBatch* _tmp4_ = NULL;
	Photo* _tmp5_ = NULL;
	DataSource* next_source = NULL;
	DataSource* prev_source = NULL;
	ViewCollection* _tmp6_ = NULL;
	Photo* _tmp7_ = NULL;
	DataSource* _tmp8_ = NULL;
	DataSource* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
	Photo* next = NULL;
	DataSource* _tmp11_ = NULL;
	Photo* _tmp12_ = NULL;
	Photo* prev = NULL;
	DataSource* _tmp13_ = NULL;
	Photo* _tmp14_ = NULL;
	PixbufCache* _tmp39_ = NULL;
	PixbufCachePixbufCacheBatch* _tmp40_ = NULL;
	PixbufCache* _tmp41_ = NULL;
	PixbufCachePixbufCacheBatch* _tmp42_ = NULL;
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_VIEW_COLLECTION (controller));
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 1000 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = pixbuf_cache_pixbuf_cache_batch_new ();
#line 1000 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	normal_batch = _tmp0_;
#line 1001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = pixbuf_cache_pixbuf_cache_batch_new ();
#line 1001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	master_batch = _tmp1_;
#line 1003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = normal_batch;
#line 1003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = photo;
#line 1003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_MULTI_MAP, GeeMultiMap), (gpointer) ((gintptr) BACKGROUND_JOB_JOB_PRIORITY_HIGHEST), _tmp3_);
#line 1004 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = master_batch;
#line 1004 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = photo;
#line 1004 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_MULTI_MAP, GeeMultiMap), (gpointer) ((gintptr) BACKGROUND_JOB_JOB_PRIORITY_LOW), _tmp5_);
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = controller;
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = photo;
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = view_collection_get_immediate_neighbors (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource), &_tmp8_, &_tmp9_, PHOTO_TYPENAME);
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (next_source);
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	next_source = _tmp8_;
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (prev_source);
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	prev_source = _tmp9_;
#line 1007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp10_) {
#line 1008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (prev_source);
#line 1008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (next_source);
#line 1008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (master_batch);
#line 1008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (normal_batch);
#line 1008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 7224 "PhotoPage.c"
	}
#line 1010 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = next_source;
#line 1010 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PHOTO, Photo));
#line 1010 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	next = _tmp12_;
#line 1011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = prev_source;
#line 1011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_PHOTO, Photo));
#line 1011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	prev = _tmp14_;
#line 7238 "PhotoPage.c"
	{
		GeeIterator* _neighbor_source_it = NULL;
		ViewCollection* _tmp15_ = NULL;
		Photo* _tmp16_ = NULL;
		GeeSet* _tmp17_ = NULL;
		GeeSet* _tmp18_ = NULL;
		GeeIterator* _tmp19_ = NULL;
		GeeIterator* _tmp20_ = NULL;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = controller;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = photo;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = view_collection_get_extended_neighbors (_tmp15_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_SOURCE, DataSource), PHOTO_TYPENAME);
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = _tmp17_;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = _tmp19_;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp18_);
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_neighbor_source_it = _tmp20_;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		while (TRUE) {
#line 7265 "PhotoPage.c"
			GeeIterator* _tmp21_ = NULL;
			gboolean _tmp22_ = FALSE;
			DataSource* neighbor_source = NULL;
			GeeIterator* _tmp23_ = NULL;
			gpointer _tmp24_ = NULL;
			Photo* neighbor = NULL;
			DataSource* _tmp25_ = NULL;
			Photo* _tmp26_ = NULL;
			BackgroundJobJobPriority priority = 0;
			gboolean _tmp27_ = FALSE;
			Photo* _tmp28_ = NULL;
			Photo* _tmp29_ = NULL;
			gboolean _tmp30_ = FALSE;
			PixbufCachePixbufCacheBatch* _tmp34_ = NULL;
			BackgroundJobJobPriority _tmp35_ = 0;
			Photo* _tmp36_ = NULL;
			PixbufCachePixbufCacheBatch* _tmp37_ = NULL;
			Photo* _tmp38_ = NULL;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp21_ = _neighbor_source_it;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp22_ = gee_iterator_next (_tmp21_);
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (!_tmp22_) {
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 7292 "PhotoPage.c"
			}
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp23_ = _neighbor_source_it;
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp24_ = gee_iterator_get (_tmp23_);
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			neighbor_source = (DataSource*) _tmp24_;
#line 1015 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp25_ = neighbor_source;
#line 1015 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp26_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_PHOTO, Photo));
#line 1015 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			neighbor = _tmp26_;
#line 1017 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			priority = BACKGROUND_JOB_JOB_PRIORITY_NORMAL;
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp28_ = neighbor;
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp29_ = next;
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp30_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_SOURCE, DataSource));
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp30_) {
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp27_ = TRUE;
#line 7318 "PhotoPage.c"
			} else {
				Photo* _tmp31_ = NULL;
				Photo* _tmp32_ = NULL;
				gboolean _tmp33_ = FALSE;
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp31_ = neighbor;
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp32_ = prev;
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp33_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_DATA_SOURCE, DataSource));
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp27_ = _tmp33_;
#line 7331 "PhotoPage.c"
			}
#line 1018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp27_) {
#line 1019 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				priority = BACKGROUND_JOB_JOB_PRIORITY_HIGH;
#line 7337 "PhotoPage.c"
			}
#line 1021 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp34_ = normal_batch;
#line 1021 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp35_ = priority;
#line 1021 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp36_ = neighbor;
#line 1021 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_MULTI_MAP, GeeMultiMap), (gpointer) ((gintptr) _tmp35_), _tmp36_);
#line 1022 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp37_ = master_batch;
#line 1022 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp38_ = neighbor;
#line 1022 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_MULTI_MAP, GeeMultiMap), (gpointer) ((gintptr) BACKGROUND_JOB_JOB_PRIORITY_LOWEST), _tmp38_);
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (neighbor);
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (neighbor_source);
#line 7357 "PhotoPage.c"
		}
#line 1014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_neighbor_source_it);
#line 7361 "PhotoPage.c"
	}
#line 1025 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp39_ = self->priv->cache;
#line 1025 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp40_ = normal_batch;
#line 1025 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pixbuf_cache_prefetch_batch (_tmp39_, _tmp40_, FALSE);
#line 1026 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp41_ = self->priv->master_cache;
#line 1026 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp42_ = master_batch;
#line 1026 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pixbuf_cache_prefetch_batch (_tmp41_, _tmp42_, FALSE);
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (prev);
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (next);
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (prev_source);
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (next_source);
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (master_batch);
#line 999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (normal_batch);
#line 7387 "PhotoPage.c"
}


static void editing_host_page_cancel_prefetch_neighbors (EditingHostPage* self, ViewCollection* old_controller, Photo* old_photo, ViewCollection* new_controller, Photo* new_photo) {
	GeeSet* old_neighbors = NULL;
	ViewCollection* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	GeeSet* new_neighbors = NULL;
	ViewCollection* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	GeeSet* _tmp5_ = NULL;
	gboolean _tmp23_ = FALSE;
	GeeSet* _tmp24_ = NULL;
	Photo* _tmp25_ = NULL;
	gboolean _tmp26_ = FALSE;
#line 1031 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1031 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_VIEW_COLLECTION (old_controller));
#line 1031 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (old_photo));
#line 1031 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_VIEW_COLLECTION (new_controller));
#line 1031 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (new_photo));
#line 1033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = old_controller;
#line 1033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = old_photo;
#line 1033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_extended_neighbors (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_SOURCE, DataSource), PHOTO_TYPENAME);
#line 1033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	old_neighbors = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_SET, GeeSet);
#line 1035 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = new_controller;
#line 1035 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = new_photo;
#line 1035 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = view_collection_get_extended_neighbors (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource), PHOTO_TYPENAME);
#line 1035 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	new_neighbors = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_SET, GeeSet);
#line 7430 "PhotoPage.c"
	{
		GeeIterator* _old_neighbor_it = NULL;
		GeeSet* _tmp6_ = NULL;
		GeeIterator* _tmp7_ = NULL;
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = old_neighbors;
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_old_neighbor_it = _tmp7_;
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		while (TRUE) {
#line 7443 "PhotoPage.c"
			GeeIterator* _tmp8_ = NULL;
			gboolean _tmp9_ = FALSE;
			Photo* old_neighbor = NULL;
			GeeIterator* _tmp10_ = NULL;
			gpointer _tmp11_ = NULL;
			gboolean _tmp12_ = FALSE;
			GeeSet* _tmp13_ = NULL;
			Photo* _tmp14_ = NULL;
			gboolean _tmp15_ = FALSE;
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp8_ = _old_neighbor_it;
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = gee_iterator_next (_tmp8_);
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (!_tmp9_) {
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 7461 "PhotoPage.c"
			}
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp10_ = _old_neighbor_it;
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp11_ = gee_iterator_get (_tmp10_);
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			old_neighbor = (Photo*) _tmp11_;
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp13_ = new_neighbors;
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp14_ = old_neighbor;
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp15_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection), _tmp14_);
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (!_tmp15_) {
#line 7477 "PhotoPage.c"
				Photo* _tmp16_ = NULL;
				Photo* _tmp17_ = NULL;
				gboolean _tmp18_ = FALSE;
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp16_ = new_photo;
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp17_ = old_neighbor;
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp18_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_SOURCE, DataSource));
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp12_ = !_tmp18_;
#line 7489 "PhotoPage.c"
			} else {
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp12_ = FALSE;
#line 7493 "PhotoPage.c"
			}
#line 1041 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp12_) {
#line 7497 "PhotoPage.c"
				PixbufCache* _tmp19_ = NULL;
				Photo* _tmp20_ = NULL;
				PixbufCache* _tmp21_ = NULL;
				Photo* _tmp22_ = NULL;
#line 1042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp19_ = self->priv->cache;
#line 1042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp20_ = old_neighbor;
#line 1042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				pixbuf_cache_drop (_tmp19_, _tmp20_);
#line 1043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp21_ = self->priv->master_cache;
#line 1043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp22_ = old_neighbor;
#line 1043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				pixbuf_cache_drop (_tmp21_, _tmp22_);
#line 7514 "PhotoPage.c"
			}
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (old_neighbor);
#line 7518 "PhotoPage.c"
		}
#line 1038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_old_neighbor_it);
#line 7522 "PhotoPage.c"
	}
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = new_neighbors;
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = old_photo;
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_COLLECTION, GeeCollection), _tmp25_);
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp26_) {
#line 7532 "PhotoPage.c"
		Photo* _tmp27_ = NULL;
		Photo* _tmp28_ = NULL;
		gboolean _tmp29_ = FALSE;
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp27_ = new_photo;
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp28_ = old_photo;
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp29_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_DATA_SOURCE, DataSource));
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = !_tmp29_;
#line 7544 "PhotoPage.c"
	} else {
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = FALSE;
#line 7548 "PhotoPage.c"
	}
#line 1048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp23_) {
#line 7552 "PhotoPage.c"
		PixbufCache* _tmp30_ = NULL;
		Photo* _tmp31_ = NULL;
		PixbufCache* _tmp32_ = NULL;
		Photo* _tmp33_ = NULL;
#line 1049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = self->priv->cache;
#line 1049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = old_photo;
#line 1049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		pixbuf_cache_drop (_tmp30_, _tmp31_);
#line 1050 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = self->priv->master_cache;
#line 1050 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp33_ = old_photo;
#line 1050 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		pixbuf_cache_drop (_tmp32_, _tmp33_);
#line 7569 "PhotoPage.c"
	}
#line 1031 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (new_neighbors);
#line 1031 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (old_neighbors);
#line 7575 "PhotoPage.c"
}


static DataView* editing_host_page_real_create_photo_view (EditingHostPage* self, DataSource* source) {
	DataView* result = NULL;
	DataSource* _tmp0_ = NULL;
	PhotoView* _tmp1_ = NULL;
#line 1054 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
#line 1055 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = source;
#line 1055 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = photo_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_SOURCE, PhotoSource));
#line 1055 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView);
#line 1055 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 7593 "PhotoPage.c"
}


DataView* editing_host_page_create_photo_view (EditingHostPage* self, DataSource* source) {
#line 1054 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 1054 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->create_photo_view (self, source);
#line 7602 "PhotoPage.c"
}


static gboolean editing_host_page_is_photo (EditingHostPage* self, DataSource* source) {
	gboolean result = FALSE;
	DataSource* _tmp0_ = NULL;
#line 1058 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1058 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE);
#line 1059 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = source;
#line 1059 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_PHOTO_SOURCE);
#line 1059 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 7619 "PhotoPage.c"
}


static DataView* _editing_host_page_create_photo_view_create_view (DataSource* source, gpointer self) {
	DataView* result;
	result = editing_host_page_create_photo_view ((EditingHostPage*) self, source);
#line 1067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 7628 "PhotoPage.c"
}


static gboolean _editing_host_page_is_photo_create_view_predicate (DataSource* source, gpointer self) {
	gboolean result;
	result = editing_host_page_is_photo ((EditingHostPage*) self, source);
#line 1067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 7637 "PhotoPage.c"
}


void editing_host_page_display_copy_of (EditingHostPage* self, ViewCollection* controller, Photo* starting_photo) {
	ViewCollection* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	DataView* _tmp2_ = NULL;
	DataView* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	ViewCollection* _tmp5_ = NULL;
	ViewCollection* _tmp6_ = NULL;
	ViewCollection* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	Photo* _tmp18_ = NULL;
#line 1062 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1062 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_VIEW_COLLECTION (controller));
#line 1062 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (starting_photo));
#line 1063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = controller;
#line 1063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = starting_photo;
#line 1063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_view_for_source (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_SOURCE, DataSource));
#line 1063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 1063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp3_ != NULL, "controller.get_view_for_source(starting_photo) != null");
#line 1063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = controller;
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp5_ != _tmp7_;
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp7_);
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp8_) {
#line 7682 "PhotoPage.c"
		ViewCollection* _tmp9_ = NULL;
		ViewCollection* _tmp10_ = NULL;
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = controller;
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = self->priv->parent_view;
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp9_ != _tmp10_;
#line 7691 "PhotoPage.c"
	} else {
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = FALSE;
#line 7695 "PhotoPage.c"
	}
#line 1065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_) {
#line 7699 "PhotoPage.c"
		ViewCollection* _tmp11_ = NULL;
		ViewCollection* _tmp12_ = NULL;
		ViewCollection* _tmp13_ = NULL;
		ViewCollection* _tmp14_ = NULL;
		ViewCollection* _tmp15_ = NULL;
		ViewCollection* _tmp16_ = NULL;
		ViewCollection* _tmp17_ = NULL;
#line 1066 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1066 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 1066 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		data_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_COLLECTION, DataCollection));
#line 1066 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp12_);
#line 1067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_;
#line 1067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = controller;
#line 1067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_collection_copy_into (_tmp14_, _tmp15_, _editing_host_page_create_photo_view_create_view, self, _editing_host_page_is_photo_create_view_predicate, self);
#line 1067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp14_);
#line 1068 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = controller;
#line 1068 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = _data_collection_ref0 (_tmp16_);
#line 1068 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (self->priv->parent_view);
#line 1068 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->parent_view = _tmp17_;
#line 7733 "PhotoPage.c"
	}
#line 1071 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = starting_photo;
#line 1071 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_replace_photo (self, _tmp18_);
#line 7739 "PhotoPage.c"
}


void editing_host_page_display_mirror_of (EditingHostPage* self, ViewCollection* controller, Photo* starting_photo) {
	ViewCollection* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	DataView* _tmp2_ = NULL;
	DataView* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	ViewCollection* _tmp5_ = NULL;
	ViewCollection* _tmp6_ = NULL;
	ViewCollection* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	Photo* _tmp18_ = NULL;
#line 1074 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1074 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_VIEW_COLLECTION (controller));
#line 1074 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (starting_photo));
#line 1075 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = controller;
#line 1075 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = starting_photo;
#line 1075 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_view_for_source (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_SOURCE, DataSource));
#line 1075 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 1075 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp3_ != NULL, "controller.get_view_for_source(starting_photo) != null");
#line 1075 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = controller;
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp5_ != _tmp7_;
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp7_);
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp8_) {
#line 7784 "PhotoPage.c"
		ViewCollection* _tmp9_ = NULL;
		ViewCollection* _tmp10_ = NULL;
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = controller;
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = self->priv->parent_view;
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp9_ != _tmp10_;
#line 7793 "PhotoPage.c"
	} else {
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = FALSE;
#line 7797 "PhotoPage.c"
	}
#line 1077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_) {
#line 7801 "PhotoPage.c"
		ViewCollection* _tmp11_ = NULL;
		ViewCollection* _tmp12_ = NULL;
		ViewCollection* _tmp13_ = NULL;
		ViewCollection* _tmp14_ = NULL;
		ViewCollection* _tmp15_ = NULL;
		ViewCollection* _tmp16_ = NULL;
		ViewCollection* _tmp17_ = NULL;
#line 1078 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1078 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 1078 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		data_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_COLLECTION, DataCollection));
#line 1078 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp12_);
#line 1079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_;
#line 1079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = controller;
#line 1079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		view_collection_mirror (_tmp14_, _tmp15_, _editing_host_page_create_photo_view_create_view, self, _editing_host_page_is_photo_create_view_predicate, self);
#line 1079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp14_);
#line 1080 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = controller;
#line 1080 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = _data_collection_ref0 (_tmp16_);
#line 1080 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (self->priv->parent_view);
#line 1080 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->parent_view = _tmp17_;
#line 7835 "PhotoPage.c"
	}
#line 1083 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = starting_photo;
#line 1083 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_replace_photo (self, _tmp18_);
#line 7841 "PhotoPage.c"
}


static void editing_host_page_real_update_ui (EditingHostPage* self, gboolean missing) {
	gboolean sensitivity = FALSE;
	gboolean _tmp0_ = FALSE;
	GtkToolButton* _tmp1_ = NULL;
	GtkToggleToolButton* _tmp2_ = NULL;
	GtkToggleToolButton* _tmp3_ = NULL;
	GtkToggleToolButton* _tmp4_ = NULL;
	GtkToggleToolButton* _tmp5_ = NULL;
	GtkToolButton* _tmp6_ = NULL;
	GtkScale* _tmp7_ = NULL;
	Dimensions _tmp8_ = {0};
#line 1087 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = missing;
#line 1087 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	sensitivity = !_tmp0_;
#line 1089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->rotate_button;
#line 1089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), sensitivity);
#line 1090 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->crop_button;
#line 1090 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), sensitivity);
#line 1091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->straighten_button;
#line 1091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), sensitivity);
#line 1092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = self->priv->redeye_button;
#line 1092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), sensitivity);
#line 1093 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = self->priv->adjust_button;
#line 1093 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), sensitivity);
#line 1094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->enhance_button;
#line 1094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), sensitivity);
#line 1095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = self->priv->zoom_slider;
#line 1095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), sensitivity);
#line 1097 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp8_, 0, 0);
#line 1097 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp8_, FALSE);
#line 7892 "PhotoPage.c"
}


void editing_host_page_update_ui (EditingHostPage* self, gboolean missing) {
#line 1086 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1086 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_GET_CLASS (self)->update_ui (self, missing);
#line 7901 "PhotoPage.c"
}


static void editing_host_page_real_notify_photo_backing_missing (EditingHostPage* self, Photo* photo, gboolean missing) {
#line 1101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 7908 "PhotoPage.c"
}


void editing_host_page_notify_photo_backing_missing (EditingHostPage* self, Photo* photo, gboolean missing) {
#line 1101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_GET_CLASS (self)->notify_photo_backing_missing (self, photo, missing);
#line 7917 "PhotoPage.c"
}


static void editing_host_page_draw_message (EditingHostPage* self, const gchar* message) {
	PangoLayout* pango_layout = NULL;
	const gchar* _tmp0_ = NULL;
	PangoLayout* _tmp1_ = NULL;
	gint text_width = 0;
	gint text_height = 0;
	PangoLayout* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GtkAllocation allocation = {0};
	GtkAllocation _tmp5_ = {0};
	gint x = 0;
	GtkAllocation _tmp6_ = {0};
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	gint y = 0;
	GtkAllocation _tmp12_ = {0};
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	PangoLayout* _tmp18_ = NULL;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
#line 1104 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1104 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (message != NULL);
#line 1106 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = message;
#line 1106 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = gtk_widget_create_pango_layout (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp0_);
#line 1106 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pango_layout = _tmp1_;
#line 1108 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = pango_layout;
#line 1108 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pango_layout_get_pixel_size (_tmp2_, &_tmp3_, &_tmp4_);
#line 1108 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	text_width = _tmp3_;
#line 1108 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	text_height = _tmp4_;
#line 1111 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_get_allocation (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), &_tmp5_);
#line 1111 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	allocation = _tmp5_;
#line 1113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = allocation;
#line 1113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_.width;
#line 1113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = text_width;
#line 1113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	x = _tmp7_ - _tmp8_;
#line 1114 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = x;
#line 1114 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp10_ > 0) {
#line 7981 "PhotoPage.c"
		gint _tmp11_ = 0;
#line 1114 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = x;
#line 1114 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = _tmp11_ / 2;
#line 7987 "PhotoPage.c"
	} else {
#line 1114 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = 0;
#line 7991 "PhotoPage.c"
	}
#line 1114 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	x = _tmp9_;
#line 1116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = allocation;
#line 1116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = _tmp12_.height;
#line 1116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = text_height;
#line 1116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	y = _tmp13_ - _tmp14_;
#line 1117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = y;
#line 1117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp16_ > 0) {
#line 8007 "PhotoPage.c"
		gint _tmp17_ = 0;
#line 1117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = y;
#line 1117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = _tmp17_ / 2;
#line 8013 "PhotoPage.c"
	} else {
#line 1117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = 0;
#line 8017 "PhotoPage.c"
	}
#line 1117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	y = _tmp15_;
#line 1119 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = pango_layout;
#line 1119 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = x;
#line 1119 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = y;
#line 1119 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_paint_text (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp18_, _tmp19_, _tmp20_);
#line 1104 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (pango_layout);
#line 8031 "PhotoPage.c"
}


void editing_host_page_set_photo_missing (EditingHostPage* self, gboolean missing) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	Photo* photo = NULL;
	Photo* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	GError * _inner_error_ = NULL;
#line 1123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->photo_missing;
#line 1124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = missing;
#line 1124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == _tmp1_) {
#line 1125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 8055 "PhotoPage.c"
	}
#line 1127 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = missing;
#line 1127 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->photo_missing = _tmp2_;
#line 1129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_get_photo (self);
#line 1129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = _tmp3_;
#line 1130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = photo;
#line 1130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_ == NULL) {
#line 1131 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (photo);
#line 1131 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 8073 "PhotoPage.c"
	}
#line 1133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = missing;
#line 1133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_update_ui (self, _tmp5_);
#line 1135 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->photo_missing;
#line 1135 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_) {
#line 8083 "PhotoPage.c"
		{
			GdkPixbuf* pixbuf = NULL;
			Photo* _tmp7_ = NULL;
			Scaling _tmp8_ = {0};
			GdkPixbuf* _tmp9_ = NULL;
			GdkPixbuf* _tmp10_ = NULL;
			GdkPixbuf* _tmp11_ = NULL;
			gint _tmp12_ = 0;
			GdkPixbuf* _tmp13_ = NULL;
			gint _tmp14_ = 0;
			GdkPixbuf* _tmp15_ = NULL;
			GdkPixbuf* _tmp16_ = NULL;
			Photo* _tmp17_ = NULL;
			Dimensions _tmp18_ = {0};
#line 1137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp7_ = photo;
#line 1137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp8_);
#line 1137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = media_source_get_preview_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource), &_tmp8_, &_inner_error_);
#line 1137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			pixbuf = _tmp9_;
#line 1137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 8108 "PhotoPage.c"
				goto __catch245_g_error;
			}
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp10_ = pixbuf;
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp11_ = pixbuf;
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp12_ = gdk_pixbuf_get_width (_tmp11_);
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp13_ = pixbuf;
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp14_ = gdk_pixbuf_get_height (_tmp13_);
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp15_ = gdk_pixbuf_composite_color_simple (_tmp10_, _tmp12_, _tmp14_, GDK_INTERP_NEAREST, 100, 2, (guint32) 0, (guint32) 0);
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (pixbuf);
#line 1139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			pixbuf = _tmp15_;
#line 1142 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp16_ = pixbuf;
#line 1142 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp17_ = photo;
#line 1142 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp18_);
#line 1142 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp16_, &_tmp18_, NULL);
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (pixbuf);
#line 8137 "PhotoPage.c"
		}
		goto __finally245;
		__catch245_g_error:
		{
			GError* err = NULL;
			GdkPixbuf* _tmp19_ = NULL;
			GdkPixbuf* _tmp20_ = NULL;
			Photo* _tmp21_ = NULL;
			Dimensions _tmp22_ = {0};
			GError* _tmp23_ = NULL;
			const gchar* _tmp24_ = NULL;
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			err = _inner_error_;
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_inner_error_ = NULL;
#line 1144 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp19_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 1, 1);
#line 1144 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp20_ = _tmp19_;
#line 1144 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp21_ = photo;
#line 1144 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp22_);
#line 1144 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp20_, &_tmp22_, NULL);
#line 1144 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp20_);
#line 1145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp23_ = err;
#line 1145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp24_ = _tmp23_->message;
#line 1145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			g_warning ("PhotoPage.vala:1145: %s", _tmp24_);
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_error_free0 (err);
#line 8173 "PhotoPage.c"
		}
		__finally245:
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (photo);
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.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 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			g_clear_error (&_inner_error_);
#line 1136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return;
#line 8186 "PhotoPage.c"
		}
	}
#line 1123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 8191 "PhotoPage.c"
}


gboolean editing_host_page_get_photo_missing (EditingHostPage* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 1150 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1151 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->photo_missing;
#line 1151 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp0_;
#line 1151 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 8206 "PhotoPage.c"
}


static gboolean editing_host_page_real_confirm_replace_photo (EditingHostPage* self, Photo* old_photo, Photo* new_photo) {
	gboolean result = FALSE;
#line 1154 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail ((old_photo == NULL) || IS_PHOTO (old_photo), FALSE);
#line 1154 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (new_photo), FALSE);
#line 1155 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 1155 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 8220 "PhotoPage.c"
}


gboolean editing_host_page_confirm_replace_photo (EditingHostPage* self, Photo* old_photo, Photo* new_photo) {
#line 1154 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1154 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->confirm_replace_photo (self, old_photo, new_photo);
#line 8229 "PhotoPage.c"
}


static GdkPixbuf* editing_host_page_get_zoom_pixbuf (EditingHostPage* self, Photo* new_photo) {
	GdkPixbuf* result = NULL;
	GdkPixbuf* pixbuf = NULL;
	PixbufCache* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	GdkPixbuf* _tmp2_ = NULL;
	GdkPixbuf* _tmp3_ = NULL;
	GdkPixbuf* _tmp11_ = NULL;
	GError * _inner_error_ = NULL;
#line 1158 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 1158 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (new_photo), NULL);
#line 1159 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->cache;
#line 1159 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = new_photo;
#line 1159 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = pixbuf_cache_get_ready_pixbuf (_tmp0_, _tmp1_);
#line 1159 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pixbuf = _tmp2_;
#line 1160 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = pixbuf;
#line 1160 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ == NULL) {
#line 8258 "PhotoPage.c"
		{
			GdkPixbuf* _tmp4_ = NULL;
			Photo* _tmp5_ = NULL;
			Scaling _tmp6_ = {0};
			GdkPixbuf* _tmp7_ = NULL;
			GdkPixbuf* _tmp8_ = NULL;
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp5_ = new_photo;
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp6_);
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp7_ = media_source_get_preview_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource), &_tmp6_, &_inner_error_);
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp4_ = _tmp7_;
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 8275 "PhotoPage.c"
				goto __catch246_g_error;
			}
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp8_ = _tmp4_;
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp4_ = NULL;
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (pixbuf);
#line 1162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			pixbuf = _tmp8_;
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp4_);
#line 8288 "PhotoPage.c"
		}
		goto __finally246;
		__catch246_g_error:
		{
			GError* err = NULL;
			GError* _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			err = _inner_error_;
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_inner_error_ = NULL;
#line 1164 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = err;
#line 1164 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp10_ = _tmp9_->message;
#line 1164 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			g_warning ("PhotoPage.vala:1164: %s", _tmp10_);
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_error_free0 (err);
#line 8308 "PhotoPage.c"
		}
		__finally246:
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (pixbuf);
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.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 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			g_clear_error (&_inner_error_);
#line 1161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return NULL;
#line 8321 "PhotoPage.c"
		}
	}
#line 1167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = pixbuf;
#line 1167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp11_ == NULL) {
#line 8328 "PhotoPage.c"
		GdkPixbuf* _tmp12_ = NULL;
		Scaling _tmp13_ = {0};
		GdkPixbuf* _tmp14_ = NULL;
		GdkPixbuf* _tmp15_ = NULL;
		GdkPixbuf* _tmp16_ = NULL;
#line 1168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = get_placeholder_pixbuf ();
#line 1168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (pixbuf);
#line 1168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		pixbuf = _tmp12_;
#line 1169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp13_);
#line 1169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = pixbuf;
#line 1169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = scaling_perform_on_pixbuf (&_tmp13_, _tmp14_, GDK_INTERP_NEAREST, TRUE);
#line 1169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_;
#line 1169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp16_);
#line 8350 "PhotoPage.c"
	}
#line 1171 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = pixbuf;
#line 1171 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 8356 "PhotoPage.c"
}


static void editing_host_page_replace_photo (EditingHostPage* self, Photo* new_photo) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	Dimensions _tmp26_ = {0};
	Photo* old_photo = NULL;
	Photo* _tmp27_ = NULL;
	Photo* _tmp28_ = NULL;
	Photo* _tmp29_ = NULL;
	gchar* _tmp30_ = NULL;
	gchar* _tmp31_ = NULL;
	Photo* _tmp32_ = NULL;
	GFile* _tmp33_ = NULL;
	GFile* _tmp34_ = NULL;
	gboolean _tmp35_ = FALSE;
	Photo* _tmp36_ = NULL;
	Photo* _tmp43_ = NULL;
	Photo* _tmp44_ = NULL;
	GdkPixbuf* _tmp45_ = NULL;
	GdkPixbuf* _tmp46_ = NULL;
	ZoomBuffer* _tmp47_ = NULL;
#line 1174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (new_photo));
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = new_photo;
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_get_photo (self);
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource));
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp4_);
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_) {
#line 8406 "PhotoPage.c"
		gboolean _tmp7_ = FALSE;
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = self->priv->pixbuf_dirty;
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = !_tmp7_;
#line 8412 "PhotoPage.c"
	} else {
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = FALSE;
#line 8416 "PhotoPage.c"
	}
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 8420 "PhotoPage.c"
		gboolean _tmp8_ = FALSE;
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = self->priv->photo_missing;
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp8_;
#line 8426 "PhotoPage.c"
	} else {
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 8430 "PhotoPage.c"
	}
#line 1179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 8434 "PhotoPage.c"
		Photo* _tmp9_ = NULL;
		Photo* _tmp10_ = NULL;
		GdkPixbuf* _tmp11_ = NULL;
		GdkPixbuf* _tmp12_ = NULL;
		ZoomBuffer* _tmp13_ = NULL;
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = new_photo;
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = new_photo;
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = editing_host_page_get_zoom_pixbuf (self, _tmp10_);
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = zoom_buffer_new (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp9_, _tmp12_);
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (self->priv->zoom_buffer);
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->zoom_buffer = _tmp13_;
#line 1180 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp12_);
#line 1181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 8458 "PhotoPage.c"
	}
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = editing_host_page_has_photo (self);
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp16_) {
#line 8464 "PhotoPage.c"
		Photo* _tmp17_ = NULL;
		Photo* _tmp18_ = NULL;
		Photo* _tmp19_ = NULL;
		gboolean _tmp20_ = FALSE;
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = new_photo;
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = editing_host_page_get_photo (self);
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_;
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_DATA_SOURCE, DataSource));
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = !_tmp20_;
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp19_);
#line 8481 "PhotoPage.c"
	} else {
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = FALSE;
#line 8485 "PhotoPage.c"
	}
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp15_) {
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = editing_host_page_confirm_replace_photo != NULL;
#line 8491 "PhotoPage.c"
	} else {
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = FALSE;
#line 8495 "PhotoPage.c"
	}
#line 1185 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp14_) {
#line 8499 "PhotoPage.c"
		Photo* _tmp21_ = NULL;
		Photo* _tmp22_ = NULL;
		Photo* _tmp23_ = NULL;
		gboolean _tmp24_ = FALSE;
		gboolean _tmp25_ = FALSE;
#line 1186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = editing_host_page_get_photo (self);
#line 1186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = _tmp21_;
#line 1186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = new_photo;
#line 1186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = editing_host_page_confirm_replace_photo (self, _tmp22_, _tmp23_);
#line 1186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp25_ = !_tmp24_;
#line 1186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp22_);
#line 1186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp25_) {
#line 1187 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return;
#line 8521 "PhotoPage.c"
		}
	}
#line 1190 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp26_, 0, 0);
#line 1190 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp26_, FALSE);
#line 1193 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = editing_host_page_get_photo (self);
#line 1193 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	old_photo = _tmp27_;
#line 1194 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = new_photo;
#line 1194 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_set_photo (self, _tmp28_);
#line 1195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = new_photo;
#line 1195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp30_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_OBJECT, DataObject));
#line 1195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp31_ = _tmp30_;
#line 1195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_page_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), _tmp31_);
#line 1195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp31_);
#line 1198 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->swapped);
#line 1198 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->swapped = NULL;
#line 1201 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp32_ = new_photo;
#line 1201 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp33_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1201 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp34_ = _tmp33_;
#line 1201 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp35_ = g_file_query_exists (_tmp34_, NULL);
#line 1201 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_set_photo_missing (self, !_tmp35_);
#line 1201 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp34_);
#line 1202 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->pixbuf_dirty = TRUE;
#line 1206 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rebuild_caches (self, "replace_photo");
#line 1208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp36_ = old_photo;
#line 1208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp36_ != NULL) {
#line 8570 "PhotoPage.c"
		ViewCollection* _tmp37_ = NULL;
		ViewCollection* _tmp38_ = NULL;
		Photo* _tmp39_ = NULL;
		ViewCollection* _tmp40_ = NULL;
		ViewCollection* _tmp41_ = NULL;
		Photo* _tmp42_ = NULL;
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp37_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp38_ = _tmp37_;
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp39_ = old_photo;
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp40_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp41_ = _tmp40_;
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp42_ = new_photo;
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_cancel_prefetch_neighbors (self, _tmp38_, _tmp39_, _tmp41_, _tmp42_);
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp41_);
#line 1209 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp38_);
#line 8595 "PhotoPage.c"
	}
#line 1211 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp43_ = new_photo;
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp44_ = new_photo;
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp45_ = editing_host_page_get_zoom_pixbuf (self, _tmp44_);
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp46_ = _tmp45_;
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp47_ = zoom_buffer_new (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp43_, _tmp46_);
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->zoom_buffer);
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->zoom_buffer = _tmp47_;
#line 1213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp46_);
#line 1215 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_quick_update_pixbuf (self);
#line 1218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_refresh_caches (self, "replace_photo");
#line 1174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (old_photo);
#line 8621 "PhotoPage.c"
}


static void editing_host_page_real_cancel_zoom (SinglePhotoPage* base) {
	EditingHostPage * self;
	GtkScale* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	GtkScale* _tmp2_ = NULL;
	GtkScale* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	Photo* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp12_ = FALSE;
	GtkDrawingArea* _tmp13_ = NULL;
#line 1221 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	SINGLE_PHOTO_PAGE_CLASS (editing_host_page_parent_class)->cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1224 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->zoom_slider;
#line 1224 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("value-changed", gtk_range_get_type (), &_tmp1_, NULL, FALSE);
#line 1224 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_range_get_type (), GtkRange), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self);
#line 1225 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->zoom_slider;
#line 1225 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_range_set_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_range_get_type (), GtkRange), 0.0);
#line 1226 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->zoom_slider;
#line 1226 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_range_get_type (), GtkRange), "value-changed", (GCallback) _editing_host_page_on_zoom_slider_value_changed_gtk_range_value_changed, self, 0);
#line 1228 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = editing_host_page_get_photo (self);
#line 1228 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 1228 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_ != NULL;
#line 1228 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp5_);
#line 1228 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_) {
#line 8664 "PhotoPage.c"
		Photo* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		Dimensions _tmp9_ = {0};
		Dimensions _tmp10_ = {0};
		ZoomState _tmp11_ = {0};
#line 1229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo (self);
#line 1229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 1229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp9_);
#line 1229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_surface_dim (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp10_);
#line 1229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		zoom_state_init (&_tmp11_, &_tmp9_, &_tmp10_, 0.0, NULL);
#line 1229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp11_);
#line 1229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 8684 "PhotoPage.c"
	}
#line 1235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)->canvas;
#line 1235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp13_ != NULL) {
#line 8690 "PhotoPage.c"
		GtkDrawingArea* _tmp14_ = NULL;
		GdkWindow* _tmp15_ = NULL;
#line 1235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)->canvas;
#line 1235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget));
#line 1235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp15_ != NULL;
#line 8699 "PhotoPage.c"
	} else {
#line 1235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = FALSE;
#line 8703 "PhotoPage.c"
	}
#line 1235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp12_) {
#line 1236 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_set_page_cursor (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), GDK_LEFT_PTR);
#line 8709 "PhotoPage.c"
	}
#line 1238 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 8713 "PhotoPage.c"
}


static void editing_host_page_quick_update_pixbuf (EditingHostPage* self) {
	GdkPixbuf* pixbuf = NULL;
	PixbufCache* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	Photo* _tmp2_ = NULL;
	GdkPixbuf* _tmp3_ = NULL;
	GdkPixbuf* _tmp4_ = NULL;
	GdkPixbuf* _tmp5_ = NULL;
	Scaling scaling = {0};
	Scaling _tmp10_ = {0};
	Photo* _tmp11_ = NULL;
	Photo* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	PixbufCache* _tmp28_ = NULL;
	Photo* _tmp29_ = NULL;
	Photo* _tmp30_ = NULL;
	GError * _inner_error_ = NULL;
#line 1241 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->cache;
#line 1242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_get_photo (self);
#line 1242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 1242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = pixbuf_cache_get_ready_pixbuf (_tmp0_, _tmp2_);
#line 1242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 1242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 1242 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pixbuf = _tmp4_;
#line 1243 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = pixbuf;
#line 1243 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_ != NULL) {
#line 8757 "PhotoPage.c"
		GdkPixbuf* _tmp6_ = NULL;
		Photo* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		Dimensions _tmp9_ = {0};
#line 1244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = pixbuf;
#line 1244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo (self);
#line 1244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 1244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp9_);
#line 1244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp6_, &_tmp9_, NULL);
#line 1244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 1245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->pixbuf_dirty = FALSE;
#line 1247 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (pixbuf);
#line 1247 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 8780 "PhotoPage.c"
	}
#line 1250 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp10_);
#line 1250 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scaling = _tmp10_;
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = editing_host_page_get_photo (self);
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_OBJECT, DataObject));
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = _tmp13_;
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = scaling_to_string (&scaling);
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = _tmp15_;
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_debug ("PhotoPage.vala:1252: Using progressive load for %s (%s)", _tmp14_, _tmp16_);
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp16_);
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp14_);
#line 1252 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp12_);
#line 8806 "PhotoPage.c"
	{
		GdkPixbuf* _tmp17_ = NULL;
		Photo* _tmp18_ = NULL;
		Photo* _tmp19_ = NULL;
		Scaling _tmp20_ = {0};
		GdkPixbuf* _tmp21_ = NULL;
		GdkPixbuf* _tmp22_ = NULL;
		Photo* _tmp23_ = NULL;
		Photo* _tmp24_ = NULL;
		Dimensions _tmp25_ = {0};
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = editing_host_page_get_photo (self);
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_;
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = scaling;
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = media_source_get_preview_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_MEDIA_SOURCE, MediaSource), &_tmp20_, &_inner_error_);
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = _tmp21_;
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp19_);
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = _tmp22_;
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 8833 "PhotoPage.c"
			goto __catch247_g_error;
		}
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = editing_host_page_get_photo (self);
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = _tmp23_;
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp25_);
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp17_, &_tmp25_, NULL);
#line 1257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp24_);
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp17_);
#line 8848 "PhotoPage.c"
	}
	goto __finally247;
	__catch247_g_error:
	{
		GError* err = NULL;
		GError* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		err = _inner_error_;
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 1259 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = err;
#line 1259 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp27_ = _tmp26_->message;
#line 1259 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_warning ("PhotoPage.vala:1259: %s", _tmp27_);
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (err);
#line 8868 "PhotoPage.c"
	}
	__finally247:
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (pixbuf);
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.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 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 1256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 8881 "PhotoPage.c"
	}
#line 1262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = self->priv->cache;
#line 1262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = editing_host_page_get_photo (self);
#line 1262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp30_ = _tmp29_;
#line 1262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pixbuf_cache_prefetch (_tmp28_, _tmp30_, BACKGROUND_JOB_JOB_PRIORITY_HIGHEST, FALSE);
#line 1262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp30_);
#line 1266 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->pixbuf_dirty = FALSE;
#line 1241 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (pixbuf);
#line 8897 "PhotoPage.c"
}


static gboolean editing_host_page_update_pixbuf (EditingHostPage* self) {
	gboolean result = FALSE;
	Photo* photo = NULL;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	GdkPixbuf* pixbuf = NULL;
	Dimensions max_dim = {0};
	Photo* _tmp2_ = NULL;
	Dimensions _tmp3_ = {0};
	gboolean _tmp18_ = FALSE;
	gboolean _tmp26_ = FALSE;
	gboolean _tmp27_ = FALSE;
	GError * _inner_error_ = NULL;
#line 1269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1274 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (self);
#line 1274 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = _tmp0_;
#line 1275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = photo;
#line 1275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ == NULL) {
#line 1276 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = FALSE;
#line 1276 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (photo);
#line 1276 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 8930 "PhotoPage.c"
	}
#line 1278 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pixbuf = NULL;
#line 1279 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = photo;
#line 1279 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp3_);
#line 1279 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	max_dim = _tmp3_;
#line 8940 "PhotoPage.c"
	{
		Dimensions tool_pixbuf_dim = {0};
		Dimensions _tmp4_ = {0};
		EditingToolsEditingTool* _tmp5_ = NULL;
		GdkPixbuf* _tmp13_ = NULL;
#line 1282 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_.width = 0;
#line 1282 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		tool_pixbuf_dim = _tmp4_;
#line 1283 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = self->priv->current_tool;
#line 1283 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp5_ != NULL) {
#line 8954 "PhotoPage.c"
			GdkPixbuf* _tmp6_ = NULL;
			EditingToolsEditingTool* _tmp7_ = NULL;
			Scaling _tmp8_ = {0};
			Photo* _tmp9_ = NULL;
			Dimensions _tmp10_ = {0};
			GdkPixbuf* _tmp11_ = NULL;
			GdkPixbuf* _tmp12_ = NULL;
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp7_ = self->priv->current_tool;
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp8_);
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = photo;
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp11_ = editing_tools_editing_tool_get_display_pixbuf (_tmp7_, &_tmp8_, _tmp9_, &_tmp10_, &_inner_error_);
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			tool_pixbuf_dim = _tmp10_;
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = _tmp11_;
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 8976 "PhotoPage.c"
				goto __catch248_g_error;
			}
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp12_ = _tmp6_;
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = NULL;
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (pixbuf);
#line 1284 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			pixbuf = _tmp12_;
#line 1283 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp6_);
#line 8989 "PhotoPage.c"
		}
#line 1286 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = pixbuf;
#line 1286 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp13_ != NULL) {
#line 8995 "PhotoPage.c"
			Dimensions _tmp14_ = {0};
#line 1287 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp14_ = tool_pixbuf_dim;
#line 1287 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			max_dim = _tmp14_;
#line 9001 "PhotoPage.c"
		}
	}
	goto __finally248;
	__catch248_g_error:
	{
		GError* err = NULL;
		GError* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		err = _inner_error_;
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 1289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = err;
#line 1289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_->message;
#line 1289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_warning ("PhotoPage.vala:1289: %s", _tmp16_);
#line 1290 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_set_photo_missing (self, TRUE);
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (err);
#line 9024 "PhotoPage.c"
	}
	__finally248:
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 9029 "PhotoPage.c"
		gboolean _tmp17_ = FALSE;
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (pixbuf);
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (photo);
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.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 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 1281 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return _tmp17_;
#line 9041 "PhotoPage.c"
	}
#line 1293 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = self->priv->photo_missing;
#line 1293 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp18_) {
#line 9047 "PhotoPage.c"
		GdkPixbuf* _tmp19_ = NULL;
		GdkPixbuf* _tmp23_ = NULL;
#line 1295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = pixbuf;
#line 1295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp19_ == NULL) {
#line 9054 "PhotoPage.c"
			PixbufCache* _tmp20_ = NULL;
			Photo* _tmp21_ = NULL;
			GdkPixbuf* _tmp22_ = NULL;
#line 1296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp20_ = self->priv->cache;
#line 1296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp21_ = photo;
#line 1296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp22_ = pixbuf_cache_get_ready_pixbuf (_tmp20_, _tmp21_);
#line 1296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (pixbuf);
#line 1296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			pixbuf = _tmp22_;
#line 9068 "PhotoPage.c"
		}
#line 1299 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = pixbuf;
#line 1299 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp23_ == NULL) {
#line 9074 "PhotoPage.c"
			PixbufCache* _tmp24_ = NULL;
			Photo* _tmp25_ = NULL;
#line 1300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp24_ = self->priv->cache;
#line 1300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp25_ = photo;
#line 1300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			pixbuf_cache_prefetch (_tmp24_, _tmp25_, BACKGROUND_JOB_JOB_PRIORITY_NORMAL, FALSE);
#line 9083 "PhotoPage.c"
		}
	}
#line 1303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = self->priv->photo_missing;
#line 1303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp27_) {
#line 9090 "PhotoPage.c"
		GdkPixbuf* _tmp28_ = NULL;
#line 1303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp28_ = pixbuf;
#line 1303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = _tmp28_ != NULL;
#line 9096 "PhotoPage.c"
	} else {
#line 1303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = FALSE;
#line 9100 "PhotoPage.c"
	}
#line 1303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp26_) {
#line 9104 "PhotoPage.c"
		GdkPixbuf* _tmp29_ = NULL;
		Dimensions _tmp30_ = {0};
#line 1304 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp29_ = pixbuf;
#line 1304 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = max_dim;
#line 1304 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp29_, &_tmp30_, NULL);
#line 1305 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->pixbuf_dirty = FALSE;
#line 9115 "PhotoPage.c"
	}
#line 1312 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 1312 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (pixbuf);
#line 1312 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 1312 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 9125 "PhotoPage.c"
}


static void editing_host_page_real_on_resize (Page* base, GdkRectangle* rect) {
	EditingHostPage * self;
	GdkRectangle _tmp0_ = {0};
#line 1315 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1315 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (rect != NULL);
#line 1316 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = *rect;
#line 1316 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->on_resize (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), &_tmp0_);
#line 1318 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_track_tool_window (self);
#line 9142 "PhotoPage.c"
}


static void editing_host_page_real_on_resize_finished (Page* base, GdkRectangle* rect) {
	EditingHostPage * self;
#line 1321 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1321 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (rect != NULL);
#line 1325 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rebuild_caches (self, "on_resize_finished");
#line 1326 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->pixbuf_dirty = TRUE;
#line 1328 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_update_pixbuf (self);
#line 9158 "PhotoPage.c"
}


static void editing_host_page_on_viewport_resized (EditingHostPage* self) {
#line 1331 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rebuild_caches (self, "on_viewport_resized");
#line 1335 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->pixbuf_dirty = TRUE;
#line 1337 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_update_pixbuf (self);
#line 9171 "PhotoPage.c"
}


static void editing_host_page_real_update_actions (Page* base, gint selected_count, gint count) {
	EditingHostPage * self;
	gboolean multiple_photos = FALSE;
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
	GtkToolButton* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	GtkToolButton* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	Photo* photo = NULL;
	Photo* _tmp8_ = NULL;
	Scaling scaling = {0};
	Scaling _tmp9_ = {0};
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	Photo* _tmp13_ = NULL;
	GtkToolButton* _tmp19_ = NULL;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp21_ = FALSE;
	Photo* _tmp22_ = NULL;
	GtkToggleToolButton* _tmp27_ = NULL;
	gboolean _tmp28_ = FALSE;
	gboolean _tmp29_ = FALSE;
	Photo* _tmp30_ = NULL;
	GtkToggleToolButton* _tmp35_ = NULL;
	gboolean _tmp36_ = FALSE;
	gboolean _tmp37_ = FALSE;
	Photo* _tmp38_ = NULL;
	GtkToggleToolButton* _tmp43_ = NULL;
	gboolean _tmp44_ = FALSE;
	gboolean _tmp45_ = FALSE;
	Photo* _tmp46_ = NULL;
	GtkToolButton* _tmp50_ = NULL;
	gboolean _tmp51_ = FALSE;
	gboolean _tmp52_ = FALSE;
	Photo* _tmp53_ = NULL;
	GtkToggleToolButton* _tmp58_ = NULL;
	gint _tmp59_ = 0;
	gint _tmp60_ = 0;
#line 1340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1341 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1341 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 1341 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_sources_of_type_count (_tmp1_, TYPE_PHOTO);
#line 1341 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_ > 1;
#line 1341 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 1341 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	multiple_photos = _tmp3_;
#line 1343 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = self->priv->prev_button;
#line 1343 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = multiple_photos;
#line 1343 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), _tmp5_);
#line 1344 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->next_button;
#line 1344 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = multiple_photos;
#line 1344 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), _tmp7_);
#line 1346 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = editing_host_page_get_photo (self);
#line 1346 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = _tmp8_;
#line 1347 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp9_);
#line 1347 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scaling = _tmp9_;
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = photo;
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp13_ != NULL) {
#line 9255 "PhotoPage.c"
		gboolean _tmp14_ = FALSE;
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = self->priv->photo_missing;
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = !_tmp14_;
#line 9261 "PhotoPage.c"
	} else {
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = FALSE;
#line 9265 "PhotoPage.c"
	}
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp12_) {
#line 9269 "PhotoPage.c"
		Photo* _tmp15_ = NULL;
		gboolean _tmp16_ = FALSE;
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = photo;
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = photo_check_can_rotate (_tmp15_);
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = _tmp16_;
#line 9278 "PhotoPage.c"
	} else {
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = FALSE;
#line 9282 "PhotoPage.c"
	}
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp11_) {
#line 9286 "PhotoPage.c"
		Photo* _tmp17_ = NULL;
		gboolean _tmp18_ = FALSE;
#line 1350 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = photo;
#line 1350 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = editing_host_page_is_rotate_available (self, _tmp17_);
#line 1350 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = _tmp18_;
#line 9295 "PhotoPage.c"
	} else {
#line 1350 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = FALSE;
#line 9299 "PhotoPage.c"
	}
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = self->priv->rotate_button;
#line 1349 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), _tmp10_);
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = photo;
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp22_ != NULL) {
#line 9309 "PhotoPage.c"
		gboolean _tmp23_ = FALSE;
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = self->priv->photo_missing;
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = !_tmp23_;
#line 9315 "PhotoPage.c"
	} else {
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = FALSE;
#line 9319 "PhotoPage.c"
	}
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp21_) {
#line 9323 "PhotoPage.c"
		Photo* _tmp24_ = NULL;
		Scaling _tmp25_ = {0};
		gboolean _tmp26_ = FALSE;
#line 1352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = photo;
#line 1352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp25_ = scaling;
#line 1352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = editing_tools_crop_tool_is_available (_tmp24_, &_tmp25_);
#line 1352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = _tmp26_;
#line 9335 "PhotoPage.c"
	} else {
#line 1352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = FALSE;
#line 9339 "PhotoPage.c"
	}
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = self->priv->crop_button;
#line 1351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_widget_get_type (), GtkWidget), _tmp20_);
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp30_ = photo;
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp30_ != NULL) {
#line 9349 "PhotoPage.c"
		gboolean _tmp31_ = FALSE;
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = self->priv->photo_missing;
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp29_ = !_tmp31_;
#line 9355 "PhotoPage.c"
	} else {
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp29_ = FALSE;
#line 9359 "PhotoPage.c"
	}
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp29_) {
#line 9363 "PhotoPage.c"
		Photo* _tmp32_ = NULL;
		Scaling _tmp33_ = {0};
		gboolean _tmp34_ = FALSE;
#line 1354 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = photo;
#line 1354 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp33_ = scaling;
#line 1354 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp34_ = editing_tools_redeye_tool_is_available (_tmp32_, &_tmp33_);
#line 1354 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp28_ = _tmp34_;
#line 9375 "PhotoPage.c"
	} else {
#line 1354 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp28_ = FALSE;
#line 9379 "PhotoPage.c"
	}
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp35_ = self->priv->redeye_button;
#line 1353 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_widget_get_type (), GtkWidget), _tmp28_);
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp38_ = photo;
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp38_ != NULL) {
#line 9389 "PhotoPage.c"
		gboolean _tmp39_ = FALSE;
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp39_ = self->priv->photo_missing;
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp37_ = !_tmp39_;
#line 9395 "PhotoPage.c"
	} else {
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp37_ = FALSE;
#line 9399 "PhotoPage.c"
	}
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp37_) {
#line 9403 "PhotoPage.c"
		Photo* _tmp40_ = NULL;
		Scaling _tmp41_ = {0};
		gboolean _tmp42_ = FALSE;
#line 1356 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp40_ = photo;
#line 1356 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp41_ = scaling;
#line 1356 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp42_ = editing_tools_adjust_tool_is_available (_tmp40_, &_tmp41_);
#line 1356 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp36_ = _tmp42_;
#line 9415 "PhotoPage.c"
	} else {
#line 1356 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp36_ = FALSE;
#line 9419 "PhotoPage.c"
	}
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp43_ = self->priv->adjust_button;
#line 1355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_widget_get_type (), GtkWidget), _tmp36_);
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp46_ = photo;
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp46_ != NULL) {
#line 9429 "PhotoPage.c"
		gboolean _tmp47_ = FALSE;
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp47_ = self->priv->photo_missing;
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp45_ = !_tmp47_;
#line 9435 "PhotoPage.c"
	} else {
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp45_ = FALSE;
#line 9439 "PhotoPage.c"
	}
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp45_) {
#line 9443 "PhotoPage.c"
		Photo* _tmp48_ = NULL;
		gboolean _tmp49_ = FALSE;
#line 1358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp48_ = photo;
#line 1358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp49_ = editing_host_page_is_enhance_available (self, _tmp48_);
#line 1358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp44_ = _tmp49_;
#line 9452 "PhotoPage.c"
	} else {
#line 1358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp44_ = FALSE;
#line 9456 "PhotoPage.c"
	}
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp50_ = self->priv->enhance_button;
#line 1357 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, gtk_widget_get_type (), GtkWidget), _tmp44_);
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp53_ = photo;
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp53_ != NULL) {
#line 9466 "PhotoPage.c"
		gboolean _tmp54_ = FALSE;
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp54_ = self->priv->photo_missing;
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp52_ = !_tmp54_;
#line 9472 "PhotoPage.c"
	} else {
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp52_ = FALSE;
#line 9476 "PhotoPage.c"
	}
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp52_) {
#line 9480 "PhotoPage.c"
		Photo* _tmp55_ = NULL;
		Scaling _tmp56_ = {0};
		gboolean _tmp57_ = FALSE;
#line 1360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp55_ = photo;
#line 1360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp56_ = scaling;
#line 1360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp57_ = editing_tools_straighten_tool_is_available (_tmp55_, &_tmp56_);
#line 1360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp51_ = _tmp57_;
#line 9492 "PhotoPage.c"
	} else {
#line 1360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp51_ = FALSE;
#line 9496 "PhotoPage.c"
	}
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp58_ = self->priv->straighten_button;
#line 1359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, gtk_widget_get_type (), GtkWidget), _tmp51_);
#line 1362 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp59_ = selected_count;
#line 1362 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp60_ = count;
#line 1362 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->update_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp59_, _tmp60_);
#line 1340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 9510 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_shift_pressed (Page* base, GdkEventKey* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	EditingToolsEditingTool* _tmp3_ = NULL;
	GdkEventKey* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
#line 1365 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->current_tool;
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ == NULL) {
#line 9529 "PhotoPage.c"
		gboolean _tmp4_ = FALSE;
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = page_get_ctrl_pressed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = !_tmp4_;
#line 9535 "PhotoPage.c"
	} else {
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = FALSE;
#line 9539 "PhotoPage.c"
	}
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 9543 "PhotoPage.c"
		gboolean _tmp5_ = FALSE;
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = page_get_alt_pressed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = !_tmp5_;
#line 9549 "PhotoPage.c"
	} else {
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = FALSE;
#line 9553 "PhotoPage.c"
	}
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 9557 "PhotoPage.c"
		gboolean _tmp6_ = FALSE;
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = editing_host_page_has_photo (self);
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp6_;
#line 9563 "PhotoPage.c"
	} else {
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 9567 "PhotoPage.c"
	}
#line 1367 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 1368 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_swap_in_original (self);
#line 9573 "PhotoPage.c"
	}
#line 1370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = event;
#line 1370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = PAGE_CLASS (editing_host_page_parent_class)->on_shift_pressed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp7_);
#line 1370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp8_;
#line 1370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 9583 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_shift_released (Page* base, GdkEventKey* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	EditingToolsEditingTool* _tmp0_ = NULL;
	GdkEventKey* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 1373 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == NULL) {
#line 1375 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_swap_out_original (self);
#line 9601 "PhotoPage.c"
	}
#line 1377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = event;
#line 1377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = PAGE_CLASS (editing_host_page_parent_class)->on_shift_released (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp1_);
#line 1377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp2_;
#line 1377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 9611 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_alt_pressed (Page* base, GdkEventKey* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	EditingToolsEditingTool* _tmp0_ = NULL;
	GdkEventKey* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 1380 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1381 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1381 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == NULL) {
#line 1382 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_swap_out_original (self);
#line 9629 "PhotoPage.c"
	}
#line 1384 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = event;
#line 1384 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = PAGE_CLASS (editing_host_page_parent_class)->on_alt_pressed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp1_);
#line 1384 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp2_;
#line 1384 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 9639 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_alt_released (Page* base, GdkEventKey* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	EditingToolsEditingTool* _tmp2_ = NULL;
	GdkEventKey* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
#line 1387 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->current_tool;
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_ == NULL) {
#line 9657 "PhotoPage.c"
		gboolean _tmp3_ = FALSE;
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = page_get_shift_pressed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = _tmp3_;
#line 9663 "PhotoPage.c"
	} else {
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = FALSE;
#line 9667 "PhotoPage.c"
	}
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 9671 "PhotoPage.c"
		gboolean _tmp4_ = FALSE;
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = page_get_ctrl_pressed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp4_;
#line 9677 "PhotoPage.c"
	} else {
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 9681 "PhotoPage.c"
	}
#line 1388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 1389 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_swap_in_original (self);
#line 9687 "PhotoPage.c"
	}
#line 1391 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = event;
#line 1391 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = PAGE_CLASS (editing_host_page_parent_class)->on_alt_released (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp5_);
#line 1391 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp6_;
#line 1391 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 9697 "PhotoPage.c"
}


static void editing_host_page_swap_in_original (EditingHostPage* self) {
	GdkPixbuf* original = NULL;
	GdkPixbuf* _tmp9_ = NULL;
	GtkScale* _tmp10_ = NULL;
	gdouble _tmp11_ = 0.0;
	GdkPixbuf* _tmp12_ = NULL;
	Photo* _tmp13_ = NULL;
	Photo* _tmp14_ = NULL;
	Dimensions _tmp15_ = {0};
	GError * _inner_error_ = NULL;
#line 1394 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 9713 "PhotoPage.c"
	{
		GdkPixbuf* _tmp0_ = NULL;
		Photo* _tmp1_ = NULL;
		Photo* _tmp2_ = NULL;
		GdkPixbuf* _tmp3_ = NULL;
		GdkPixbuf* _tmp4_ = NULL;
		Photo* _tmp5_ = NULL;
		Photo* _tmp6_ = NULL;
		Orientation _tmp7_ = 0;
		GdkPixbuf* _tmp8_ = NULL;
#line 1398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = editing_host_page_get_photo (self);
#line 1398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = _tmp1_;
#line 1398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = photo_get_prefetched_copy (_tmp2_, &_inner_error_);
#line 1398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 1398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp2_);
#line 1398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp4_;
#line 1398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 9738 "PhotoPage.c"
			goto __catch249_g_error;
		}
#line 1397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = editing_host_page_get_photo (self);
#line 1397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_;
#line 1397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = photo_get_original_orientation (_tmp6_);
#line 1397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = orientation_rotate_pixbuf (_tmp7_, _tmp0_);
#line 1397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (original);
#line 1397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		original = _tmp8_;
#line 1397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp6_);
#line 1396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp0_);
#line 9757 "PhotoPage.c"
	}
	goto __finally249;
	__catch249_g_error:
	{
		GError* err = NULL;
#line 1396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		err = _inner_error_;
#line 1396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 1400 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (err);
#line 1400 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (original);
#line 1400 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 9773 "PhotoPage.c"
	}
	__finally249:
#line 1396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (original);
#line 1396 "/home/jens/Source/shotwell/src/PhotoPage.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 1396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 1396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 9786 "PhotoPage.c"
	}
#line 1404 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = single_photo_page_get_unscaled_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1404 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->swapped);
#line 1404 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->swapped = _tmp9_;
#line 1408 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = self->priv->zoom_slider;
#line 1408 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_range_get_type (), GtkRange));
#line 1408 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp11_ != 0.0) {
#line 1409 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_save_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1410 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 9804 "PhotoPage.c"
	}
#line 1413 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = original;
#line 1413 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = editing_host_page_get_photo (self);
#line 1413 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = _tmp13_;
#line 1413 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo_get_master_dimensions (_tmp14_, &_tmp15_);
#line 1413 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp12_, &_tmp15_, NULL);
#line 1413 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp14_);
#line 1394 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (original);
#line 9820 "PhotoPage.c"
}


static void editing_host_page_swap_out_original (EditingHostPage* self) {
	GdkPixbuf* _tmp0_ = NULL;
#line 1416 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->swapped;
#line 1417 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 9832 "PhotoPage.c"
		GdkPixbuf* _tmp1_ = NULL;
		Photo* _tmp2_ = NULL;
		Photo* _tmp3_ = NULL;
		Dimensions _tmp4_ = {0};
#line 1418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->swapped;
#line 1418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_host_page_get_photo (self);
#line 1418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp2_;
#line 1418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp4_);
#line 1418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp1_, &_tmp4_, NULL);
#line 1418 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp3_);
#line 1420 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_restore_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1421 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_update_cursor_for_zoom_context (self);
#line 1424 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (self->priv->swapped);
#line 1424 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->swapped = NULL;
#line 9857 "PhotoPage.c"
	}
}


static gpointer _editing_tools_editing_tool_ref0 (gpointer self) {
#line 1468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self ? editing_tools_editing_tool_ref (self) : NULL;
#line 9865 "PhotoPage.c"
}


static void editing_host_page_activate_tool (EditingHostPage* self, EditingToolsEditingTool* tool) {
	Dimensions _tmp0_ = {0};
	GdkPixbuf* _tmp1_ = NULL;
	GdkPixbuf* unscaled = NULL;
	Dimensions max_dim = {0};
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	Dimensions _tmp4_ = {0};
	Dimensions _tmp5_ = {0};
	GdkPixbuf* _tmp22_ = NULL;
	EditingToolsPhotoCanvas* photo_canvas = NULL;
	EditingHostPageEditingHostCanvas* _tmp25_ = NULL;
	EditingToolsEditingTool* _tmp26_ = NULL;
	EditingToolsEditingTool* _tmp27_ = NULL;
	EditingToolsEditingTool* _tmp28_ = NULL;
	EditingToolsPhotoCanvas* _tmp29_ = NULL;
	GError * _inner_error_ = NULL;
#line 1428 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1428 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (EDITING_TOOLS_IS_EDITING_TOOL (tool));
#line 1431 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_save_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1432 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1436 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp0_, 0, 0);
#line 1436 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp0_, FALSE);
#line 1439 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = single_photo_page_get_unscaled_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1439 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->cancel_editing_pixbuf);
#line 1439 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->cancel_editing_pixbuf = _tmp1_;
#line 1443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_get_photo (self);
#line 1443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 1443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	media_source_get_dimensions (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE, MediaSource), PHOTO_EXCEPTION_NONE, &_tmp4_);
#line 1443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 1443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 1443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	max_dim = _tmp5_;
#line 9916 "PhotoPage.c"
	{
		Dimensions tool_pixbuf_dim = {0};
		Dimensions _tmp6_ = {0};
		GdkPixbuf* _tmp7_ = NULL;
		EditingToolsEditingTool* _tmp8_ = NULL;
		Scaling _tmp9_ = {0};
		Photo* _tmp10_ = NULL;
		Photo* _tmp11_ = NULL;
		Dimensions _tmp12_ = {0};
		GdkPixbuf* _tmp13_ = NULL;
		GdkPixbuf* _tmp14_ = NULL;
		GdkPixbuf* _tmp15_ = NULL;
		GdkPixbuf* _tmp16_ = NULL;
#line 1445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_.width = 0;
#line 1445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		tool_pixbuf_dim = _tmp6_;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = tool;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_canvas_scaling (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp9_);
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = editing_host_page_get_photo (self);
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = _tmp10_;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = editing_tools_editing_tool_get_display_pixbuf (_tmp8_, &_tmp9_, _tmp11_, &_tmp12_, &_inner_error_);
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		tool_pixbuf_dim = _tmp12_;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp11_);
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = _tmp14_;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 9954 "PhotoPage.c"
			goto __catch250_g_error;
		}
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = _tmp7_;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = NULL;
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (unscaled);
#line 1446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		unscaled = _tmp15_;
#line 1448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = unscaled;
#line 1448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp16_ != NULL) {
#line 9969 "PhotoPage.c"
			Dimensions _tmp17_ = {0};
#line 1449 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp17_ = tool_pixbuf_dim;
#line 1449 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			max_dim = _tmp17_;
#line 9975 "PhotoPage.c"
		}
#line 1444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp7_);
#line 9979 "PhotoPage.c"
	}
	goto __finally250;
	__catch250_g_error:
	{
		GError* err = NULL;
		GError* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
		GtkToggleToolButton* _tmp20_ = NULL;
		GtkToggleToolButton* _tmp21_ = NULL;
#line 1444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		err = _inner_error_;
#line 1444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 1451 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = err;
#line 1451 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_->message;
#line 1451 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_warning ("PhotoPage.vala:1451: %s", _tmp19_);
#line 1452 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_set_photo_missing (self, TRUE);
#line 1455 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = self->priv->current_editing_toggle;
#line 1455 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_vala_assert (_tmp20_ != NULL, "current_editing_toggle != null");
#line 1456 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = self->priv->current_editing_toggle;
#line 1456 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gtk_toggle_tool_button_set_active (_tmp21_, FALSE);
#line 1458 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (err);
#line 1458 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (unscaled);
#line 1458 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 10015 "PhotoPage.c"
	}
	__finally250:
#line 1444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (unscaled);
#line 1444 "/home/jens/Source/shotwell/src/PhotoPage.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 1444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 1444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 10028 "PhotoPage.c"
	}
#line 1461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = unscaled;
#line 1461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp22_ != NULL) {
#line 10034 "PhotoPage.c"
		GdkPixbuf* _tmp23_ = NULL;
		Dimensions _tmp24_ = {0};
#line 1462 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = unscaled;
#line 1462 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = max_dim;
#line 1462 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp23_, &_tmp24_, NULL);
#line 10043 "PhotoPage.c"
	}
#line 1465 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = editing_host_page_editing_host_canvas_new (self);
#line 1465 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo_canvas = G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, EDITING_TOOLS_TYPE_PHOTO_CANVAS, EditingToolsPhotoCanvas);
#line 1468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = tool;
#line 1468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = _editing_tools_editing_tool_ref0 (_tmp26_);
#line 1468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_editing_tool_unref0 (self->priv->current_tool);
#line 1468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->current_tool = _tmp27_;
#line 1469 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = self->priv->current_tool;
#line 1469 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = photo_canvas;
#line 1469 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_tools_editing_tool_activate (_tmp28_, _tmp29_);
#line 1472 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_place_tool_window (self);
#line 1475 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 1428 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_photo_canvas_unref0 (photo_canvas);
#line 1428 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (unscaled);
#line 10071 "PhotoPage.c"
}


static void _editing_host_page_on_tool_activated_editing_tools_editing_tool_activated (EditingToolsEditingTool* _sender, gpointer self) {
#line 1499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_activated ((EditingHostPage*) self);
#line 10078 "PhotoPage.c"
}


static void _editing_host_page_on_tool_deactivated_editing_tools_editing_tool_deactivated (EditingToolsEditingTool* _sender, gpointer self) {
#line 1500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_deactivated ((EditingHostPage*) self);
#line 10085 "PhotoPage.c"
}


static void _editing_host_page_on_tool_applied_editing_tools_editing_tool_applied (EditingToolsEditingTool* _sender, Command* command, GdkPixbuf* new_pixbuf, Dimensions* new_max_dim, gboolean needs_improvement, gpointer self) {
#line 1501 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_applied ((EditingHostPage*) self, command, new_pixbuf, new_max_dim, needs_improvement);
#line 10092 "PhotoPage.c"
}


static void _editing_host_page_on_tool_cancelled_editing_tools_editing_tool_cancelled (EditingToolsEditingTool* _sender, gpointer self) {
#line 1502 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_cancelled ((EditingHostPage*) self);
#line 10099 "PhotoPage.c"
}


static void _editing_host_page_on_tool_aborted_editing_tools_editing_tool_aborted (EditingToolsEditingTool* _sender, gpointer self) {
#line 1503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_aborted ((EditingHostPage*) self);
#line 10106 "PhotoPage.c"
}


static gboolean _editing_host_page_update_pixbuf_gsource_func (gpointer self) {
	gboolean result;
	result = editing_host_page_update_pixbuf ((EditingHostPage*) self);
#line 1530 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10115 "PhotoPage.c"
}


static void editing_host_page_deactivate_tool (EditingHostPage* self, Command* command, GdkPixbuf* new_pixbuf, Dimensions* new_max_dim, gboolean needs_improvement) {
	EditingToolsEditingTool* _tmp0_ = NULL;
	EditingToolsEditingTool* tool = NULL;
	EditingToolsEditingTool* _tmp1_ = NULL;
	EditingToolsEditingTool* _tmp2_ = NULL;
	EditingToolsEditingToolWindow* tool_window = NULL;
	EditingToolsEditingTool* _tmp3_ = NULL;
	EditingToolsEditingToolWindow* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	EditingToolsEditingToolWindow* _tmp6_ = NULL;
	EditingToolsEditingTool* _tmp24_ = NULL;
	EditingToolsEditingTool* _tmp25_ = NULL;
	guint _tmp26_ = 0U;
	EditingToolsEditingTool* _tmp27_ = NULL;
	guint _tmp28_ = 0U;
	EditingToolsEditingTool* _tmp29_ = NULL;
	guint _tmp30_ = 0U;
	EditingToolsEditingTool* _tmp31_ = NULL;
	guint _tmp32_ = 0U;
	EditingToolsEditingTool* _tmp33_ = NULL;
	guint _tmp34_ = 0U;
	GdkPixbuf* replacement = NULL;
	GdkPixbuf* _tmp35_ = NULL;
	GdkPixbuf* _tmp43_ = NULL;
	gboolean _tmp46_ = FALSE;
	Command* _tmp47_ = NULL;
#line 1478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail ((command == NULL) || IS_COMMAND (command));
#line 1478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail ((new_pixbuf == NULL) || GDK_IS_PIXBUF (new_pixbuf));
#line 1478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (new_max_dim != NULL);
#line 1480 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1480 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == NULL) {
#line 1481 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 10159 "PhotoPage.c"
	}
#line 1483 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->current_tool;
#line 1483 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _editing_tools_editing_tool_ref0 (_tmp1_);
#line 1483 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	tool = _tmp2_;
#line 1484 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_editing_tool_unref0 (self->priv->current_tool);
#line 1484 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->current_tool = NULL;
#line 1487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = tool;
#line 1487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = editing_tools_editing_tool_get_tool_window (_tmp3_);
#line 1487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	tool_window = _tmp4_;
#line 1488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = tool_window;
#line 1488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_ != NULL) {
#line 10181 "PhotoPage.c"
		EditingToolsEditingToolWindow* _tmp7_ = NULL;
		gboolean _tmp8_ = FALSE;
#line 1488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = tool_window;
#line 1488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = editing_tools_editing_tool_window_has_user_moved (_tmp7_);
#line 1488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = _tmp8_;
#line 10190 "PhotoPage.c"
	} else {
#line 1488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = FALSE;
#line 10194 "PhotoPage.c"
	}
#line 1488 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_) {
#line 10198 "PhotoPage.c"
		gint last_location_x = 0;
		gint last_location_y = 0;
		EditingToolsEditingToolWindow* _tmp9_ = NULL;
		gint _tmp10_ = 0;
		gint _tmp11_ = 0;
		GeeHashMap* _tmp12_ = NULL;
		EditingToolsEditingTool* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gint _tmp17_ = 0;
		GeeHashMap* _tmp18_ = NULL;
		EditingToolsEditingTool* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
		gint _tmp23_ = 0;
#line 1490 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = tool_window;
#line 1490 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gtk_window_get_position (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_window_get_type (), GtkWindow), &_tmp10_, &_tmp11_);
#line 1490 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		last_location_x = _tmp10_;
#line 1490 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		last_location_y = _tmp11_;
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = self->priv->last_locations;
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = tool;
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_->name;
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = g_strconcat (_tmp14_, "_x", NULL);
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_;
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = last_location_x;
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp16_, (gpointer) ((gintptr) _tmp17_));
#line 1491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp16_);
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = self->priv->last_locations;
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = tool;
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = _tmp19_->name;
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = g_strconcat (_tmp20_, "_y", NULL);
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = _tmp21_;
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = last_location_y;
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp22_, (gpointer) ((gintptr) _tmp23_));
#line 1492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp22_);
#line 10256 "PhotoPage.c"
	}
#line 1497 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = tool;
#line 1497 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_tools_editing_tool_deactivate (_tmp24_);
#line 1499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = tool;
#line 1499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("activated", EDITING_TOOLS_TYPE_EDITING_TOOL, &_tmp26_, NULL, FALSE);
#line 1499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (_tmp25_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp26_, 0, NULL, (GCallback) _editing_host_page_on_tool_activated_editing_tools_editing_tool_activated, self);
#line 1500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = tool;
#line 1500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("deactivated", EDITING_TOOLS_TYPE_EDITING_TOOL, &_tmp28_, NULL, FALSE);
#line 1500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (_tmp27_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp28_, 0, NULL, (GCallback) _editing_host_page_on_tool_deactivated_editing_tools_editing_tool_deactivated, self);
#line 1501 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = tool;
#line 1501 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("applied", EDITING_TOOLS_TYPE_EDITING_TOOL, &_tmp30_, NULL, FALSE);
#line 1501 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (_tmp29_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp30_, 0, NULL, (GCallback) _editing_host_page_on_tool_applied_editing_tools_editing_tool_applied, self);
#line 1502 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp31_ = tool;
#line 1502 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("cancelled", EDITING_TOOLS_TYPE_EDITING_TOOL, &_tmp32_, NULL, FALSE);
#line 1502 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (_tmp31_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp32_, 0, NULL, (GCallback) _editing_host_page_on_tool_cancelled_editing_tools_editing_tool_cancelled, self);
#line 1503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp33_ = tool;
#line 1503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("aborted", EDITING_TOOLS_TYPE_EDITING_TOOL, &_tmp34_, NULL, FALSE);
#line 1503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (_tmp33_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp34_, 0, NULL, (GCallback) _editing_host_page_on_tool_aborted_editing_tools_editing_tool_aborted, self);
#line 1505 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_editing_tool_unref0 (tool);
#line 1505 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	tool = NULL;
#line 1509 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->current_editing_toggle);
#line 1509 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->current_editing_toggle = NULL;
#line 1512 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	replacement = NULL;
#line 1513 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp35_ = new_pixbuf;
#line 1513 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp35_ != NULL) {
#line 10306 "PhotoPage.c"
		GdkPixbuf* _tmp36_ = NULL;
		GdkPixbuf* _tmp37_ = NULL;
#line 1514 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp36_ = new_pixbuf;
#line 1514 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp37_ = _g_object_ref0 (_tmp36_);
#line 1514 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (replacement);
#line 1514 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		replacement = _tmp37_;
#line 10317 "PhotoPage.c"
	} else {
		GdkPixbuf* _tmp38_ = NULL;
#line 1515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp38_ = self->priv->cancel_editing_pixbuf;
#line 1515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp38_ != NULL) {
#line 10324 "PhotoPage.c"
			GdkPixbuf* _tmp39_ = NULL;
			GdkPixbuf* _tmp40_ = NULL;
			GdkPixbuf* _tmp41_ = NULL;
			Dimensions _tmp42_ = {0};
#line 1516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp39_ = self->priv->cancel_editing_pixbuf;
#line 1516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp40_ = _g_object_ref0 (_tmp39_);
#line 1516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (replacement);
#line 1516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			replacement = _tmp40_;
#line 1517 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp41_ = replacement;
#line 1517 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			dimensions_for_pixbuf (_tmp41_, &_tmp42_);
#line 1517 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			*new_max_dim = _tmp42_;
#line 1518 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			needs_improvement = FALSE;
#line 10345 "PhotoPage.c"
		} else {
#line 1520 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			needs_improvement = TRUE;
#line 10349 "PhotoPage.c"
		}
	}
#line 1523 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp43_ = replacement;
#line 1523 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp43_ != NULL) {
#line 10356 "PhotoPage.c"
		GdkPixbuf* _tmp44_ = NULL;
		Dimensions _tmp45_ = {0};
#line 1524 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp44_ = replacement;
#line 1524 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp45_ = *new_max_dim;
#line 1524 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp44_, &_tmp45_, NULL);
#line 10365 "PhotoPage.c"
	}
#line 1525 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->cancel_editing_pixbuf);
#line 1525 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->cancel_editing_pixbuf = NULL;
#line 1528 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp46_ = needs_improvement;
#line 1528 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp46_) {
#line 1529 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->pixbuf_dirty = TRUE;
#line 1530 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _editing_host_page_update_pixbuf_gsource_func, g_object_ref (self), g_object_unref);
#line 10379 "PhotoPage.c"
	}
#line 1534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp47_ = command;
#line 1534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp47_ != NULL) {
#line 10385 "PhotoPage.c"
		CommandManager* _tmp48_ = NULL;
		CommandManager* _tmp49_ = NULL;
		Command* _tmp50_ = NULL;
#line 1535 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp48_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1535 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp49_ = _tmp48_;
#line 1535 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp50_ = command;
#line 1535 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		command_manager_execute (_tmp49_, _tmp50_);
#line 1535 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_command_manager_unref0 (_tmp49_);
#line 10399 "PhotoPage.c"
	}
#line 1478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (replacement);
#line 1478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (tool_window);
#line 1478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_editing_tool_unref0 (tool);
#line 10407 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_double_click (EditingHostPage* self, GdkEventButton* event) {
	gboolean result = FALSE;
#line 1540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 1541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 1541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10419 "PhotoPage.c"
}


gboolean editing_host_page_on_double_click (EditingHostPage* self, GdkEventButton* event) {
#line 1540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->on_double_click (self, event);
#line 10428 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_left_click (Page* base, GdkEventButton* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	GdkEventButton* _tmp0_ = NULL;
	GdkEventType _tmp1_ = 0;
	gint x = 0;
	GdkEventButton* _tmp6_ = NULL;
	gdouble _tmp7_ = 0.0;
	gint y = 0;
	GdkEventButton* _tmp8_ = NULL;
	gdouble _tmp9_ = 0.0;
	gboolean _tmp10_ = FALSE;
	EditingToolsEditingTool* _tmp11_ = NULL;
	EditingToolsEditingTool* _tmp18_ = NULL;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	gboolean _tmp21_ = FALSE;
	EditingToolsEditingTool* _tmp22_ = NULL;
	gint _tmp23_ = 0;
	gint _tmp24_ = 0;
#line 1545 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1545 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 1547 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = event;
#line 1547 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_->type;
#line 1547 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ == GDK_2BUTTON_PRESS) {
#line 10462 "PhotoPage.c"
		gboolean _tmp2_ = FALSE;
		EditingToolsEditingTool* _tmp3_ = NULL;
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->current_tool;
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp3_ == NULL) {
#line 10469 "PhotoPage.c"
			GdkEventButton* _tmp4_ = NULL;
			gboolean _tmp5_ = FALSE;
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp4_ = event;
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp5_ = editing_host_page_on_double_click (self, _tmp4_);
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp2_ = _tmp5_;
#line 10478 "PhotoPage.c"
		} else {
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp2_ = FALSE;
#line 10482 "PhotoPage.c"
		}
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = _tmp2_;
#line 1548 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 10488 "PhotoPage.c"
	}
#line 1550 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = event;
#line 1550 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_->x;
#line 1550 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	x = (gint) _tmp7_;
#line 1551 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = event;
#line 1551 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_->y;
#line 1551 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	y = (gint) _tmp9_;
#line 1555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = self->priv->current_tool;
#line 1555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp11_ == NULL) {
#line 10506 "PhotoPage.c"
		GtkScale* _tmp12_ = NULL;
		gdouble _tmp13_ = 0.0;
#line 1555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = self->priv->zoom_slider;
#line 1555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = gtk_range_get_value (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_range_get_type (), GtkRange));
#line 1555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = _tmp13_ != 0.0;
#line 10515 "PhotoPage.c"
	} else {
#line 1555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = FALSE;
#line 10519 "PhotoPage.c"
	}
#line 1555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp10_) {
#line 10523 "PhotoPage.c"
		GdkEventButton* _tmp14_ = NULL;
		gdouble _tmp15_ = 0.0;
		GdkEventButton* _tmp16_ = NULL;
		gdouble _tmp17_ = 0.0;
#line 1556 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = event;
#line 1556 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = _tmp14_->x;
#line 1556 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->zoom_pan_start_point.x = (gint) _tmp15_;
#line 1557 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = event;
#line 1557 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = _tmp16_->y;
#line 1557 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->zoom_pan_start_point.y = (gint) _tmp17_;
#line 1558 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->is_pan_in_progress = TRUE;
#line 1559 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_suspend_cursor_hiding (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1561 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 1561 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 10548 "PhotoPage.c"
	}
#line 1565 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = self->priv->current_tool;
#line 1565 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp18_ == NULL) {
#line 1566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = FALSE;
#line 1566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 10558 "PhotoPage.c"
	}
#line 1571 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = x;
#line 1571 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = y;
#line 1571 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = single_photo_page_is_inside_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp19_, _tmp20_);
#line 1571 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp21_) {
#line 1572 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 1572 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 10572 "PhotoPage.c"
	}
#line 1574 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = self->priv->current_tool;
#line 1574 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = x;
#line 1574 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = y;
#line 1574 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_tools_editing_tool_on_left_click (_tmp22_, _tmp23_, _tmp24_);
#line 1577 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 1577 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10586 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_left_released (Page* base, GdkEventButton* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	EditingToolsEditingTool* _tmp21_ = NULL;
	EditingToolsEditingTool* _tmp22_ = NULL;
	GdkEventButton* _tmp23_ = NULL;
	gdouble _tmp24_ = 0.0;
	GdkEventButton* _tmp25_ = NULL;
	gdouble _tmp26_ = 0.0;
	EditingToolsEditingTool* _tmp27_ = NULL;
	EditingToolsEditingToolWindow* _tmp28_ = NULL;
	EditingToolsEditingToolWindow* _tmp29_ = NULL;
	gboolean _tmp30_ = FALSE;
#line 1580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 1581 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->is_pan_in_progress;
#line 1581 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 10612 "PhotoPage.c"
		GdkPoint viewport_center = {0};
		ZoomState _tmp1_ = {0};
		GdkPoint _tmp2_ = {0};
		gint delta_x = 0;
		GdkEventButton* _tmp3_ = NULL;
		gdouble _tmp4_ = 0.0;
		GdkPoint _tmp5_ = {0};
		gint _tmp6_ = 0;
		gint delta_y = 0;
		GdkEventButton* _tmp7_ = NULL;
		gdouble _tmp8_ = 0.0;
		GdkPoint _tmp9_ = {0};
		gint _tmp10_ = 0;
		gint _tmp11_ = 0;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
		gint _tmp14_ = 0;
		ZoomState zoom_state = {0};
		ZoomState _tmp15_ = {0};
		GdkPoint _tmp16_ = {0};
		ZoomState _tmp17_ = {0};
		ZoomBuffer* _tmp18_ = NULL;
		ZoomBuffer* _tmp19_ = NULL;
		ZoomState _tmp20_ = {0};
#line 1582 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp1_);
#line 1582 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		zoom_state_get_viewport_center (&_tmp1_, &_tmp2_);
#line 1582 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		viewport_center = _tmp2_;
#line 1583 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = event;
#line 1583 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_->x;
#line 1583 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = self->priv->zoom_pan_start_point;
#line 1583 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_.x;
#line 1583 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		delta_x = ((gint) _tmp4_) - _tmp6_;
#line 1584 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = event;
#line 1584 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_->y;
#line 1584 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = self->priv->zoom_pan_start_point;
#line 1584 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = _tmp9_.y;
#line 1584 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		delta_y = ((gint) _tmp8_) - _tmp10_;
#line 1585 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = viewport_center.x;
#line 1585 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = delta_x;
#line 1585 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		viewport_center.x = _tmp11_ - _tmp12_;
#line 1586 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = viewport_center.y;
#line 1586 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = delta_y;
#line 1586 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		viewport_center.y = _tmp13_ - _tmp14_;
#line 1588 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp15_);
#line 1588 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = viewport_center;
#line 1588 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		zoom_state_init_pan (&zoom_state, &_tmp15_, &_tmp16_);
#line 1589 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = zoom_state;
#line 1589 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_set_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp17_);
#line 1590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = single_photo_page_get_zoom_buffer (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_;
#line 1590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = zoom_state;
#line 1590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		zoom_buffer_flush_demand_cache (_tmp19_, &_tmp20_);
#line 1590 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp19_);
#line 1592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->is_pan_in_progress = FALSE;
#line 1593 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_restore_cursor_hiding (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 10699 "PhotoPage.c"
	}
#line 1598 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = self->priv->current_tool;
#line 1598 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp21_ == NULL) {
#line 1599 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = FALSE;
#line 1599 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 10709 "PhotoPage.c"
	}
#line 1601 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = self->priv->current_tool;
#line 1601 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = event;
#line 1601 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = _tmp23_->x;
#line 1601 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = event;
#line 1601 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = _tmp25_->y;
#line 1601 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_tools_editing_tool_on_left_released (_tmp22_, (gint) _tmp24_, (gint) _tmp26_);
#line 1603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = self->priv->current_tool;
#line 1603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = editing_tools_editing_tool_get_tool_window (_tmp27_);
#line 1603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = _tmp28_;
#line 1603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp30_ = _tmp29_ != NULL;
#line 1603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp29_);
#line 1603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp30_) {
#line 10735 "PhotoPage.c"
		EditingToolsEditingTool* _tmp31_ = NULL;
		EditingToolsEditingToolWindow* _tmp32_ = NULL;
		EditingToolsEditingToolWindow* _tmp33_ = NULL;
#line 1604 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = self->priv->current_tool;
#line 1604 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = editing_tools_editing_tool_get_tool_window (_tmp31_);
#line 1604 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp33_ = _tmp32_;
#line 1604 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gtk_window_present (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_window_get_type (), GtkWindow));
#line 1604 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp33_);
#line 10749 "PhotoPage.c"
	}
#line 1606 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 1606 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10755 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_right_click (Page* base, GdkEventButton* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	GdkEventButton* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 1609 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1609 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 1610 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = event;
#line 1610 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = page_on_context_buttonpress (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), _tmp0_);
#line 1610 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp1_;
#line 1610 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10776 "PhotoPage.c"
}


static gboolean _editing_host_page_on_fetch_original_gsource_func (gpointer self) {
	gboolean result;
	result = editing_host_page_on_fetch_original ((EditingHostPage*) self);
#line 1622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10785 "PhotoPage.c"
}


static void editing_host_page_on_photos_altered (EditingHostPage* self, GeeMap* map) {
	GeeMap* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	Photo* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	Photo* _tmp5_ = NULL;
	Photo* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	ViewCollection* _tmp9_ = NULL;
	ViewCollection* _tmp10_ = NULL;
	gint _tmp11_ = 0;
	ViewCollection* _tmp12_ = NULL;
	ViewCollection* _tmp13_ = NULL;
	gint _tmp14_ = 0;
#line 1613 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1613 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GEE_IS_MAP (map));
#line 1614 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = map;
#line 1614 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_get_photo (self);
#line 1614 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 1614 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = gee_map_has_key (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject));
#line 1614 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = !_tmp3_;
#line 1614 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 1614 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_) {
#line 1615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 10825 "PhotoPage.c"
	}
#line 1617 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->pixbuf_dirty = TRUE;
#line 1621 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = editing_host_page_get_photo (self);
#line 1621 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 1621 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = photo_has_transformations (_tmp6_);
#line 1621 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 1621 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp6_);
#line 1621 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp8_) {
#line 1622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _editing_host_page_on_fetch_original_gsource_func, g_object_ref (self), g_object_unref);
#line 10843 "PhotoPage.c"
	}
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = view_collection_get_selected_count (_tmp10_);
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = _tmp12_;
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_COLLECTION, DataCollection));
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_update_actions (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), _tmp11_, _tmp14_);
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp13_);
#line 1624 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp10_);
#line 10863 "PhotoPage.c"
}


static void editing_host_page_on_view_contents_ordering_altered (EditingHostPage* self) {
#line 1627 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1628 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_refresh_caches (self, "on_view_contents_ordering_altered");
#line 10872 "PhotoPage.c"
}


static gboolean editing_host_page_on_fetch_original (EditingHostPage* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 1631 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1632 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (self);
#line 1632 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 10885 "PhotoPage.c"
		PixbufCache* _tmp1_ = NULL;
		Photo* _tmp2_ = NULL;
		Photo* _tmp3_ = NULL;
#line 1633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->master_cache;
#line 1633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_host_page_get_photo (self);
#line 1633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp2_;
#line 1633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		pixbuf_cache_prefetch (_tmp1_, _tmp3_, BACKGROUND_JOB_JOB_PRIORITY_LOW, FALSE);
#line 1633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp3_);
#line 10899 "PhotoPage.c"
	}
#line 1635 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = FALSE;
#line 1635 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10905 "PhotoPage.c"
}


static gboolean editing_host_page_is_panning_possible (EditingHostPage* self) {
	gboolean result = FALSE;
	Dimensions content_dim = {0};
	Dimensions _tmp0_ = {0};
	ZoomState _tmp1_ = {0};
	gint _tmp2_ = 0;
	ZoomState _tmp3_ = {0};
	gint _tmp4_ = 0;
	Dimensions canvas_dim = {0};
	Dimensions _tmp5_ = {0};
	gboolean _tmp6_ = FALSE;
	Dimensions _tmp7_ = {0};
	gint _tmp8_ = 0;
	Dimensions _tmp9_ = {0};
	gint _tmp10_ = 0;
#line 1638 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_.width = 0;
#line 1641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	content_dim = _tmp0_;
#line 1642 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp1_);
#line 1642 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = zoom_state_get_zoomed_width (&_tmp1_);
#line 1642 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	content_dim.width = _tmp2_;
#line 1643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp3_);
#line 1643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = zoom_state_get_zoomed_height (&_tmp3_);
#line 1643 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	content_dim.height = _tmp4_;
#line 1644 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_surface_dim (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp5_);
#line 1644 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	canvas_dim = _tmp5_;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = canvas_dim;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_.width;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = content_dim;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_.width;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp8_ >= _tmp10_) {
#line 10956 "PhotoPage.c"
		Dimensions _tmp11_ = {0};
		gint _tmp12_ = 0;
		Dimensions _tmp13_ = {0};
		gint _tmp14_ = 0;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = canvas_dim;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_.height;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = content_dim;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_.height;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp12_ >= _tmp14_;
#line 10971 "PhotoPage.c"
	} else {
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = FALSE;
#line 10975 "PhotoPage.c"
	}
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = !_tmp6_;
#line 1646 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 10981 "PhotoPage.c"
}


static void editing_host_page_update_cursor_for_zoom_context (EditingHostPage* self) {
	gboolean _tmp0_ = FALSE;
#line 1649 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1650 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_is_panning_possible (self);
#line 1650 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 1651 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_set_page_cursor (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), GDK_FLEUR);
#line 10995 "PhotoPage.c"
	} else {
#line 1653 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_set_page_cursor (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), GDK_LEFT_PTR);
#line 10999 "PhotoPage.c"
	}
}


static gboolean editing_host_page_real_on_motion (Page* base, GdkEventMotion* event, gint x, gint y, GdkModifierType mask) {
	EditingHostPage * self;
	gboolean result = FALSE;
	EditingToolsEditingTool* _tmp0_ = NULL;
	gboolean _tmp6_ = FALSE;
	GdkEventMotion* _tmp24_ = NULL;
	gint _tmp25_ = 0;
	gint _tmp26_ = 0;
	GdkModifierType _tmp27_ = 0;
	gboolean _tmp28_ = FALSE;
#line 1657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 1658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 11022 "PhotoPage.c"
		EditingToolsEditingTool* _tmp1_ = NULL;
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		GdkModifierType _tmp4_ = 0;
		GdkEventMotion* _tmp5_ = NULL;
#line 1659 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->current_tool;
#line 1659 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = x;
#line 1659 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = y;
#line 1659 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = mask;
#line 1659 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_tools_editing_tool_on_motion (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 1662 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = event;
#line 1662 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gdk_event_request_motions (_tmp5_);
#line 1664 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 1664 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 11046 "PhotoPage.c"
	}
#line 1667 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_update_cursor_for_zoom_context (self);
#line 1669 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->is_pan_in_progress;
#line 1669 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_) {
#line 11054 "PhotoPage.c"
		gint delta_x = 0;
		GdkEventMotion* _tmp7_ = NULL;
		gdouble _tmp8_ = 0.0;
		GdkPoint _tmp9_ = {0};
		gint _tmp10_ = 0;
		gint delta_y = 0;
		GdkEventMotion* _tmp11_ = NULL;
		gdouble _tmp12_ = 0.0;
		GdkPoint _tmp13_ = {0};
		gint _tmp14_ = 0;
		GdkPoint viewport_center = {0};
		ZoomState _tmp15_ = {0};
		GdkPoint _tmp16_ = {0};
		gint _tmp17_ = 0;
		gint _tmp18_ = 0;
		gint _tmp19_ = 0;
		gint _tmp20_ = 0;
		ZoomState zoom_state = {0};
		ZoomState _tmp21_ = {0};
		GdkPoint _tmp22_ = {0};
		ZoomState _tmp23_ = {0};
#line 1670 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = event;
#line 1670 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_->x;
#line 1670 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = self->priv->zoom_pan_start_point;
#line 1670 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = _tmp9_.x;
#line 1670 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		delta_x = ((gint) _tmp8_) - _tmp10_;
#line 1671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = event;
#line 1671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_->y;
#line 1671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = self->priv->zoom_pan_start_point;
#line 1671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_.y;
#line 1671 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		delta_y = ((gint) _tmp12_) - _tmp14_;
#line 1673 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp15_);
#line 1673 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		zoom_state_get_viewport_center (&_tmp15_, &_tmp16_);
#line 1673 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		viewport_center = _tmp16_;
#line 1674 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = viewport_center.x;
#line 1674 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = delta_x;
#line 1674 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		viewport_center.x = _tmp17_ - _tmp18_;
#line 1675 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = viewport_center.y;
#line 1675 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = delta_y;
#line 1675 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		viewport_center.y = _tmp19_ - _tmp20_;
#line 1677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp21_);
#line 1677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = viewport_center;
#line 1677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		zoom_state_init_pan (&zoom_state, &_tmp21_, &_tmp22_);
#line 1679 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = zoom_state;
#line 1679 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_on_interactive_pan (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp23_);
#line 1680 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 1680 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 11128 "PhotoPage.c"
	}
#line 1683 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = event;
#line 1683 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = x;
#line 1683 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = y;
#line 1683 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = mask;
#line 1683 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = PAGE_CLASS (editing_host_page_parent_class)->on_motion (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp24_, _tmp25_, _tmp26_, _tmp27_);
#line 1683 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp28_;
#line 1683 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11144 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_leave_notify_event (Page* base) {
	EditingHostPage * self;
	gboolean result = FALSE;
	EditingToolsEditingTool* _tmp0_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 1686 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1687 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1687 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 11159 "PhotoPage.c"
		EditingToolsEditingTool* _tmp1_ = NULL;
		gboolean _tmp2_ = FALSE;
#line 1688 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->current_tool;
#line 1688 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_tools_editing_tool_on_leave_notify_event (_tmp1_);
#line 1688 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = _tmp2_;
#line 1688 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 11170 "PhotoPage.c"
	}
#line 1690 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = PAGE_CLASS (editing_host_page_parent_class)->on_leave_notify_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page));
#line 1690 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp3_;
#line 1690 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11178 "PhotoPage.c"
}


static void editing_host_page_track_tool_window (EditingHostPage* self) {
	EditingToolsEditingTool* _tmp0_ = NULL;
#line 1693 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1695 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1695 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 11190 "PhotoPage.c"
		EditingToolsEditingToolWindow* tool_window = NULL;
		EditingToolsEditingTool* _tmp1_ = NULL;
		EditingToolsEditingToolWindow* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		EditingToolsEditingToolWindow* _tmp4_ = NULL;
#line 1696 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->current_tool;
#line 1696 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_tools_editing_tool_get_tool_window (_tmp1_);
#line 1696 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		tool_window = _tmp2_;
#line 1697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = tool_window;
#line 1697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp4_ != NULL) {
#line 11206 "PhotoPage.c"
			EditingToolsEditingToolWindow* _tmp5_ = NULL;
			gboolean _tmp6_ = FALSE;
#line 1697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp5_ = tool_window;
#line 1697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = editing_tools_editing_tool_window_has_user_moved (_tmp5_);
#line 1697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp3_ = !_tmp6_;
#line 11215 "PhotoPage.c"
		} else {
#line 1697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp3_ = FALSE;
#line 11219 "PhotoPage.c"
		}
#line 1697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp3_) {
#line 1698 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			editing_host_page_place_tool_window (self);
#line 11225 "PhotoPage.c"
		}
#line 1695 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (tool_window);
#line 11229 "PhotoPage.c"
	}
}


static void editing_host_page_real_on_move (Page* base, GdkRectangle* rect) {
	EditingHostPage * self;
	GdkRectangle _tmp0_ = {0};
#line 1702 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1702 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (rect != NULL);
#line 1703 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_track_tool_window (self);
#line 1705 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = *rect;
#line 1705 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->on_move (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), &_tmp0_);
#line 11247 "PhotoPage.c"
}


static void editing_host_page_real_on_move_finished (Page* base, GdkRectangle* rect) {
	EditingHostPage * self;
	GeeHashMap* _tmp0_ = NULL;
	GdkRectangle _tmp1_ = {0};
#line 1708 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1708 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (rect != NULL);
#line 1709 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->last_locations;
#line 1709 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gee_abstract_map_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1711 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = *rect;
#line 1711 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (editing_host_page_parent_class)->on_move_finished (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), &_tmp1_);
#line 11267 "PhotoPage.c"
}


static gboolean editing_host_page_on_keyboard_pan_event (EditingHostPage* self, GdkEventKey* event) {
	gboolean result = FALSE;
	ZoomState current_zoom_state = {0};
	ZoomState _tmp0_ = {0};
	GdkPoint viewport_center = {0};
	GdkPoint _tmp1_ = {0};
	GdkEventKey* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GQuark _tmp7_ = 0U;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label0 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label1 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label2 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label3 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label4 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label5 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label6 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label7 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label8 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label9 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label10 = 0;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp6_label11 = 0;
#line 11306 "PhotoPage.c"
	ZoomState new_zoom_state = {0};
	ZoomState _tmp12_ = {0};
	GdkPoint _tmp13_ = {0};
	ZoomState _tmp14_ = {0};
#line 1714 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1714 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 1715 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp0_);
#line 1715 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	current_zoom_state = _tmp0_;
#line 1716 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_get_viewport_center (&current_zoom_state, &_tmp1_);
#line 1716 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	viewport_center = _tmp1_;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = event;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_->keyval;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = gdk_keyval_name (_tmp3_);
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = (NULL == _tmp5_) ? 0 : g_quark_from_string (_tmp5_);
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (((_tmp7_ == ((0 != _tmp6_label0) ? _tmp6_label0 : (_tmp6_label0 = g_quark_from_static_string ("Left")))) || (_tmp7_ == ((0 != _tmp6_label1) ? _tmp6_label1 : (_tmp6_label1 = g_quark_from_static_string ("KP_Left"))))) || (_tmp7_ == ((0 != _tmp6_label2) ? _tmp6_label2 : (_tmp6_label2 = g_quark_from_static_string ("KP_4"))))) {
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11337 "PhotoPage.c"
			default:
			{
				gint _tmp8_ = 0;
#line 1722 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp8_ = viewport_center.x;
#line 1722 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				viewport_center.x = _tmp8_ - EDITING_HOST_PAGE_PAN_INCREMENT_SIZE;
#line 1723 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11347 "PhotoPage.c"
			}
		}
	} else if (((_tmp7_ == ((0 != _tmp6_label3) ? _tmp6_label3 : (_tmp6_label3 = g_quark_from_static_string ("Right")))) || (_tmp7_ == ((0 != _tmp6_label4) ? _tmp6_label4 : (_tmp6_label4 = g_quark_from_static_string ("KP_Right"))))) || (_tmp7_ == ((0 != _tmp6_label5) ? _tmp6_label5 : (_tmp6_label5 = g_quark_from_static_string ("KP_6"))))) {
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11353 "PhotoPage.c"
			default:
			{
				gint _tmp9_ = 0;
#line 1728 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp9_ = viewport_center.x;
#line 1728 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				viewport_center.x = _tmp9_ + EDITING_HOST_PAGE_PAN_INCREMENT_SIZE;
#line 1729 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11363 "PhotoPage.c"
			}
		}
	} else if (((_tmp7_ == ((0 != _tmp6_label6) ? _tmp6_label6 : (_tmp6_label6 = g_quark_from_static_string ("Down")))) || (_tmp7_ == ((0 != _tmp6_label7) ? _tmp6_label7 : (_tmp6_label7 = g_quark_from_static_string ("KP_Down"))))) || (_tmp7_ == ((0 != _tmp6_label8) ? _tmp6_label8 : (_tmp6_label8 = g_quark_from_static_string ("KP_2"))))) {
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11369 "PhotoPage.c"
			default:
			{
				gint _tmp10_ = 0;
#line 1734 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp10_ = viewport_center.y;
#line 1734 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				viewport_center.y = _tmp10_ + EDITING_HOST_PAGE_PAN_INCREMENT_SIZE;
#line 1735 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11379 "PhotoPage.c"
			}
		}
	} else if (((_tmp7_ == ((0 != _tmp6_label9) ? _tmp6_label9 : (_tmp6_label9 = g_quark_from_static_string ("Up")))) || (_tmp7_ == ((0 != _tmp6_label10) ? _tmp6_label10 : (_tmp6_label10 = g_quark_from_static_string ("KP_Up"))))) || (_tmp7_ == ((0 != _tmp6_label11) ? _tmp6_label11 : (_tmp6_label11 = g_quark_from_static_string ("KP_8"))))) {
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11385 "PhotoPage.c"
			default:
			{
				gint _tmp11_ = 0;
#line 1740 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp11_ = viewport_center.y;
#line 1740 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				viewport_center.y = _tmp11_ - EDITING_HOST_PAGE_PAN_INCREMENT_SIZE;
#line 1741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11395 "PhotoPage.c"
			}
		}
	} else {
#line 1718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11401 "PhotoPage.c"
			default:
			{
#line 1744 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				result = FALSE;
#line 1744 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				return result;
#line 11408 "PhotoPage.c"
			}
		}
	}
#line 1747 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = current_zoom_state;
#line 1747 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = viewport_center;
#line 1747 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	zoom_state_init_pan (&new_zoom_state, &_tmp12_, &_tmp13_);
#line 1748 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = new_zoom_state;
#line 1748 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_set_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp14_);
#line 1749 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 1751 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 1751 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11428 "PhotoPage.c"
}


static gboolean editing_host_page_real_key_press_event (GtkWidget* base, GdkEventKey* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	EditingToolsEditingTool* _tmp0_ = NULL;
	gboolean _tmp4_ = FALSE;
	GdkEventKey* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	gboolean handled = FALSE;
	GdkEventKey* _tmp9_ = NULL;
	guint _tmp10_ = 0U;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	GQuark _tmp14_ = 0U;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label0 = 0;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label1 = 0;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label2 = 0;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label3 = 0;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label4 = 0;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label5 = 0;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label6 = 0;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp13_label7 = 0;
#line 11461 "PhotoPage.c"
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
#line 1754 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1754 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 1756 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1756 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 11472 "PhotoPage.c"
		EditingToolsEditingTool* _tmp1_ = NULL;
		GdkEventKey* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
#line 1757 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->current_tool;
#line 1757 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = event;
#line 1757 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_tools_editing_tool_on_keypress (_tmp1_, _tmp2_);
#line 1757 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp3_) {
#line 1758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = TRUE;
#line 1758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 11488 "PhotoPage.c"
		}
	}
#line 1762 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = editing_host_page_is_panning_possible (self);
#line 1762 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_) {
#line 11495 "PhotoPage.c"
		GdkEventKey* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
#line 1763 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = event;
#line 1763 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = editing_host_page_on_keyboard_pan_event (self, _tmp5_);
#line 1763 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp6_) {
#line 1764 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			result = TRUE;
#line 1764 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return result;
#line 11508 "PhotoPage.c"
		}
	}
#line 1770 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = event;
#line 1770 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = editing_host_page_on_zoom_slider_key_press (self, _tmp7_);
#line 1770 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp8_) {
#line 1771 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 1771 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 11521 "PhotoPage.c"
	}
#line 1773 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	handled = TRUE;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = event;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_->keyval;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = gdk_keyval_name (_tmp10_);
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = (NULL == _tmp12_) ? 0 : g_quark_from_string (_tmp12_);
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if ((_tmp14_ == ((0 != _tmp13_label0) ? _tmp13_label0 : (_tmp13_label0 = g_quark_from_static_string ("Down")))) || (_tmp14_ == ((0 != _tmp13_label1) ? _tmp13_label1 : (_tmp13_label1 = g_quark_from_static_string ("KP_Down"))))) {
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11539 "PhotoPage.c"
			default:
			{
#line 1780 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11544 "PhotoPage.c"
			}
		}
	} else if (((_tmp14_ == ((0 != _tmp13_label2) ? _tmp13_label2 : (_tmp13_label2 = g_quark_from_static_string ("equal")))) || (_tmp14_ == ((0 != _tmp13_label3) ? _tmp13_label3 : (_tmp13_label3 = g_quark_from_static_string ("plus"))))) || (_tmp14_ == ((0 != _tmp13_label4) ? _tmp13_label4 : (_tmp13_label4 = g_quark_from_static_string ("KP_Add"))))) {
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11550 "PhotoPage.c"
			default:
			{
#line 1785 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize");
#line 1786 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11557 "PhotoPage.c"
			}
		}
	} else if (((_tmp14_ == ((0 != _tmp13_label5) ? _tmp13_label5 : (_tmp13_label5 = g_quark_from_static_string ("minus")))) || (_tmp14_ == ((0 != _tmp13_label6) ? _tmp13_label6 : (_tmp13_label6 = g_quark_from_static_string ("underscore"))))) || (_tmp14_ == ((0 != _tmp13_label7) ? _tmp13_label7 : (_tmp13_label7 = g_quark_from_static_string ("KP_Subtract"))))) {
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11563 "PhotoPage.c"
			default:
			{
#line 1792 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize");
#line 1793 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11570 "PhotoPage.c"
			}
		}
	} else {
#line 1775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 11576 "PhotoPage.c"
			default:
			{
#line 1796 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				handled = FALSE;
#line 1797 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 11583 "PhotoPage.c"
			}
		}
	}
#line 1800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = handled;
#line 1800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp15_) {
#line 1801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 1801 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 11595 "PhotoPage.c"
	}
#line 1803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (GTK_WIDGET_CLASS (editing_host_page_parent_class)->key_press_event != NULL) {
#line 11599 "PhotoPage.c"
		GdkEventKey* _tmp17_ = NULL;
		gboolean _tmp18_ = FALSE;
#line 1803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = event;
#line 1803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = GTK_WIDGET_CLASS (editing_host_page_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), gtk_widget_get_type (), GtkWidget), _tmp17_);
#line 1803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp18_;
#line 11608 "PhotoPage.c"
	} else {
#line 1803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = TRUE;
#line 11612 "PhotoPage.c"
	}
#line 1803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp16_;
#line 1803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11618 "PhotoPage.c"
}


static void editing_host_page_real_new_surface (SinglePhotoPage* base, cairo_t* default_ctx, Dimensions* dim) {
	EditingHostPage * self;
	EditingToolsEditingTool* _tmp0_ = NULL;
#line 1806 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1806 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (default_ctx != NULL);
#line 1806 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (dim != NULL);
#line 1808 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1808 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 11635 "PhotoPage.c"
		EditingToolsEditingTool* _tmp1_ = NULL;
		EditingToolsPhotoCanvas* _tmp2_ = NULL;
		cairo_t* _tmp3_ = NULL;
		Dimensions _tmp4_ = {0};
#line 1809 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->current_tool;
#line 1809 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = _tmp1_->canvas;
#line 1809 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = default_ctx;
#line 1809 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = *dim;
#line 1809 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_tools_photo_canvas_set_surface (_tmp2_, _tmp3_, &_tmp4_);
#line 11650 "PhotoPage.c"
	}
}


static void editing_host_page_real_updated_pixbuf (SinglePhotoPage* base, GdkPixbuf* pixbuf, SinglePhotoPageUpdateReason reason, Dimensions* old_dim) {
	EditingHostPage * self;
	gboolean _tmp0_ = FALSE;
	EditingToolsEditingTool* _tmp1_ = NULL;
#line 1812 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1812 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
#line 1812 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (old_dim != NULL);
#line 1816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->current_tool;
#line 1816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ != NULL) {
#line 11669 "PhotoPage.c"
		SinglePhotoPageUpdateReason _tmp2_ = 0;
#line 1816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = reason;
#line 1816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp2_ != SINGLE_PHOTO_PAGE_UPDATE_REASON_QUALITY_IMPROVEMENT;
#line 11675 "PhotoPage.c"
	} else {
#line 1816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 11679 "PhotoPage.c"
	}
#line 1816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 11683 "PhotoPage.c"
		EditingToolsEditingTool* _tmp3_ = NULL;
		EditingToolsPhotoCanvas* _tmp4_ = NULL;
		Dimensions _tmp5_ = {0};
		GdkPixbuf* _tmp6_ = NULL;
		GdkRectangle _tmp7_ = {0};
#line 1817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->current_tool;
#line 1817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_->canvas;
#line 1817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = *old_dim;
#line 1817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = pixbuf;
#line 1817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_scaled_pixbuf_position (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp7_);
#line 1817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_tools_photo_canvas_resized_pixbuf (_tmp4_, &_tmp5_, _tmp6_, &_tmp7_);
#line 1818 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (self->priv->cancel_editing_pixbuf);
#line 1818 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->cancel_editing_pixbuf = NULL;
#line 11705 "PhotoPage.c"
	}
}


static GdkPixbuf* editing_host_page_real_get_bottom_left_trinket (EditingHostPage* self, gint scale) {
	GdkPixbuf* result = NULL;
#line 1823 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = NULL;
#line 1823 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11716 "PhotoPage.c"
}


GdkPixbuf* editing_host_page_get_bottom_left_trinket (EditingHostPage* self, gint scale) {
#line 1822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 1822 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->get_bottom_left_trinket (self, scale);
#line 11725 "PhotoPage.c"
}


static GdkPixbuf* editing_host_page_real_get_top_left_trinket (EditingHostPage* self, gint scale) {
	GdkPixbuf* result = NULL;
#line 1827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = NULL;
#line 1827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11735 "PhotoPage.c"
}


GdkPixbuf* editing_host_page_get_top_left_trinket (EditingHostPage* self, gint scale) {
#line 1826 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 1826 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->get_top_left_trinket (self, scale);
#line 11744 "PhotoPage.c"
}


static GdkPixbuf* editing_host_page_real_get_top_right_trinket (EditingHostPage* self, gint scale) {
	GdkPixbuf* result = NULL;
#line 1831 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = NULL;
#line 1831 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11754 "PhotoPage.c"
}


GdkPixbuf* editing_host_page_get_top_right_trinket (EditingHostPage* self, gint scale) {
#line 1830 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 1830 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->get_top_right_trinket (self, scale);
#line 11763 "PhotoPage.c"
}


static GdkPixbuf* editing_host_page_real_get_bottom_right_trinket (EditingHostPage* self, gint scale) {
	GdkPixbuf* result = NULL;
#line 1835 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = NULL;
#line 1835 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 11773 "PhotoPage.c"
}


GdkPixbuf* editing_host_page_get_bottom_right_trinket (EditingHostPage* self, gint scale) {
#line 1834 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), NULL);
#line 1834 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return EDITING_HOST_PAGE_GET_CLASS (self)->get_bottom_right_trinket (self, scale);
#line 11782 "PhotoPage.c"
}


static void editing_host_page_real_paint (SinglePhotoPage* base, cairo_t* ctx, Dimensions* ctx_dim) {
	EditingHostPage * self;
	EditingToolsEditingTool* _tmp0_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	cairo_t* _tmp23_ = NULL;
	Dimensions _tmp24_ = {0};
	ZoomState _tmp25_ = {0};
	gboolean _tmp26_ = FALSE;
	GdkRectangle scaled_rect = {0};
	GdkRectangle _tmp27_ = {0};
	GdkPixbuf* trinket = NULL;
	GdkPixbuf* _tmp28_ = NULL;
	GdkPixbuf* _tmp29_ = NULL;
	GdkPixbuf* _tmp53_ = NULL;
	GdkPixbuf* _tmp54_ = NULL;
	GdkPixbuf* _tmp73_ = NULL;
	GdkPixbuf* _tmp74_ = NULL;
	GdkPixbuf* _tmp98_ = NULL;
	GdkPixbuf* _tmp99_ = NULL;
#line 1838 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 1838 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (ctx != NULL);
#line 1838 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (ctx_dim != NULL);
#line 1839 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 1839 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ != NULL) {
#line 11816 "PhotoPage.c"
		EditingToolsEditingTool* _tmp1_ = NULL;
		cairo_t* _tmp2_ = NULL;
#line 1840 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = self->priv->current_tool;
#line 1840 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = ctx;
#line 1840 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_tools_editing_tool_paint (_tmp1_, _tmp2_);
#line 1842 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 11827 "PhotoPage.c"
	}
#line 1845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = self->priv->photo_missing;
#line 1845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_) {
#line 11833 "PhotoPage.c"
		gboolean _tmp5_ = FALSE;
#line 1845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = editing_host_page_has_photo (self);
#line 1845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp5_;
#line 11839 "PhotoPage.c"
	} else {
#line 1845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = FALSE;
#line 11843 "PhotoPage.c"
	}
#line 1845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_) {
#line 11847 "PhotoPage.c"
		cairo_t* _tmp6_ = NULL;
		cairo_t* _tmp7_ = NULL;
		Dimensions _tmp8_ = {0};
		gint _tmp9_ = 0;
		Dimensions _tmp10_ = {0};
		gint _tmp11_ = 0;
		cairo_t* _tmp12_ = NULL;
		cairo_t* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		Photo* _tmp15_ = NULL;
		Photo* _tmp16_ = NULL;
		GFile* _tmp17_ = NULL;
		GFile* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
#line 1846 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = ctx;
#line 1846 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		set_source_color_from_string (_tmp6_, "#000");
#line 1847 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = ctx;
#line 1847 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_surface_dim (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp8_);
#line 1847 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = _tmp8_.width;
#line 1847 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_get_surface_dim (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp10_);
#line 1847 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = _tmp10_.height;
#line 1847 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_rectangle (_tmp7_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp9_, (gdouble) _tmp11_);
#line 1848 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = ctx;
#line 1848 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_fill (_tmp12_);
#line 1849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = ctx;
#line 1849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_paint (_tmp13_);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _ ("Photo source file missing: %s");
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = editing_host_page_get_photo (self);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_;
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = _tmp17_;
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = g_file_get_path (_tmp18_);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = _tmp19_;
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = g_strdup_printf (_tmp14_, _tmp20_);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = _tmp21_;
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_draw_message (self, _tmp22_);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp22_);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp20_);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp18_);
#line 1850 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp16_);
#line 1851 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 11919 "PhotoPage.c"
	}
#line 1854 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = ctx;
#line 1854 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = *ctx_dim;
#line 1854 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	SINGLE_PHOTO_PAGE_CLASS (editing_host_page_parent_class)->paint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp23_, &_tmp24_);
#line 1856 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp25_);
#line 1856 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = zoom_state_is_default (&_tmp25_);
#line 1856 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp26_) {
#line 1857 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 11935 "PhotoPage.c"
	}
#line 1860 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_scaled_pixbuf_position (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp27_);
#line 1860 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scaled_rect = _tmp27_;
#line 1862 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = editing_host_page_get_bottom_left_trinket (self, EDITING_HOST_PAGE_TRINKET_SCALE);
#line 1862 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	trinket = _tmp28_;
#line 1863 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp29_ = trinket;
#line 1863 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp29_ != NULL) {
#line 11949 "PhotoPage.c"
		gint x = 0;
		GdkRectangle _tmp30_ = {0};
		gint _tmp31_ = 0;
		gint y = 0;
		GdkRectangle _tmp32_ = {0};
		gint _tmp33_ = 0;
		GdkRectangle _tmp34_ = {0};
		gint _tmp35_ = 0;
		GdkPixbuf* _tmp36_ = NULL;
		gint _tmp37_ = 0;
		gint _tmp38_ = 0;
		cairo_t* _tmp39_ = NULL;
		GdkPixbuf* _tmp40_ = NULL;
		gint _tmp41_ = 0;
		gint _tmp42_ = 0;
		cairo_t* _tmp43_ = NULL;
		gint _tmp44_ = 0;
		gint _tmp45_ = 0;
		GdkPixbuf* _tmp46_ = NULL;
		gint _tmp47_ = 0;
		gint _tmp48_ = 0;
		GdkPixbuf* _tmp49_ = NULL;
		gint _tmp50_ = 0;
		gint _tmp51_ = 0;
		cairo_t* _tmp52_ = NULL;
#line 1864 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = scaled_rect;
#line 1864 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = _tmp30_.x;
#line 1864 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		x = _tmp31_ + EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = scaled_rect;
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp33_ = _tmp32_.y;
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp34_ = scaled_rect;
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp35_ = _tmp34_.height;
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp36_ = trinket;
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp37_ = gdk_pixbuf_get_height (_tmp36_);
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp38_ = _tmp37_;
#line 1865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		y = ((_tmp33_ + _tmp35_) - _tmp38_) - EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1866 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp39_ = ctx;
#line 1866 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp40_ = trinket;
#line 1866 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp41_ = x;
#line 1866 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp42_ = y;
#line 1866 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gdk_cairo_set_source_pixbuf (_tmp39_, _tmp40_, (gdouble) _tmp41_, (gdouble) _tmp42_);
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp43_ = ctx;
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp44_ = x;
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp45_ = y;
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp46_ = trinket;
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp47_ = gdk_pixbuf_get_width (_tmp46_);
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp48_ = _tmp47_;
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp49_ = trinket;
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp50_ = gdk_pixbuf_get_height (_tmp49_);
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp51_ = _tmp50_;
#line 1867 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_rectangle (_tmp43_, (gdouble) _tmp44_, (gdouble) _tmp45_, (gdouble) _tmp48_, (gdouble) _tmp51_);
#line 1868 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp52_ = ctx;
#line 1868 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_fill (_tmp52_);
#line 12031 "PhotoPage.c"
	}
#line 1871 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp53_ = editing_host_page_get_top_left_trinket (self, EDITING_HOST_PAGE_TRINKET_SCALE);
#line 1871 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (trinket);
#line 1871 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	trinket = _tmp53_;
#line 1872 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp54_ = trinket;
#line 1872 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp54_ != NULL) {
#line 12043 "PhotoPage.c"
		gint x = 0;
		GdkRectangle _tmp55_ = {0};
		gint _tmp56_ = 0;
		gint y = 0;
		GdkRectangle _tmp57_ = {0};
		gint _tmp58_ = 0;
		cairo_t* _tmp59_ = NULL;
		GdkPixbuf* _tmp60_ = NULL;
		gint _tmp61_ = 0;
		gint _tmp62_ = 0;
		cairo_t* _tmp63_ = NULL;
		gint _tmp64_ = 0;
		gint _tmp65_ = 0;
		GdkPixbuf* _tmp66_ = NULL;
		gint _tmp67_ = 0;
		gint _tmp68_ = 0;
		GdkPixbuf* _tmp69_ = NULL;
		gint _tmp70_ = 0;
		gint _tmp71_ = 0;
		cairo_t* _tmp72_ = NULL;
#line 1873 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp55_ = scaled_rect;
#line 1873 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp56_ = _tmp55_.x;
#line 1873 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		x = _tmp56_ + EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp57_ = scaled_rect;
#line 1874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp58_ = _tmp57_.y;
#line 1874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		y = _tmp58_ + EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1875 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp59_ = ctx;
#line 1875 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp60_ = trinket;
#line 1875 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp61_ = x;
#line 1875 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp62_ = y;
#line 1875 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gdk_cairo_set_source_pixbuf (_tmp59_, _tmp60_, (gdouble) _tmp61_, (gdouble) _tmp62_);
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp63_ = ctx;
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp64_ = x;
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp65_ = y;
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp66_ = trinket;
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp67_ = gdk_pixbuf_get_width (_tmp66_);
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp68_ = _tmp67_;
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp69_ = trinket;
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp70_ = gdk_pixbuf_get_height (_tmp69_);
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp71_ = _tmp70_;
#line 1876 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_rectangle (_tmp63_, (gdouble) _tmp64_, (gdouble) _tmp65_, (gdouble) _tmp68_, (gdouble) _tmp71_);
#line 1877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp72_ = ctx;
#line 1877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_fill (_tmp72_);
#line 12110 "PhotoPage.c"
	}
#line 1880 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp73_ = editing_host_page_get_top_right_trinket (self, EDITING_HOST_PAGE_TRINKET_SCALE);
#line 1880 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (trinket);
#line 1880 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	trinket = _tmp73_;
#line 1881 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp74_ = trinket;
#line 1881 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp74_ != NULL) {
#line 12122 "PhotoPage.c"
		gint x = 0;
		GdkRectangle _tmp75_ = {0};
		gint _tmp76_ = 0;
		GdkRectangle _tmp77_ = {0};
		gint _tmp78_ = 0;
		GdkPixbuf* _tmp79_ = NULL;
		gint _tmp80_ = 0;
		gint _tmp81_ = 0;
		gint y = 0;
		GdkRectangle _tmp82_ = {0};
		gint _tmp83_ = 0;
		cairo_t* _tmp84_ = NULL;
		GdkPixbuf* _tmp85_ = NULL;
		gint _tmp86_ = 0;
		gint _tmp87_ = 0;
		cairo_t* _tmp88_ = NULL;
		gint _tmp89_ = 0;
		gint _tmp90_ = 0;
		GdkPixbuf* _tmp91_ = NULL;
		gint _tmp92_ = 0;
		gint _tmp93_ = 0;
		GdkPixbuf* _tmp94_ = NULL;
		gint _tmp95_ = 0;
		gint _tmp96_ = 0;
		cairo_t* _tmp97_ = NULL;
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp75_ = scaled_rect;
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp76_ = _tmp75_.x;
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp77_ = scaled_rect;
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp78_ = _tmp77_.width;
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp79_ = trinket;
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp80_ = gdk_pixbuf_get_width (_tmp79_);
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp81_ = _tmp80_;
#line 1882 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		x = ((_tmp76_ + _tmp78_) - _tmp81_) - EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1883 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp82_ = scaled_rect;
#line 1883 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp83_ = _tmp82_.y;
#line 1883 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		y = _tmp83_ + EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1884 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp84_ = ctx;
#line 1884 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp85_ = trinket;
#line 1884 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp86_ = x;
#line 1884 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp87_ = y;
#line 1884 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gdk_cairo_set_source_pixbuf (_tmp84_, _tmp85_, (gdouble) _tmp86_, (gdouble) _tmp87_);
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp88_ = ctx;
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp89_ = x;
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp90_ = y;
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp91_ = trinket;
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp92_ = gdk_pixbuf_get_width (_tmp91_);
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp93_ = _tmp92_;
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp94_ = trinket;
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp95_ = gdk_pixbuf_get_height (_tmp94_);
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp96_ = _tmp95_;
#line 1885 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_rectangle (_tmp88_, (gdouble) _tmp89_, (gdouble) _tmp90_, (gdouble) _tmp93_, (gdouble) _tmp96_);
#line 1886 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp97_ = ctx;
#line 1886 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_fill (_tmp97_);
#line 12204 "PhotoPage.c"
	}
#line 1889 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp98_ = editing_host_page_get_bottom_right_trinket (self, EDITING_HOST_PAGE_TRINKET_SCALE);
#line 1889 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (trinket);
#line 1889 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	trinket = _tmp98_;
#line 1890 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp99_ = trinket;
#line 1890 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp99_ != NULL) {
#line 12216 "PhotoPage.c"
		gint x = 0;
		GdkRectangle _tmp100_ = {0};
		gint _tmp101_ = 0;
		GdkRectangle _tmp102_ = {0};
		gint _tmp103_ = 0;
		GdkPixbuf* _tmp104_ = NULL;
		gint _tmp105_ = 0;
		gint _tmp106_ = 0;
		gint y = 0;
		GdkRectangle _tmp107_ = {0};
		gint _tmp108_ = 0;
		GdkRectangle _tmp109_ = {0};
		gint _tmp110_ = 0;
		GdkPixbuf* _tmp111_ = NULL;
		gint _tmp112_ = 0;
		gint _tmp113_ = 0;
		cairo_t* _tmp114_ = NULL;
		GdkPixbuf* _tmp115_ = NULL;
		gint _tmp116_ = 0;
		gint _tmp117_ = 0;
		cairo_t* _tmp118_ = NULL;
		gint _tmp119_ = 0;
		gint _tmp120_ = 0;
		GdkPixbuf* _tmp121_ = NULL;
		gint _tmp122_ = 0;
		gint _tmp123_ = 0;
		GdkPixbuf* _tmp124_ = NULL;
		gint _tmp125_ = 0;
		gint _tmp126_ = 0;
		cairo_t* _tmp127_ = NULL;
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp100_ = scaled_rect;
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp101_ = _tmp100_.x;
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp102_ = scaled_rect;
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp103_ = _tmp102_.width;
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp104_ = trinket;
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp105_ = gdk_pixbuf_get_width (_tmp104_);
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp106_ = _tmp105_;
#line 1891 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		x = ((_tmp101_ + _tmp103_) - _tmp106_) - EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp107_ = scaled_rect;
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp108_ = _tmp107_.y;
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp109_ = scaled_rect;
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp110_ = _tmp109_.height;
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp111_ = trinket;
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp112_ = gdk_pixbuf_get_height (_tmp111_);
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp113_ = _tmp112_;
#line 1892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		y = ((_tmp108_ + _tmp110_) - _tmp113_) - EDITING_HOST_PAGE_TRINKET_PADDING;
#line 1893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp114_ = ctx;
#line 1893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp115_ = trinket;
#line 1893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp116_ = x;
#line 1893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp117_ = y;
#line 1893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gdk_cairo_set_source_pixbuf (_tmp114_, _tmp115_, (gdouble) _tmp116_, (gdouble) _tmp117_);
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp118_ = ctx;
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp119_ = x;
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp120_ = y;
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp121_ = trinket;
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp122_ = gdk_pixbuf_get_width (_tmp121_);
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp123_ = _tmp122_;
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp124_ = trinket;
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp125_ = gdk_pixbuf_get_height (_tmp124_);
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp126_ = _tmp125_;
#line 1894 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_rectangle (_tmp118_, (gdouble) _tmp119_, (gdouble) _tmp120_, (gdouble) _tmp123_, (gdouble) _tmp126_);
#line 1895 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp127_ = ctx;
#line 1895 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		cairo_fill (_tmp127_);
#line 12313 "PhotoPage.c"
	}
#line 1838 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (trinket);
#line 12317 "PhotoPage.c"
}


gboolean editing_host_page_is_rotate_available (EditingHostPage* self, Photo* photo) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 1899 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 1899 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (photo), FALSE);
#line 1900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->photo_missing;
#line 1900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = !_tmp0_;
#line 1900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 12334 "PhotoPage.c"
}


static void editing_host_page_rotate (EditingHostPage* self, Rotation rotation, const gchar* name, const gchar* description) {
	Dimensions _tmp0_ = {0};
	gboolean _tmp1_ = FALSE;
	RotateSingleCommand* command = NULL;
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	Rotation _tmp4_ = 0;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	RotateSingleCommand* _tmp7_ = NULL;
	RotateSingleCommand* _tmp8_ = NULL;
	CommandManager* _tmp9_ = NULL;
	CommandManager* _tmp10_ = NULL;
	RotateSingleCommand* _tmp11_ = NULL;
#line 1903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (name != NULL);
#line 1903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (description != NULL);
#line 1904 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1906 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp0_, 0, 0);
#line 1906 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp0_, FALSE);
#line 1908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (self);
#line 1908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 1909 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12370 "PhotoPage.c"
	}
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_get_photo (self);
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = rotation;
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = name;
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = description;
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = rotate_single_command_new (_tmp3_, _tmp4_, _tmp5_, _tmp6_);
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 1911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp8_;
#line 1913 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1913 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 1913 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = command;
#line 1913 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
#line 1913 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp10_);
#line 1903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 12402 "PhotoPage.c"
}


void editing_host_page_on_rotate_clockwise (EditingHostPage* self) {
#line 1916 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1917 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rotate (self, ROTATION_CLOCKWISE, RESOURCES_ROTATE_CW_FULL_LABEL, RESOURCES_ROTATE_CW_TOOLTIP);
#line 12411 "PhotoPage.c"
}


void editing_host_page_on_rotate_counterclockwise (EditingHostPage* self) {
#line 1920 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1921 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rotate (self, ROTATION_COUNTERCLOCKWISE, RESOURCES_ROTATE_CCW_FULL_LABEL, RESOURCES_ROTATE_CCW_TOOLTIP);
#line 12420 "PhotoPage.c"
}


void editing_host_page_on_flip_horizontally (EditingHostPage* self) {
#line 1924 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1925 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rotate (self, ROTATION_MIRROR, RESOURCES_HFLIP_LABEL, "");
#line 12429 "PhotoPage.c"
}


void editing_host_page_on_flip_vertically (EditingHostPage* self) {
#line 1928 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1929 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_rotate (self, ROTATION_UPSIDE_DOWN, RESOURCES_VFLIP_LABEL, "");
#line 12438 "PhotoPage.c"
}


void editing_host_page_on_revert (EditingHostPage* self) {
	gboolean _tmp0_ = FALSE;
	Dimensions _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	Photo* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	RevertSingleCommand* command = NULL;
	Photo* _tmp17_ = NULL;
	Photo* _tmp18_ = NULL;
	RevertSingleCommand* _tmp19_ = NULL;
	RevertSingleCommand* _tmp20_ = NULL;
	CommandManager* _tmp21_ = NULL;
	CommandManager* _tmp22_ = NULL;
	RevertSingleCommand* _tmp23_ = NULL;
#line 1932 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->photo_missing;
#line 1933 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 1934 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12466 "PhotoPage.c"
	}
#line 1936 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp1_, 0, 0);
#line 1936 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp1_, FALSE);
#line 1938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_has_photo (self);
#line 1938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp2_) {
#line 1939 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12478 "PhotoPage.c"
	}
#line 1941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_get_photo (self);
#line 1941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 1941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = photo_has_editable (_tmp4_);
#line 1941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 1941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp4_);
#line 1941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_) {
#line 12492 "PhotoPage.c"
		AppWindow* _tmp7_ = NULL;
		AppWindow* _tmp8_ = NULL;
		ViewCollection* _tmp9_ = NULL;
		ViewCollection* _tmp10_ = NULL;
		GeeCollection* _tmp11_ = NULL;
		GeeCollection* _tmp12_ = NULL;
		gboolean _tmp13_ = FALSE;
		gboolean _tmp14_ = FALSE;
		Photo* _tmp15_ = NULL;
		Photo* _tmp16_ = NULL;
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = app_window_get_instance ();
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = _tmp9_;
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = view_collection_get_sources (_tmp10_);
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection);
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = revert_editable_dialog (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_window_get_type (), GtkWindow), _tmp12_);
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = !_tmp13_;
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp12_);
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp10_);
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 1942 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp14_) {
#line 1944 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			return;
#line 12529 "PhotoPage.c"
		}
#line 1947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = editing_host_page_get_photo (self);
#line 1947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_;
#line 1947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		photo_revert_to_master (_tmp16_, TRUE);
#line 1947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp16_);
#line 12539 "PhotoPage.c"
	}
#line 1950 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 1952 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_set_photo_missing (self, FALSE);
#line 1954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = editing_host_page_get_photo (self);
#line 1954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = _tmp17_;
#line 1954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = revert_single_command_new (_tmp18_);
#line 1954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = _tmp19_;
#line 1954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp18_);
#line 1954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp20_;
#line 1955 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1955 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = _tmp21_;
#line 1955 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = command;
#line 1955 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp22_, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_COMMAND, Command));
#line 1955 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp22_);
#line 1932 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 12569 "PhotoPage.c"
}


void editing_host_page_on_edit_title (EditingHostPage* self) {
	LibraryPhoto* item = NULL;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	EditTitleDialog* edit_title_dialog = NULL;
	LibraryPhoto* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	EditTitleDialog* _tmp8_ = NULL;
	EditTitleDialog* _tmp9_ = NULL;
	gchar* new_title = NULL;
	EditTitleDialog* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	EditTitleCommand* command = NULL;
	LibraryPhoto* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	EditTitleCommand* _tmp15_ = NULL;
	CommandManager* _tmp16_ = NULL;
	CommandManager* _tmp17_ = NULL;
	EditTitleCommand* _tmp18_ = NULL;
#line 1958 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1960 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (self);
#line 1960 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 1960 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_LIBRARY_PHOTO);
#line 1960 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 1960 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 12607 "PhotoPage.c"
		Photo* _tmp3_ = NULL;
		LibraryPhoto* _tmp4_ = NULL;
#line 1961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (self);
#line 1961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_LIBRARY_PHOTO) ? ((LibraryPhoto*) _tmp3_) : NULL;
#line 1961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp4_ == NULL) {
#line 1961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp3_);
#line 12618 "PhotoPage.c"
		}
#line 1961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (item);
#line 1961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		item = _tmp4_;
#line 12624 "PhotoPage.c"
	} else {
#line 1963 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (item);
#line 1963 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12630 "PhotoPage.c"
	}
#line 1965 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = item;
#line 1965 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = media_source_get_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1965 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 1965 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = edit_title_dialog_new (_tmp7_);
#line 1965 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 1965 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp7_);
#line 1965 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	edit_title_dialog = _tmp9_;
#line 1966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = edit_title_dialog;
#line 1966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = edit_title_dialog_execute (_tmp10_);
#line 1966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	new_title = _tmp11_;
#line 1967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = new_title;
#line 1967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp12_ == NULL) {
#line 1968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (new_title);
#line 1968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_text_entry_dialog_mediator_unref0 (edit_title_dialog);
#line 1968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (item);
#line 1968 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12664 "PhotoPage.c"
	}
#line 1970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = item;
#line 1970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = new_title;
#line 1970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = edit_title_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_MEDIA_SOURCE, MediaSource), _tmp14_);
#line 1970 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp15_;
#line 1971 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1971 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = _tmp16_;
#line 1971 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = command;
#line 1971 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_COMMAND, Command));
#line 1971 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp17_);
#line 1958 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 1958 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (new_title);
#line 1958 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_text_entry_dialog_mediator_unref0 (edit_title_dialog);
#line 1958 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (item);
#line 12692 "PhotoPage.c"
}


void editing_host_page_on_edit_comment (EditingHostPage* self) {
	LibraryPhoto* item = NULL;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	EditCommentDialog* edit_comment_dialog = NULL;
	LibraryPhoto* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	EditCommentDialog* _tmp8_ = NULL;
	EditCommentDialog* _tmp9_ = NULL;
	gchar* new_comment = NULL;
	EditCommentDialog* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	EditCommentCommand* command = NULL;
	LibraryPhoto* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	EditCommentCommand* _tmp15_ = NULL;
	CommandManager* _tmp16_ = NULL;
	CommandManager* _tmp17_ = NULL;
	EditCommentCommand* _tmp18_ = NULL;
#line 1974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (self);
#line 1976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 1976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_LIBRARY_PHOTO);
#line 1976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 1976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_) {
#line 12730 "PhotoPage.c"
		Photo* _tmp3_ = NULL;
		LibraryPhoto* _tmp4_ = NULL;
#line 1977 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (self);
#line 1977 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_LIBRARY_PHOTO) ? ((LibraryPhoto*) _tmp3_) : NULL;
#line 1977 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp4_ == NULL) {
#line 1977 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp3_);
#line 12741 "PhotoPage.c"
		}
#line 1977 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (item);
#line 1977 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		item = _tmp4_;
#line 12747 "PhotoPage.c"
	} else {
#line 1979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (item);
#line 1979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12753 "PhotoPage.c"
	}
#line 1981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = item;
#line 1981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = media_source_get_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 1981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = edit_comment_dialog_new (_tmp7_, FALSE);
#line 1981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 1981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp7_);
#line 1981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	edit_comment_dialog = _tmp9_;
#line 1982 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = edit_comment_dialog;
#line 1982 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = edit_comment_dialog_execute (_tmp10_);
#line 1982 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	new_comment = _tmp11_;
#line 1983 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = new_comment;
#line 1983 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp12_ == NULL) {
#line 1984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (new_comment);
#line 1984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_multi_text_entry_dialog_mediator_unref0 (edit_comment_dialog);
#line 1984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (item);
#line 1984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12787 "PhotoPage.c"
	}
#line 1986 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = item;
#line 1986 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = new_comment;
#line 1986 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = edit_comment_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_MEDIA_SOURCE, MediaSource), _tmp14_);
#line 1986 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp15_;
#line 1987 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1987 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = _tmp16_;
#line 1987 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = command;
#line 1987 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_COMMAND, Command));
#line 1987 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp17_);
#line 1974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 1974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (new_comment);
#line 1974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_multi_text_entry_dialog_mediator_unref0 (edit_comment_dialog);
#line 1974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (item);
#line 12815 "PhotoPage.c"
}


void editing_host_page_on_adjust_date_time (EditingHostPage* self) {
	gboolean _tmp0_ = FALSE;
	AdjustDateTimeDialog* dialog = NULL;
	Photo* _tmp1_ = NULL;
	Photo* _tmp2_ = NULL;
	AdjustDateTimeDialog* _tmp3_ = NULL;
	AdjustDateTimeDialog* _tmp4_ = NULL;
	gint64 time_shift = 0LL;
	gboolean keep_relativity = FALSE;
	gboolean modify_originals = FALSE;
	AdjustDateTimeDialog* _tmp5_ = NULL;
	gint64 _tmp6_ = 0LL;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
#line 1990 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 1991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (self);
#line 1991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp0_) {
#line 1992 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 12842 "PhotoPage.c"
	}
#line 1994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_get_photo (self);
#line 1994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 1994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = adjust_date_time_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATEABLE, Dateable), 1, !G_TYPE_CHECK_INSTANCE_TYPE (self, TYPE_DIRECT_PHOTO_PAGE), FALSE, FALSE);
#line 1994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp3_);
#line 1994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 1994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 1994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dialog = _tmp4_;
#line 1998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = dialog;
#line 1998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = adjust_date_time_dialog_execute (_tmp5_, &_tmp6_, &_tmp7_, &_tmp8_);
#line 1998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	time_shift = _tmp6_;
#line 1998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	keep_relativity = _tmp7_;
#line 1998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	modify_originals = _tmp8_;
#line 1998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp9_) {
#line 12870 "PhotoPage.c"
		ViewCollection* _tmp10_ = NULL;
		ViewCollection* _tmp11_ = NULL;
		GeeList* _tmp12_ = NULL;
		GeeList* _tmp13_ = NULL;
		AdjustDateTimePhotoCommand* command = NULL;
		Photo* _tmp14_ = NULL;
		Photo* _tmp15_ = NULL;
		gint64 _tmp16_ = 0LL;
		gboolean _tmp17_ = FALSE;
		AdjustDateTimePhotoCommand* _tmp18_ = NULL;
		AdjustDateTimePhotoCommand* _tmp19_ = NULL;
		CommandManager* _tmp20_ = NULL;
		CommandManager* _tmp21_ = NULL;
		AdjustDateTimePhotoCommand* _tmp22_ = NULL;
#line 1999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 1999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = _tmp10_;
#line 1999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = view_collection_get_selected (_tmp11_);
#line 1999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = _tmp12_;
#line 1999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp13_);
#line 1999 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp11_);
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = editing_host_page_get_photo (self);
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = _tmp14_;
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = time_shift;
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = modify_originals;
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = adjust_date_time_photo_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_DATEABLE, Dateable), _tmp16_, _tmp17_);
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_;
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp15_);
#line 2001 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		command = _tmp19_;
#line 2003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = _tmp20_;
#line 2003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = command;
#line 2003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		command_manager_execute (_tmp21_, G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_COMMAND, Command));
#line 2003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_command_manager_unref0 (_tmp21_);
#line 1998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (command);
#line 12925 "PhotoPage.c"
	}
#line 1990 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (dialog);
#line 12929 "PhotoPage.c"
}


void editing_host_page_on_set_background (EditingHostPage* self) {
	gboolean _tmp0_ = FALSE;
#line 2007 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (self);
#line 2008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 12941 "PhotoPage.c"
		SetBackgroundPhotoDialog* dialog = NULL;
		SetBackgroundPhotoDialog* _tmp1_ = NULL;
		gboolean desktop = FALSE;
		gboolean screensaver = FALSE;
		SetBackgroundPhotoDialog* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
#line 2009 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = set_background_photo_dialog_new ();
#line 2009 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_object_ref_sink (_tmp1_);
#line 2009 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		dialog = _tmp1_;
#line 2011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = dialog;
#line 2011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = set_background_photo_dialog_execute (_tmp2_, &_tmp3_, &_tmp4_);
#line 2011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		desktop = _tmp3_;
#line 2011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		screensaver = _tmp4_;
#line 2011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp5_) {
#line 12966 "PhotoPage.c"
			AppWindow* _tmp6_ = NULL;
			AppWindow* _tmp7_ = NULL;
			Photo* _tmp8_ = NULL;
			Photo* _tmp9_ = NULL;
			gboolean _tmp10_ = FALSE;
			gboolean _tmp11_ = FALSE;
			AppWindow* _tmp12_ = NULL;
			AppWindow* _tmp13_ = NULL;
#line 2012 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp6_ = app_window_get_instance ();
#line 2012 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp7_ = _tmp6_;
#line 2012 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PAGE_WINDOW, PageWindow));
#line 2012 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp7_);
#line 2013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp8_ = editing_host_page_get_photo (self);
#line 2013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = _tmp8_;
#line 2013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp10_ = desktop;
#line 2013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp11_ = screensaver;
#line 2013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			desktop_integration_set_background (_tmp9_, _tmp10_, _tmp11_);
#line 2013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp9_);
#line 2014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp12_ = app_window_get_instance ();
#line 2014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp13_ = _tmp12_;
#line 2014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_PAGE_WINDOW, PageWindow));
#line 2014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp13_);
#line 13003 "PhotoPage.c"
		}
#line 2008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (dialog);
#line 13007 "PhotoPage.c"
	}
}


static void _editing_host_page_on_rotate_counterclockwise_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
#line 2024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_rotate_counterclockwise ((EditingHostPage*) self);
#line 13015 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_ctrl_pressed (Page* base, GdkEventKey* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	GtkToolButton* _tmp0_ = NULL;
	GtkToolButton* _tmp1_ = NULL;
	GtkToolButton* _tmp2_ = NULL;
	GtkToolButton* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	GtkToolButton* _tmp5_ = NULL;
	EditingToolsEditingTool* _tmp6_ = NULL;
	GdkEventKey* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
#line 2019 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 2020 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->rotate_button;
#line 2020 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (_tmp0_, RESOURCES_COUNTERCLOCKWISE);
#line 2021 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->rotate_button;
#line 2021 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_label (_tmp1_, RESOURCES_ROTATE_CCW_LABEL);
#line 2022 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->rotate_button;
#line 2022 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_ROTATE_CCW_TOOLTIP);
#line 2023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->rotate_button;
#line 2023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("clicked", gtk_tool_button_get_type (), &_tmp4_, NULL, FALSE);
#line 2023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _editing_host_page_on_rotate_clockwise_gtk_tool_button_clicked, self);
#line 2024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = self->priv->rotate_button;
#line 2024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) _editing_host_page_on_rotate_counterclockwise_gtk_tool_button_clicked, self, 0);
#line 2026 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = self->priv->current_tool;
#line 2026 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_ == NULL) {
#line 2027 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_swap_out_original (self);
#line 13061 "PhotoPage.c"
	}
#line 2029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = event;
#line 2029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = PAGE_CLASS (editing_host_page_parent_class)->on_ctrl_pressed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp7_);
#line 2029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp8_;
#line 2029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 13071 "PhotoPage.c"
}


static gboolean editing_host_page_real_on_ctrl_released (Page* base, GdkEventKey* event) {
	EditingHostPage * self;
	gboolean result = FALSE;
	GtkToolButton* _tmp0_ = NULL;
	GtkToolButton* _tmp1_ = NULL;
	GtkToolButton* _tmp2_ = NULL;
	GtkToolButton* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	GtkToolButton* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	EditingToolsEditingTool* _tmp8_ = NULL;
	GdkEventKey* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
#line 2032 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 2033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->rotate_button;
#line 2033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_icon_name (_tmp0_, RESOURCES_CLOCKWISE);
#line 2034 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->rotate_button;
#line 2034 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_button_set_label (_tmp1_, RESOURCES_ROTATE_CW_LABEL);
#line 2035 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->rotate_button;
#line 2035 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_tool_item_set_tooltip_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_tool_item_get_type (), GtkToolItem), RESOURCES_ROTATE_CW_TOOLTIP);
#line 2036 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->rotate_button;
#line 2036 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("clicked", gtk_tool_button_get_type (), &_tmp4_, NULL, FALSE);
#line 2036 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _editing_host_page_on_rotate_counterclockwise_gtk_tool_button_clicked, self);
#line 2037 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = self->priv->rotate_button;
#line 2037 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) _editing_host_page_on_rotate_clockwise_gtk_tool_button_clicked, self, 0);
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = self->priv->current_tool;
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp8_ == NULL) {
#line 13117 "PhotoPage.c"
		gboolean _tmp9_ = FALSE;
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = page_get_shift_pressed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = _tmp9_;
#line 13123 "PhotoPage.c"
	} else {
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = FALSE;
#line 13127 "PhotoPage.c"
	}
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp7_) {
#line 13131 "PhotoPage.c"
		gboolean _tmp10_ = FALSE;
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = page_get_alt_pressed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = !_tmp10_;
#line 13137 "PhotoPage.c"
	} else {
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = FALSE;
#line 13141 "PhotoPage.c"
	}
#line 2039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp6_) {
#line 2040 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_swap_in_original (self);
#line 13147 "PhotoPage.c"
	}
#line 2042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = event;
#line 2042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = PAGE_CLASS (editing_host_page_parent_class)->on_ctrl_released (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp11_);
#line 2042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp12_;
#line 2042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 13157 "PhotoPage.c"
}


void editing_host_page_on_tool_button_toggled (EditingHostPage* self, GtkToggleToolButton* toggle, EditingToolsEditingToolFactory factory) {
	gboolean _tmp0_ = FALSE;
	GtkToggleToolButton* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean deactivating_only = FALSE;
	Dimensions _tmp6_ = {0};
	gboolean _tmp7_ = FALSE;
	GtkToggleToolButton* _tmp8_ = NULL;
	GtkToggleToolButton* _tmp9_ = NULL;
	EditingToolsEditingTool* tool = NULL;
	EditingToolsEditingToolFactory _tmp10_ = NULL;
	EditingToolsEditingTool* _tmp11_ = NULL;
	EditingToolsEditingTool* _tmp12_ = NULL;
	EditingToolsEditingTool* _tmp13_ = NULL;
	EditingToolsEditingTool* _tmp14_ = NULL;
	EditingToolsEditingTool* _tmp15_ = NULL;
	EditingToolsEditingTool* _tmp16_ = NULL;
	EditingToolsEditingTool* _tmp17_ = NULL;
#line 2045 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2045 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GTK_IS_TOGGLE_TOOL_BUTTON (toggle));
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = toggle;
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gtk_toggle_tool_button_get_active (_tmp1_);
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp3_) {
#line 13192 "PhotoPage.c"
		GtkToggleToolButton* _tmp4_ = NULL;
		GtkToggleToolButton* _tmp5_ = NULL;
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = self->priv->current_editing_toggle;
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = toggle;
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp4_ == _tmp5_;
#line 13201 "PhotoPage.c"
	} else {
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 13205 "PhotoPage.c"
	}
#line 2048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	deactivating_only = _tmp0_;
#line 2049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp6_, 0, 0);
#line 2049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp6_, FALSE);
#line 2051 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = deactivating_only;
#line 2051 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp7_) {
#line 2052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_restore_cursor_hiding (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2053 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 13221 "PhotoPage.c"
	}
#line 2056 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_suspend_cursor_hiding (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2058 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = toggle;
#line 2058 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _g_object_ref0 (_tmp8_);
#line 2058 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->current_editing_toggle);
#line 2058 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->current_editing_toggle = _tmp9_;
#line 2061 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = factory;
#line 2061 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = _tmp10_ ();
#line 2061 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	tool = _tmp11_;
#line 2062 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = tool;
#line 2062 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp12_, "activated", (GCallback) _editing_host_page_on_tool_activated_editing_tools_editing_tool_activated, self, 0);
#line 2063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = tool;
#line 2063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp13_, "deactivated", (GCallback) _editing_host_page_on_tool_deactivated_editing_tools_editing_tool_deactivated, self, 0);
#line 2064 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = tool;
#line 2064 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp14_, "applied", (GCallback) _editing_host_page_on_tool_applied_editing_tools_editing_tool_applied, self, 0);
#line 2065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = tool;
#line 2065 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp15_, "cancelled", (GCallback) _editing_host_page_on_tool_cancelled_editing_tools_editing_tool_cancelled, self, 0);
#line 2066 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = tool;
#line 2066 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (_tmp16_, "aborted", (GCallback) _editing_host_page_on_tool_aborted_editing_tools_editing_tool_aborted, self, 0);
#line 2068 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = tool;
#line 2068 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_activate_tool (self, _tmp17_);
#line 2045 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_editing_tool_unref0 (tool);
#line 13265 "PhotoPage.c"
}


static void editing_host_page_on_tool_activated (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkToggleToolButton* _tmp2_ = NULL;
#line 2071 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2072 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_editing_toggle;
#line 2072 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp0_ != NULL, "current_editing_toggle != null");
#line 2073 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->zoom_slider;
#line 2073 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 2074 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->current_editing_toggle;
#line 2074 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toggle_tool_button_set_active (_tmp2_, TRUE);
#line 13287 "PhotoPage.c"
}


static void editing_host_page_on_tool_deactivated (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkToggleToolButton* _tmp2_ = NULL;
#line 2077 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2078 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_editing_toggle;
#line 2078 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp0_ != NULL, "current_editing_toggle != null");
#line 2079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->zoom_slider;
#line 2079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), TRUE);
#line 2080 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = self->priv->current_editing_toggle;
#line 2080 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toggle_tool_button_set_active (_tmp2_, FALSE);
#line 13309 "PhotoPage.c"
}


static void editing_host_page_on_tool_applied (EditingHostPage* self, Command* command, GdkPixbuf* new_pixbuf, Dimensions* new_max_dim, gboolean needs_improvement) {
	Command* _tmp0_ = NULL;
	GdkPixbuf* _tmp1_ = NULL;
	Dimensions _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
#line 2083 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2083 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail ((command == NULL) || IS_COMMAND (command));
#line 2083 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail ((new_pixbuf == NULL) || GDK_IS_PIXBUF (new_pixbuf));
#line 2083 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (new_max_dim != NULL);
#line 2085 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = command;
#line 2085 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = new_pixbuf;
#line 2085 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = *new_max_dim;
#line 2085 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = needs_improvement;
#line 2085 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, _tmp0_, _tmp1_, &_tmp2_, _tmp3_);
#line 13336 "PhotoPage.c"
}


static void editing_host_page_on_tool_cancelled (EditingHostPage* self) {
	Dimensions _tmp0_ = {0};
#line 2088 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp0_, 0, 0);
#line 2089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp0_, FALSE);
#line 2091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_restore_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 2092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 13352 "PhotoPage.c"
}


static void editing_host_page_on_tool_aborted (EditingHostPage* self) {
	Dimensions _tmp0_ = {0};
#line 2095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2096 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp0_, 0, 0);
#line 2096 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp0_, FALSE);
#line 2097 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_set_photo_missing (self, TRUE);
#line 13366 "PhotoPage.c"
}


void editing_host_page_toggle_crop (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
	GtkToggleToolButton* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 2100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->crop_button;
#line 2101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->crop_button;
#line 2101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gtk_toggle_tool_button_get_active (_tmp1_);
#line 2101 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toggle_tool_button_set_active (_tmp0_, !_tmp2_);
#line 13384 "PhotoPage.c"
}


void editing_host_page_toggle_straighten (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
	GtkToggleToolButton* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 2104 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->straighten_button;
#line 2105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->straighten_button;
#line 2105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gtk_toggle_tool_button_get_active (_tmp1_);
#line 2105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toggle_tool_button_set_active (_tmp0_, !_tmp2_);
#line 13402 "PhotoPage.c"
}


void editing_host_page_toggle_redeye (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
	GtkToggleToolButton* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 2108 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->redeye_button;
#line 2109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->redeye_button;
#line 2109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gtk_toggle_tool_button_get_active (_tmp1_);
#line 2109 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toggle_tool_button_set_active (_tmp0_, !_tmp2_);
#line 13420 "PhotoPage.c"
}


void editing_host_page_toggle_adjust (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
	GtkToggleToolButton* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 2112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->adjust_button;
#line 2113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->adjust_button;
#line 2113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gtk_toggle_tool_button_get_active (_tmp1_);
#line 2113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_toggle_tool_button_set_active (_tmp0_, !_tmp2_);
#line 13438 "PhotoPage.c"
}


static EditingToolsEditingTool* _editing_tools_straighten_tool_factory_editing_tools_editing_tool_factory (void) {
	EditingToolsEditingTool* result;
	result = editing_tools_straighten_tool_factory ();
#line 2117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 13447 "PhotoPage.c"
}


static void editing_host_page_on_straighten_toggled (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
#line 2116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->straighten_button;
#line 2117 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_button_toggled (self, _tmp0_, _editing_tools_straighten_tool_factory_editing_tools_editing_tool_factory);
#line 13459 "PhotoPage.c"
}


static EditingToolsEditingTool* _editing_tools_crop_tool_factory_editing_tools_editing_tool_factory (void) {
	EditingToolsEditingTool* result;
	result = editing_tools_crop_tool_factory ();
#line 2121 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 13468 "PhotoPage.c"
}


static void editing_host_page_on_crop_toggled (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
#line 2120 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2121 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->crop_button;
#line 2121 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_button_toggled (self, _tmp0_, _editing_tools_crop_tool_factory_editing_tools_editing_tool_factory);
#line 13480 "PhotoPage.c"
}


static EditingToolsEditingTool* _editing_tools_redeye_tool_factory_editing_tools_editing_tool_factory (void) {
	EditingToolsEditingTool* result;
	result = editing_tools_redeye_tool_factory ();
#line 2125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 13489 "PhotoPage.c"
}


static void editing_host_page_on_redeye_toggled (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
#line 2124 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->redeye_button;
#line 2125 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_button_toggled (self, _tmp0_, _editing_tools_redeye_tool_factory_editing_tools_editing_tool_factory);
#line 13501 "PhotoPage.c"
}


static EditingToolsEditingTool* _editing_tools_adjust_tool_factory_editing_tools_editing_tool_factory (void) {
	EditingToolsEditingTool* result;
	result = editing_tools_adjust_tool_factory ();
#line 2129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 13510 "PhotoPage.c"
}


static void editing_host_page_on_adjust_toggled (EditingHostPage* self) {
	GtkToggleToolButton* _tmp0_ = NULL;
#line 2128 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->adjust_button;
#line 2129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_tool_button_toggled (self, _tmp0_, _editing_tools_adjust_tool_factory_editing_tools_editing_tool_factory);
#line 13522 "PhotoPage.c"
}


gboolean editing_host_page_is_enhance_available (EditingHostPage* self, Photo* photo) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 2132 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 2132 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (photo), FALSE);
#line 2133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->photo_missing;
#line 2133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = !_tmp0_;
#line 2133 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 13539 "PhotoPage.c"
}


void editing_host_page_on_enhance (EditingHostPage* self) {
	EditingToolsEditingTool* _tmp0_ = NULL;
	gboolean _tmp2_ = FALSE;
	EditingToolsAdjustTool* adjust_tool = NULL;
	EditingToolsEditingTool* _tmp3_ = NULL;
	EditingToolsAdjustTool* _tmp4_ = NULL;
	EditingToolsAdjustTool* _tmp5_ = NULL;
	EnhanceSingleCommand* command = NULL;
	Photo* _tmp7_ = NULL;
	Photo* _tmp8_ = NULL;
	EnhanceSingleCommand* _tmp9_ = NULL;
	EnhanceSingleCommand* _tmp10_ = NULL;
	CommandManager* _tmp11_ = NULL;
	CommandManager* _tmp12_ = NULL;
	EnhanceSingleCommand* _tmp13_ = NULL;
#line 2136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 2140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, EDITING_TOOLS_TYPE_ADJUST_TOOL)) {
#line 13564 "PhotoPage.c"
		Dimensions _tmp1_ = {0};
#line 2141 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		dimensions_init (&_tmp1_, 0, 0);
#line 2141 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp1_, FALSE);
#line 2143 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_cancel_zoom (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 13572 "PhotoPage.c"
	}
#line 2146 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_has_photo (self);
#line 2146 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp2_) {
#line 2147 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 13580 "PhotoPage.c"
	}
#line 2149 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = self->priv->current_tool;
#line 2149 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _editing_tools_editing_tool_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, EDITING_TOOLS_TYPE_ADJUST_TOOL) ? ((EditingToolsAdjustTool*) _tmp3_) : NULL);
#line 2149 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	adjust_tool = _tmp4_;
#line 2150 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = adjust_tool;
#line 2150 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_ != NULL) {
#line 13592 "PhotoPage.c"
		EditingToolsAdjustTool* _tmp6_ = NULL;
#line 2151 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = adjust_tool;
#line 2151 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		editing_tools_adjust_tool_enhance (_tmp6_);
#line 2153 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_editing_tools_editing_tool_unref0 (adjust_tool);
#line 2153 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 13602 "PhotoPage.c"
	}
#line 2156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = editing_host_page_get_photo (self);
#line 2156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 2156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = enhance_single_command_new (_tmp8_);
#line 2156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 2156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp8_);
#line 2156 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp10_;
#line 2157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 2157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = command;
#line 2157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_COMMAND, Command));
#line 2157 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp12_);
#line 2136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 2136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_editing_tool_unref0 (adjust_tool);
#line 13630 "PhotoPage.c"
}


void editing_host_page_on_copy_adjustments (EditingHostPage* self) {
	gboolean _tmp0_ = FALSE;
	Photo* _tmp1_ = NULL;
	Photo* _tmp2_ = NULL;
	PixelTransformationBundle* _tmp3_ = NULL;
	PixelTransformationBundle* _tmp4_ = NULL;
#line 2160 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (self);
#line 2161 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp0_) {
#line 2162 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 13648 "PhotoPage.c"
	}
#line 2163 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_get_photo (self);
#line 2163 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 2163 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = photo_get_color_adjustments (_tmp2_);
#line 2163 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 2163 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	pixel_transformation_bundle_set_copied_color_adjustments (_tmp4_);
#line 2163 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_pixel_transformation_bundle_unref0 (_tmp4_);
#line 2163 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 2164 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "PasteColorAdjustments", TRUE);
#line 13666 "PhotoPage.c"
}


void editing_host_page_on_paste_adjustments (EditingHostPage* self) {
	PixelTransformationBundle* copied_adjustments = NULL;
	PixelTransformationBundle* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	AdjustColorsSingleCommand* command = NULL;
	Photo* _tmp4_ = NULL;
	Photo* _tmp5_ = NULL;
	PixelTransformationBundle* _tmp6_ = NULL;
	AdjustColorsSingleCommand* _tmp7_ = NULL;
	AdjustColorsSingleCommand* _tmp8_ = NULL;
	CommandManager* _tmp9_ = NULL;
	CommandManager* _tmp10_ = NULL;
	AdjustColorsSingleCommand* _tmp11_ = NULL;
#line 2167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = pixel_transformation_bundle_get_copied_color_adjustments ();
#line 2168 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	copied_adjustments = _tmp0_;
#line 2169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_has_photo (self);
#line 2169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp2_) {
#line 2169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = TRUE;
#line 13696 "PhotoPage.c"
	} else {
		PixelTransformationBundle* _tmp3_ = NULL;
#line 2169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = copied_adjustments;
#line 2169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = _tmp3_ == NULL;
#line 13703 "PhotoPage.c"
	}
#line 2169 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 2170 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_pixel_transformation_bundle_unref0 (copied_adjustments);
#line 2170 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 13711 "PhotoPage.c"
	}
#line 2172 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = editing_host_page_get_photo (self);
#line 2172 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 2172 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = copied_adjustments;
#line 2172 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = adjust_colors_single_command_new (_tmp5_, _tmp6_, RESOURCES_PASTE_ADJUSTMENTS_LABEL, RESOURCES_PASTE_ADJUSTMENTS_TOOLTIP);
#line 2172 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 2172 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp5_);
#line 2172 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp8_;
#line 2174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 2174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = command;
#line 2174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_COMMAND, Command));
#line 2174 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp10_);
#line 2167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 2167 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_pixel_transformation_bundle_unref0 (copied_adjustments);
#line 13741 "PhotoPage.c"
}


static void editing_host_page_place_tool_window (EditingHostPage* self) {
	EditingToolsEditingTool* _tmp0_ = NULL;
	EditingToolsEditingToolWindow* tool_window = NULL;
	EditingToolsEditingTool* _tmp1_ = NULL;
	EditingToolsEditingToolWindow* _tmp2_ = NULL;
	EditingToolsEditingToolWindow* _tmp3_ = NULL;
	EditingToolsEditingToolWindow* _tmp4_ = NULL;
	AppWindow* _tmp5_ = NULL;
	AppWindow* _tmp6_ = NULL;
	EditingToolsEditingToolWindow* _tmp7_ = NULL;
	EditingToolsEditingToolWindow* _tmp8_ = NULL;
	GtkAllocation tool_alloc = {0};
	EditingToolsEditingToolWindow* _tmp9_ = NULL;
	GtkAllocation _tmp10_ = {0};
	gint x = 0;
	gint y = 0;
	GeeHashMap* _tmp11_ = NULL;
	EditingToolsEditingTool* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	GdkScreen* screen = NULL;
	GtkWindow* _tmp87_ = NULL;
	GtkWindow* _tmp88_ = NULL;
	GdkScreen* _tmp89_ = NULL;
	GdkScreen* _tmp90_ = NULL;
	GdkScreen* _tmp91_ = NULL;
	gint _tmp92_ = 0;
	GdkScreen* _tmp93_ = NULL;
	gint _tmp94_ = 0;
	GtkAllocation _tmp95_ = {0};
	gint _tmp96_ = 0;
	gint _tmp97_ = 0;
	gint _tmp98_ = 0;
	GdkScreen* _tmp99_ = NULL;
	gint _tmp100_ = 0;
	GtkAllocation _tmp101_ = {0};
	gint _tmp102_ = 0;
	gint _tmp103_ = 0;
	EditingToolsEditingToolWindow* _tmp104_ = NULL;
	gint _tmp105_ = 0;
	gint _tmp106_ = 0;
	EditingToolsEditingToolWindow* _tmp107_ = NULL;
	EditingToolsEditingToolWindow* _tmp108_ = NULL;
#line 2177 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2178 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 2178 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == NULL) {
#line 2179 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 13799 "PhotoPage.c"
	}
#line 2181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->current_tool;
#line 2181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_tools_editing_tool_get_tool_window (_tmp1_);
#line 2181 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	tool_window = _tmp2_;
#line 2182 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = tool_window;
#line 2182 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ == NULL) {
#line 2183 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (tool_window);
#line 2183 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 13815 "PhotoPage.c"
	}
#line 2186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = tool_window;
#line 2186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = app_window_get_instance ();
#line 2186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 2186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_window_get_type (), GtkWindow));
#line 2186 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp6_);
#line 2187 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = tool_window;
#line 2187 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
#line 2188 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = tool_window;
#line 2188 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
#line 2191 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = tool_window;
#line 2191 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_get_allocation (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), &_tmp10_);
#line 2191 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	tool_alloc = _tmp10_;
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = self->priv->last_locations;
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = self->priv->current_tool;
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = _tmp12_->name;
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = g_strconcat (_tmp13_, "_x", NULL);
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = _tmp14_;
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp15_);
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = _tmp16_;
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp15_);
#line 2195 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp17_) {
#line 13859 "PhotoPage.c"
		GeeHashMap* _tmp18_ = NULL;
		EditingToolsEditingTool* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
		gpointer _tmp23_ = NULL;
		GeeHashMap* _tmp24_ = NULL;
		EditingToolsEditingTool* _tmp25_ = NULL;
		const gchar* _tmp26_ = NULL;
		gchar* _tmp27_ = NULL;
		gchar* _tmp28_ = NULL;
		gpointer _tmp29_ = NULL;
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = self->priv->last_locations;
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = self->priv->current_tool;
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = _tmp19_->name;
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = g_strconcat (_tmp20_, "_x", NULL);
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = _tmp21_;
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp22_);
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		x = (gint) ((gintptr) _tmp23_);
#line 2196 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp22_);
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = self->priv->last_locations;
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp25_ = self->priv->current_tool;
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = _tmp25_->name;
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp27_ = g_strconcat (_tmp26_, "_y", NULL);
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp28_ = _tmp27_;
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp29_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp28_);
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		y = (gint) ((gintptr) _tmp29_);
#line 2197 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp28_);
#line 13904 "PhotoPage.c"
	} else {
		GtkWindow* _tmp30_ = NULL;
		GtkWindow* _tmp31_ = NULL;
		AppWindow* _tmp32_ = NULL;
		AppWindow* _tmp33_ = NULL;
		gboolean _tmp34_ = FALSE;
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = _tmp30_;
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = app_window_get_instance ();
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp33_ = _tmp32_;
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp34_ = _tmp31_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_window_get_type (), GtkWindow);
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp33_);
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp31_);
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp34_) {
#line 13927 "PhotoPage.c"
			gint rx = 0;
			gint ry = 0;
			GtkWindow* _tmp35_ = NULL;
			GtkWindow* _tmp36_ = NULL;
			GdkWindow* _tmp37_ = NULL;
			gint _tmp38_ = 0;
			gint _tmp39_ = 0;
			GtkAllocation viewport_allocation = {0};
			GtkViewport* _tmp40_ = NULL;
			GtkAllocation _tmp41_ = {0};
			gint cx = 0;
			gint cy = 0;
			gint cwidth = 0;
			gint cheight = 0;
			GtkAllocation _tmp42_ = {0};
			gint _tmp43_ = 0;
			GtkAllocation _tmp44_ = {0};
			gint _tmp45_ = 0;
			GtkAllocation _tmp46_ = {0};
			gint _tmp47_ = 0;
			GtkAllocation _tmp48_ = {0};
			gint _tmp49_ = 0;
			gint _tmp50_ = 0;
			gint _tmp59_ = 0;
			gint _tmp60_ = 0;
			gint _tmp61_ = 0;
			GtkAllocation _tmp62_ = {0};
			gint _tmp63_ = 0;
#line 2205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp35_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp36_ = _tmp35_;
#line 2205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp37_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_widget_get_type (), GtkWidget));
#line 2205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			gdk_window_get_root_origin (_tmp37_, &_tmp38_, &_tmp39_);
#line 2205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			rx = _tmp38_;
#line 2205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			ry = _tmp39_;
#line 2205 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp36_);
#line 2208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp40_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)->viewport;
#line 2208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			gtk_widget_get_allocation (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, gtk_widget_get_type (), GtkWidget), &_tmp41_);
#line 2208 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			viewport_allocation = _tmp41_;
#line 2211 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp42_ = viewport_allocation;
#line 2211 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp43_ = _tmp42_.x;
#line 2211 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			cx = _tmp43_;
#line 2212 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp44_ = viewport_allocation;
#line 2212 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp45_ = _tmp44_.y;
#line 2212 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			cy = _tmp45_;
#line 2213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp46_ = viewport_allocation;
#line 2213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp47_ = _tmp46_.width;
#line 2213 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			cwidth = _tmp47_;
#line 2214 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp48_ = viewport_allocation;
#line 2214 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp49_ = _tmp48_.height;
#line 2214 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			cheight = _tmp49_;
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (self, TYPE_DIRECT_PHOTO_PAGE)) {
#line 14002 "PhotoPage.c"
				gint _tmp51_ = 0;
				gint _tmp52_ = 0;
				gint _tmp53_ = 0;
				GtkAllocation _tmp54_ = {0};
				gint _tmp55_ = 0;
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp51_ = rx;
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp52_ = cx;
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp53_ = cwidth;
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp54_ = tool_alloc;
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp55_ = _tmp54_.width;
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp50_ = ((_tmp51_ + _tmp52_) + (_tmp53_ / 2)) - (_tmp55_ / 2);
#line 14020 "PhotoPage.c"
			} else {
				gint _tmp56_ = 0;
				gint _tmp57_ = 0;
				gint _tmp58_ = 0;
#line 2219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp56_ = rx;
#line 2219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp57_ = cx;
#line 2219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp58_ = cwidth;
#line 2219 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp50_ = (_tmp56_ + _tmp57_) + (_tmp58_ / 2);
#line 14033 "PhotoPage.c"
			}
#line 2218 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			x = _tmp50_;
#line 2220 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp59_ = ry;
#line 2220 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp60_ = cy;
#line 2220 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp61_ = cheight;
#line 2220 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp62_ = tool_alloc;
#line 2220 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp63_ = _tmp62_.height;
#line 2220 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			y = ((_tmp59_ + _tmp60_) + _tmp61_) - ((_tmp63_ / 4) * 3);
#line 14049 "PhotoPage.c"
		} else {
			GtkWindow* _tmp64_ = NULL;
			GtkWindow* _tmp65_ = NULL;
			GtkAllocation toolbar_alloc = {0};
			GtkToolbar* _tmp66_ = NULL;
			GtkToolbar* _tmp67_ = NULL;
			GtkAllocation _tmp68_ = {0};
			GdkScreen* screen = NULL;
			GtkWindow* _tmp69_ = NULL;
			GtkWindow* _tmp70_ = NULL;
			GdkScreen* _tmp71_ = NULL;
			GdkScreen* _tmp72_ = NULL;
			GdkScreen* _tmp73_ = NULL;
			GdkScreen* _tmp74_ = NULL;
			gint _tmp75_ = 0;
			GdkScreen* _tmp76_ = NULL;
			gint _tmp77_ = 0;
			GtkAllocation _tmp78_ = {0};
			gint _tmp79_ = 0;
			GtkAllocation _tmp80_ = {0};
			gint _tmp81_ = 0;
			EditingToolsEditingTool* _tmp82_ = NULL;
#line 2222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp64_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp65_ = _tmp64_;
#line 2222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp65_, TYPE_FULLSCREEN_WINDOW), "get_container() is FullscreenWindow");
#line 2222 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp65_);
#line 2227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp66_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp67_ = _tmp66_;
#line 2227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			gtk_widget_get_allocation (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, gtk_widget_get_type (), GtkWidget), &_tmp68_);
#line 2227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			toolbar_alloc = _tmp68_;
#line 2227 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp67_);
#line 2229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp69_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp70_ = _tmp69_;
#line 2229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp71_ = gtk_window_get_screen (_tmp70_);
#line 2229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp72_ = _g_object_ref0 (_tmp71_);
#line 2229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp73_ = _tmp72_;
#line 2229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp70_);
#line 2229 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			screen = _tmp73_;
#line 2230 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp74_ = screen;
#line 2230 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp75_ = gdk_screen_get_width (_tmp74_);
#line 2230 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			x = _tmp75_;
#line 2231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp76_ = screen;
#line 2231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp77_ = gdk_screen_get_height (_tmp76_);
#line 2231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp78_ = toolbar_alloc;
#line 2231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp79_ = _tmp78_.height;
#line 2231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp80_ = tool_alloc;
#line 2231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp81_ = _tmp80_.height;
#line 2231 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			y = ((_tmp77_ - _tmp79_) - _tmp81_) - EDITING_HOST_PAGE_TOOL_WINDOW_SEPARATOR;
#line 2235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp82_ = self->priv->current_tool;
#line 2235 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp82_, EDITING_TOOLS_TYPE_ADJUST_TOOL)) {
#line 14128 "PhotoPage.c"
				gint _tmp83_ = 0;
#line 2236 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp83_ = x;
#line 2236 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				x = (_tmp83_ * 3) / 4;
#line 14134 "PhotoPage.c"
			} else {
				gint _tmp84_ = 0;
				GtkAllocation _tmp85_ = {0};
				gint _tmp86_ = 0;
#line 2238 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp84_ = x;
#line 2238 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp85_ = tool_alloc;
#line 2238 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp86_ = _tmp85_.width;
#line 2238 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				x = (_tmp84_ - _tmp86_) / 2;
#line 14147 "PhotoPage.c"
			}
#line 2200 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (screen);
#line 14151 "PhotoPage.c"
		}
	}
#line 2244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp87_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp88_ = _tmp87_;
#line 2244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp89_ = gtk_window_get_screen (_tmp88_);
#line 2244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp90_ = _g_object_ref0 (_tmp89_);
#line 2244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp91_ = _tmp90_;
#line 2244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp88_);
#line 2244 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	screen = _tmp91_;
#line 2245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp92_ = x;
#line 2245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp93_ = screen;
#line 2245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp94_ = gdk_screen_get_width (_tmp93_);
#line 2245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp95_ = tool_alloc;
#line 2245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp96_ = _tmp95_.width;
#line 2245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp97_ = CLAMP (_tmp92_, 0, _tmp94_ - _tmp96_);
#line 2245 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	x = _tmp97_;
#line 2246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp98_ = y;
#line 2246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp99_ = screen;
#line 2246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp100_ = gdk_screen_get_height (_tmp99_);
#line 2246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp101_ = tool_alloc;
#line 2246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp102_ = _tmp101_.height;
#line 2246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp103_ = CLAMP (_tmp98_, 0, _tmp100_ - _tmp102_);
#line 2246 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	y = _tmp103_;
#line 2248 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp104_ = tool_window;
#line 2248 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp105_ = x;
#line 2248 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp106_ = y;
#line 2248 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_window_move (G_TYPE_CHECK_INSTANCE_CAST (_tmp104_, gtk_window_get_type (), GtkWindow), _tmp105_, _tmp106_);
#line 2249 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp107_ = tool_window;
#line 2249 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp107_, gtk_widget_get_type (), GtkWidget));
#line 2250 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp108_ = tool_window;
#line 2250 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gtk_window_present (G_TYPE_CHECK_INSTANCE_CAST (_tmp108_, gtk_window_get_type (), GtkWindow));
#line 2177 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (screen);
#line 2177 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (tool_window);
#line 14216 "PhotoPage.c"
}


static void editing_host_page_real_on_next_photo (SinglePhotoPage* base) {
	EditingHostPage * self;
	Dimensions _tmp0_ = {0};
	gboolean _tmp1_ = FALSE;
	Photo* current_photo = NULL;
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	DataView* current = NULL;
	ViewCollection* _tmp4_ = NULL;
	ViewCollection* _tmp5_ = NULL;
	Photo* _tmp6_ = NULL;
	Photo* _tmp7_ = NULL;
	DataView* _tmp8_ = NULL;
	DataView* _tmp9_ = NULL;
	DataView* _tmp10_ = NULL;
	DataView* next = NULL;
	DataView* _tmp11_ = NULL;
	DataView* _tmp12_ = NULL;
#line 2253 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 2254 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp0_, 0, 0);
#line 2254 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp0_, FALSE);
#line 2256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (self);
#line 2256 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 2257 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 14250 "PhotoPage.c"
	}
#line 2259 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_get_photo (self);
#line 2259 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	current_photo = _tmp2_;
#line 2260 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = current_photo;
#line 2260 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp3_ != NULL, "current_photo != null");
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = editing_host_page_get_photo (self);
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = view_collection_get_view_for_source (_tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource));
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp7_);
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp5_);
#line 2262 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	current = _tmp9_;
#line 2263 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = current;
#line 2263 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp10_ == NULL) {
#line 2264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (current);
#line 2264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (current_photo);
#line 2264 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 14288 "PhotoPage.c"
	}
#line 2267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = current;
#line 2267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _g_object_ref0 (_tmp11_);
#line 2267 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	next = _tmp12_;
#line 14296 "PhotoPage.c"
	{
		gboolean _tmp13_ = FALSE;
#line 2268 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = TRUE;
#line 2268 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		while (TRUE) {
#line 14303 "PhotoPage.c"
			ViewCollection* _tmp14_ = NULL;
			ViewCollection* _tmp15_ = NULL;
			DataView* _tmp16_ = NULL;
			DataView* _tmp17_ = NULL;
			DataView* _tmp18_ = NULL;
			Photo* next_photo = NULL;
			DataView* _tmp19_ = NULL;
			DataSource* _tmp20_ = NULL;
			Photo* _tmp21_ = NULL;
			Photo* _tmp22_ = NULL;
			Photo* _tmp23_ = NULL;
			Photo* _tmp24_ = NULL;
			Photo* _tmp25_ = NULL;
#line 2268 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (!_tmp13_) {
#line 14319 "PhotoPage.c"
			}
#line 2268 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp13_ = FALSE;
#line 2269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp14_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp15_ = _tmp14_;
#line 2269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp16_ = next;
#line 2269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp17_ = view_collection_get_next (_tmp15_, _tmp16_);
#line 2269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (next);
#line 2269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			next = _tmp17_;
#line 2269 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_data_collection_unref0 (_tmp15_);
#line 2270 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp18_ = next;
#line 2270 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp18_ == NULL) {
#line 2271 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 14343 "PhotoPage.c"
			}
#line 2273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp19_ = next;
#line 2273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp20_ = data_view_get_source (_tmp19_);
#line 2273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp21_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, TYPE_PHOTO) ? ((Photo*) _tmp20_) : NULL;
#line 2273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp21_ == NULL) {
#line 2273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (_tmp20_);
#line 14355 "PhotoPage.c"
			}
#line 2273 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			next_photo = _tmp21_;
#line 2274 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp22_ = next_photo;
#line 2274 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp22_ == NULL) {
#line 2275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (next_photo);
#line 2275 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				continue;
#line 14367 "PhotoPage.c"
			}
#line 2277 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp23_ = next_photo;
#line 2277 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp24_ = current_photo;
#line 2277 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp23_ == _tmp24_) {
#line 2278 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (next_photo);
#line 2278 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 14379 "PhotoPage.c"
			}
#line 2280 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp25_ = next_photo;
#line 2280 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			editing_host_page_replace_photo (self, _tmp25_);
#line 2282 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (next_photo);
#line 2282 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			break;
#line 14389 "PhotoPage.c"
		}
	}
#line 2253 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (next);
#line 2253 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (current);
#line 2253 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (current_photo);
#line 14398 "PhotoPage.c"
}


static void editing_host_page_real_on_previous_photo (SinglePhotoPage* base) {
	EditingHostPage * self;
	Dimensions _tmp0_ = {0};
	gboolean _tmp1_ = FALSE;
	Photo* current_photo = NULL;
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	DataView* current = NULL;
	ViewCollection* _tmp4_ = NULL;
	ViewCollection* _tmp5_ = NULL;
	Photo* _tmp6_ = NULL;
	Photo* _tmp7_ = NULL;
	DataView* _tmp8_ = NULL;
	DataView* _tmp9_ = NULL;
	DataView* _tmp10_ = NULL;
	DataView* previous = NULL;
	DataView* _tmp11_ = NULL;
	DataView* _tmp12_ = NULL;
#line 2286 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 2287 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dimensions_init (&_tmp0_, 0, 0);
#line 2287 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_deactivate_tool (self, NULL, NULL, &_tmp0_, FALSE);
#line 2289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (self);
#line 2289 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 2290 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 14432 "PhotoPage.c"
	}
#line 2292 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_get_photo (self);
#line 2292 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	current_photo = _tmp2_;
#line 2293 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = current_photo;
#line 2293 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp3_ != NULL, "current_photo != null");
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = editing_host_page_get_photo (self);
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = view_collection_get_view_for_source (_tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource));
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp7_);
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp5_);
#line 2295 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	current = _tmp9_;
#line 2296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = current;
#line 2296 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp10_ == NULL) {
#line 2297 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (current);
#line 2297 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (current_photo);
#line 2297 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 14470 "PhotoPage.c"
	}
#line 2300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = current;
#line 2300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _g_object_ref0 (_tmp11_);
#line 2300 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	previous = _tmp12_;
#line 14478 "PhotoPage.c"
	{
		gboolean _tmp13_ = FALSE;
#line 2301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = TRUE;
#line 2301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		while (TRUE) {
#line 14485 "PhotoPage.c"
			ViewCollection* _tmp14_ = NULL;
			ViewCollection* _tmp15_ = NULL;
			DataView* _tmp16_ = NULL;
			DataView* _tmp17_ = NULL;
			DataView* _tmp18_ = NULL;
			Photo* previous_photo = NULL;
			DataView* _tmp19_ = NULL;
			DataSource* _tmp20_ = NULL;
			Photo* _tmp21_ = NULL;
			Photo* _tmp22_ = NULL;
			Photo* _tmp23_ = NULL;
			Photo* _tmp24_ = NULL;
			Photo* _tmp25_ = NULL;
#line 2301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (!_tmp13_) {
#line 14501 "PhotoPage.c"
			}
#line 2301 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp13_ = FALSE;
#line 2302 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp14_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2302 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp15_ = _tmp14_;
#line 2302 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp16_ = previous;
#line 2302 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp17_ = view_collection_get_previous (_tmp15_, _tmp16_);
#line 2302 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (previous);
#line 2302 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			previous = _tmp17_;
#line 2302 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_data_collection_unref0 (_tmp15_);
#line 2303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp18_ = previous;
#line 2303 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp18_ == NULL) {
#line 2304 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 14525 "PhotoPage.c"
			}
#line 2306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp19_ = previous;
#line 2306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp20_ = data_view_get_source (_tmp19_);
#line 2306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp21_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, TYPE_PHOTO) ? ((Photo*) _tmp20_) : NULL;
#line 2306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp21_ == NULL) {
#line 2306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (_tmp20_);
#line 14537 "PhotoPage.c"
			}
#line 2306 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			previous_photo = _tmp21_;
#line 2307 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp22_ = previous_photo;
#line 2307 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp22_ == NULL) {
#line 2308 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (previous_photo);
#line 2308 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				continue;
#line 14549 "PhotoPage.c"
			}
#line 2310 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp23_ = previous_photo;
#line 2310 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp24_ = current_photo;
#line 2310 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			if (_tmp23_ == _tmp24_) {
#line 2311 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (previous_photo);
#line 2311 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 14561 "PhotoPage.c"
			}
#line 2313 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp25_ = previous_photo;
#line 2313 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			editing_host_page_replace_photo (self, _tmp25_);
#line 2315 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (previous_photo);
#line 2315 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			break;
#line 14571 "PhotoPage.c"
		}
	}
#line 2286 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (previous);
#line 2286 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (current);
#line 2286 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (current_photo);
#line 14580 "PhotoPage.c"
}


gboolean editing_host_page_has_current_tool (EditingHostPage* self) {
	gboolean result = FALSE;
	EditingToolsEditingTool* _tmp0_ = NULL;
#line 2319 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (self), FALSE);
#line 2320 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->current_tool;
#line 2320 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp0_ != NULL;
#line 2320 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 14595 "PhotoPage.c"
}


void editing_host_page_unset_view_collection (EditingHostPage* self) {
#line 2323 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_EDITING_HOST_PAGE (self));
#line 2324 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (self->priv->parent_view);
#line 2324 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->parent_view = NULL;
#line 14606 "PhotoPage.c"
}


static EditingHostPageEditingHostCanvas* editing_host_page_editing_host_canvas_construct (GType object_type, EditingHostPage* host_page) {
	EditingHostPageEditingHostCanvas* self = NULL;
	EditingHostPage* _tmp0_ = NULL;
	GtkWindow* _tmp1_ = NULL;
	GtkWindow* _tmp2_ = NULL;
	EditingHostPage* _tmp3_ = NULL;
	GtkDrawingArea* _tmp4_ = NULL;
	GdkWindow* _tmp5_ = NULL;
	EditingHostPage* _tmp6_ = NULL;
	Photo* _tmp7_ = NULL;
	Photo* _tmp8_ = NULL;
	EditingHostPage* _tmp9_ = NULL;
	cairo_t* _tmp10_ = NULL;
	cairo_t* _tmp11_ = NULL;
	EditingHostPage* _tmp12_ = NULL;
	Dimensions _tmp13_ = {0};
	EditingHostPage* _tmp14_ = NULL;
	GdkPixbuf* _tmp15_ = NULL;
	GdkPixbuf* _tmp16_ = NULL;
	EditingHostPage* _tmp17_ = NULL;
	GdkRectangle _tmp18_ = {0};
	EditingHostPage* _tmp19_ = NULL;
	EditingHostPage* _tmp20_ = NULL;
#line 377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_EDITING_HOST_PAGE (host_page), NULL);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = host_page;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page));
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = host_page;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)->canvas;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget));
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = host_page;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = editing_host_page_get_photo (_tmp6_);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = host_page;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = single_photo_page_get_cairo_context (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = _tmp10_;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = host_page;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_surface_dim (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp13_);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = host_page;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = single_photo_page_get_scaled_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = _tmp15_;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = host_page;
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_scaled_pixbuf_position (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp18_);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = (EditingHostPageEditingHostCanvas*) editing_tools_photo_canvas_construct (object_type, _tmp2_, _tmp5_, _tmp8_, _tmp11_, &_tmp13_, _tmp16_, &_tmp18_);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp16_);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_cairo_destroy0 (_tmp11_);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp8_);
#line 378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 382 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = host_page;
#line 382 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = _g_object_ref0 (_tmp19_);
#line 382 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->host_page);
#line 382 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->host_page = _tmp20_;
#line 377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self;
#line 14693 "PhotoPage.c"
}


static EditingHostPageEditingHostCanvas* editing_host_page_editing_host_canvas_new (EditingHostPage* host_page) {
#line 377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return editing_host_page_editing_host_canvas_construct (EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS, host_page);
#line 14700 "PhotoPage.c"
}


static void editing_host_page_editing_host_canvas_real_repaint (EditingToolsPhotoCanvas* base) {
	EditingHostPageEditingHostCanvas * self;
	EditingHostPage* _tmp0_ = NULL;
#line 385 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS, EditingHostPageEditingHostCanvas);
#line 386 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->host_page;
#line 386 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 14713 "PhotoPage.c"
}


static void editing_host_page_editing_host_canvas_class_init (EditingHostPageEditingHostCanvasClass * klass) {
#line 374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_editing_host_canvas_parent_class = g_type_class_peek_parent (klass);
#line 374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingToolsPhotoCanvasClass *) klass)->finalize = editing_host_page_editing_host_canvas_finalize;
#line 374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_type_class_add_private (klass, sizeof (EditingHostPageEditingHostCanvasPrivate));
#line 374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingToolsPhotoCanvasClass *) klass)->repaint = (void (*)(EditingToolsPhotoCanvas*)) editing_host_page_editing_host_canvas_real_repaint;
#line 14726 "PhotoPage.c"
}


static void editing_host_page_editing_host_canvas_instance_init (EditingHostPageEditingHostCanvas * self) {
#line 374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv = EDITING_HOST_PAGE_EDITING_HOST_CANVAS_GET_PRIVATE (self);
#line 14733 "PhotoPage.c"
}


static void editing_host_page_editing_host_canvas_finalize (EditingToolsPhotoCanvas* obj) {
	EditingHostPageEditingHostCanvas * self;
#line 374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EDITING_HOST_PAGE_TYPE_EDITING_HOST_CANVAS, EditingHostPageEditingHostCanvas);
#line 375 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->host_page);
#line 374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_TOOLS_PHOTO_CANVAS_CLASS (editing_host_page_editing_host_canvas_parent_class)->finalize (obj);
#line 14745 "PhotoPage.c"
}


static GType editing_host_page_editing_host_canvas_get_type (void) {
	static volatile gsize editing_host_page_editing_host_canvas_type_id__volatile = 0;
	if (g_once_init_enter (&editing_host_page_editing_host_canvas_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EditingHostPageEditingHostCanvasClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_host_page_editing_host_canvas_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingHostPageEditingHostCanvas), 0, (GInstanceInitFunc) editing_host_page_editing_host_canvas_instance_init, NULL };
		GType editing_host_page_editing_host_canvas_type_id;
		editing_host_page_editing_host_canvas_type_id = g_type_register_static (EDITING_TOOLS_TYPE_PHOTO_CANVAS, "EditingHostPageEditingHostCanvas", &g_define_type_info, 0);
		g_once_init_leave (&editing_host_page_editing_host_canvas_type_id__volatile, editing_host_page_editing_host_canvas_type_id);
	}
	return editing_host_page_editing_host_canvas_type_id__volatile;
}


static void editing_host_page_class_init (EditingHostPageClass * klass) {
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_parent_class = g_type_class_peek_parent (klass);
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_type_class_add_private (klass, sizeof (EditingHostPagePrivate));
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_zoom_slider_key_press = (gboolean (*)(EditingHostPage*, GdkEventKey*)) editing_host_page_real_on_zoom_slider_key_press;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_increase_size = (void (*)(EditingHostPage*)) editing_host_page_real_on_increase_size;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_decrease_size = (void (*)(EditingHostPage*)) editing_host_page_real_on_decrease_size;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->save_zoom_state = (void (*)(SinglePhotoPage*)) editing_host_page_real_save_zoom_state;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->get_zoom_buffer = (ZoomBuffer* (*)(SinglePhotoPage*)) editing_host_page_real_get_zoom_buffer;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_mousewheel_up = (gboolean (*)(Page*, GdkEventScroll*)) editing_host_page_real_on_mousewheel_up;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_mousewheel_down = (gboolean (*)(Page*, GdkEventScroll*)) editing_host_page_real_on_mousewheel_down;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->restore_zoom_state = (void (*)(SinglePhotoPage*)) editing_host_page_real_restore_zoom_state;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->is_zoom_supported = (gboolean (*)(SinglePhotoPage*)) editing_host_page_real_is_zoom_supported;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->set_container = (void (*)(Page*, GtkWindow*)) editing_host_page_real_set_container;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->photo_changing = (void (*)(EditingHostPage*, Photo*)) editing_host_page_real_photo_changing;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((GtkWidgetClass *) klass)->realize = (void (*)(GtkWidget*)) editing_host_page_real_realize;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->switched_to = (void (*)(Page*)) editing_host_page_real_switched_to;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->switching_from = (void (*)(Page*)) editing_host_page_real_switching_from;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->switching_to_fullscreen = (void (*)(Page*, FullscreenWindow*)) editing_host_page_real_switching_to_fullscreen;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->returning_from_fullscreen = (void (*)(Page*, FullscreenWindow*)) editing_host_page_real_returning_from_fullscreen;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->create_photo_view = (DataView* (*)(EditingHostPage*, DataSource*)) editing_host_page_real_create_photo_view;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->update_ui = (void (*)(EditingHostPage*, gboolean)) editing_host_page_real_update_ui;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->notify_photo_backing_missing = (void (*)(EditingHostPage*, Photo*, gboolean)) editing_host_page_real_notify_photo_backing_missing;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->confirm_replace_photo = (gboolean (*)(EditingHostPage*, Photo*, Photo*)) editing_host_page_real_confirm_replace_photo;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->cancel_zoom = (void (*)(SinglePhotoPage*)) editing_host_page_real_cancel_zoom;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_resize = (void (*)(Page*, GdkRectangle*)) editing_host_page_real_on_resize;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_resize_finished = (void (*)(Page*, GdkRectangle*)) editing_host_page_real_on_resize_finished;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->update_actions = (void (*)(Page*, gint, gint)) editing_host_page_real_update_actions;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_shift_pressed = (gboolean (*)(Page*, GdkEventKey*)) editing_host_page_real_on_shift_pressed;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_shift_released = (gboolean (*)(Page*, GdkEventKey*)) editing_host_page_real_on_shift_released;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_alt_pressed = (gboolean (*)(Page*, GdkEventKey*)) editing_host_page_real_on_alt_pressed;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_alt_released = (gboolean (*)(Page*, GdkEventKey*)) editing_host_page_real_on_alt_released;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_double_click = (gboolean (*)(EditingHostPage*, GdkEventButton*)) editing_host_page_real_on_double_click;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_left_click = (gboolean (*)(Page*, GdkEventButton*)) editing_host_page_real_on_left_click;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_left_released = (gboolean (*)(Page*, GdkEventButton*)) editing_host_page_real_on_left_released;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_right_click = (gboolean (*)(Page*, GdkEventButton*)) editing_host_page_real_on_right_click;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_motion = (gboolean (*)(Page*, GdkEventMotion*, gint, gint, GdkModifierType)) editing_host_page_real_on_motion;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_leave_notify_event = (gboolean (*)(Page*)) editing_host_page_real_on_leave_notify_event;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_move = (void (*)(Page*, GdkRectangle*)) editing_host_page_real_on_move;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_move_finished = (void (*)(Page*, GdkRectangle*)) editing_host_page_real_on_move_finished;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((GtkWidgetClass *) klass)->key_press_event = (gboolean (*)(GtkWidget*, GdkEventKey*)) editing_host_page_real_key_press_event;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->new_surface = (void (*)(SinglePhotoPage*, cairo_t*, Dimensions*)) editing_host_page_real_new_surface;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->updated_pixbuf = (void (*)(SinglePhotoPage*, GdkPixbuf*, SinglePhotoPageUpdateReason, Dimensions*)) editing_host_page_real_updated_pixbuf;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->get_bottom_left_trinket = (GdkPixbuf* (*)(EditingHostPage*, gint)) editing_host_page_real_get_bottom_left_trinket;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->get_top_left_trinket = (GdkPixbuf* (*)(EditingHostPage*, gint)) editing_host_page_real_get_top_left_trinket;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->get_top_right_trinket = (GdkPixbuf* (*)(EditingHostPage*, gint)) editing_host_page_real_get_top_right_trinket;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->get_bottom_right_trinket = (GdkPixbuf* (*)(EditingHostPage*, gint)) editing_host_page_real_get_bottom_right_trinket;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->paint = (void (*)(SinglePhotoPage*, cairo_t*, Dimensions*)) editing_host_page_real_paint;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_ctrl_pressed = (gboolean (*)(Page*, GdkEventKey*)) editing_host_page_real_on_ctrl_pressed;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_ctrl_released = (gboolean (*)(Page*, GdkEventKey*)) editing_host_page_real_on_ctrl_released;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->on_next_photo = (void (*)(SinglePhotoPage*)) editing_host_page_real_on_next_photo;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((SinglePhotoPageClass *) klass)->on_previous_photo = (void (*)(SinglePhotoPage*)) editing_host_page_real_on_previous_photo;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	G_OBJECT_CLASS (klass)->finalize = editing_host_page_finalize;
#line 14864 "PhotoPage.c"
}


static void editing_host_page_instance_init (EditingHostPage * self) {
	GtkToolButton* _tmp0_ = NULL;
	GtkToolButton* _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv = EDITING_HOST_PAGE_GET_PRIVATE (self);
#line 391 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->parent_view = NULL;
#line 392 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->swapped = NULL;
#line 393 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->pixbuf_dirty = TRUE;
#line 394 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->rotate_button = NULL;
#line 395 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->crop_button = NULL;
#line 396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->redeye_button = NULL;
#line 397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->adjust_button = NULL;
#line 398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->straighten_button = NULL;
#line 399 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->enhance_button = NULL;
#line 400 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->zoom_slider = NULL;
#line 401 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = (GtkToolButton*) gtk_tool_button_new (NULL, RESOURCES_PREVIOUS_LABEL);
#line 401 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp0_);
#line 401 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->prev_button = _tmp0_;
#line 402 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = (GtkToolButton*) gtk_tool_button_new (NULL, RESOURCES_NEXT_LABEL);
#line 402 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp1_);
#line 402 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->next_button = _tmp1_;
#line 403 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->current_tool = NULL;
#line 404 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->current_editing_toggle = NULL;
#line 405 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->cancel_editing_pixbuf = NULL;
#line 406 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->photo_missing = FALSE;
#line 407 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->cache = NULL;
#line 408 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->master_cache = NULL;
#line 409 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->dnd_handler = NULL;
#line 410 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->enable_interactive_zoom_refresh = FALSE;
#line 412 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->is_pan_in_progress = FALSE;
#line 413 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->saved_slider_val = 0.0;
#line 414 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->zoom_buffer = NULL;
#line 415 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 415 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->last_locations = _tmp2_;
#line 14932 "PhotoPage.c"
}


static void editing_host_page_finalize (GObject* obj) {
	EditingHostPage * self;
	SourceCollection* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	ViewCollection* _tmp2_ = NULL;
	ViewCollection* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	ViewCollection* _tmp5_ = NULL;
	ViewCollection* _tmp6_ = NULL;
	guint _tmp7_ = 0U;
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EDITING_HOST_PAGE, EditingHostPage);
#line 551 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->sources;
#line 551 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE);
#line 551 "/home/jens/Source/shotwell/src/PhotoPage.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) _editing_host_page_on_photos_altered_data_collection_items_altered, self);
#line 553 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 553 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 553 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp4_, NULL, FALSE);
#line 553 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _editing_host_page_on_view_contents_ordering_altered_data_collection_contents_altered, self);
#line 553 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp3_);
#line 554 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 554 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 554 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("ordering-changed", TYPE_DATA_COLLECTION, &_tmp7_, NULL, FALSE);
#line 554 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _editing_host_page_on_view_contents_ordering_altered_data_collection_ordering_changed, self);
#line 554 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp6_);
#line 390 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (self->priv->sources);
#line 391 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (self->priv->parent_view);
#line 392 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->swapped);
#line 394 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->rotate_button);
#line 395 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->crop_button);
#line 396 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->redeye_button);
#line 397 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->adjust_button);
#line 398 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->straighten_button);
#line 399 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->enhance_button);
#line 400 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->zoom_slider);
#line 401 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->prev_button);
#line 402 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->next_button);
#line 403 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_editing_tools_editing_tool_unref0 (self->priv->current_tool);
#line 404 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->current_editing_toggle);
#line 405 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->cancel_editing_pixbuf);
#line 407 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->cache);
#line 408 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->master_cache);
#line 409 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_drag_and_drop_handler_unref0 (self->priv->dnd_handler);
#line 414 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->zoom_buffer);
#line 415 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->last_locations);
#line 364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	G_OBJECT_CLASS (editing_host_page_parent_class)->finalize (obj);
#line 15016 "PhotoPage.c"
}


GType editing_host_page_get_type (void) {
	static volatile gsize editing_host_page_type_id__volatile = 0;
	if (g_once_init_enter (&editing_host_page_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EditingHostPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) editing_host_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditingHostPage), 0, (GInstanceInitFunc) editing_host_page_instance_init, NULL };
		GType editing_host_page_type_id;
		editing_host_page_type_id = g_type_register_static (TYPE_SINGLE_PHOTO_PAGE, "EditingHostPage", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&editing_host_page_type_id__volatile, editing_host_page_type_id);
	}
	return editing_host_page_type_id__volatile;
}


static void _library_photo_page_on_photo_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 2364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_photo_destroyed ((LibraryPhotoPage*) self, source);
#line 15035 "PhotoPage.c"
}


static void _library_photo_page_on_metadata_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) {
#line 2365 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_metadata_altered ((LibraryPhotoPage*) self, items);
#line 15042 "PhotoPage.c"
}


static void _library_photo_page_on_external_app_changed_configuration_facade_external_app_changed (ConfigurationFacade* _sender, gpointer self) {
#line 2366 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_external_app_changed ((LibraryPhotoPage*) self);
#line 15049 "PhotoPage.c"
}


static void _library_photo_page_on_export_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_export ((LibraryPhotoPage*) self);
#line 15056 "PhotoPage.c"
}


static void _library_photo_page_on_print_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_print ((LibraryPhotoPage*) self);
#line 15063 "PhotoPage.c"
}


static void _library_photo_page_on_publish_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_publish ((LibraryPhotoPage*) self);
#line 15070 "PhotoPage.c"
}


static void _library_photo_page_on_remove_from_library_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_remove_from_library ((LibraryPhotoPage*) self);
#line 15077 "PhotoPage.c"
}


static void _library_photo_page_on_move_to_trash_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_move_to_trash ((LibraryPhotoPage*) self);
#line 15084 "PhotoPage.c"
}


static void _single_photo_page_on_previous_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_on_previous_photo ((SinglePhotoPage*) self);
#line 15091 "PhotoPage.c"
}


static void _single_photo_page_on_next_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_on_next_photo ((SinglePhotoPage*) self);
#line 15098 "PhotoPage.c"
}


static void _editing_host_page_on_rotate_clockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_rotate_clockwise ((EditingHostPage*) self);
#line 15105 "PhotoPage.c"
}


static void _editing_host_page_on_rotate_counterclockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_rotate_counterclockwise ((EditingHostPage*) self);
#line 15112 "PhotoPage.c"
}


static void _editing_host_page_on_flip_horizontally_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_flip_horizontally ((EditingHostPage*) self);
#line 15119 "PhotoPage.c"
}


static void _editing_host_page_on_flip_vertically_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_flip_vertically ((EditingHostPage*) self);
#line 15126 "PhotoPage.c"
}


static void _editing_host_page_on_enhance_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_enhance ((EditingHostPage*) self);
#line 15133 "PhotoPage.c"
}


static void _editing_host_page_on_copy_adjustments_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_copy_adjustments ((EditingHostPage*) self);
#line 15140 "PhotoPage.c"
}


static void _editing_host_page_on_paste_adjustments_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_paste_adjustments ((EditingHostPage*) self);
#line 15147 "PhotoPage.c"
}


static void _editing_host_page_toggle_crop_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_toggle_crop ((EditingHostPage*) self);
#line 15154 "PhotoPage.c"
}


static void _editing_host_page_toggle_straighten_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_toggle_straighten ((EditingHostPage*) self);
#line 15161 "PhotoPage.c"
}


static void _editing_host_page_toggle_redeye_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_toggle_redeye ((EditingHostPage*) self);
#line 15168 "PhotoPage.c"
}


static void _editing_host_page_toggle_adjust_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_toggle_adjust ((EditingHostPage*) self);
#line 15175 "PhotoPage.c"
}


static void _editing_host_page_on_revert_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_revert ((EditingHostPage*) self);
#line 15182 "PhotoPage.c"
}


static void _editing_host_page_on_edit_title_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_edit_title ((EditingHostPage*) self);
#line 15189 "PhotoPage.c"
}


static void _editing_host_page_on_edit_comment_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_edit_comment ((EditingHostPage*) self);
#line 15196 "PhotoPage.c"
}


static void _editing_host_page_on_adjust_date_time_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_adjust_date_time ((EditingHostPage*) self);
#line 15203 "PhotoPage.c"
}


static void _library_photo_page_on_external_edit_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_external_edit ((LibraryPhotoPage*) self);
#line 15210 "PhotoPage.c"
}


static void _library_photo_page_on_external_edit_raw_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_external_edit_raw ((LibraryPhotoPage*) self);
#line 15217 "PhotoPage.c"
}


static void _library_photo_page_on_send_to_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_send_to ((LibraryPhotoPage*) self);
#line 15224 "PhotoPage.c"
}


static void _editing_host_page_on_set_background_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_set_background ((EditingHostPage*) self);
#line 15231 "PhotoPage.c"
}


static void _library_photo_page_on_flag_unflag_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_flag_unflag ((LibraryPhotoPage*) self);
#line 15238 "PhotoPage.c"
}


static void _library_photo_page_on_increase_rating_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_increase_rating ((LibraryPhotoPage*) self);
#line 15245 "PhotoPage.c"
}


static void _library_photo_page_on_decrease_rating_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_decrease_rating ((LibraryPhotoPage*) self);
#line 15252 "PhotoPage.c"
}


static void _library_photo_page_on_rate_rejected_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_rate_rejected ((LibraryPhotoPage*) self);
#line 15259 "PhotoPage.c"
}


static void _library_photo_page_on_rate_unrated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_rate_unrated ((LibraryPhotoPage*) self);
#line 15266 "PhotoPage.c"
}


static void _library_photo_page_on_rate_one_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_rate_one ((LibraryPhotoPage*) self);
#line 15273 "PhotoPage.c"
}


static void _library_photo_page_on_rate_two_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_rate_two ((LibraryPhotoPage*) self);
#line 15280 "PhotoPage.c"
}


static void _library_photo_page_on_rate_three_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_rate_three ((LibraryPhotoPage*) self);
#line 15287 "PhotoPage.c"
}


static void _library_photo_page_on_rate_four_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_rate_four ((LibraryPhotoPage*) self);
#line 15294 "PhotoPage.c"
}


static void _library_photo_page_on_rate_five_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_rate_five ((LibraryPhotoPage*) self);
#line 15301 "PhotoPage.c"
}


static void _editing_host_page_on_increase_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_increase_size ((EditingHostPage*) self);
#line 15308 "PhotoPage.c"
}


static void _editing_host_page_on_decrease_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_on_decrease_size ((EditingHostPage*) self);
#line 15315 "PhotoPage.c"
}


static void _editing_host_page_snap_zoom_to_min_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_snap_zoom_to_min ((EditingHostPage*) self);
#line 15322 "PhotoPage.c"
}


static void _editing_host_page_snap_zoom_to_isomorphic_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_snap_zoom_to_isomorphic ((EditingHostPage*) self);
#line 15329 "PhotoPage.c"
}


static void _editing_host_page_snap_zoom_to_max_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_snap_zoom_to_max ((EditingHostPage*) self);
#line 15336 "PhotoPage.c"
}


static void _library_photo_page_on_add_tags_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_add_tags ((LibraryPhotoPage*) self);
#line 15343 "PhotoPage.c"
}


static void _library_photo_page_on_modify_tags_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_modify_tags ((LibraryPhotoPage*) self);
#line 15350 "PhotoPage.c"
}


static void _library_photo_page_on_slideshow_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_slideshow ((LibraryPhotoPage*) self);
#line 15357 "PhotoPage.c"
}


static void _page_on_action_toggle_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_on_action_toggle ((Page*) self, action, parameter);
#line 15364 "PhotoPage.c"
}


static void _library_photo_page_on_display_ratings_gsimple_action_change_state_callback (GSimpleAction* action, GVariant* value, gpointer self) {
#line 2388 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_display_ratings ((LibraryPhotoPage*) self, action, value);
#line 15371 "PhotoPage.c"
}


static void _library_photo_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) {
#line 2348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_photos_altered ((LibraryPhotoPage*) self);
#line 15378 "PhotoPage.c"
}


static void _library_photo_page_on_photo_unlinking_source_collection_items_unlinking (SourceCollection* _sender, GeeCollection* unlinking, gpointer self) {
#line 2359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_photo_unlinking ((LibraryPhotoPage*) self, unlinking);
#line 15385 "PhotoPage.c"
}


static void _library_photo_page_on_photo_relinked_source_collection_items_relinked (SourceCollection* _sender, GeeCollection* relinked, gpointer self) {
#line 2360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_photo_relinked ((LibraryPhotoPage*) self, relinked);
#line 15392 "PhotoPage.c"
}


LibraryPhotoPage* library_photo_page_construct (GType object_type) {
	LibraryPhotoPage * self = NULL;
	LibraryPhotoSourceCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	ViewCollection* _tmp2_ = NULL;
	LibraryPhotoSourceCollection* _tmp3_ = NULL;
	LibraryPhotoSourceCollection* _tmp4_ = NULL;
	ConfigFacade* _tmp5_ = NULL;
	ConfigFacade* _tmp6_ = NULL;
	ViewCollection* _tmp7_ = NULL;
	ViewCollection* _tmp8_ = NULL;
	LibraryPhotoPageLibraryPhotoPageViewFilter* _tmp9_ = NULL;
	LibraryPhotoSourceCollection* _tmp10_ = NULL;
	LibraryPhotoSourceCollection* _tmp11_ = NULL;
#line 2345 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = library_photo_global;
#line 2345 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = (LibraryPhotoPage*) editing_host_page_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), "Photo");
#line 2348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 2348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _library_photo_page_on_photos_altered_data_collection_items_altered, self, 0);
#line 2348 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp2_);
#line 2351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = library_photo_global;
#line 2351 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _library_photo_page_on_photo_destroyed_source_collection_item_destroyed, self, 0);
#line 2352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = library_photo_global;
#line 2352 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _library_photo_page_on_metadata_altered_data_collection_items_altered, self, 0);
#line 2355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = config_facade_get_instance ();
#line 2355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 2355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "external-app-changed", (GCallback) _library_photo_page_on_external_app_changed_configuration_facade_external_app_changed, self, 0);
#line 2355 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp6_);
#line 2358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 2358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = self->priv->filter;
#line 2358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view_collection_install_view_filter (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_VIEW_FILTER, ViewFilter));
#line 2358 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp8_);
#line 2359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = library_photo_global;
#line 2359 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_SOURCE_COLLECTION, SourceCollection), "items-unlinking", (GCallback) _library_photo_page_on_photo_unlinking_source_collection_items_unlinking, self, 0);
#line 2360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = library_photo_global;
#line 2360 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_SOURCE_COLLECTION, SourceCollection), "items-relinked", (GCallback) _library_photo_page_on_photo_relinked_source_collection_items_relinked, self, 0);
#line 2344 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self;
#line 15458 "PhotoPage.c"
}


LibraryPhotoPage* library_photo_page_new (void) {
#line 2344 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return library_photo_page_construct (TYPE_LIBRARY_PHOTO_PAGE);
#line 15465 "PhotoPage.c"
}


gboolean library_photo_page_not_trashed_view_filter (LibraryPhotoPage* self, DataView* view) {
	gboolean result = FALSE;
	DataView* _tmp0_ = NULL;
	DataSource* _tmp1_ = NULL;
	MediaSource* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
#line 2369 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_LIBRARY_PHOTO_PAGE (self), FALSE);
#line 2369 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_DATA_VIEW (view), FALSE);
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = view;
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = data_view_get_source (_tmp0_);
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource);
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = media_source_is_trashed (_tmp2_);
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = !_tmp3_;
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp4_;
#line 2370 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 15496 "PhotoPage.c"
}


static void library_photo_page_on_photo_unlinking (LibraryPhotoPage* self, GeeCollection* unlinking) {
	LibraryPhotoPageLibraryPhotoPageViewFilter* _tmp0_ = NULL;
#line 2373 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2373 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GEE_IS_COLLECTION (unlinking));
#line 2374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->filter;
#line 2374 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIEW_FILTER, ViewFilter), "refresh");
#line 15510 "PhotoPage.c"
}


static void library_photo_page_on_photo_relinked (LibraryPhotoPage* self, GeeCollection* relinked) {
	LibraryPhotoPageLibraryPhotoPageViewFilter* _tmp0_ = NULL;
#line 2377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2377 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GEE_IS_COLLECTION (relinked));
#line 2378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->filter;
#line 2378 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIEW_FILTER, ViewFilter), "refresh");
#line 15524 "PhotoPage.c"
}


static void library_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames) {
	LibraryPhotoPage * self;
	GeeList* _tmp0_ = NULL;
	GeeList* _tmp1_ = NULL;
	GeeList* _tmp2_ = NULL;
#line 2381 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2381 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GEE_IS_LIST (ui_filenames));
#line 2382 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = ui_filenames;
#line 2382 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (library_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 2384 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = ui_filenames;
#line 2384 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection), "photo_context.ui");
#line 2385 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = ui_filenames;
#line 2385 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), "photo.ui");
#line 15549 "PhotoPage.c"
}


static GVariant* _variant_new16 (gboolean value) {
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return g_variant_ref_sink (g_variant_new_boolean (value));
#line 15556 "PhotoPage.c"
}


static GVariant* _variant_new17 (const gchar* value) {
#line 2446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return g_variant_ref_sink (g_variant_new_string (value));
#line 15563 "PhotoPage.c"
}


static void _library_photo_page_on_raw_developer_changed_g_simple_action_change_state (GSimpleAction* _sender, GVariant* value, gpointer self) {
#line 2448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_raw_developer_changed ((LibraryPhotoPage*) self, _sender, value);
#line 15570 "PhotoPage.c"
}


static void library_photo_page_real_add_actions (Page* base, GActionMap* map) {
	LibraryPhotoPage * self;
	GActionMap* _tmp0_ = NULL;
	GActionMap* _tmp1_ = NULL;
	GAction* _tmp2_ = NULL;
	GSimpleAction* _tmp3_ = NULL;
	GSimpleAction* _tmp4_ = NULL;
	ConfigFacade* _tmp5_ = NULL;
	ConfigFacade* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	GVariant* _tmp8_ = NULL;
	RawDeveloper d = 0;
	ConfigFacade* _tmp9_ = NULL;
	ConfigFacade* _tmp10_ = NULL;
	RawDeveloper _tmp11_ = 0;
	RawDeveloper _tmp12_ = 0;
	const gchar* _tmp13_ = NULL;
	RawDeveloper _tmp14_ = 0;
	GSimpleAction* action = NULL;
	const GVariantType* _tmp15_ = NULL;
	GVariant* _tmp16_ = NULL;
	GSimpleAction* _tmp17_ = NULL;
	GSimpleAction* _tmp18_ = NULL;
	GActionMap* _tmp19_ = NULL;
#line 2440 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2440 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (G_IS_ACTION_MAP (map));
#line 2441 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = map;
#line 2441 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (library_photo_page_parent_class)->add_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp0_);
#line 2443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = map;
#line 2443 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_action_map_add_action_entries (_tmp1_, LIBRARY_PHOTO_PAGE_entries, G_N_ELEMENTS (LIBRARY_PHOTO_PAGE_entries), self);
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ViewRatings");
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp2_) : NULL;
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_ == NULL) {
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp2_);
#line 15618 "PhotoPage.c"
	}
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = config_facade_get_instance ();
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = configuration_facade_get_display_photo_ratings (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _variant_new16 (_tmp7_);
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_emit_by_name (_tmp4_, "change-state", _tmp8_);
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_variant_unref0 (_tmp8_);
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp6_);
#line 2444 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp4_);
#line 2445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = config_facade_get_instance ();
#line 2445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 2445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = configuration_facade_get_default_raw_developer (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 2445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 2445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp10_);
#line 2445 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	d = _tmp12_;
#line 2447 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = d;
#line 2447 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp14_ == RAW_DEVELOPER_SHOTWELL) {
#line 2447 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = "Shotwell";
#line 15656 "PhotoPage.c"
	} else {
#line 2447 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = "Camera";
#line 15660 "PhotoPage.c"
	}
#line 2446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = G_VARIANT_TYPE_STRING;
#line 2446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = _variant_new17 (_tmp13_);
#line 2446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = g_simple_action_new_stateful ("RawDeveloper", _tmp15_, _tmp16_);
#line 2446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = _tmp17_;
#line 2446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_variant_unref0 (_tmp16_);
#line 2446 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	action = _tmp18_;
#line 2448 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (action, "change-state", (GCallback) _library_photo_page_on_raw_developer_changed_g_simple_action_change_state, self, 0);
#line 2449 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_simple_action_set_enabled (action, TRUE);
#line 2450 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = map;
#line 2450 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_action_map_add_action (_tmp19_, G_TYPE_CHECK_INSTANCE_CAST (action, g_action_get_type (), GAction));
#line 2440 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (action);
#line 15684 "PhotoPage.c"
}


static void library_photo_page_real_remove_actions (Page* base, GActionMap* map) {
	LibraryPhotoPage * self;
	GActionMap* _tmp0_ = NULL;
#line 2453 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2453 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (G_IS_ACTION_MAP (map));
#line 2454 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = map;
#line 2454 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (library_photo_page_parent_class)->remove_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp0_);
#line 15699 "PhotoPage.c"
	{
		GActionEntry* entry_collection = NULL;
		gint entry_collection_length1 = 0;
		gint _entry_collection_size_ = 0;
		gint entry_it = 0;
#line 2455 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		entry_collection = LIBRARY_PHOTO_PAGE_entries;
#line 2455 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		entry_collection_length1 = G_N_ELEMENTS (LIBRARY_PHOTO_PAGE_entries);
#line 2455 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		for (entry_it = 0; entry_it < G_N_ELEMENTS (LIBRARY_PHOTO_PAGE_entries); entry_it = entry_it + 1) {
#line 15711 "PhotoPage.c"
			GActionEntry entry = {0};
#line 2455 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			entry = entry_collection[entry_it];
#line 15715 "PhotoPage.c"
			{
				GActionMap* _tmp1_ = NULL;
				GActionEntry _tmp2_ = {0};
				const gchar* _tmp3_ = NULL;
#line 2456 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp1_ = map;
#line 2456 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp2_ = entry;
#line 2456 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp3_ = _tmp2_.name;
#line 2456 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				g_action_map_remove_action (_tmp1_, _tmp3_);
#line 15728 "PhotoPage.c"
			}
		}
	}
}


static gpointer _injection_group_ref0 (gpointer self) {
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self ? injection_group_ref (self) : NULL;
#line 15738 "PhotoPage.c"
}


static void _vala_array_add82 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value) {
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if ((*length) == (*size)) {
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
#line 15749 "PhotoPage.c"
	}
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	(*array)[(*length)++] = value;
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	(*array)[*length] = NULL;
#line 15755 "PhotoPage.c"
}


static void _vala_array_add83 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value) {
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if ((*length) == (*size)) {
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
#line 15766 "PhotoPage.c"
	}
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	(*array)[(*length)++] = value;
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	(*array)[*length] = NULL;
#line 15772 "PhotoPage.c"
}


static void _vala_array_add84 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value) {
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if ((*length) == (*size)) {
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
#line 15783 "PhotoPage.c"
	}
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	(*array)[(*length)++] = value;
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	(*array)[*length] = NULL;
#line 15789 "PhotoPage.c"
}


static InjectionGroup** library_photo_page_real_init_collect_injection_groups (Page* base, int* result_length1) {
	LibraryPhotoPage * 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;
	const gchar* _tmp3_ = NULL;
	InjectionGroup** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	InjectionGroup* _tmp5_ = NULL;
	InjectionGroup* publish_group = NULL;
	InjectionGroup* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	InjectionGroup** _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
	InjectionGroup* _tmp9_ = NULL;
	InjectionGroup* bg_group = NULL;
	InjectionGroup* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	InjectionGroup** _tmp12_ = NULL;
	gint _tmp12__length1 = 0;
	InjectionGroup* _tmp13_ = NULL;
	InjectionGroup** _tmp14_ = NULL;
	gint _tmp14__length1 = 0;
#line 2460 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = PAGE_CLASS (library_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 2461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	groups = _tmp1_;
#line 2461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	groups_length1 = _tmp0_;
#line 2461 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_groups_size_ = groups_length1;
#line 2463 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = injection_group_new ("PrintPlaceholder");
#line 2463 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	print_group = _tmp2_;
#line 2464 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _ ("_Print");
#line 2464 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	injection_group_add_menu_item (print_group, _tmp3_, "Print", "<Primary>p");
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = groups;
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4__length1 = groups_length1;
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _injection_group_ref0 (print_group);
#line 2466 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_array_add82 (&groups, &groups_length1, &_groups_size_, _tmp5_);
#line 2468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = injection_group_new ("PublishPlaceholder");
#line 2468 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	publish_group = _tmp6_;
#line 2469 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _ ("_Publish");
#line 2469 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	injection_group_add_menu_item (publish_group, _tmp7_, "Publish", "<Primary><Shift>p");
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = groups;
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8__length1 = groups_length1;
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _injection_group_ref0 (publish_group);
#line 2471 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_array_add83 (&groups, &groups_length1, &_groups_size_, _tmp9_);
#line 2473 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = injection_group_new ("SetBackgroundPlaceholder");
#line 2473 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	bg_group = _tmp10_;
#line 2474 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = _ ("Set as _Desktop Background");
#line 2474 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	injection_group_add_menu_item (bg_group, _tmp11_, "SetBackground", "<Primary>b");
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = groups;
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12__length1 = groups_length1;
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = _injection_group_ref0 (bg_group);
#line 2476 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_array_add84 (&groups, &groups_length1, &_groups_size_, _tmp13_);
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = groups;
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14__length1 = groups_length1;
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (result_length1) {
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		*result_length1 = _tmp14__length1;
#line 15887 "PhotoPage.c"
	}
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp14_;
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_injection_group_unref0 (bg_group);
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_injection_group_unref0 (publish_group);
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_injection_group_unref0 (print_group);
#line 2478 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 15899 "PhotoPage.c"
}


static void library_photo_page_on_display_ratings (LibraryPhotoPage* self, GSimpleAction* action, GVariant* value) {
	gboolean display = FALSE;
	GVariant* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	ConfigFacade* _tmp2_ = NULL;
	ConfigFacade* _tmp3_ = NULL;
	GSimpleAction* _tmp4_ = NULL;
	GVariant* _tmp5_ = NULL;
#line 2481 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2481 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (G_IS_SIMPLE_ACTION (action));
#line 2482 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = value;
#line 2482 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = g_variant_get_boolean (_tmp0_);
#line 2482 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	display = _tmp1_;
#line 2484 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_set_display_ratings (self, display);
#line 2486 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = config_facade_get_instance ();
#line 2486 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 2486 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	configuration_facade_set_display_photo_ratings (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), display);
#line 2486 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 2487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = action;
#line 2487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = value;
#line 2487 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_simple_action_set_state (_tmp4_, _tmp5_);
#line 15937 "PhotoPage.c"
}


static void library_photo_page_set_display_ratings (LibraryPhotoPage* self, gboolean display) {
	GSimpleAction* action = NULL;
	GAction* _tmp0_ = NULL;
	GSimpleAction* _tmp1_ = NULL;
	GSimpleAction* _tmp2_ = NULL;
#line 2491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ViewRatings");
#line 2492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp0_) : NULL;
#line 2492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ == NULL) {
#line 2492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp0_);
#line 15956 "PhotoPage.c"
	}
#line 2492 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	action = _tmp1_;
#line 2493 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = action;
#line 2493 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_ != NULL) {
#line 15964 "PhotoPage.c"
		GSimpleAction* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 2494 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = action;
#line 2494 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = display;
#line 2494 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_simple_action_set_enabled (_tmp3_, _tmp4_);
#line 15973 "PhotoPage.c"
	}
#line 2491 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (action);
#line 15977 "PhotoPage.c"
}


static void library_photo_page_real_update_actions (Page* base, gint selected_count, gint count) {
	LibraryPhotoPage * self;
	gboolean multiple = FALSE;
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean rotate_possible = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean is_raw = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp21_ = FALSE;
	gboolean _tmp30_ = FALSE;
	gboolean _tmp31_ = FALSE;
	gboolean _tmp33_ = FALSE;
	gboolean _tmp34_ = FALSE;
	gboolean _tmp35_ = FALSE;
	gboolean _tmp39_ = FALSE;
	gboolean _tmp40_ = FALSE;
	gboolean _tmp41_ = FALSE;
	gboolean _tmp42_ = FALSE;
	gboolean _tmp43_ = FALSE;
	gboolean _tmp44_ = FALSE;
	gboolean _tmp45_ = FALSE;
	gboolean _tmp46_ = FALSE;
	gboolean _tmp55_ = FALSE;
	gboolean _tmp56_ = FALSE;
	gint _tmp61_ = 0;
	gint _tmp62_ = 0;
#line 2497 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2498 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2498 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 2498 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection));
#line 2498 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_ > 1;
#line 2498 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 2498 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	multiple = _tmp3_;
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_) {
#line 16033 "PhotoPage.c"
		Photo* _tmp6_ = NULL;
		Photo* _tmp7_ = NULL;
		gboolean _tmp8_ = FALSE;
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = editing_host_page_is_rotate_available (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp7_);
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp8_;
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp7_);
#line 16047 "PhotoPage.c"
	} else {
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = FALSE;
#line 16051 "PhotoPage.c"
	}
#line 2499 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	rotate_possible = _tmp4_;
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp10_) {
#line 16059 "PhotoPage.c"
		Photo* _tmp11_ = NULL;
		Photo* _tmp12_ = NULL;
		PhotoFileFormat _tmp13_ = 0;
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = photo_get_master_file_format (_tmp12_);
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = _tmp13_ == PHOTO_FILE_FORMAT_RAW;
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp12_);
#line 16073 "PhotoPage.c"
	} else {
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = FALSE;
#line 16077 "PhotoPage.c"
	}
#line 2500 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	is_raw = _tmp9_;
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp15_) {
#line 16085 "PhotoPage.c"
		ConfigFacade* _tmp16_ = NULL;
		ConfigFacade* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = config_facade_get_instance ();
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = _tmp16_;
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = configuration_facade_get_external_photo_app (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp18_;
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = g_strcmp0 (_tmp19_, "") != 0;
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp19_);
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp17_);
#line 16104 "PhotoPage.c"
	} else {
#line 2503 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = FALSE;
#line 16108 "PhotoPage.c"
	}
#line 2502 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEdit", _tmp14_);
#line 2505 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2505 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp21_) {
#line 16116 "PhotoPage.c"
		gboolean _tmp22_ = FALSE;
		Photo* _tmp23_ = NULL;
		Photo* _tmp24_ = NULL;
		gboolean _tmp25_ = FALSE;
		gboolean _tmp26_ = FALSE;
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = _tmp23_;
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp25_ = photo_has_transformations (_tmp24_);
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = _tmp25_;
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp24_);
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp26_) {
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp22_ = TRUE;
#line 16136 "PhotoPage.c"
		} else {
			Photo* _tmp27_ = NULL;
			Photo* _tmp28_ = NULL;
			gboolean _tmp29_ = FALSE;
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp27_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp28_ = _tmp27_;
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp29_ = photo_has_editable (_tmp28_);
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp22_ = _tmp29_;
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp28_);
#line 16151 "PhotoPage.c"
		}
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = _tmp22_;
#line 16155 "PhotoPage.c"
	} else {
#line 2506 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = FALSE;
#line 16159 "PhotoPage.c"
	}
#line 2505 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp20_);
#line 2508 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp31_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2508 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp31_) {
#line 16167 "PhotoPage.c"
		gboolean _tmp32_ = FALSE;
#line 2508 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2508 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = !_tmp32_;
#line 16173 "PhotoPage.c"
	} else {
#line 2508 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = FALSE;
#line 16177 "PhotoPage.c"
	}
#line 2508 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp30_) {
#line 2509 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_photo_page_update_rating_menu_item_sensitivity (self);
#line 2510 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_photo_page_update_development_menu_item_sensitivity (self);
#line 16185 "PhotoPage.c"
	}
#line 2513 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp33_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2513 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", _tmp33_);
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp35_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp35_) {
#line 16195 "PhotoPage.c"
		Photo* _tmp36_ = NULL;
		Photo* _tmp37_ = NULL;
		gboolean _tmp38_ = FALSE;
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp36_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp37_ = _tmp36_;
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp38_ = photo_has_color_adjustments (_tmp37_);
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp34_ = _tmp38_;
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp37_);
#line 16209 "PhotoPage.c"
	} else {
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp34_ = FALSE;
#line 16213 "PhotoPage.c"
	}
#line 2515 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CopyColorAdjustments", _tmp34_);
#line 2516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp39_ = pixel_transformation_bundle_has_copied_color_adjustments ();
#line 2516 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "PasteColorAdjustments", _tmp39_);
#line 2518 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp40_ = multiple;
#line 2518 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "PrevPhoto", _tmp40_);
#line 2519 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp41_ = multiple;
#line 2519 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "NextPhoto", _tmp41_);
#line 2520 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp42_ = rotate_possible;
#line 2520 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", _tmp42_);
#line 2521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp43_ = rotate_possible;
#line 2521 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", _tmp43_);
#line 2522 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp44_ = rotate_possible;
#line 2522 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipHorizontally", _tmp44_);
#line 2523 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp45_ = rotate_possible;
#line 2523 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipVertically", _tmp45_);
#line 2525 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp46_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2525 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp46_) {
#line 16249 "PhotoPage.c"
		Photo* _tmp47_ = NULL;
		Photo* _tmp48_ = NULL;
		Scaling _tmp49_ = {0};
		gboolean _tmp50_ = FALSE;
		Photo* _tmp51_ = NULL;
		Photo* _tmp52_ = NULL;
		Scaling _tmp53_ = {0};
		gboolean _tmp54_ = FALSE;
#line 2526 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp47_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2526 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp48_ = _tmp47_;
#line 2526 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		scaling_for_original (&_tmp49_);
#line 2526 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp50_ = editing_tools_crop_tool_is_available (_tmp48_, &_tmp49_);
#line 2526 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Crop", _tmp50_);
#line 2526 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp48_);
#line 2527 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp51_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2527 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp52_ = _tmp51_;
#line 2527 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		scaling_for_original (&_tmp53_);
#line 2527 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp54_ = editing_tools_redeye_tool_is_available (_tmp52_, &_tmp53_);
#line 2527 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RedEye", _tmp54_);
#line 2527 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp52_);
#line 16282 "PhotoPage.c"
	}
#line 2531 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_flag_action (self);
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp56_ = is_raw;
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp56_) {
#line 16290 "PhotoPage.c"
		ConfigFacade* _tmp57_ = NULL;
		ConfigFacade* _tmp58_ = NULL;
		gchar* _tmp59_ = NULL;
		gchar* _tmp60_ = NULL;
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp57_ = config_facade_get_instance ();
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp58_ = _tmp57_;
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp59_ = configuration_facade_get_external_raw_app (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp60_ = _tmp59_;
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp55_ = g_strcmp0 (_tmp60_, "") != 0;
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp60_);
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp58_);
#line 16309 "PhotoPage.c"
	} else {
#line 2534 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp55_ = FALSE;
#line 16313 "PhotoPage.c"
	}
#line 2533 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_visible (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEditRAW", _tmp55_);
#line 2536 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp61_ = selected_count;
#line 2536 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp62_ = count;
#line 2536 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (library_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), _tmp61_, _tmp62_);
#line 16323 "PhotoPage.c"
}


static void library_photo_page_on_photos_altered (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
#line 2539 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 16336 "PhotoPage.c"
		gboolean _tmp2_ = FALSE;
		Photo* _tmp3_ = NULL;
		Photo* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = photo_has_transformations (_tmp4_);
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_;
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp6_) {
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp2_ = TRUE;
#line 16356 "PhotoPage.c"
		} else {
			Photo* _tmp7_ = NULL;
			Photo* _tmp8_ = NULL;
			gboolean _tmp9_ = FALSE;
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp7_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp8_ = _tmp7_;
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp9_ = photo_has_editable (_tmp8_);
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp2_ = _tmp9_;
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp8_);
#line 16371 "PhotoPage.c"
		}
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp2_;
#line 16375 "PhotoPage.c"
	} else {
#line 2541 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 16379 "PhotoPage.c"
	}
#line 2540 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp0_);
#line 2542 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_flag_action (self);
#line 16385 "PhotoPage.c"
}


static void library_photo_page_on_raw_developer_changed (LibraryPhotoPage* self, GSimpleAction* action, GVariant* value) {
	RawDeveloper developer = 0;
	GVariant* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GQuark _tmp4_ = 0U;
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp3_label0 = 0;
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp3_label1 = 0;
#line 16399 "PhotoPage.c"
	RawDeveloper _tmp5_ = 0;
	GSimpleAction* _tmp6_ = NULL;
	GVariant* _tmp7_ = NULL;
#line 2545 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2545 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (G_IS_SIMPLE_ACTION (action));
#line 2547 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	developer = RAW_DEVELOPER_SHOTWELL;
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = value;
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = g_variant_get_string (_tmp0_, NULL);
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = (NULL == _tmp2_) ? 0 : g_quark_from_string (_tmp2_);
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_ == ((0 != _tmp3_label0) ? _tmp3_label0 : (_tmp3_label0 = g_quark_from_static_string ("Shotwell")))) {
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 16421 "PhotoPage.c"
			default:
			{
#line 2551 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				developer = RAW_DEVELOPER_SHOTWELL;
#line 2552 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 16428 "PhotoPage.c"
			}
		}
	} else if (_tmp4_ == ((0 != _tmp3_label1) ? _tmp3_label1 : (_tmp3_label1 = g_quark_from_static_string ("Camera")))) {
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 16434 "PhotoPage.c"
			default:
			{
#line 2554 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				developer = RAW_DEVELOPER_CAMERA;
#line 2555 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 16441 "PhotoPage.c"
			}
		}
	} else {
#line 2549 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 16447 "PhotoPage.c"
			default:
			{
#line 2557 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 16452 "PhotoPage.c"
			}
		}
	}
#line 2560 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = developer;
#line 2560 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_developer_changed (self, _tmp5_);
#line 2562 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = action;
#line 2562 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = value;
#line 2562 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_simple_action_set_state (_tmp6_, _tmp7_);
#line 16466 "PhotoPage.c"
}


static void library_photo_page_real_developer_changed (LibraryPhotoPage* self, RawDeveloper rd) {
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
	Photo* photo = NULL;
	ViewCollection* _tmp4_ = NULL;
	ViewCollection* _tmp5_ = NULL;
	GeeList* _tmp6_ = NULL;
	GeeList* _tmp7_ = NULL;
	gpointer _tmp8_ = NULL;
	DataView* _tmp9_ = NULL;
	DataSource* _tmp10_ = NULL;
	Photo* _tmp11_ = NULL;
	Photo* _tmp12_ = NULL;
	gboolean _tmp13_ = FALSE;
	Photo* _tmp14_ = NULL;
	gboolean _tmp19_ = FALSE;
	Photo* _tmp20_ = NULL;
	gboolean _tmp21_ = FALSE;
#line 2566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 2566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_selected_count (_tmp1_);
#line 2566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_ != 1;
#line 2566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 2566 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_) {
#line 2567 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 16504 "PhotoPage.c"
	}
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = view_collection_get_selected (_tmp5_);
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = gee_list_get (_tmp7_, 0);
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = (DataView*) _tmp8_;
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = data_view_get_source (_tmp9_);
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, TYPE_PHOTO) ? ((Photo*) _tmp10_) : NULL;
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp11_ == NULL) {
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp10_);
#line 16526 "PhotoPage.c"
	}
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp9_);
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp7_);
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp5_);
#line 2569 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = _tmp12_;
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = photo;
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp14_ == NULL) {
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = TRUE;
#line 16544 "PhotoPage.c"
	} else {
		RawDeveloper _tmp15_ = 0;
		Photo* _tmp16_ = NULL;
		RawDeveloper _tmp17_ = 0;
		gboolean _tmp18_ = FALSE;
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = rd;
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = photo;
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = photo_get_raw_developer (_tmp16_);
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = raw_developer_is_equivalent (_tmp15_, _tmp17_);
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = _tmp18_;
#line 16560 "PhotoPage.c"
	}
#line 2570 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp13_) {
#line 2571 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (photo);
#line 2571 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 16568 "PhotoPage.c"
	}
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = photo;
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = photo_has_transformations (_tmp20_);
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp21_) {
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = TRUE;
#line 16578 "PhotoPage.c"
	} else {
		gboolean _tmp22_ = FALSE;
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = dialogs_confirm_warn_developer_changed (1);
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = _tmp22_;
#line 16585 "PhotoPage.c"
	}
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp19_) {
#line 16589 "PhotoPage.c"
		SetRawDeveloperCommand* command = NULL;
		ViewCollection* _tmp23_ = NULL;
		ViewCollection* _tmp24_ = NULL;
		GeeList* _tmp25_ = NULL;
		GeeList* _tmp26_ = NULL;
		RawDeveloper _tmp27_ = 0;
		SetRawDeveloperCommand* _tmp28_ = NULL;
		SetRawDeveloperCommand* _tmp29_ = NULL;
		CommandManager* _tmp30_ = NULL;
		CommandManager* _tmp31_ = NULL;
		SetRawDeveloperCommand* _tmp32_ = NULL;
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = _tmp23_;
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp25_ = view_collection_get_selected (_tmp24_);
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = _tmp25_;
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp27_ = rd;
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp28_ = set_raw_developer_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ITERABLE, GeeIterable), _tmp27_);
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp29_ = _tmp28_;
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp26_);
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp24_);
#line 2576 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		command = _tmp29_;
#line 2578 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2578 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = _tmp30_;
#line 2578 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = command;
#line 2578 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		command_manager_execute (_tmp31_, G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_COMMAND, Command));
#line 2578 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_command_manager_unref0 (_tmp31_);
#line 2580 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_photo_page_update_development_menu_item_sensitivity (self);
#line 2575 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (command);
#line 16635 "PhotoPage.c"
	}
#line 2565 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 16639 "PhotoPage.c"
}


void library_photo_page_developer_changed (LibraryPhotoPage* self, RawDeveloper rd) {
#line 2565 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2565 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	LIBRARY_PHOTO_PAGE_GET_CLASS (self)->developer_changed (self, rd);
#line 16648 "PhotoPage.c"
}


static void library_photo_page_update_flag_action (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
#line 2584 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2585 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2585 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Flag", _tmp0_);
#line 16660 "PhotoPage.c"
}


static void _library_photo_page_on_page_destroyed_gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
#line 2595 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_page_destroyed ((LibraryPhotoPage*) self);
#line 16667 "PhotoPage.c"
}


void library_photo_page_display_for_collection (LibraryPhotoPage* self, CollectionPage* return_page, Photo* photo, ViewCollection* view) {
	CollectionPage* _tmp0_ = NULL;
	CollectionPage* _tmp1_ = NULL;
	CollectionPage* _tmp2_ = NULL;
	ViewCollection* _tmp3_ = NULL;
	ViewCollection* _tmp4_ = NULL;
	Photo* _tmp9_ = NULL;
#line 2592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_COLLECTION_PAGE (return_page));
#line 2592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 2592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail ((view == NULL) || IS_VIEW_COLLECTION (view));
#line 2594 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = return_page;
#line 2594 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 2594 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->return_page);
#line 2594 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->return_page = _tmp1_;
#line 2595 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = return_page;
#line 2595 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), "destroy", (GCallback) _library_photo_page_on_page_destroyed_gtk_widget_destroy, self, 0);
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = view;
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_ != NULL) {
#line 16702 "PhotoPage.c"
		ViewCollection* _tmp5_ = NULL;
		ViewCollection* _tmp6_ = NULL;
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = view;
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _data_collection_ref0 (_tmp5_);
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp3_);
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp6_;
#line 16713 "PhotoPage.c"
	} else {
		CollectionPage* _tmp7_ = NULL;
		ViewCollection* _tmp8_ = NULL;
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = return_page;
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PAGE, Page));
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp3_);
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp8_;
#line 16725 "PhotoPage.c"
	}
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = photo;
#line 2597 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_display_copy_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp3_, _tmp9_);
#line 2592 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp3_);
#line 16733 "PhotoPage.c"
}


void library_photo_page_on_page_destroyed (LibraryPhotoPage* self) {
#line 2600 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->return_page);
#line 2603 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->return_page = NULL;
#line 2604 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	editing_host_page_unset_view_collection (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 16746 "PhotoPage.c"
}


CollectionPage* library_photo_page_get_controller_page (LibraryPhotoPage* self) {
	CollectionPage* result = NULL;
	CollectionPage* _tmp0_ = NULL;
	CollectionPage* _tmp1_ = NULL;
#line 2607 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_LIBRARY_PHOTO_PAGE (self), NULL);
#line 2608 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->return_page;
#line 2608 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 2608 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp1_;
#line 2608 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 16764 "PhotoPage.c"
}


static void library_photo_page_real_switched_to (Page* base) {
	LibraryPhotoPage * self;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	ConfigFacade* _tmp2_ = NULL;
	ConfigFacade* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
#line 2611 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 2615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_vala_assert (_tmp1_ != NULL, "get_photo() != null");
#line 2615 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 2617 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (library_photo_page_parent_class)->switched_to (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page));
#line 2619 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_zoom_menu_item_sensitivity (self);
#line 2620 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_rating_menu_item_sensitivity (self);
#line 2622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = config_facade_get_instance ();
#line 2622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 2622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = configuration_facade_get_display_photo_ratings (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 2622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_set_display_ratings (self, _tmp4_);
#line 2622 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 16801 "PhotoPage.c"
}


static void library_photo_page_real_switching_from (Page* base) {
	LibraryPhotoPage * self;
#line 2626 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2627 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	PAGE_CLASS (library_photo_page_parent_class)->switching_from (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page));
#line 16811 "PhotoPage.c"
	{
		GActionEntry* entry_collection = NULL;
		gint entry_collection_length1 = 0;
		gint _entry_collection_size_ = 0;
		gint entry_it = 0;
#line 2628 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		entry_collection = LIBRARY_PHOTO_PAGE_entries;
#line 2628 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		entry_collection_length1 = G_N_ELEMENTS (LIBRARY_PHOTO_PAGE_entries);
#line 2628 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		for (entry_it = 0; entry_it < G_N_ELEMENTS (LIBRARY_PHOTO_PAGE_entries); entry_it = entry_it + 1) {
#line 16823 "PhotoPage.c"
			GActionEntry entry = {0};
#line 2628 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			entry = entry_collection[entry_it];
#line 16827 "PhotoPage.c"
			{
				AppWindow* _tmp0_ = NULL;
				AppWindow* _tmp1_ = NULL;
				GActionEntry _tmp2_ = {0};
				const gchar* _tmp3_ = NULL;
#line 2629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp0_ = app_window_get_instance ();
#line 2629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp1_ = _tmp0_;
#line 2629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp2_ = entry;
#line 2629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp3_ = _tmp2_.name;
#line 2629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				g_action_map_remove_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, g_action_map_get_type (), GActionMap), _tmp3_);
#line 2629 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (_tmp1_);
#line 16845 "PhotoPage.c"
			}
		}
	}
}


static GdkPixbuf* library_photo_page_real_get_bottom_left_trinket (EditingHostPage* base, gint scale) {
	LibraryPhotoPage * self;
	GdkPixbuf* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	Photo* _tmp5_ = NULL;
	LibraryPhoto* _tmp6_ = NULL;
	Rating _tmp7_ = 0;
	gint _tmp8_ = 0;
	GdkPixbuf* _tmp9_ = NULL;
	GdkPixbuf* _tmp10_ = NULL;
#line 2633 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 16871 "PhotoPage.c"
	} else {
		ConfigFacade* _tmp2_ = NULL;
		ConfigFacade* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = config_facade_get_instance ();
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp2_;
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = configuration_facade_get_display_photo_ratings (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp4_;
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp3_);
#line 16886 "PhotoPage.c"
	}
#line 2634 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 2635 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = NULL;
#line 2635 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 16894 "PhotoPage.c"
	}
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_LIBRARY_PHOTO, LibraryPhoto);
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource));
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = scale;
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = resources_get_rating_trinket (_tmp7_, _tmp8_);
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp6_);
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp10_;
#line 2637 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 16914 "PhotoPage.c"
}


static GdkPixbuf* library_photo_page_real_get_top_right_trinket (EditingHostPage* base, gint scale) {
	LibraryPhotoPage * self;
	GdkPixbuf* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GdkPixbuf* _tmp5_ = NULL;
#line 2640 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 16932 "PhotoPage.c"
	} else {
		Photo* _tmp2_ = NULL;
		LibraryPhoto* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_LIBRARY_PHOTO, LibraryPhoto);
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = flaggable_is_flagged (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_FLAGGABLE, Flaggable));
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp4_;
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp3_);
#line 16947 "PhotoPage.c"
	}
#line 2641 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 2642 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = NULL;
#line 2642 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 16955 "PhotoPage.c"
	}
#line 2644 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = resources_get_icon (RESOURCES_ICON_FLAGGED_TRINKET, RESOURCES_DEFAULT_ICON_SCALE);
#line 2644 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp5_;
#line 2644 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 16963 "PhotoPage.c"
}


static void library_photo_page_on_slideshow (LibraryPhotoPage* self) {
	LibraryPhoto* photo = NULL;
	Photo* _tmp0_ = NULL;
	LibraryPhoto* _tmp1_ = NULL;
	AppWindow* _tmp2_ = NULL;
	AppWindow* _tmp3_ = NULL;
	LibraryPhotoSourceCollection* _tmp4_ = NULL;
	ViewCollection* _tmp5_ = NULL;
	ViewCollection* _tmp6_ = NULL;
	LibraryPhoto* _tmp7_ = NULL;
	SlideshowPage* _tmp8_ = NULL;
	SlideshowPage* _tmp9_ = NULL;
#line 2647 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2648 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2648 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_LIBRARY_PHOTO, LibraryPhoto);
#line 2649 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = photo;
#line 2649 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ == NULL) {
#line 2650 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (photo);
#line 2650 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 16993 "PhotoPage.c"
	}
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = app_window_get_instance ();
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = library_photo_global;
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = photo;
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = slideshow_page_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PHOTO, Photo));
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp8_);
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	app_window_go_fullscreen (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_PAGE, Page));
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp9_);
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp6_);
#line 2652 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 2647 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 17023 "PhotoPage.c"
}


static void library_photo_page_update_zoom_menu_item_sensitivity (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	ZoomState _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	gboolean _tmp4_ = FALSE;
	ZoomState _tmp5_ = {0};
	gboolean _tmp6_ = FALSE;
#line 2656 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp1_);
#line 2657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = zoom_state_is_max (&_tmp1_);
#line 2657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp2_) {
#line 17042 "PhotoPage.c"
		gboolean _tmp3_ = FALSE;
#line 2657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp3_;
#line 17048 "PhotoPage.c"
	} else {
#line 2657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 17052 "PhotoPage.c"
	}
#line 2657 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize", _tmp0_);
#line 2658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp5_);
#line 2658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = zoom_state_is_default (&_tmp5_);
#line 2658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp6_) {
#line 17062 "PhotoPage.c"
		gboolean _tmp7_ = FALSE;
#line 2658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = !_tmp7_;
#line 17068 "PhotoPage.c"
	} else {
#line 2658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = FALSE;
#line 17072 "PhotoPage.c"
	}
#line 2658 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize", _tmp4_);
#line 17076 "PhotoPage.c"
}


static void library_photo_page_real_on_increase_size (EditingHostPage* base) {
	LibraryPhotoPage * self;
#line 2661 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2662 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_CLASS (library_photo_page_parent_class)->on_increase_size (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2664 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_zoom_menu_item_sensitivity (self);
#line 17088 "PhotoPage.c"
}


static void library_photo_page_real_on_decrease_size (EditingHostPage* base) {
	LibraryPhotoPage * self;
#line 2667 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2668 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_CLASS (library_photo_page_parent_class)->on_decrease_size (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2670 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_zoom_menu_item_sensitivity (self);
#line 17100 "PhotoPage.c"
}


static gboolean library_photo_page_real_on_zoom_slider_key_press (EditingHostPage* base, GdkEventKey* event) {
	LibraryPhotoPage * self;
	gboolean result = FALSE;
	GdkEventKey* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GdkEventKey* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	const gchar* _tmp4_ = NULL;
#line 2673 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2673 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 2674 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = event;
#line 2674 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = EDITING_HOST_PAGE_CLASS (library_photo_page_parent_class)->on_zoom_slider_key_press (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp0_);
#line 2674 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 2675 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 2675 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 17126 "PhotoPage.c"
	}
#line 2677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = event;
#line 2677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_->keyval;
#line 2677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = gdk_keyval_name (_tmp3_);
#line 2677 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (g_strcmp0 (_tmp4_, "Escape") == 0) {
#line 2678 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_photo_page_return_to_collection (self);
#line 2679 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 2679 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 17142 "PhotoPage.c"
	} else {
#line 2681 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = FALSE;
#line 2681 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 17148 "PhotoPage.c"
	}
}


static void library_photo_page_real_update_ui (EditingHostPage* base, gboolean missing) {
	LibraryPhotoPage * self;
	gboolean sensitivity = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
#line 2685 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2686 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = missing;
#line 2686 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	sensitivity = !_tmp0_;
#line 2688 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SendTo", sensitivity);
#line 2689 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Publish", sensitivity);
#line 2690 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Print", sensitivity);
#line 2691 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonJumpToFile", sensitivity);
#line 2693 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonUndo", sensitivity);
#line 2694 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonRedo", sensitivity);
#line 2696 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize", sensitivity);
#line 2697 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize", sensitivity);
#line 2698 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ZoomFit", sensitivity);
#line 2699 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Zoom100", sensitivity);
#line 2700 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Zoom200", sensitivity);
#line 2701 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Slideshow", sensitivity);
#line 2703 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", sensitivity);
#line 2704 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", sensitivity);
#line 2705 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipHorizontally", sensitivity);
#line 2706 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipVertically", sensitivity);
#line 2707 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Enhance", sensitivity);
#line 2708 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Crop", sensitivity);
#line 2709 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RedEye", sensitivity);
#line 2710 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Adjust", sensitivity);
#line 2711 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "EditTitle", sensitivity);
#line 2712 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", sensitivity);
#line 2713 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEdit", sensitivity);
#line 2714 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEditRAW", sensitivity);
#line 2715 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", sensitivity);
#line 2717 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Rate", sensitivity);
#line 2718 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Flag", sensitivity);
#line 2719 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AddTags", sensitivity);
#line 2720 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ModifyTags", sensitivity);
#line 2722 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", sensitivity);
#line 2724 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = missing;
#line 2724 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_CLASS (library_photo_page_parent_class)->update_ui (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp1_);
#line 17228 "PhotoPage.c"
}


static void library_photo_page_real_notify_photo_backing_missing (EditingHostPage* base, Photo* photo, gboolean missing) {
	LibraryPhotoPage * self;
	gboolean _tmp0_ = FALSE;
	Photo* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
#line 2727 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2727 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 2728 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = missing;
#line 2728 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 17245 "PhotoPage.c"
		Photo* _tmp1_ = NULL;
#line 2729 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = photo;
#line 2729 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		media_source_mark_offline (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_LIBRARY_PHOTO, LibraryPhoto), TYPE_MEDIA_SOURCE, MediaSource));
#line 17251 "PhotoPage.c"
	} else {
		Photo* _tmp2_ = NULL;
#line 2731 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = photo;
#line 2731 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		media_source_mark_online (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_LIBRARY_PHOTO, LibraryPhoto), TYPE_MEDIA_SOURCE, MediaSource));
#line 17258 "PhotoPage.c"
	}
#line 2733 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = photo;
#line 2733 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = missing;
#line 2733 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	EDITING_HOST_PAGE_CLASS (library_photo_page_parent_class)->notify_photo_backing_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp3_, _tmp4_);
#line 17266 "PhotoPage.c"
}


static gboolean library_photo_page_real_key_press_event (GtkWidget* base, GdkEventKey* event) {
	LibraryPhotoPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean handled = FALSE;
	GdkEventKey* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GQuark _tmp8_ = 0U;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label0 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label1 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label2 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label3 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label4 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label5 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label6 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label7 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label8 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label9 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label10 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label11 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label12 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label13 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label14 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label15 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label16 = 0;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	static GQuark _tmp7_label17 = 0;
#line 2736 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2736 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 2737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (GTK_WIDGET_CLASS (library_photo_page_parent_class)->key_press_event != NULL) {
#line 17322 "PhotoPage.c"
		GdkEventKey* _tmp1_ = NULL;
		gboolean _tmp2_ = FALSE;
#line 2737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = event;
#line 2737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = GTK_WIDGET_CLASS (library_photo_page_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), gtk_widget_get_type (), GtkWidget), _tmp1_);
#line 2737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp2_ == TRUE;
#line 17331 "PhotoPage.c"
	} else {
#line 2737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 17335 "PhotoPage.c"
	}
#line 2737 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 2738 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 2738 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 17343 "PhotoPage.c"
	}
#line 2740 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	handled = TRUE;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = event;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_->keyval;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = gdk_keyval_name (_tmp4_);
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = (NULL == _tmp6_) ? 0 : g_quark_from_string (_tmp6_);
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (((_tmp8_ == ((0 != _tmp7_label0) ? _tmp7_label0 : (_tmp7_label0 = g_quark_from_static_string ("Escape")))) || (_tmp8_ == ((0 != _tmp7_label1) ? _tmp7_label1 : (_tmp7_label1 = g_quark_from_static_string ("Return"))))) || (_tmp8_ == ((0 != _tmp7_label2) ? _tmp7_label2 : (_tmp7_label2 = g_quark_from_static_string ("KP_Enter"))))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17361 "PhotoPage.c"
			default:
			{
				GtkWindow* _tmp9_ = NULL;
				GtkWindow* _tmp10_ = NULL;
				gboolean _tmp11_ = FALSE;
#line 2745 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp9_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2745 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp10_ = _tmp9_;
#line 2745 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp11_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, TYPE_FULLSCREEN_WINDOW);
#line 2745 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (_tmp10_);
#line 2745 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				if (_tmp11_) {
#line 2746 "/home/jens/Source/shotwell/src/PhotoPage.vala"
					library_photo_page_return_to_collection (self);
#line 17379 "PhotoPage.c"
				}
#line 2747 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17383 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label3) ? _tmp7_label3 : (_tmp7_label3 = g_quark_from_static_string ("Delete")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17389 "PhotoPage.c"
			default:
			{
#line 2753 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "MoveToTrash");
#line 2754 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17396 "PhotoPage.c"
			}
		}
	} else if ((_tmp8_ == ((0 != _tmp7_label4) ? _tmp7_label4 : (_tmp7_label4 = g_quark_from_static_string ("period")))) || (_tmp8_ == ((0 != _tmp7_label5) ? _tmp7_label5 : (_tmp7_label5 = g_quark_from_static_string ("greater"))))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17402 "PhotoPage.c"
			default:
			{
#line 2758 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseRating");
#line 2759 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17409 "PhotoPage.c"
			}
		}
	} else if ((_tmp8_ == ((0 != _tmp7_label6) ? _tmp7_label6 : (_tmp7_label6 = g_quark_from_static_string ("comma")))) || (_tmp8_ == ((0 != _tmp7_label7) ? _tmp7_label7 : (_tmp7_label7 = g_quark_from_static_string ("less"))))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17415 "PhotoPage.c"
			default:
			{
#line 2763 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseRating");
#line 2764 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17422 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label8) ? _tmp7_label8 : (_tmp7_label8 = g_quark_from_static_string ("KP_1")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17428 "PhotoPage.c"
			default:
			{
#line 2767 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateOne");
#line 2768 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17435 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label9) ? _tmp7_label9 : (_tmp7_label9 = g_quark_from_static_string ("KP_2")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17441 "PhotoPage.c"
			default:
			{
#line 2771 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateTwo");
#line 2772 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17448 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label10) ? _tmp7_label10 : (_tmp7_label10 = g_quark_from_static_string ("KP_3")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17454 "PhotoPage.c"
			default:
			{
#line 2775 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateThree");
#line 2776 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17461 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label11) ? _tmp7_label11 : (_tmp7_label11 = g_quark_from_static_string ("KP_4")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17467 "PhotoPage.c"
			default:
			{
#line 2779 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateFour");
#line 2780 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17474 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label12) ? _tmp7_label12 : (_tmp7_label12 = g_quark_from_static_string ("KP_5")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17480 "PhotoPage.c"
			default:
			{
#line 2783 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateFive");
#line 2784 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17487 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label13) ? _tmp7_label13 : (_tmp7_label13 = g_quark_from_static_string ("KP_0")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17493 "PhotoPage.c"
			default:
			{
#line 2787 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateUnrated");
#line 2788 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17500 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label14) ? _tmp7_label14 : (_tmp7_label14 = g_quark_from_static_string ("KP_9")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17506 "PhotoPage.c"
			default:
			{
#line 2791 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateRejected");
#line 2792 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17513 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label15) ? _tmp7_label15 : (_tmp7_label15 = g_quark_from_static_string ("bracketright")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17519 "PhotoPage.c"
			default:
			{
#line 2795 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise");
#line 2796 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17526 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label16) ? _tmp7_label16 : (_tmp7_label16 = g_quark_from_static_string ("bracketleft")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17532 "PhotoPage.c"
			default:
			{
#line 2799 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise");
#line 2800 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17539 "PhotoPage.c"
			}
		}
	} else if (_tmp8_ == ((0 != _tmp7_label17) ? _tmp7_label17 : (_tmp7_label17 = g_quark_from_static_string ("slash")))) {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17545 "PhotoPage.c"
			default:
			{
#line 2803 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Flag");
#line 2804 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17552 "PhotoPage.c"
			}
		}
	} else {
#line 2741 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (0) {
#line 17558 "PhotoPage.c"
			default:
			{
#line 2807 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				handled = FALSE;
#line 2808 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 17565 "PhotoPage.c"
			}
		}
	}
#line 2811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = handled;
#line 2811 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 17573 "PhotoPage.c"
}


static gboolean library_photo_page_real_on_double_click (EditingHostPage* base, GdkEventButton* event) {
	LibraryPhotoPage * self;
	gboolean result = FALSE;
	FullscreenWindow* fs = NULL;
	GtkWindow* _tmp0_ = NULL;
	FullscreenWindow* _tmp1_ = NULL;
	FullscreenWindow* _tmp2_ = NULL;
#line 2814 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2814 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 2815 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2815 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_FULLSCREEN_WINDOW) ? ((FullscreenWindow*) _tmp0_) : NULL;
#line 2815 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ == NULL) {
#line 2815 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp0_);
#line 17596 "PhotoPage.c"
	}
#line 2815 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	fs = _tmp1_;
#line 2816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = fs;
#line 2816 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp2_ == NULL) {
#line 2817 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->return_to_collection_on_release = TRUE;
#line 17606 "PhotoPage.c"
	} else {
		FullscreenWindow* _tmp3_ = NULL;
#line 2819 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = fs;
#line 2819 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		fullscreen_window_close (_tmp3_);
#line 17613 "PhotoPage.c"
	}
#line 2821 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 2821 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (fs);
#line 2821 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 17621 "PhotoPage.c"
}


static gboolean library_photo_page_real_on_left_released (Page* base, GdkEventButton* event) {
	LibraryPhotoPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	GdkEventButton* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 2824 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2824 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 2825 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->return_to_collection_on_release;
#line 2825 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 2826 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->return_to_collection_on_release = FALSE;
#line 2827 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_photo_page_return_to_collection (self);
#line 2829 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		result = TRUE;
#line 2829 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return result;
#line 17647 "PhotoPage.c"
	}
#line 2832 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = event;
#line 2832 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = PAGE_CLASS (library_photo_page_parent_class)->on_left_released (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp1_);
#line 2832 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp2_;
#line 2832 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 17657 "PhotoPage.c"
}


static GtkMenu* library_photo_page_get_context_menu (LibraryPhotoPage* self) {
	GtkMenu* result = NULL;
	GtkMenu* _tmp0_ = NULL;
	GtkMenu* _tmp7_ = NULL;
	GtkMenu* _tmp8_ = NULL;
#line 2837 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_LIBRARY_PHOTO_PAGE (self), NULL);
#line 2838 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->context_menu;
#line 2838 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_ == NULL) {
#line 17672 "PhotoPage.c"
		GMenuModel* model = NULL;
		GtkBuilder* _tmp1_ = NULL;
		GObject* _tmp2_ = NULL;
		GMenuModel* _tmp3_ = NULL;
		GMenuModel* _tmp4_ = NULL;
		GtkMenu* _tmp5_ = NULL;
		GtkMenu* _tmp6_ = NULL;
#line 2839 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)->builder;
#line 2839 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = gtk_builder_get_object (_tmp1_, "PhotoContextMenu");
#line 2839 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, g_menu_model_get_type ()) ? ((GMenuModel*) _tmp2_) : NULL);
#line 2839 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		model = _tmp3_;
#line 2841 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = model;
#line 2841 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = (GtkMenu*) gtk_menu_new_from_model (_tmp4_);
#line 2841 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_object_ref_sink (_tmp5_);
#line 2841 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (self->priv->context_menu);
#line 2841 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		self->priv->context_menu = _tmp5_;
#line 2842 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = self->priv->context_menu;
#line 2842 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gtk_menu_attach_to_widget (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), NULL);
#line 2838 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (model);
#line 17704 "PhotoPage.c"
	}
#line 2845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = self->priv->context_menu;
#line 2845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 2845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp8_;
#line 2845 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 17714 "PhotoPage.c"
}


static gboolean library_photo_page_real_on_context_buttonpress (Page* base, GdkEventButton* event) {
	LibraryPhotoPage * self;
	gboolean result = FALSE;
	GtkMenu* _tmp0_ = NULL;
	GtkMenu* _tmp1_ = NULL;
	GdkEventButton* _tmp2_ = NULL;
#line 2848 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2848 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 2849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = library_photo_page_get_context_menu (self);
#line 2849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 2849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = event;
#line 2849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_popup_context_menu (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), _tmp1_, _tmp2_);
#line 2849 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 2851 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 2851 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 17742 "PhotoPage.c"
}


static gboolean library_photo_page_real_on_context_keypress (Page* base) {
	LibraryPhotoPage * self;
	gboolean result = FALSE;
	GtkMenu* _tmp0_ = NULL;
	GtkMenu* _tmp1_ = NULL;
#line 2854 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2855 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = library_photo_page_get_context_menu (self);
#line 2855 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 2855 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_popup_context_menu (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), _tmp1_, NULL);
#line 2855 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 2857 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = TRUE;
#line 2857 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 17765 "PhotoPage.c"
}


static void library_photo_page_return_to_collection (LibraryPhotoPage* self) {
	CollectionPage* _tmp0_ = NULL;
#line 2860 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2862 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = self->priv->return_page;
#line 2862 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (NULL != _tmp0_) {
#line 17777 "PhotoPage.c"
		LibraryWindow* _tmp1_ = NULL;
		LibraryWindow* _tmp2_ = NULL;
		CollectionPage* _tmp3_ = NULL;
#line 2863 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = library_window_get_app ();
#line 2863 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = _tmp1_;
#line 2863 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = self->priv->return_page;
#line 2863 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_window_switch_to_page (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PAGE, Page));
#line 2863 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp2_);
#line 17791 "PhotoPage.c"
	} else {
		LibraryWindow* _tmp4_ = NULL;
		LibraryWindow* _tmp5_ = NULL;
#line 2865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = library_window_get_app ();
#line 2865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = _tmp4_;
#line 2865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_window_switch_to_library_page (_tmp5_);
#line 2865 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp5_);
#line 17803 "PhotoPage.c"
	}
}


static void library_photo_page_on_remove_from_library (LibraryPhotoPage* self) {
	LibraryPhoto* photo = NULL;
	Photo* _tmp0_ = NULL;
	GeeCollection* photos = NULL;
	GeeArrayList* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
#line 2868 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2869 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_LIBRARY_PHOTO, LibraryPhoto);
#line 2871 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 2871 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photos = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection);
#line 2872 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gee_collection_add (photos, photo);
#line 2874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _ ("Remove From Library");
#line 2874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _ ("Removing Photo From Library");
#line 2874 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	remove_from_app (photos, _tmp2_, _tmp3_);
#line 2868 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photos);
#line 2868 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 17837 "PhotoPage.c"
}


static void library_photo_page_on_move_to_trash (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	CollectionPage* _tmp1_ = NULL;
	LibraryPhoto* photo = NULL;
	Photo* _tmp4_ = NULL;
	GeeCollection* photos = NULL;
	GeeArrayList* _tmp5_ = NULL;
	GeeCollection* _tmp6_ = NULL;
	LibraryPhoto* _tmp7_ = NULL;
	LibraryPhoto* _tmp8_ = NULL;
	Photo* _tmp9_ = NULL;
	Photo* _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	CommandManager* _tmp22_ = NULL;
	CommandManager* _tmp23_ = NULL;
	GeeCollection* _tmp24_ = NULL;
	TrashUntrashPhotosCommand* _tmp25_ = NULL;
	TrashUntrashPhotosCommand* _tmp26_ = NULL;
	LibraryWindow* _tmp27_ = NULL;
	LibraryWindow* _tmp28_ = NULL;
#line 2877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2878 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2878 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp0_) {
#line 2879 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 17870 "PhotoPage.c"
	}
#line 2886 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = self->priv->return_page;
#line 2886 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_EVENT_PAGE)) {
#line 17876 "PhotoPage.c"
		LibraryWindow* _tmp2_ = NULL;
		LibraryWindow* _tmp3_ = NULL;
#line 2887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = library_window_get_app ();
#line 2887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp2_;
#line 2887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_window_set_page_switching_enabled (_tmp3_, FALSE);
#line 2887 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp3_);
#line 17887 "PhotoPage.c"
	}
#line 2890 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2890 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_LIBRARY_PHOTO, LibraryPhoto);
#line 2892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 2892 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photos = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection);
#line 2893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = photos;
#line 2893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = photo;
#line 2893 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	gee_collection_add (_tmp6_, _tmp7_);
#line 2896 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_on_next_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 2900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = photo;
#line 2900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 2900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_SOURCE, DataSource));
#line 2900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 2900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp10_);
#line 2900 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp12_) {
#line 17919 "PhotoPage.c"
		LibraryWindow* _tmp13_ = NULL;
		LibraryWindow* _tmp14_ = NULL;
		GtkWindow* _tmp15_ = NULL;
		GtkWindow* _tmp16_ = NULL;
		gboolean _tmp17_ = FALSE;
		LibraryWindow* _tmp20_ = NULL;
		LibraryWindow* _tmp21_ = NULL;
#line 2903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = library_window_get_app ();
#line 2903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_;
#line 2903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_window_set_page_switching_enabled (_tmp14_, TRUE);
#line 2903 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp14_);
#line 2905 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2905 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = _tmp15_;
#line 2905 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, TYPE_FULLSCREEN_WINDOW);
#line 2905 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp16_);
#line 2905 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (_tmp17_) {
#line 17945 "PhotoPage.c"
			GtkWindow* _tmp18_ = NULL;
			FullscreenWindow* _tmp19_ = NULL;
#line 2906 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp18_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2906 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_FULLSCREEN_WINDOW, FullscreenWindow);
#line 2906 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			fullscreen_window_close (_tmp19_);
#line 2906 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			_g_object_unref0 (_tmp19_);
#line 17956 "PhotoPage.c"
		}
#line 2908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = library_window_get_app ();
#line 2908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = _tmp20_;
#line 2908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_window_switch_to_library_page (_tmp21_);
#line 2908 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp21_);
#line 17966 "PhotoPage.c"
	}
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = _tmp22_;
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = photos;
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = trash_untrash_photos_command_new (_tmp24_, TRUE);
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = _tmp25_;
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp23_, G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_COMMAND, Command));
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp26_);
#line 2911 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp23_);
#line 2912 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = library_window_get_app ();
#line 2912 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = _tmp27_;
#line 2912 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_window_set_page_switching_enabled (_tmp28_, TRUE);
#line 2912 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp28_);
#line 2877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photos);
#line 2877 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 17996 "PhotoPage.c"
}


static void library_photo_page_on_flag_unflag (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
#line 2915 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2916 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2916 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 18008 "PhotoPage.c"
		GeeArrayList* photo_list = NULL;
		GeeArrayList* _tmp1_ = NULL;
		GeeArrayList* _tmp2_ = NULL;
		Photo* _tmp3_ = NULL;
		Photo* _tmp4_ = NULL;
		CommandManager* _tmp5_ = NULL;
		CommandManager* _tmp6_ = NULL;
		GeeArrayList* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		LibraryPhoto* _tmp9_ = NULL;
		gboolean _tmp10_ = FALSE;
		FlagUnflagCommand* _tmp11_ = NULL;
		FlagUnflagCommand* _tmp12_ = NULL;
#line 2917 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 2917 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		photo_list = _tmp1_;
#line 2918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = photo_list;
#line 2918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 2918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
#line 2918 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_;
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = photo_list;
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_LIBRARY_PHOTO, LibraryPhoto);
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = flaggable_is_flagged (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_FLAGGABLE, Flaggable));
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = flag_unflag_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), !_tmp10_);
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		command_manager_execute (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_COMMAND, Command));
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp12_);
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp9_);
#line 2919 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_command_manager_unref0 (_tmp6_);
#line 2916 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (photo_list);
#line 18062 "PhotoPage.c"
	}
}


static void library_photo_page_on_photo_destroyed (LibraryPhotoPage* self, DataSource* source) {
	DataSource* _tmp0_ = NULL;
#line 2924 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2924 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 2925 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = source;
#line 2925 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_photo_removed (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_LIBRARY_PHOTO, LibraryPhoto));
#line 18077 "PhotoPage.c"
}


static void library_photo_page_on_photo_removed (LibraryPhotoPage* self, LibraryPhoto* photo) {
	gboolean _tmp0_ = FALSE;
	LibraryPhoto* _tmp1_ = NULL;
	ViewCollection* view = NULL;
	ViewCollection* _tmp6_ = NULL;
	ViewCollection* _tmp7_ = NULL;
	ViewCollection* _tmp8_ = NULL;
	ViewCollection* _tmp9_ = NULL;
	LibraryPhoto* _tmp10_ = NULL;
	DataView* _tmp11_ = NULL;
	DataView* _tmp12_ = NULL;
	Marker* _tmp13_ = NULL;
	Marker* _tmp14_ = NULL;
	LibraryPhoto* _tmp15_ = NULL;
	Photo* _tmp16_ = NULL;
	Photo* _tmp17_ = NULL;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
#line 2928 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2928 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO (photo));
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = photo;
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_ == NULL) {
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 18109 "PhotoPage.c"
	} else {
		LibraryPhoto* _tmp2_ = NULL;
		Photo* _tmp3_ = NULL;
		Photo* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = photo;
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource));
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = !_tmp5_;
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 18127 "PhotoPage.c"
	}
#line 2930 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 2931 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18133 "PhotoPage.c"
	}
#line 2934 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	single_photo_page_on_next_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 2936 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2936 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	view = _tmp6_;
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = view;
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = view;
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = view;
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = photo;
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = view_collection_get_view_for_source (_tmp9_, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_SOURCE, DataSource));
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_OBJECT, DataObject));
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = _tmp13_;
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_COLLECTION, DataCollection), _tmp14_);
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp14_);
#line 2937 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp12_);
#line 2938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = photo;
#line 2938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = _tmp16_;
#line 2938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_SOURCE, DataSource));
#line 2938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = _tmp18_;
#line 2938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp17_);
#line 2938 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp19_) {
#line 18177 "PhotoPage.c"
		LibraryWindow* _tmp20_ = NULL;
		LibraryWindow* _tmp21_ = NULL;
#line 2941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = library_window_get_app ();
#line 2941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = _tmp20_;
#line 2941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		library_window_switch_to_library_page (_tmp21_);
#line 2941 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp21_);
#line 18188 "PhotoPage.c"
	}
#line 2928 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (view);
#line 18192 "PhotoPage.c"
}


static void library_photo_page_on_print (LibraryPhotoPage* self) {
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
#line 2945 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 2946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_selected_count (_tmp1_);
#line 2946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_ > 0;
#line 2946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 2946 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_) {
#line 18215 "PhotoPage.c"
		PrintManager* _tmp4_ = NULL;
		PrintManager* _tmp5_ = NULL;
		ViewCollection* _tmp6_ = NULL;
		ViewCollection* _tmp7_ = NULL;
		GeeList* _tmp8_ = NULL;
		GeeCollection* _tmp9_ = NULL;
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = print_manager_get_instance ();
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = _tmp4_;
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = view_collection_get_selected_sources_of_type (_tmp7_, TYPE_PHOTO);
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection);
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		print_manager_spool_photo (_tmp5_, _tmp9_);
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp9_);
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp7_);
#line 2947 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_print_manager_unref0 (_tmp5_);
#line 18242 "PhotoPage.c"
	}
}


static void library_photo_page_on_external_app_changed (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
#line 2952 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2953 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2953 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp1_) {
#line 18256 "PhotoPage.c"
		ConfigFacade* _tmp2_ = NULL;
		ConfigFacade* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 2954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = config_facade_get_instance ();
#line 2954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = _tmp2_;
#line 2954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = configuration_facade_get_external_photo_app (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 2954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = _tmp4_;
#line 2954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = g_strcmp0 (_tmp5_, "") != 0;
#line 2954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp5_);
#line 2954 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp3_);
#line 18275 "PhotoPage.c"
	} else {
#line 2953 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 18279 "PhotoPage.c"
	}
#line 2953 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ExternalEdit", _tmp0_);
#line 18283 "PhotoPage.c"
}


static void library_photo_page_on_external_edit (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	GError * _inner_error_ = NULL;
#line 2957 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2958 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2958 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp0_) {
#line 2959 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18298 "PhotoPage.c"
	}
	{
		AppWindow* _tmp1_ = NULL;
		AppWindow* _tmp2_ = NULL;
		Photo* _tmp3_ = NULL;
		Photo* _tmp4_ = NULL;
		AppWindow* _tmp5_ = NULL;
		AppWindow* _tmp6_ = NULL;
#line 2962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = app_window_get_instance ();
#line 2962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = _tmp1_;
#line 2962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PAGE_WINDOW, PageWindow));
#line 2962 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp2_);
#line 2963 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2963 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 2963 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		photo_open_with_external_editor (_tmp4_, &_inner_error_);
#line 2963 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 2963 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 18325 "PhotoPage.c"
			goto __catch251_g_error;
		}
#line 2964 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = app_window_get_instance ();
#line 2964 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_;
#line 2964 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_PAGE_WINDOW, PageWindow));
#line 2964 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp6_);
#line 18336 "PhotoPage.c"
	}
	goto __finally251;
	__catch251_g_error:
	{
		GError* err = NULL;
		AppWindow* _tmp7_ = NULL;
		AppWindow* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
		Photo* _tmp10_ = NULL;
		Photo* _tmp11_ = NULL;
#line 2961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		err = _inner_error_;
#line 2961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 2966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = app_window_get_instance ();
#line 2966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 2966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PAGE_WINDOW, PageWindow));
#line 2966 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 2967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = err;
#line 2967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = _tmp10_;
#line 2967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		open_external_editor_error_dialog (_tmp9_, _tmp11_);
#line 2967 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp11_);
#line 2961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (err);
#line 18371 "PhotoPage.c"
	}
	__finally251:
#line 2961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2961 "/home/jens/Source/shotwell/src/PhotoPage.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 2961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 2961 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18382 "PhotoPage.c"
	}
}


static void library_photo_page_on_external_edit_raw (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	Photo* _tmp1_ = NULL;
	Photo* _tmp2_ = NULL;
	PhotoFileFormat _tmp3_ = 0;
	gboolean _tmp4_ = FALSE;
	GError * _inner_error_ = NULL;
#line 2972 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2973 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2973 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp0_) {
#line 2974 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18402 "PhotoPage.c"
	}
#line 2976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 2976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = photo_get_master_file_format (_tmp2_);
#line 2976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_ != PHOTO_FILE_FORMAT_RAW;
#line 2976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 2976 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_) {
#line 2977 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18418 "PhotoPage.c"
	}
	{
		AppWindow* _tmp5_ = NULL;
		AppWindow* _tmp6_ = NULL;
		Photo* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		AppWindow* _tmp9_ = NULL;
		AppWindow* _tmp10_ = NULL;
#line 2980 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = app_window_get_instance ();
#line 2980 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_;
#line 2980 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_PAGE_WINDOW, PageWindow));
#line 2980 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp6_);
#line 2981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 2981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		photo_open_with_raw_external_editor (_tmp8_, &_inner_error_);
#line 2981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 2981 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 18445 "PhotoPage.c"
			goto __catch252_g_error;
		}
#line 2982 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = app_window_get_instance ();
#line 2982 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = _tmp9_;
#line 2982 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_PAGE_WINDOW, PageWindow));
#line 2982 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp10_);
#line 18456 "PhotoPage.c"
	}
	goto __finally252;
	__catch252_g_error:
	{
		GError* err = NULL;
		AppWindow* _tmp11_ = NULL;
		AppWindow* _tmp12_ = NULL;
		GError* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
#line 2979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		err = _inner_error_;
#line 2979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 2984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = app_window_get_instance ();
#line 2984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 2984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PAGE_WINDOW, PageWindow));
#line 2984 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp12_);
#line 2985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = err;
#line 2985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = resources_launch_editor_failed (_tmp13_);
#line 2985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = _tmp14_;
#line 2985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		app_window_error_message (_tmp15_, NULL);
#line 2985 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp15_);
#line 2979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (err);
#line 18491 "PhotoPage.c"
	}
	__finally252:
#line 2979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2979 "/home/jens/Source/shotwell/src/PhotoPage.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 2979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 2979 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18502 "PhotoPage.c"
	}
}


static void library_photo_page_on_send_to (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
#line 2989 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2990 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2990 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 18515 "PhotoPage.c"
		ViewCollection* _tmp1_ = NULL;
		ViewCollection* _tmp2_ = NULL;
		GeeList* _tmp3_ = NULL;
		GeeCollection* _tmp4_ = NULL;
#line 2991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp1_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 2991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = _tmp1_;
#line 2991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp3_ = view_collection_get_selected_sources (_tmp2_);
#line 2991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection);
#line 2991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		desktop_integration_send_to (_tmp4_);
#line 2991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 2991 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp2_);
#line 18534 "PhotoPage.c"
	}
}


static void library_photo_page_on_export (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	ExportDialog* export_dialog = NULL;
	const gchar* _tmp1_ = NULL;
	ExportDialog* _tmp2_ = NULL;
	gint scale = 0;
	ScaleConstraint constraint = 0;
	ExportFormatParameters export_params = {0};
	ExportFormatParameters _tmp3_ = {0};
	ExportDialog* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	ScaleConstraint _tmp6_ = 0;
	gboolean _tmp7_ = FALSE;
	GFile* save_as = NULL;
	Photo* _tmp8_ = NULL;
	Photo* _tmp9_ = NULL;
	ExportFormatParameters _tmp10_ = {0};
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	GFile* _tmp13_ = NULL;
	GFile* _tmp14_ = NULL;
	GFile* _tmp15_ = NULL;
	Scaling scaling = {0};
	ScaleConstraint _tmp16_ = 0;
	gint _tmp17_ = 0;
	Scaling _tmp18_ = {0};
	GError * _inner_error_ = NULL;
#line 2994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 2995 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 2995 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp0_) {
#line 2996 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18574 "PhotoPage.c"
	}
#line 2998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _ ("Export Photo");
#line 2998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = export_dialog_new (_tmp1_);
#line 2998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_object_ref_sink (_tmp2_);
#line 2998 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	export_dialog = _tmp2_;
#line 3002 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	export_format_parameters_last (&_tmp3_);
#line 3002 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	export_params = _tmp3_;
#line 3003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = export_dialog;
#line 3003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = export_dialog_execute (_tmp4_, &_tmp5_, &_tmp6_, &export_params);
#line 3003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scale = _tmp5_;
#line 3003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	constraint = _tmp6_;
#line 3003 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp7_) {
#line 3004 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (export_dialog);
#line 3004 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18602 "PhotoPage.c"
	}
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = export_params;
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = photo_get_export_basename_for_parameters (_tmp9_, &_tmp10_);
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = export_ui_choose_file (_tmp12_);
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = _tmp13_;
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_free0 (_tmp12_);
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp9_);
#line 3006 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	save_as = _tmp14_;
#line 3008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = save_as;
#line 3008 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp15_ == NULL) {
#line 3009 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (save_as);
#line 3009 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (export_dialog);
#line 3009 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18634 "PhotoPage.c"
	}
#line 3011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = constraint;
#line 3011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = scale;
#line 3011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scaling_for_constraint (_tmp16_, _tmp17_, FALSE, &_tmp18_);
#line 3011 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	scaling = _tmp18_;
#line 18644 "PhotoPage.c"
	{
		Photo* _tmp19_ = NULL;
		Photo* _tmp20_ = NULL;
		GFile* _tmp21_ = NULL;
		Scaling _tmp22_ = {0};
		ExportFormatParameters _tmp23_ = {0};
		JpegQuality _tmp24_ = 0;
		Photo* _tmp25_ = NULL;
		Photo* _tmp26_ = NULL;
		ExportFormatParameters _tmp27_ = {0};
		PhotoFileFormat _tmp28_ = 0;
		ExportFormatParameters _tmp29_ = {0};
		ExportFormatMode _tmp30_ = 0;
		ExportFormatParameters _tmp31_ = {0};
		gboolean _tmp32_ = FALSE;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp19_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp20_ = _tmp19_;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp21_ = save_as;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp22_ = scaling;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp23_ = export_params;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp24_ = _tmp23_.quality;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp25_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp26_ = _tmp25_;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp27_ = export_params;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp28_ = photo_get_export_format_for_parameters (_tmp26_, &_tmp27_);
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp29_ = export_params;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp30_ = _tmp29_.mode;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp31_ = export_params;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp32_ = _tmp31_.export_metadata;
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		photo_export (_tmp20_, _tmp21_, &_tmp22_, _tmp24_, _tmp28_, _tmp30_ == EXPORT_FORMAT_MODE_UNMODIFIED, _tmp32_, &_inner_error_);
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp26_);
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp20_);
#line 3014 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 18696 "PhotoPage.c"
			goto __catch253_g_error;
		}
	}
	goto __finally253;
	__catch253_g_error:
	{
		GError* err = NULL;
		const gchar* _tmp33_ = NULL;
		GFile* _tmp34_ = NULL;
		gchar* _tmp35_ = NULL;
		gchar* _tmp36_ = NULL;
		GError* _tmp37_ = NULL;
		const gchar* _tmp38_ = NULL;
		gchar* _tmp39_ = NULL;
		gchar* _tmp40_ = NULL;
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		err = _inner_error_;
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_inner_error_ = NULL;
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp33_ = _ ("Unable to export %s: %s");
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp34_ = save_as;
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp35_ = g_file_get_path (_tmp34_);
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp36_ = _tmp35_;
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp37_ = err;
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp38_ = _tmp37_->message;
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp39_ = g_strdup_printf (_tmp33_, _tmp36_, _tmp38_);
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp40_ = _tmp39_;
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		app_window_error_message (_tmp40_, NULL);
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp40_);
#line 3018 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_free0 (_tmp36_);
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_error_free0 (err);
#line 18740 "PhotoPage.c"
	}
	__finally253:
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (save_as);
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (export_dialog);
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.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 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 3013 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18755 "PhotoPage.c"
	}
#line 2994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (save_as);
#line 2994 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (export_dialog);
#line 18761 "PhotoPage.c"
}


static void library_photo_page_on_publish (LibraryPhotoPage* self) {
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
#line 3022 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 3023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection));
#line 3023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_ > 0;
#line 3023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 3023 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp3_) {
#line 18784 "PhotoPage.c"
		ViewCollection* _tmp4_ = NULL;
		ViewCollection* _tmp5_ = NULL;
		GeeList* _tmp6_ = NULL;
		GeeCollection* _tmp7_ = NULL;
#line 3024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = _tmp4_;
#line 3024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = view_collection_get_selected_sources (_tmp5_);
#line 3024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection);
#line 3024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		publishing_ui_publishing_dialog_go (_tmp7_);
#line 3024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp7_);
#line 3024 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp5_);
#line 18803 "PhotoPage.c"
	}
}


static void library_photo_page_on_increase_rating (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	SetRatingSingleCommand* command = NULL;
	Photo* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	SetRatingSingleCommand* _tmp5_ = NULL;
	SetRatingSingleCommand* _tmp6_ = NULL;
	CommandManager* _tmp7_ = NULL;
	CommandManager* _tmp8_ = NULL;
	SetRatingSingleCommand* _tmp9_ = NULL;
#line 3028 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 3029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 18827 "PhotoPage.c"
	} else {
		gboolean _tmp2_ = FALSE;
#line 3029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp2_;
#line 18834 "PhotoPage.c"
	}
#line 3029 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 3030 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18840 "PhotoPage.c"
	}
#line 3032 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3032 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 3032 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = set_rating_single_command_new_inc_dec (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource), TRUE);
#line 3032 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 3032 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp4_);
#line 3032 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp6_;
#line 3033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 3033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = command;
#line 3033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_COMMAND, Command));
#line 3033 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp8_);
#line 3035 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_rating_menu_item_sensitivity (self);
#line 3028 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 18868 "PhotoPage.c"
}


static void library_photo_page_on_decrease_rating (LibraryPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	SetRatingSingleCommand* command = NULL;
	Photo* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	SetRatingSingleCommand* _tmp5_ = NULL;
	SetRatingSingleCommand* _tmp6_ = NULL;
	CommandManager* _tmp7_ = NULL;
	CommandManager* _tmp8_ = NULL;
	SetRatingSingleCommand* _tmp9_ = NULL;
#line 3038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 3039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 18891 "PhotoPage.c"
	} else {
		gboolean _tmp2_ = FALSE;
#line 3039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp2_;
#line 18898 "PhotoPage.c"
	}
#line 3039 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 3040 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18904 "PhotoPage.c"
	}
#line 3042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 3042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = set_rating_single_command_new_inc_dec (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource), FALSE);
#line 3042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 3042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp4_);
#line 3042 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp6_;
#line 3043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 3043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = command;
#line 3043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp8_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_COMMAND, Command));
#line 3043 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp8_);
#line 3045 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_rating_menu_item_sensitivity (self);
#line 3038 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 18932 "PhotoPage.c"
}


static void library_photo_page_on_set_rating (LibraryPhotoPage* self, Rating rating) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	SetRatingSingleCommand* command = NULL;
	Photo* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	Rating _tmp5_ = 0;
	SetRatingSingleCommand* _tmp6_ = NULL;
	SetRatingSingleCommand* _tmp7_ = NULL;
	CommandManager* _tmp8_ = NULL;
	CommandManager* _tmp9_ = NULL;
	SetRatingSingleCommand* _tmp10_ = NULL;
#line 3048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (!_tmp1_) {
#line 3049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = TRUE;
#line 18956 "PhotoPage.c"
	} else {
		gboolean _tmp2_ = FALSE;
#line 3049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp2_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp2_;
#line 18963 "PhotoPage.c"
	}
#line 3049 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 3050 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 18969 "PhotoPage.c"
	}
#line 3052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 3052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = rating;
#line 3052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = set_rating_single_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource), _tmp5_);
#line 3052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 3052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp4_);
#line 3052 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command = _tmp7_;
#line 3053 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3053 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 3053 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = command;
#line 3053 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp9_, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_COMMAND, Command));
#line 3053 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp9_);
#line 3055 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_update_rating_menu_item_sensitivity (self);
#line 3048 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (command);
#line 18999 "PhotoPage.c"
}


static void library_photo_page_on_rate_rejected (LibraryPhotoPage* self) {
#line 3058 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3059 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_set_rating (self, RATING_REJECTED);
#line 19008 "PhotoPage.c"
}


static void library_photo_page_on_rate_unrated (LibraryPhotoPage* self) {
#line 3062 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3063 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_set_rating (self, RATING_UNRATED);
#line 19017 "PhotoPage.c"
}


static void library_photo_page_on_rate_one (LibraryPhotoPage* self) {
#line 3066 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3067 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_set_rating (self, RATING_ONE);
#line 19026 "PhotoPage.c"
}


static void library_photo_page_on_rate_two (LibraryPhotoPage* self) {
#line 3070 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3071 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_set_rating (self, RATING_TWO);
#line 19035 "PhotoPage.c"
}


static void library_photo_page_on_rate_three (LibraryPhotoPage* self) {
#line 3074 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3075 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_set_rating (self, RATING_THREE);
#line 19044 "PhotoPage.c"
}


static void library_photo_page_on_rate_four (LibraryPhotoPage* self) {
#line 3078 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3079 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_set_rating (self, RATING_FOUR);
#line 19053 "PhotoPage.c"
}


static void library_photo_page_on_rate_five (LibraryPhotoPage* self) {
#line 3082 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3083 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_on_set_rating (self, RATING_FIVE);
#line 19062 "PhotoPage.c"
}


static void library_photo_page_update_rating_menu_item_sensitivity (LibraryPhotoPage* self) {
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	Rating _tmp2_ = 0;
	Photo* _tmp3_ = NULL;
	Photo* _tmp4_ = NULL;
	Rating _tmp5_ = 0;
	Photo* _tmp6_ = NULL;
	Photo* _tmp7_ = NULL;
	Rating _tmp8_ = 0;
	Photo* _tmp9_ = NULL;
	Photo* _tmp10_ = NULL;
	Rating _tmp11_ = 0;
	Photo* _tmp12_ = NULL;
	Photo* _tmp13_ = NULL;
	Rating _tmp14_ = 0;
	Photo* _tmp15_ = NULL;
	Photo* _tmp16_ = NULL;
	Rating _tmp17_ = 0;
	Photo* _tmp18_ = NULL;
	Photo* _tmp19_ = NULL;
	Rating _tmp20_ = 0;
	Photo* _tmp21_ = NULL;
	Photo* _tmp22_ = NULL;
	Rating _tmp23_ = 0;
	gboolean _tmp24_ = FALSE;
	Photo* _tmp25_ = NULL;
	Photo* _tmp26_ = NULL;
	Rating _tmp27_ = 0;
	gboolean _tmp28_ = FALSE;
#line 3086 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3087 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3087 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 3087 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3087 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateRejected", _tmp2_ != RATING_REJECTED);
#line 3087 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 3088 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3088 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = _tmp3_;
#line 3088 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3088 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateUnrated", _tmp5_ != RATING_UNRATED);
#line 3088 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp4_);
#line 3089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = _tmp6_;
#line 3089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateOne", _tmp8_ != RATING_ONE);
#line 3089 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp7_);
#line 3090 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3090 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = _tmp9_;
#line 3090 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3090 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateTwo", _tmp11_ != RATING_TWO);
#line 3090 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp10_);
#line 3091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = _tmp12_;
#line 3091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateThree", _tmp14_ != RATING_THREE);
#line 3091 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp13_);
#line 3092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = _tmp15_;
#line 3092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp17_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateFour", _tmp17_ != RATING_FOUR);
#line 3092 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp16_);
#line 3093 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp18_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3093 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp19_ = _tmp18_;
#line 3093 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp20_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3093 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RateFive", _tmp20_ != RATING_FIVE);
#line 3093 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp19_);
#line 3094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp21_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp22_ = _tmp21_;
#line 3094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp23_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp24_ = rating_can_increase (_tmp23_);
#line 3094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseRating", _tmp24_);
#line 3094 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp22_);
#line 3095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp25_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp26_ = _tmp25_;
#line 3095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp27_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp28_ = rating_can_decrease (_tmp27_);
#line 3095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseRating", _tmp28_);
#line 3095 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp26_);
#line 19192 "PhotoPage.c"
}


static GVariant* _variant_new18 (const gchar* value) {
#line 3107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return g_variant_ref_sink (g_variant_new_string (value));
#line 19199 "PhotoPage.c"
}


static GVariant* _variant_new19 (const gchar* value) {
#line 3112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return g_variant_ref_sink (g_variant_new_string (value));
#line 19206 "PhotoPage.c"
}


static void library_photo_page_update_development_menu_item_sensitivity (LibraryPhotoPage* self) {
	PhotoFileFormat format = 0;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	PhotoFileFormat _tmp2_ = 0;
	PhotoFileFormat _tmp3_ = 0;
	PhotoFileFormat _tmp4_ = 0;
	PhotoFileFormat _tmp5_ = 0;
#line 3098 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3099 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3099 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 3099 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = photo_get_master_file_format (_tmp1_);
#line 3099 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 3099 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 3099 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	format = _tmp3_;
#line 3100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = format;
#line 3100 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RawDeveloper", _tmp4_ == PHOTO_FILE_FORMAT_RAW);
#line 3102 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = format;
#line 3102 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_ == PHOTO_FILE_FORMAT_RAW) {
#line 19240 "PhotoPage.c"
		Photo* _tmp6_ = NULL;
		Photo* _tmp7_ = NULL;
		RawDeveloper _tmp8_ = 0;
		RawDeveloper _tmp9_ = 0;
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = photo_get_raw_developer (_tmp7_);
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = _tmp8_;
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp7_);
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		switch (_tmp9_) {
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			case RAW_DEVELOPER_SHOTWELL:
#line 19259 "PhotoPage.c"
			{
				GAction* _tmp10_ = NULL;
				GAction* _tmp11_ = NULL;
				GVariant* _tmp12_ = NULL;
#line 3107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp10_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RawDeveloper");
#line 3107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp11_ = _tmp10_;
#line 3107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp12_ = _variant_new18 ("Shotwell");
#line 3107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				g_action_change_state (_tmp11_, _tmp12_);
#line 3107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_variant_unref0 (_tmp12_);
#line 3107 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (_tmp11_);
#line 3108 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 19278 "PhotoPage.c"
			}
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			case RAW_DEVELOPER_CAMERA:
#line 3105 "/home/jens/Source/shotwell/src/PhotoPage.vala"
			case RAW_DEVELOPER_EMBEDDED:
#line 19284 "PhotoPage.c"
			{
				GAction* _tmp13_ = NULL;
				GAction* _tmp14_ = NULL;
				GVariant* _tmp15_ = NULL;
#line 3112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp13_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RawDeveloper");
#line 3112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp14_ = _tmp13_;
#line 3112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_tmp15_ = _variant_new19 ("Camera");
#line 3112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				g_action_change_state (_tmp14_, _tmp15_);
#line 3112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_variant_unref0 (_tmp15_);
#line 3112 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				_g_object_unref0 (_tmp14_);
#line 3113 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				break;
#line 19303 "PhotoPage.c"
			}
			default:
			{
#line 3116 "/home/jens/Source/shotwell/src/PhotoPage.vala"
				g_assert_not_reached ();
#line 19309 "PhotoPage.c"
			}
		}
	}
}


static void library_photo_page_on_metadata_altered (LibraryPhotoPage* self, GeeMap* map) {
	gboolean _tmp0_ = FALSE;
	GeeMap* _tmp1_ = NULL;
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
#line 3121 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3121 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (GEE_IS_MAP (map));
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = map;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = gee_map_has_key (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject));
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp5_) {
#line 19341 "PhotoPage.c"
		GeeMap* _tmp6_ = NULL;
		Photo* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		gpointer _tmp9_ = NULL;
		Alteration* _tmp10_ = NULL;
		gboolean _tmp11_ = FALSE;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = map;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = gee_map_get (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_OBJECT, DataObject));
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp10_ = (Alteration*) _tmp9_;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = alteration_has_subject (_tmp10_, "metadata");
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = _tmp11_;
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_alteration_unref0 (_tmp10_);
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 19366 "PhotoPage.c"
	} else {
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp0_ = FALSE;
#line 19370 "PhotoPage.c"
	}
#line 3122 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp0_) {
#line 3123 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		single_photo_page_repaint (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), NULL);
#line 19376 "PhotoPage.c"
	}
}


static void library_photo_page_on_add_tags (LibraryPhotoPage* self) {
	AddTagsDialog* dialog = NULL;
	AddTagsDialog* _tmp0_ = NULL;
	gchar** names = NULL;
	AddTagsDialog* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gchar** _tmp3_ = NULL;
	gint names_length1 = 0;
	gint _names_size_ = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 3126 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3127 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = add_tags_dialog_new ();
#line 3127 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dialog = _tmp0_;
#line 3128 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = dialog;
#line 3128 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = add_tags_dialog_execute (_tmp1_, &_tmp2_);
#line 3128 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	names = _tmp3_;
#line 3128 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	names_length1 = _tmp2_;
#line 3128 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_names_size_ = names_length1;
#line 3129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = names;
#line 3129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4__length1 = names_length1;
#line 3129 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp4_ != NULL) {
#line 19414 "PhotoPage.c"
		CommandManager* _tmp5_ = NULL;
		CommandManager* _tmp6_ = NULL;
		HierarchicalTagIndex* _tmp7_ = NULL;
		HierarchicalTagIndex* _tmp8_ = NULL;
		gchar** _tmp9_ = NULL;
		gint _tmp9__length1 = 0;
		gint _tmp10_ = 0;
		gchar** _tmp11_ = NULL;
		gchar** _tmp12_ = NULL;
		gint _tmp12__length1 = 0;
		ViewCollection* _tmp13_ = NULL;
		ViewCollection* _tmp14_ = NULL;
		GeeList* _tmp15_ = NULL;
		GeeCollection* _tmp16_ = NULL;
		AddTagsCommand* _tmp17_ = NULL;
		AddTagsCommand* _tmp18_ = NULL;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp5_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp6_ = _tmp5_;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp7_ = hierarchical_tag_index_get_global_index ();
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9_ = names;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp9__length1 = names_length1;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp11_ = hierarchical_tag_index_get_paths_for_names_array (_tmp8_, _tmp9_, _tmp9__length1, &_tmp10_);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = _tmp11_;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12__length1 = _tmp10_;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp13_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp14_ = _tmp13_;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp15_ = view_collection_get_selected_sources (_tmp14_);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp16_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp17_ = add_tags_command_new (_tmp12_, _tmp10_, _tmp16_);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp18_ = _tmp17_;
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		command_manager_execute (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_COMMAND, Command));
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp18_);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (_tmp16_);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_data_collection_unref0 (_tmp14_);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_tmp12_ = (_vala_array_free (_tmp12_, _tmp12__length1, (GDestroyNotify) g_free), NULL);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_hierarchical_tag_index_unref0 (_tmp8_);
#line 3130 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_command_manager_unref0 (_tmp6_);
#line 19475 "PhotoPage.c"
	}
#line 3126 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	names = (_vala_array_free (names, names_length1, (GDestroyNotify) g_free), NULL);
#line 3126 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_text_entry_dialog_mediator_unref0 (dialog);
#line 19481 "PhotoPage.c"
}


static void library_photo_page_on_modify_tags (LibraryPhotoPage* self) {
	LibraryPhoto* photo = NULL;
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	DataView* _tmp2_ = NULL;
	DataView* _tmp3_ = NULL;
	DataSource* _tmp4_ = NULL;
	LibraryPhoto* _tmp5_ = NULL;
	ModifyTagsDialog* dialog = NULL;
	LibraryPhoto* _tmp6_ = NULL;
	ModifyTagsDialog* _tmp7_ = NULL;
	GeeArrayList* new_tags = NULL;
	ModifyTagsDialog* _tmp8_ = NULL;
	GeeArrayList* _tmp9_ = NULL;
	GeeArrayList* _tmp10_ = NULL;
	CommandManager* _tmp11_ = NULL;
	CommandManager* _tmp12_ = NULL;
	LibraryPhoto* _tmp13_ = NULL;
	GeeArrayList* _tmp14_ = NULL;
	ModifyTagsCommand* _tmp15_ = NULL;
	ModifyTagsCommand* _tmp16_ = NULL;
#line 3136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_if_fail (IS_LIBRARY_PHOTO_PAGE (self));
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = view_collection_get_selected_at (_tmp1_, 0);
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = data_view_get_source (_tmp3_);
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_LIBRARY_PHOTO, LibraryPhoto);
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 3137 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	photo = _tmp5_;
#line 3139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp6_ = photo;
#line 3139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp7_ = modify_tags_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource));
#line 3139 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	dialog = _tmp7_;
#line 3140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp8_ = dialog;
#line 3140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp9_ = modify_tags_dialog_execute (_tmp8_);
#line 3140 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	new_tags = _tmp9_;
#line 3142 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp10_ = new_tags;
#line 3142 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	if (_tmp10_ == NULL) {
#line 3143 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (new_tags);
#line 3143 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_text_entry_dialog_mediator_unref0 (dialog);
#line 3143 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		_g_object_unref0 (photo);
#line 3143 "/home/jens/Source/shotwell/src/PhotoPage.vala"
		return;
#line 19550 "PhotoPage.c"
	}
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp11_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp13_ = photo;
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp14_ = new_tags;
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp15_ = modify_tags_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_MEDIA_SOURCE, MediaSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_COLLECTION, GeeCollection));
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp16_ = _tmp15_;
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	command_manager_execute (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_COMMAND, Command));
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp16_);
#line 3145 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_command_manager_unref0 (_tmp12_);
#line 3136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (new_tags);
#line 3136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_text_entry_dialog_mediator_unref0 (dialog);
#line 3136 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (photo);
#line 19576 "PhotoPage.c"
}


static gboolean library_photo_page_library_photo_page_view_filter_real_predicate (ViewFilter* base, DataView* view) {
	LibraryPhotoPageLibraryPhotoPageViewFilter * self;
	gboolean result = FALSE;
	DataView* _tmp0_ = NULL;
	DataSource* _tmp1_ = NULL;
	MediaSource* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
#line 2335 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER, LibraryPhotoPageLibraryPhotoPageViewFilter);
#line 2335 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_return_val_if_fail (IS_DATA_VIEW (view), FALSE);
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = view;
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp1_ = data_view_get_source (_tmp0_);
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource);
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp3_ = media_source_is_trashed (_tmp2_);
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = !_tmp3_;
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp2_);
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	result = _tmp4_;
#line 2336 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return result;
#line 19608 "PhotoPage.c"
}


static LibraryPhotoPageLibraryPhotoPageViewFilter* library_photo_page_library_photo_page_view_filter_construct (GType object_type) {
	LibraryPhotoPageLibraryPhotoPageViewFilter* self = NULL;
#line 2334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = (LibraryPhotoPageLibraryPhotoPageViewFilter*) view_filter_construct (object_type);
#line 2334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return self;
#line 19618 "PhotoPage.c"
}


static LibraryPhotoPageLibraryPhotoPageViewFilter* library_photo_page_library_photo_page_view_filter_new (void) {
#line 2334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	return library_photo_page_library_photo_page_view_filter_construct (LIBRARY_PHOTO_PAGE_TYPE_LIBRARY_PHOTO_PAGE_VIEW_FILTER);
#line 19625 "PhotoPage.c"
}


static void library_photo_page_library_photo_page_view_filter_class_init (LibraryPhotoPageLibraryPhotoPageViewFilterClass * klass) {
#line 2334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_library_photo_page_view_filter_parent_class = g_type_class_peek_parent (klass);
#line 2334 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((ViewFilterClass *) klass)->predicate = (gboolean (*)(ViewFilter*, DataView*)) library_photo_page_library_photo_page_view_filter_real_predicate;
#line 19634 "PhotoPage.c"
}


static void library_photo_page_library_photo_page_view_filter_instance_init (LibraryPhotoPageLibraryPhotoPageViewFilter * self) {
}


static GType library_photo_page_library_photo_page_view_filter_get_type (void) {
	static volatile gsize library_photo_page_library_photo_page_view_filter_type_id__volatile = 0;
	if (g_once_init_enter (&library_photo_page_library_photo_page_view_filter_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LibraryPhotoPageLibraryPhotoPageViewFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_photo_page_library_photo_page_view_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryPhotoPageLibraryPhotoPageViewFilter), 0, (GInstanceInitFunc) library_photo_page_library_photo_page_view_filter_instance_init, NULL };
		GType library_photo_page_library_photo_page_view_filter_type_id;
		library_photo_page_library_photo_page_view_filter_type_id = g_type_register_static (TYPE_VIEW_FILTER, "LibraryPhotoPageLibraryPhotoPageViewFilter", &g_define_type_info, 0);
		g_once_init_leave (&library_photo_page_library_photo_page_view_filter_type_id__volatile, library_photo_page_library_photo_page_view_filter_type_id);
	}
	return library_photo_page_library_photo_page_view_filter_type_id__volatile;
}


static void library_photo_page_class_init (LibraryPhotoPageClass * klass) {
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	library_photo_page_parent_class = g_type_class_peek_parent (klass);
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_type_class_add_private (klass, sizeof (LibraryPhotoPagePrivate));
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->init_collect_ui_filenames = (void (*)(Page*, GeeList*)) library_photo_page_real_init_collect_ui_filenames;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->add_actions = (void (*)(Page*, GActionMap*)) library_photo_page_real_add_actions;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->remove_actions = (void (*)(Page*, GActionMap*)) library_photo_page_real_remove_actions;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->init_collect_injection_groups = (InjectionGroup** (*)(Page*, int*)) library_photo_page_real_init_collect_injection_groups;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->update_actions = (void (*)(Page*, gint, gint)) library_photo_page_real_update_actions;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((LibraryPhotoPageClass *) klass)->developer_changed = (void (*)(LibraryPhotoPage*, RawDeveloper)) library_photo_page_real_developer_changed;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->switched_to = (void (*)(Page*)) library_photo_page_real_switched_to;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->switching_from = (void (*)(Page*)) library_photo_page_real_switching_from;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->get_bottom_left_trinket = (GdkPixbuf* (*)(EditingHostPage*, gint)) library_photo_page_real_get_bottom_left_trinket;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->get_top_right_trinket = (GdkPixbuf* (*)(EditingHostPage*, gint)) library_photo_page_real_get_top_right_trinket;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_increase_size = (void (*)(EditingHostPage*)) library_photo_page_real_on_increase_size;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_decrease_size = (void (*)(EditingHostPage*)) library_photo_page_real_on_decrease_size;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_zoom_slider_key_press = (gboolean (*)(EditingHostPage*, GdkEventKey*)) library_photo_page_real_on_zoom_slider_key_press;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->update_ui = (void (*)(EditingHostPage*, gboolean)) library_photo_page_real_update_ui;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->notify_photo_backing_missing = (void (*)(EditingHostPage*, Photo*, gboolean)) library_photo_page_real_notify_photo_backing_missing;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((GtkWidgetClass *) klass)->key_press_event = (gboolean (*)(GtkWidget*, GdkEventKey*)) library_photo_page_real_key_press_event;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((EditingHostPageClass *) klass)->on_double_click = (gboolean (*)(EditingHostPage*, GdkEventButton*)) library_photo_page_real_on_double_click;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_left_released = (gboolean (*)(Page*, GdkEventButton*)) library_photo_page_real_on_left_released;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_context_buttonpress = (gboolean (*)(Page*, GdkEventButton*)) library_photo_page_real_on_context_buttonpress;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	((PageClass *) klass)->on_context_keypress = (gboolean (*)(Page*)) library_photo_page_real_on_context_keypress;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	G_OBJECT_CLASS (klass)->finalize = library_photo_page_finalize;
#line 19701 "PhotoPage.c"
}


static void library_photo_page_instance_init (LibraryPhotoPage * self) {
	LibraryPhotoPageLibraryPhotoPageViewFilter* _tmp0_ = NULL;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv = LIBRARY_PHOTO_PAGE_GET_PRIVATE (self);
#line 2340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->return_page = NULL;
#line 2341 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->return_to_collection_on_release = FALSE;
#line 2342 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = library_photo_page_library_photo_page_view_filter_new ();
#line 2342 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self->priv->filter = _tmp0_;
#line 19717 "PhotoPage.c"
}


static void library_photo_page_finalize (GObject* obj) {
	LibraryPhotoPage * self;
	LibraryPhotoSourceCollection* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	LibraryPhotoSourceCollection* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	ConfigFacade* _tmp4_ = NULL;
	ConfigFacade* _tmp5_ = NULL;
	guint _tmp6_ = 0U;
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_LIBRARY_PHOTO_PAGE, LibraryPhotoPage);
#line 2364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp0_ = library_photo_global;
#line 2364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE);
#line 2364 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _library_photo_page_on_photo_destroyed_source_collection_item_destroyed, self);
#line 2365 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp2_ = library_photo_global;
#line 2365 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp3_, NULL, FALSE);
#line 2365 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _library_photo_page_on_metadata_altered_data_collection_items_altered, self);
#line 2366 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp4_ = config_facade_get_instance ();
#line 2366 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_tmp5_ = _tmp4_;
#line 2366 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_parse_name ("external-app-changed", TYPE_CONFIGURATION_FACADE, &_tmp6_, NULL, FALSE);
#line 2366 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _library_photo_page_on_external_app_changed_configuration_facade_external_app_changed, self);
#line 2366 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (_tmp5_);
#line 2340 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->return_page);
#line 2342 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_view_filter_unref0 (self->priv->filter);
#line 2835 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	_g_object_unref0 (self->priv->context_menu);
#line 2332 "/home/jens/Source/shotwell/src/PhotoPage.vala"
	G_OBJECT_CLASS (library_photo_page_parent_class)->finalize (obj);
#line 19762 "PhotoPage.c"
}


GType library_photo_page_get_type (void) {
	static volatile gsize library_photo_page_type_id__volatile = 0;
	if (g_once_init_enter (&library_photo_page_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LibraryPhotoPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_photo_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryPhotoPage), 0, (GInstanceInitFunc) library_photo_page_instance_init, NULL };
		GType library_photo_page_type_id;
		library_photo_page_type_id = g_type_register_static (TYPE_EDITING_HOST_PAGE, "LibraryPhotoPage", &g_define_type_info, 0);
		g_once_init_leave (&library_photo_page_type_id__volatile, library_photo_page_type_id);
	}
	return library_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);
}